| 1 |
#LyX 1.4.3 created this file. For more info see http://www.lyx.org/ |
| 2 |
\lyxformat 245 |
| 3 |
\begin_document |
| 4 |
\begin_header |
| 5 |
\textclass book |
| 6 |
\begin_preamble |
| 7 |
\usepackage[bookmarks,bookmarksnumbered=true]{hyperref} |
| 8 |
\usepackage{lmodern} |
| 9 |
\usepackage{color} |
| 10 |
\definecolor{darkred}{rgb}{0.55,0,0} |
| 11 |
|
| 12 |
\usepackage{listings} |
| 13 |
|
| 14 |
\lstdefinelanguage{ascend}{ |
| 15 |
morekeywords=[1]{ |
| 16 |
REQUIRE,IMPORT, |
| 17 |
ATOM,MODEL,METHOD,METHODS, |
| 18 |
UNIVERSAL,CONSTANT,DIMENSION,DEFAULT, |
| 19 |
END,FOR,CREATE,DO,EXTERNAL, |
| 20 |
CONDITIONAL,SATISFIED,WHEN,CASE,OTHERWISE,TRUE, |
| 21 |
FALSE,SELF, |
| 22 |
}, |
| 23 |
morekeywords=[2]{ |
| 24 |
REFINES,IS_A,WILL_BE,ALIASES,INPUT,OUTPUT,DATA, |
| 25 |
FIX,FREE,RUN,ARE_THE_SAME |
| 26 |
}, |
| 27 |
morekeywords=[3]{ |
| 28 |
solver_var,integer_constant |
| 29 |
}, |
| 30 |
sensitive=true, |
| 31 |
morecomment=[s]{(*}{*)}, |
| 32 |
morestring=[b]', |
| 33 |
morestring=[b]", |
| 34 |
} |
| 35 |
|
| 36 |
\lstset{ |
| 37 |
basicstyle=\ttfamily, |
| 38 |
commentstyle=\color{blue}, |
| 39 |
keywordstyle=\color{darkred}, |
| 40 |
} |
| 41 |
\end_preamble |
| 42 |
\language english |
| 43 |
\inputencoding auto |
| 44 |
\fontscheme default |
| 45 |
\graphics default |
| 46 |
\paperfontsize default |
| 47 |
\spacing single |
| 48 |
\papersize a4paper |
| 49 |
\use_geometry false |
| 50 |
\use_amsmath 2 |
| 51 |
\cite_engine basic |
| 52 |
\use_bibtopic false |
| 53 |
\paperorientation portrait |
| 54 |
\secnumdepth 3 |
| 55 |
\tocdepth 3 |
| 56 |
\paragraph_separation indent |
| 57 |
\defskip medskip |
| 58 |
\quotes_language english |
| 59 |
\papercolumns 1 |
| 60 |
\papersides 2 |
| 61 |
\paperpagestyle default |
| 62 |
\tracking_changes false |
| 63 |
\output_changes true |
| 64 |
\end_header |
| 65 |
|
| 66 |
\begin_body |
| 67 |
|
| 68 |
\begin_layout Chapter |
| 69 |
Vessel Model for Beginners |
| 70 |
\begin_inset LatexCommand \label{cha:model1} |
| 71 |
|
| 72 |
\end_inset |
| 73 |
|
| 74 |
|
| 75 |
\end_layout |
| 76 |
|
| 77 |
\begin_layout Standard |
| 78 |
You read our propaganda about the ASCEND system in which we said it was |
| 79 |
to help technical people create hard models. |
| 80 |
We said you can tackle really large models -- 100,000 equations, compiling |
| 81 |
and solving them in minutes on a PC. |
| 82 |
We also pointed out that you can readily solve the small problems many |
| 83 |
currently solve using a spreadsheet, only once posed you can solve them |
| 84 |
inside out, upside down and backwards. |
| 85 |
|
| 86 |
\end_layout |
| 87 |
|
| 88 |
\begin_layout Standard |
| 89 |
This sounded intriguing so you downloaded the system and installed it. |
| 90 |
Hopefully, this proved quite straight forward. |
| 91 |
You double-clicked the ASCEND icon on your desktop and started it up for |
| 92 |
the first time. |
| 93 |
Four windows opened up. |
| 94 |
You panicked. |
| 95 |
|
| 96 |
\end_layout |
| 97 |
|
| 98 |
\begin_layout Standard |
| 99 |
Who wouldn't? |
| 100 |
\end_layout |
| 101 |
|
| 102 |
\begin_layout Standard |
| 103 |
To use this system properly requires that you learn how to use it. |
| 104 |
If you pay the price to do so - and we hope it is not a large price, then |
| 105 |
we believe you will find the tools we have provided to help you create |
| 106 |
and debug models will pay you back handsomely. |
| 107 |
|
| 108 |
\end_layout |
| 109 |
|
| 110 |
\begin_layout Standard |
| 111 |
This chapter |
| 112 |
\noun off |
| 113 |
and the next two chapters ( |
| 114 |
\noun default |
| 115 |
Chapter |
| 116 |
\noun off |
| 117 |
|
| 118 |
\begin_inset LatexCommand \ref{cha:model2} |
| 119 |
|
| 120 |
\end_inset |
| 121 |
|
| 122 |
and |
| 123 |
\noun default |
| 124 |
Chapter |
| 125 |
\noun off |
| 126 |
|
| 127 |
\begin_inset LatexCommand \ref{cha:model3} |
| 128 |
|
| 129 |
\end_inset |
| 130 |
|
| 131 |
) |
| 132 |
\noun default |
| 133 |
|
| 134 |
\noun off |
| 135 |
are meant to be a good first step along the path to learning how to use |
| 136 |
ASCEND. |
| 137 |
We |
| 138 |
\noun default |
| 139 |
will |
| 140 |
\noun off |
| 141 |
lead you through the steps for creating and testing a simple model. |
| 142 |
You will also learn how to improve this model so it may be more readily |
| 143 |
shared with others. |
| 144 |
We will present our reasons for the steps we take. |
| 145 |
We |
| 146 |
\noun default |
| 147 |
will |
| 148 |
\noun off |
| 149 |
show you all the buttons you should push as you proceed. |
| 150 |
\end_layout |
| 151 |
|
| 152 |
\begin_layout Standard |
| 153 |
We strongly suggest you put time aside and go through all three of these |
| 154 |
early chapters to introduce yourself to ASCEND. |
| 155 |
It should take you about two to three hours. |
| 156 |
The second chapter is particularly important if you wish to understand |
| 157 |
our approach to good modeling practices. |
| 158 |
\end_layout |
| 159 |
|
| 160 |
\begin_layout Standard |
| 161 |
\begin_inset Marginal |
| 162 |
status collapsed |
| 163 |
|
| 164 |
\begin_layout Standard |
| 165 |
the problem |
| 166 |
\end_layout |
| 167 |
|
| 168 |
\end_inset |
| 169 |
|
| 170 |
Step 1: |
| 171 |
\emph on |
| 172 |
We are going to create and test an ASCEND model to compute, the mass of |
| 173 |
the metal in the sides and ends of the thin-walled cylindrical vessel |
| 174 |
\emph default |
| 175 |
|
| 176 |
\begin_inset LatexCommand \index{vessel} |
| 177 |
|
| 178 |
\end_inset |
| 179 |
|
| 180 |
|
| 181 |
\emph on |
| 182 |
shown in Figure |
| 183 |
\begin_inset LatexCommand \ref{fig:model1.thinWalledVessel} |
| 184 |
|
| 185 |
\end_inset |
| 186 |
|
| 187 |
. |
| 188 |
|
| 189 |
\end_layout |
| 190 |
|
| 191 |
\begin_layout Standard |
| 192 |
\begin_inset Float figure |
| 193 |
wide false |
| 194 |
sideways false |
| 195 |
status open |
| 196 |
|
| 197 |
\begin_layout Standard |
| 198 |
|
| 199 |
\noun off |
| 200 |
\InsetSpace ~ |
| 201 |
\InsetSpace ~ |
| 202 |
\InsetSpace ~ |
| 203 |
\InsetSpace ~ |
| 204 |
\InsetSpace ~ |
| 205 |
\InsetSpace ~ |
| 206 |
\InsetSpace ~ |
| 207 |
\InsetSpace ~ |
| 208 |
\InsetSpace ~ |
| 209 |
\InsetSpace ~ |
| 210 |
\InsetSpace ~ |
| 211 |
\InsetSpace ~ |
| 212 |
\InsetSpace ~ |
| 213 |
\InsetSpace ~ |
| 214 |
\InsetSpace ~ |
| 215 |
\InsetSpace ~ |
| 216 |
\InsetSpace ~ |
| 217 |
\InsetSpace ~ |
| 218 |
\InsetSpace ~ |
| 219 |
\InsetSpace ~ |
| 220 |
\InsetSpace ~ |
| 221 |
\InsetSpace ~ |
| 222 |
\InsetSpace ~ |
| 223 |
\InsetSpace ~ |
| 224 |
\InsetSpace ~ |
| 225 |
\InsetSpace ~ |
| 226 |
\InsetSpace ~ |
| 227 |
\InsetSpace ~ |
| 228 |
\InsetSpace ~ |
| 229 |
\InsetSpace ~ |
| 230 |
\InsetSpace ~ |
| 231 |
\InsetSpace ~ |
| 232 |
|
| 233 |
\begin_inset Graphics |
| 234 |
filename howto-model1Fig1.eps |
| 235 |
BoundingBox 0bp 0bp 280bp 260bp |
| 236 |
|
| 237 |
\end_inset |
| 238 |
|
| 239 |
|
| 240 |
\end_layout |
| 241 |
|
| 242 |
\begin_layout Caption |
| 243 |
A thin-walled cylindrical vessel with flat ends |
| 244 |
\begin_inset LatexCommand \label{fig:model1.thinWalledVessel} |
| 245 |
|
| 246 |
\end_inset |
| 247 |
|
| 248 |
|
| 249 |
\end_layout |
| 250 |
|
| 251 |
\end_inset |
| 252 |
|
| 253 |
|
| 254 |
\end_layout |
| 255 |
|
| 256 |
\begin_layout Standard |
| 257 |
Step 2: |
| 258 |
\emph on |
| 259 |
This model is to become a part of a library of models which others can use |
| 260 |
in the future. |
| 261 |
You must document it. |
| 262 |
You must add methods to it to make it easy for others to make it well-posed. |
| 263 |
You should probably parameterize it, and finally you must create a script |
| 264 |
which anyone can easily run that solves an example problem to illustrate |
| 265 |
its use. |
| 266 |
\end_layout |
| 267 |
|
| 268 |
\begin_layout Standard |
| 269 |
\begin_inset Marginal |
| 270 |
status collapsed |
| 271 |
|
| 272 |
\begin_layout Standard |
| 273 |
topics covered |
| 274 |
\end_layout |
| 275 |
|
| 276 |
\end_inset |
| 277 |
|
| 278 |
Topics covered in this and the following two chapters are: |
| 279 |
\end_layout |
| 280 |
|
| 281 |
\begin_layout Itemize |
| 282 |
\begin_inset Marginal |
| 283 |
status collapsed |
| 284 |
|
| 285 |
\begin_layout Standard |
| 286 |
T |
| 287 |
\noun off |
| 288 |
his chapter) |
| 289 |
\end_layout |
| 290 |
|
| 291 |
\end_inset |
| 292 |
|
| 293 |
Converting the word description to an ASCEND model. |
| 294 |
\end_layout |
| 295 |
|
| 296 |
\begin_layout Itemize |
| 297 |
Loading the model into ASCEND, dealing with the error messages. |
| 298 |
\end_layout |
| 299 |
|
| 300 |
\begin_layout Itemize |
| 301 |
Compiling the model. |
| 302 |
\end_layout |
| 303 |
|
| 304 |
\begin_layout Itemize |
| 305 |
Browsing the model to see if it looks right |
| 306 |
\end_layout |
| 307 |
|
| 308 |
\begin_layout Itemize |
| 309 |
Solving the model. |
| 310 |
\end_layout |
| 311 |
|
| 312 |
\begin_layout Itemize |
| 313 |
Examining the results. |
| 314 |
\end_layout |
| 315 |
|
| 316 |
\begin_layout Itemize |
| 317 |
More thoroughly testing the model. |
| 318 |
\end_layout |
| 319 |
|
| 320 |
\begin_layout Itemize |
| 321 |
\begin_inset Marginal |
| 322 |
status collapsed |
| 323 |
|
| 324 |
\begin_layout Standard |
| 325 |
Chapter\InsetSpace ~ |
| 326 |
|
| 327 |
\begin_inset LatexCommand \vref{cha:model2} |
| 328 |
|
| 329 |
\end_inset |
| 330 |
|
| 331 |
|
| 332 |
\end_layout |
| 333 |
|
| 334 |
\end_inset |
| 335 |
|
| 336 |
Converting the model to a more reusable form by adding methods to it and |
| 337 |
by parameterizing it. |
| 338 |
\end_layout |
| 339 |
|
| 340 |
\begin_layout Itemize |
| 341 |
Creating a script to load and execute an instance of the model. |
| 342 |
\end_layout |
| 343 |
|
| 344 |
\begin_layout Itemize |
| 345 |
\begin_inset Marginal |
| 346 |
status collapsed |
| 347 |
|
| 348 |
\begin_layout Standard |
| 349 |
Chapter\InsetSpace ~ |
| 350 |
|
| 351 |
\begin_inset LatexCommand \vref{cha:model3} |
| 352 |
|
| 353 |
\end_inset |
| 354 |
|
| 355 |
|
| 356 |
\end_layout |
| 357 |
|
| 358 |
\end_inset |
| 359 |
|
| 360 |
Creating an array of models. |
| 361 |
\end_layout |
| 362 |
|
| 363 |
\begin_layout Itemize |
| 364 |
Using an existing library model for plotting. |
| 365 |
\end_layout |
| 366 |
|
| 367 |
\begin_layout Itemize |
| 368 |
Creating a case study using the model. |
| 369 |
\end_layout |
| 370 |
|
| 371 |
\begin_layout Standard |
| 372 |
We shall introduce many of the features of the modeling language as well |
| 373 |
as the use of the interactive interface you use when compiling, debugging, |
| 374 |
solving and exploring your model. |
| 375 |
Language features include units conversion, arrays and sets. |
| 376 |
\end_layout |
| 377 |
|
| 378 |
\begin_layout Section |
| 379 |
Converting the word description into an ASCEND model |
| 380 |
\begin_inset LatexCommand \label{sec:model1.converting-the-word} |
| 381 |
|
| 382 |
\end_inset |
| 383 |
|
| 384 |
|
| 385 |
\end_layout |
| 386 |
|
| 387 |
\begin_layout Standard |
| 388 |
\begin_inset Marginal |
| 389 |
status collapsed |
| 390 |
|
| 391 |
\begin_layout Standard |
| 392 |
an ASCEND model is a type |
| 393 |
\begin_inset LatexCommand \index{type} |
| 394 |
|
| 395 |
\end_inset |
| 396 |
|
| 397 |
definition |
| 398 |
\end_layout |
| 399 |
|
| 400 |
\end_inset |
| 401 |
|
| 402 |
Every ASCEND model is, in fact, a type definition. |
| 403 |
To "solve a model," we make an instance |
| 404 |
\begin_inset LatexCommand \index{instance} |
| 405 |
|
| 406 |
\end_inset |
| 407 |
|
| 408 |
of a type and solve the instance. |
| 409 |
So we shall start by creating a vessel type definition. |
| 410 |
We will have to create our type definition as a text file using a text |
| 411 |
editor. |
| 412 |
(Some simple text editors |
| 413 |
\begin_inset LatexCommand \index{text editors} |
| 414 |
|
| 415 |
\end_inset |
| 416 |
|
| 417 |
include |
| 418 |
\family typewriter |
| 419 |
emacs |
| 420 |
\family default |
| 421 |
|
| 422 |
\begin_inset LatexCommand \index{emacs} |
| 423 |
|
| 424 |
\end_inset |
| 425 |
|
| 426 |
and |
| 427 |
\family typewriter |
| 428 |
gedit |
| 429 |
\begin_inset LatexCommand \index{gedit} |
| 430 |
|
| 431 |
\end_inset |
| 432 |
|
| 433 |
|
| 434 |
\family default |
| 435 |
on Linux, and Notepad |
| 436 |
\begin_inset LatexCommand \index{Notepad} |
| 437 |
|
| 438 |
\end_inset |
| 439 |
|
| 440 |
and TextPad |
| 441 |
\begin_inset LatexCommand \index{TextPad} |
| 442 |
|
| 443 |
\end_inset |
| 444 |
|
| 445 |
on Windows. |
| 446 |
We shall discuss editors shortly.) |
| 447 |
\end_layout |
| 448 |
|
| 449 |
\begin_layout Standard |
| 450 |
We need first to decide the parts to our model. |
| 451 |
In this case we know that we need the variables |
| 452 |
\begin_inset LatexCommand \index{variables, vessel} |
| 453 |
|
| 454 |
\end_inset |
| 455 |
|
| 456 |
listed in Table |
| 457 |
\begin_inset LatexCommand \ref{tab:model1.variablesVesselModel} |
| 458 |
|
| 459 |
\end_inset |
| 460 |
|
| 461 |
|
| 462 |
\noun off |
| 463 |
. |
| 464 |
We readily fill in the first three columns in this table. |
| 465 |
We shall discuss the entry in the last column in a moment. |
| 466 |
\end_layout |
| 467 |
|
| 468 |
\begin_layout Standard |
| 469 |
\begin_inset Float table |
| 470 |
wide false |
| 471 |
sideways false |
| 472 |
status open |
| 473 |
|
| 474 |
\begin_layout Caption |
| 475 |
Variables required for model |
| 476 |
\begin_inset LatexCommand \label{tab:model1.variablesVesselModel} |
| 477 |
|
| 478 |
\end_inset |
| 479 |
|
| 480 |
|
| 481 |
\end_layout |
| 482 |
|
| 483 |
\begin_layout Standard |
| 484 |
\begin_inset Tabular |
| 485 |
<lyxtabular version="3" rows="5" columns="4"> |
| 486 |
<features> |
| 487 |
<column alignment="center" valignment="top" leftline="true" width="0"> |
| 488 |
<column alignment="center" valignment="top" leftline="true" width="0"> |
| 489 |
<column alignment="center" valignment="top" leftline="true" width="0"> |
| 490 |
<column alignment="center" valignment="top" leftline="true" rightline="true" width="1in"> |
| 491 |
<row topline="true" bottomline="true"> |
| 492 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 493 |
\begin_inset Text |
| 494 |
|
| 495 |
\begin_layout Standard |
| 496 |
Symbol |
| 497 |
\end_layout |
| 498 |
|
| 499 |
\end_inset |
| 500 |
</cell> |
| 501 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 502 |
\begin_inset Text |
| 503 |
|
| 504 |
\begin_layout Standard |
| 505 |
Meaning |
| 506 |
\end_layout |
| 507 |
|
| 508 |
\end_inset |
| 509 |
</cell> |
| 510 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 511 |
\begin_inset Text |
| 512 |
|
| 513 |
\begin_layout Standard |
| 514 |
Typical Units |
| 515 |
\end_layout |
| 516 |
|
| 517 |
\end_inset |
| 518 |
</cell> |
| 519 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 520 |
\begin_inset Text |
| 521 |
|
| 522 |
\begin_layout Standard |
| 523 |
ASCEND variable type |
| 524 |
\end_layout |
| 525 |
|
| 526 |
\end_inset |
| 527 |
</cell> |
| 528 |
</row> |
| 529 |
<row topline="true"> |
| 530 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 531 |
\begin_inset Text |
| 532 |
|
| 533 |
\begin_layout Standard |
| 534 |
|
| 535 |
\family typewriter |
| 536 |
D |
| 537 |
\end_layout |
| 538 |
|
| 539 |
\end_inset |
| 540 |
</cell> |
| 541 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 542 |
\begin_inset Text |
| 543 |
|
| 544 |
\begin_layout Standard |
| 545 |
vessel diameter |
| 546 |
\end_layout |
| 547 |
|
| 548 |
\end_inset |
| 549 |
</cell> |
| 550 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 551 |
\begin_inset Text |
| 552 |
|
| 553 |
\begin_layout Standard |
| 554 |
m, ft |
| 555 |
\end_layout |
| 556 |
|
| 557 |
\end_inset |
| 558 |
</cell> |
| 559 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 560 |
\begin_inset Text |
| 561 |
|
| 562 |
\begin_layout Standard |
| 563 |
|
| 564 |
\family typewriter |
| 565 |
length |
| 566 |
\end_layout |
| 567 |
|
| 568 |
\end_inset |
| 569 |
</cell> |
| 570 |
</row> |
| 571 |
<row topline="true"> |
| 572 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 573 |
\begin_inset Text |
| 574 |
|
| 575 |
\begin_layout Standard |
| 576 |
|
| 577 |
\family typewriter |
| 578 |
H |
| 579 |
\end_layout |
| 580 |
|
| 581 |
\end_inset |
| 582 |
</cell> |
| 583 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 584 |
\begin_inset Text |
| 585 |
|
| 586 |
\begin_layout Standard |
| 587 |
vessel height |
| 588 |
\end_layout |
| 589 |
|
| 590 |
\end_inset |
| 591 |
</cell> |
| 592 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 593 |
\begin_inset Text |
| 594 |
|
| 595 |
\begin_layout Standard |
| 596 |
m, ft |
| 597 |
\end_layout |
| 598 |
|
| 599 |
\end_inset |
| 600 |
</cell> |
| 601 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 602 |
\begin_inset Text |
| 603 |
|
| 604 |
\begin_layout Standard |
| 605 |
|
| 606 |
\family typewriter |
| 607 |
length |
| 608 |
\end_layout |
| 609 |
|
| 610 |
\end_inset |
| 611 |
</cell> |
| 612 |
</row> |
| 613 |
<row topline="true"> |
| 614 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 615 |
\begin_inset Text |
| 616 |
|
| 617 |
\begin_layout Standard |
| 618 |
|
| 619 |
\family typewriter |
| 620 |
wall_thickness |
| 621 |
\end_layout |
| 622 |
|
| 623 |
\end_inset |
| 624 |
</cell> |
| 625 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 626 |
\begin_inset Text |
| 627 |
|
| 628 |
\begin_layout Standard |
| 629 |
wall thickness |
| 630 |
\end_layout |
| 631 |
|
| 632 |
\end_inset |
| 633 |
</cell> |
| 634 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 635 |
\begin_inset Text |
| 636 |
|
| 637 |
\begin_layout Standard |
| 638 |
mm, in |
| 639 |
\end_layout |
| 640 |
|
| 641 |
\end_inset |
| 642 |
</cell> |
| 643 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 644 |
\begin_inset Text |
| 645 |
|
| 646 |
\begin_layout Standard |
| 647 |
|
| 648 |
\family typewriter |
| 649 |
length |
| 650 |
\end_layout |
| 651 |
|
| 652 |
\end_inset |
| 653 |
</cell> |
| 654 |
</row> |
| 655 |
<row topline="true" bottomline="true"> |
| 656 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 657 |
\begin_inset Text |
| 658 |
|
| 659 |
\begin_layout Standard |
| 660 |
|
| 661 |
\family typewriter |
| 662 |
metal_density |
| 663 |
\end_layout |
| 664 |
|
| 665 |
\end_inset |
| 666 |
</cell> |
| 667 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 668 |
\begin_inset Text |
| 669 |
|
| 670 |
\begin_layout Standard |
| 671 |
metal density |
| 672 |
\end_layout |
| 673 |
|
| 674 |
\end_inset |
| 675 |
</cell> |
| 676 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 677 |
\begin_inset Text |
| 678 |
|
| 679 |
\begin_layout Standard |
| 680 |
kg/m |
| 681 |
\begin_inset Formula $^{\textrm{3}}$ |
| 682 |
\end_inset |
| 683 |
|
| 684 |
, lbm/ft |
| 685 |
\begin_inset Formula $^{\textrm{3}}$ |
| 686 |
\end_inset |
| 687 |
|
| 688 |
|
| 689 |
\end_layout |
| 690 |
|
| 691 |
\end_inset |
| 692 |
</cell> |
| 693 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 694 |
\begin_inset Text |
| 695 |
|
| 696 |
\begin_layout Standard |
| 697 |
|
| 698 |
\family typewriter |
| 699 |
mass_density |
| 700 |
\end_layout |
| 701 |
|
| 702 |
\end_inset |
| 703 |
</cell> |
| 704 |
</row> |
| 705 |
</lyxtabular> |
| 706 |
|
| 707 |
\end_inset |
| 708 |
|
| 709 |
|
| 710 |
\end_layout |
| 711 |
|
| 712 |
\end_inset |
| 713 |
|
| 714 |
|
| 715 |
\end_layout |
| 716 |
|
| 717 |
\begin_layout Standard |
| 718 |
We will be computing the masses for the metal in the side wall and in the |
| 719 |
ends for this vessel. |
| 720 |
As this is a thin-walled vessel, we shall compute the volume of metal as |
| 721 |
the area of the walls times the wall thickness. |
| 722 |
The following equations allow us to compute the required areas |
| 723 |
\end_layout |
| 724 |
|
| 725 |
\begin_layout Standard |
| 726 |
\begin_inset Formula \begin{equation} |
| 727 |
\mathrm{side\, wall\, area}=\pi DH\label{eq:model1.side-wall-area}\end{equation} |
| 728 |
|
| 729 |
\end_inset |
| 730 |
|
| 731 |
|
| 732 |
\end_layout |
| 733 |
|
| 734 |
\begin_layout Standard |
| 735 |
\begin_inset Formula \begin{equation} |
| 736 |
\mathrm{single\, end\, area}=\frac{\pi D^{2}}{4}\label{eq:model1.single-end-area}\end{equation} |
| 737 |
|
| 738 |
\end_inset |
| 739 |
|
| 740 |
|
| 741 |
\end_layout |
| 742 |
|
| 743 |
\begin_layout Standard |
| 744 |
We should be interested in the volume of the vessel, which we compute as: |
| 745 |
\end_layout |
| 746 |
|
| 747 |
\begin_layout Standard |
| 748 |
\begin_inset Formula \begin{equation} |
| 749 |
\mathrm{vessel\, volume}=\mathrm{single\, end\, area}\times H\label{eq:model1.vessel-volume}\end{equation} |
| 750 |
|
| 751 |
\end_inset |
| 752 |
|
| 753 |
|
| 754 |
\end_layout |
| 755 |
|
| 756 |
\begin_layout Standard |
| 757 |
We add the variables in Table |
| 758 |
\begin_inset LatexCommand \ref{tab:model1.moreVariablesVessel} |
| 759 |
|
| 760 |
\end_inset |
| 761 |
|
| 762 |
|
| 763 |
\noun off |
| 764 |
to our list. |
| 765 |
\end_layout |
| 766 |
|
| 767 |
\begin_layout Standard |
| 768 |
\begin_inset Float table |
| 769 |
wide false |
| 770 |
sideways false |
| 771 |
status open |
| 772 |
|
| 773 |
\begin_layout Caption |
| 774 |
Some more variables |
| 775 |
\begin_inset LatexCommand \index{variables, vessel} |
| 776 |
|
| 777 |
\end_inset |
| 778 |
|
| 779 |
required for vessel model |
| 780 |
\begin_inset LatexCommand \label{tab:model1.moreVariablesVessel} |
| 781 |
|
| 782 |
\end_inset |
| 783 |
|
| 784 |
|
| 785 |
\end_layout |
| 786 |
|
| 787 |
\begin_layout Standard |
| 788 |
\begin_inset Tabular |
| 789 |
<lyxtabular version="3" rows="6" columns="4"> |
| 790 |
<features> |
| 791 |
<column alignment="center" valignment="top" leftline="true" width="0"> |
| 792 |
<column alignment="center" valignment="top" leftline="true" width="1.5in"> |
| 793 |
<column alignment="center" valignment="top" leftline="true" width="0"> |
| 794 |
<column alignment="center" valignment="top" leftline="true" rightline="true" width="1in"> |
| 795 |
<row topline="true" bottomline="true"> |
| 796 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 797 |
\begin_inset Text |
| 798 |
|
| 799 |
\begin_layout Standard |
| 800 |
Symbol |
| 801 |
\end_layout |
| 802 |
|
| 803 |
\end_inset |
| 804 |
</cell> |
| 805 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 806 |
\begin_inset Text |
| 807 |
|
| 808 |
\begin_layout Standard |
| 809 |
Meaning |
| 810 |
\end_layout |
| 811 |
|
| 812 |
\end_inset |
| 813 |
</cell> |
| 814 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 815 |
\begin_inset Text |
| 816 |
|
| 817 |
\begin_layout Standard |
| 818 |
Typical Units |
| 819 |
\end_layout |
| 820 |
|
| 821 |
\end_inset |
| 822 |
</cell> |
| 823 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 824 |
\begin_inset Text |
| 825 |
|
| 826 |
\begin_layout Standard |
| 827 |
ASCEND variable type |
| 828 |
\end_layout |
| 829 |
|
| 830 |
\end_inset |
| 831 |
</cell> |
| 832 |
</row> |
| 833 |
<row topline="true"> |
| 834 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 835 |
\begin_inset Text |
| 836 |
|
| 837 |
\begin_layout Standard |
| 838 |
|
| 839 |
\family typewriter |
| 840 |
side_area |
| 841 |
\end_layout |
| 842 |
|
| 843 |
\end_inset |
| 844 |
</cell> |
| 845 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 846 |
\begin_inset Text |
| 847 |
|
| 848 |
\begin_layout Standard |
| 849 |
area in the sidewall of the vessel |
| 850 |
\end_layout |
| 851 |
|
| 852 |
\end_inset |
| 853 |
</cell> |
| 854 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 855 |
\begin_inset Text |
| 856 |
|
| 857 |
\begin_layout Standard |
| 858 |
m |
| 859 |
\begin_inset Formula $^{\textrm{2}}$ |
| 860 |
\end_inset |
| 861 |
|
| 862 |
, ft |
| 863 |
\begin_inset Formula $^{\textrm{2}}$ |
| 864 |
\end_inset |
| 865 |
|
| 866 |
|
| 867 |
\end_layout |
| 868 |
|
| 869 |
\end_inset |
| 870 |
</cell> |
| 871 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 872 |
\begin_inset Text |
| 873 |
|
| 874 |
\begin_layout Standard |
| 875 |
|
| 876 |
\family typewriter |
| 877 |
area |
| 878 |
\end_layout |
| 879 |
|
| 880 |
\end_inset |
| 881 |
</cell> |
| 882 |
</row> |
| 883 |
<row topline="true"> |
| 884 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 885 |
\begin_inset Text |
| 886 |
|
| 887 |
\begin_layout Standard |
| 888 |
|
| 889 |
\family typewriter |
| 890 |
end_area |
| 891 |
\end_layout |
| 892 |
|
| 893 |
\end_inset |
| 894 |
</cell> |
| 895 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 896 |
\begin_inset Text |
| 897 |
|
| 898 |
\begin_layout Standard |
| 899 |
total area iin the ends of the vessel |
| 900 |
\end_layout |
| 901 |
|
| 902 |
\end_inset |
| 903 |
</cell> |
| 904 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 905 |
\begin_inset Text |
| 906 |
|
| 907 |
\begin_layout Standard |
| 908 |
m |
| 909 |
\begin_inset Formula $^{\textrm{2}}$ |
| 910 |
\end_inset |
| 911 |
|
| 912 |
, ft |
| 913 |
\begin_inset Formula $^{\textrm{2}}$ |
| 914 |
\end_inset |
| 915 |
|
| 916 |
|
| 917 |
\end_layout |
| 918 |
|
| 919 |
\end_inset |
| 920 |
</cell> |
| 921 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 922 |
\begin_inset Text |
| 923 |
|
| 924 |
\begin_layout Standard |
| 925 |
|
| 926 |
\family typewriter |
| 927 |
area |
| 928 |
\end_layout |
| 929 |
|
| 930 |
\end_inset |
| 931 |
</cell> |
| 932 |
</row> |
| 933 |
<row topline="true"> |
| 934 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 935 |
\begin_inset Text |
| 936 |
|
| 937 |
\begin_layout Standard |
| 938 |
|
| 939 |
\family typewriter |
| 940 |
vessel_volume |
| 941 |
\end_layout |
| 942 |
|
| 943 |
\end_inset |
| 944 |
</cell> |
| 945 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 946 |
\begin_inset Text |
| 947 |
|
| 948 |
\begin_layout Standard |
| 949 |
volume of the vessel |
| 950 |
\end_layout |
| 951 |
|
| 952 |
\end_inset |
| 953 |
</cell> |
| 954 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 955 |
\begin_inset Text |
| 956 |
|
| 957 |
\begin_layout Standard |
| 958 |
m |
| 959 |
\begin_inset Formula $^{3}$ |
| 960 |
\end_inset |
| 961 |
|
| 962 |
, ft |
| 963 |
\begin_inset Formula $^{\textrm{3}}$ |
| 964 |
\end_inset |
| 965 |
|
| 966 |
|
| 967 |
\end_layout |
| 968 |
|
| 969 |
\end_inset |
| 970 |
</cell> |
| 971 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 972 |
\begin_inset Text |
| 973 |
|
| 974 |
\begin_layout Standard |
| 975 |
|
| 976 |
\family typewriter |
| 977 |
volume |
| 978 |
\end_layout |
| 979 |
|
| 980 |
\end_inset |
| 981 |
</cell> |
| 982 |
</row> |
| 983 |
<row topline="true"> |
| 984 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 985 |
\begin_inset Text |
| 986 |
|
| 987 |
\begin_layout Standard |
| 988 |
|
| 989 |
\family typewriter |
| 990 |
metal_volume |
| 991 |
\end_layout |
| 992 |
|
| 993 |
\end_inset |
| 994 |
</cell> |
| 995 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 996 |
\begin_inset Text |
| 997 |
|
| 998 |
\begin_layout Standard |
| 999 |
total volume of metal in the walls |
| 1000 |
\end_layout |
| 1001 |
|
| 1002 |
\end_inset |
| 1003 |
</cell> |
| 1004 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 1005 |
\begin_inset Text |
| 1006 |
|
| 1007 |
\begin_layout Standard |
| 1008 |
m |
| 1009 |
\begin_inset Formula $^{3}$ |
| 1010 |
\end_inset |
| 1011 |
|
| 1012 |
, ft |
| 1013 |
\begin_inset Formula $^{\textrm{3}}$ |
| 1014 |
\end_inset |
| 1015 |
|
| 1016 |
|
| 1017 |
\end_layout |
| 1018 |
|
| 1019 |
\end_inset |
| 1020 |
</cell> |
| 1021 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 1022 |
\begin_inset Text |
| 1023 |
|
| 1024 |
\begin_layout Standard |
| 1025 |
|
| 1026 |
\family typewriter |
| 1027 |
volume |
| 1028 |
\end_layout |
| 1029 |
|
| 1030 |
\end_inset |
| 1031 |
</cell> |
| 1032 |
</row> |
| 1033 |
<row topline="true" bottomline="true"> |
| 1034 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 1035 |
\begin_inset Text |
| 1036 |
|
| 1037 |
\begin_layout Standard |
| 1038 |
|
| 1039 |
\family typewriter |
| 1040 |
metal_mass |
| 1041 |
\end_layout |
| 1042 |
|
| 1043 |
\end_inset |
| 1044 |
</cell> |
| 1045 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 1046 |
\begin_inset Text |
| 1047 |
|
| 1048 |
\begin_layout Standard |
| 1049 |
total mass of the metal in the walls of the vessel |
| 1050 |
\end_layout |
| 1051 |
|
| 1052 |
\end_inset |
| 1053 |
</cell> |
| 1054 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 1055 |
\begin_inset Text |
| 1056 |
|
| 1057 |
\begin_layout Standard |
| 1058 |
kg, lbm |
| 1059 |
\end_layout |
| 1060 |
|
| 1061 |
\end_inset |
| 1062 |
</cell> |
| 1063 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 1064 |
\begin_inset Text |
| 1065 |
|
| 1066 |
\begin_layout Standard |
| 1067 |
|
| 1068 |
\family typewriter |
| 1069 |
mass |
| 1070 |
\end_layout |
| 1071 |
|
| 1072 |
\end_inset |
| 1073 |
</cell> |
| 1074 |
</row> |
| 1075 |
</lyxtabular> |
| 1076 |
|
| 1077 |
\end_inset |
| 1078 |
|
| 1079 |
|
| 1080 |
\end_layout |
| 1081 |
|
| 1082 |
\end_inset |
| 1083 |
|
| 1084 |
|
| 1085 |
\end_layout |
| 1086 |
|
| 1087 |
\begin_layout Standard |
| 1088 |
We believe that no one should create a model of any consequence without |
| 1089 |
worrying about the units for expressing the variables within it. |
| 1090 |
We consider that to be a commandment handed down from somewhere on high; |
| 1091 |
however, we know that others do not believe as we do. |
| 1092 |
Grant us our beliefs. |
| 1093 |
We have created in the ASCEND system a library of variable and constant |
| 1094 |
types called atoms.a4l |
| 1095 |
\begin_inset LatexCommand \index{atoms.a4l} |
| 1096 |
|
| 1097 |
\end_inset |
| 1098 |
|
| 1099 |
. |
| 1100 |
\end_layout |
| 1101 |
|
| 1102 |
\begin_layout Standard |
| 1103 |
The file type " |
| 1104 |
\family typewriter |
| 1105 |
.a4l |
| 1106 |
\begin_inset LatexCommand \index{a4l} |
| 1107 |
|
| 1108 |
\end_inset |
| 1109 |
|
| 1110 |
|
| 1111 |
\family default |
| 1112 |
" designates it to be an ASCEND IV library file |
| 1113 |
\begin_inset LatexCommand \index{library file} |
| 1114 |
|
| 1115 |
\end_inset |
| 1116 |
|
| 1117 |
. |
| 1118 |
Double-click on this link to see the approximately 150 different types |
| 1119 |
ranging from universal constants |
| 1120 |
\begin_inset LatexCommand \index{universal constants} |
| 1121 |
|
| 1122 |
\end_inset |
| 1123 |
|
| 1124 |
such as |
| 1125 |
\begin_inset Formula $\pi$ |
| 1126 |
\end_inset |
| 1127 |
|
| 1128 |
(=3.14159...) and |
| 1129 |
\begin_inset Formula $e$ |
| 1130 |
\end_inset |
| 1131 |
|
| 1132 |
(=2.718...) to |
| 1133 |
\family typewriter |
| 1134 |
length |
| 1135 |
\family default |
| 1136 |
, |
| 1137 |
\family typewriter |
| 1138 |
mass |
| 1139 |
\family default |
| 1140 |
and |
| 1141 |
\family typewriter |
| 1142 |
angle |
| 1143 |
\family default |
| 1144 |
. |
| 1145 |
If we have not created one that you need, you can use this library of types |
| 1146 |
to see how to construct one for yourself and add it to your file of type |
| 1147 |
definitions. |
| 1148 |
You will find detailed instructions for how to make your own variable type |
| 1149 |
library in Chapter\InsetSpace ~ |
| 1150 |
|
| 1151 |
\begin_inset LatexCommand \vref{cha:atoms} |
| 1152 |
|
| 1153 |
\end_inset |
| 1154 |
|
| 1155 |
. |
| 1156 |
\end_layout |
| 1157 |
|
| 1158 |
\begin_layout Standard |
| 1159 |
\begin_inset Marginal |
| 1160 |
status collapsed |
| 1161 |
|
| 1162 |
\begin_layout Standard |
| 1163 |
type definition library for variables and constants |
| 1164 |
\end_layout |
| 1165 |
|
| 1166 |
\end_inset |
| 1167 |
|
| 1168 |
ASCEND considers variable and constant types to be elementary or "atomic" |
| 1169 |
to the system. |
| 1170 |
These type definitions can contain only attributes for variables and constants. |
| 1171 |
They cannot contain equations, for example. |
| 1172 |
Thus ASCEND calls such a type definition an atom rather than a model. |
| 1173 |
Figure |
| 1174 |
\begin_inset LatexCommand \ref{fig:model1.atomVolume} |
| 1175 |
|
| 1176 |
\end_inset |
| 1177 |
|
| 1178 |
|
| 1179 |
\noun off |
| 1180 |
illustrates the definition for the type volume. |
| 1181 |
|
| 1182 |
\end_layout |
| 1183 |
|
| 1184 |
\begin_layout Standard |
| 1185 |
\begin_inset Float figure |
| 1186 |
wide false |
| 1187 |
sideways false |
| 1188 |
status open |
| 1189 |
|
| 1190 |
\begin_layout Standard |
| 1191 |
\begin_inset LatexCommand \index{ATOM} |
| 1192 |
|
| 1193 |
\end_inset |
| 1194 |
|
| 1195 |
|
| 1196 |
\begin_inset ERT |
| 1197 |
status open |
| 1198 |
|
| 1199 |
\begin_layout Standard |
| 1200 |
|
| 1201 |
|
| 1202 |
\backslash |
| 1203 |
lstset{language=ASCEND} |
| 1204 |
\end_layout |
| 1205 |
|
| 1206 |
\begin_layout Standard |
| 1207 |
|
| 1208 |
|
| 1209 |
\backslash |
| 1210 |
begin{lstlisting} |
| 1211 |
\end_layout |
| 1212 |
|
| 1213 |
\begin_layout Standard |
| 1214 |
|
| 1215 |
ATOM volume REFINES solver_var |
| 1216 |
\end_layout |
| 1217 |
|
| 1218 |
\begin_layout Standard |
| 1219 |
|
| 1220 |
DIMENSION L^3 |
| 1221 |
\end_layout |
| 1222 |
|
| 1223 |
\begin_layout Standard |
| 1224 |
|
| 1225 |
DEFAULT 100.0{ft^3}; |
| 1226 |
\end_layout |
| 1227 |
|
| 1228 |
\begin_layout Standard |
| 1229 |
|
| 1230 |
lower_bound := 0.0{ft^3}; |
| 1231 |
\end_layout |
| 1232 |
|
| 1233 |
\begin_layout Standard |
| 1234 |
|
| 1235 |
upper_bound := 1e50{ft^3}; |
| 1236 |
\end_layout |
| 1237 |
|
| 1238 |
\begin_layout Standard |
| 1239 |
|
| 1240 |
nominal := 100.0{ft^3}; |
| 1241 |
\end_layout |
| 1242 |
|
| 1243 |
\begin_layout Standard |
| 1244 |
|
| 1245 |
END volume; |
| 1246 |
\end_layout |
| 1247 |
|
| 1248 |
\begin_layout Standard |
| 1249 |
|
| 1250 |
|
| 1251 |
\backslash |
| 1252 |
end{lstlisting} |
| 1253 |
\end_layout |
| 1254 |
|
| 1255 |
\begin_layout Standard |
| 1256 |
|
| 1257 |
\end_layout |
| 1258 |
|
| 1259 |
\end_inset |
| 1260 |
|
| 1261 |
|
| 1262 |
\end_layout |
| 1263 |
|
| 1264 |
\begin_layout Caption |
| 1265 |
A typical type definition, called an atom, used to define variable and constant |
| 1266 |
types |
| 1267 |
\begin_inset LatexCommand \label{fig:model1.atomVolume} |
| 1268 |
|
| 1269 |
\end_inset |
| 1270 |
|
| 1271 |
|
| 1272 |
\end_layout |
| 1273 |
|
| 1274 |
\end_inset |
| 1275 |
|
| 1276 |
|
| 1277 |
\end_layout |
| 1278 |
|
| 1279 |
\begin_layout Standard |
| 1280 |
The definition starts by stating that volume is a specialization of |
| 1281 |
\begin_inset LatexCommand \index{solver\_var} |
| 1282 |
|
| 1283 |
\end_inset |
| 1284 |
|
| 1285 |
|
| 1286 |
\family typewriter |
| 1287 |
solver_var |
| 1288 |
\family default |
| 1289 |
. |
| 1290 |
The type |
| 1291 |
\family typewriter |
| 1292 |
solver_var |
| 1293 |
\family default |
| 1294 |
refines a base type in the system known as |
| 1295 |
\family typewriter |
| 1296 |
real |
| 1297 |
\family default |
| 1298 |
|
| 1299 |
\begin_inset LatexCommand \index{real} |
| 1300 |
|
| 1301 |
\end_inset |
| 1302 |
|
| 1303 |
and adds several attributes to it that a nonlinear equation solver may |
| 1304 |
need, such as a lower and upper bounds, a 'fixed' flag, and so forth. |
| 1305 |
|
| 1306 |
\end_layout |
| 1307 |
|
| 1308 |
\begin_layout Standard |
| 1309 |
\begin_inset Marginal |
| 1310 |
status collapsed |
| 1311 |
|
| 1312 |
\begin_layout Standard |
| 1313 |
dimensions |
| 1314 |
\begin_inset LatexCommand \index{dimensions} |
| 1315 |
|
| 1316 |
\end_inset |
| 1317 |
|
| 1318 |
and units |
| 1319 |
\begin_inset LatexCommand \index{units} |
| 1320 |
|
| 1321 |
\end_inset |
| 1322 |
|
| 1323 |
in ASCEND. |
| 1324 |
|
| 1325 |
\end_layout |
| 1326 |
|
| 1327 |
\end_inset |
| 1328 |
|
| 1329 |
The type definition for volume states that volume has dimensionality of |
| 1330 |
length to the power 3 ( |
| 1331 |
\family typewriter |
| 1332 |
L^3 |
| 1333 |
\family default |
| 1334 |
) where L is one of the 10 dimensions supported by ASCEND (see |
| 1335 |
\noun off |
| 1336 |
in ASCEND Syntax document for the 10 dimensions defined within the ASCEND |
| 1337 |
language). |
| 1338 |
\end_layout |
| 1339 |
|
| 1340 |
\begin_layout Standard |
| 1341 |
One may express the value for a volume using any units which are consistent |
| 1342 |
with the dimensionality of |
| 1343 |
\family typewriter |
| 1344 |
L^3 |
| 1345 |
\family default |
| 1346 |
, such as |
| 1347 |
\family typewriter |
| 1348 |
{ft^3} |
| 1349 |
\family default |
| 1350 |
, |
| 1351 |
\family typewriter |
| 1352 |
{m^3} |
| 1353 |
\family default |
| 1354 |
, |
| 1355 |
\family typewriter |
| 1356 |
{gal} |
| 1357 |
\family default |
| 1358 |
, or even |
| 1359 |
\family typewriter |
| 1360 |
{mile^4/mm} |
| 1361 |
\family default |
| 1362 |
. |
| 1363 |
Setting the lower bound to |
| 1364 |
\family typewriter |
| 1365 |
0 {ft^3} |
| 1366 |
\family default |
| 1367 |
says volume must be a nonnegative number. |
| 1368 |
ASCEND used the nominal value for scaling a variable of type volume when |
| 1369 |
solving, here |
| 1370 |
\begin_inset Formula $100\,\mathrm{ft}^{3}$ |
| 1371 |
\end_inset |
| 1372 |
|
| 1373 |
. |
| 1374 |
\end_layout |
| 1375 |
|
| 1376 |
\begin_layout Standard |
| 1377 |
One may change the values for the bounds, default and nominal values at |
| 1378 |
any time. |
| 1379 |
\end_layout |
| 1380 |
|
| 1381 |
\begin_layout Standard |
| 1382 |
We now can understand the last column in Table |
| 1383 |
\begin_inset LatexCommand \ref{tab:model1.variablesVesselModel} |
| 1384 |
|
| 1385 |
\end_inset |
| 1386 |
|
| 1387 |
|
| 1388 |
\noun off |
| 1389 |
and |
| 1390 |
\noun default |
| 1391 |
Table |
| 1392 |
\noun off |
| 1393 |
|
| 1394 |
\begin_inset LatexCommand \ref{tab:model1.moreVariablesVessel} |
| 1395 |
|
| 1396 |
\end_inset |
| 1397 |
|
| 1398 |
. |
| 1399 |
For each variable or constant in the system, we have identified its type |
| 1400 |
in the file |
| 1401 |
\family typewriter |
| 1402 |
\noun default |
| 1403 |
atoms.a4l |
| 1404 |
\family default |
| 1405 |
\noun off |
| 1406 |
. |
| 1407 |
That is, we looked in this file for the type definition that corresponded |
| 1408 |
to the variable we were defining and listed that type here. |
| 1409 |
This task is not as onerous as it seems. |
| 1410 |
As we shall see later, we provide a tool to find for you all atom types |
| 1411 |
that correspond to a particular set of units, e.g, |
| 1412 |
\family typewriter |
| 1413 |
\noun default |
| 1414 |
ft^3 |
| 1415 |
\family default |
| 1416 |
\noun off |
| 1417 |
-- i.e., the computer will do the searching for you. |
| 1418 |
\end_layout |
| 1419 |
|
| 1420 |
\begin_layout Standard |
| 1421 |
In Figure |
| 1422 |
\begin_inset LatexCommand \ref{fig:model1.universalConstant} |
| 1423 |
|
| 1424 |
\end_inset |
| 1425 |
|
| 1426 |
|
| 1427 |
\noun off |
| 1428 |
we see the definition of one of the universal constants contained in |
| 1429 |
\family typewriter |
| 1430 |
\noun default |
| 1431 |
atoms.a4l |
| 1432 |
\family default |
| 1433 |
\noun off |
| 1434 |
. |
| 1435 |
This definition is very short; it gives the name of the type |
| 1436 |
\family typewriter |
| 1437 |
\noun default |
| 1438 |
circle_constant |
| 1439 |
\family default |
| 1440 |
\noun off |
| 1441 |
|
| 1442 |
\begin_inset LatexCommand \index{circle\_constant} |
| 1443 |
|
| 1444 |
\end_inset |
| 1445 |
|
| 1446 |
, that it refines |
| 1447 |
\family typewriter |
| 1448 |
\noun default |
| 1449 |
real_constant |
| 1450 |
\family default |
| 1451 |
\noun off |
| 1452 |
|
| 1453 |
\begin_inset LatexCommand \index{real\_constant} |
| 1454 |
|
| 1455 |
\end_inset |
| 1456 |
|
| 1457 |
and that it has the value |
| 1458 |
\family typewriter |
| 1459 |
\noun default |
| 1460 |
1 {PI |
| 1461 |
\begin_inset LatexCommand \index{PI} |
| 1462 |
|
| 1463 |
\end_inset |
| 1464 |
|
| 1465 |
} |
| 1466 |
\family default |
| 1467 |
\noun off |
| 1468 |
|
| 1469 |
\begin_inset LatexCommand \index{\{PI\}} |
| 1470 |
|
| 1471 |
\end_inset |
| 1472 |
|
| 1473 |
where the internal conversion needed for |
| 1474 |
\family typewriter |
| 1475 |
\noun default |
| 1476 |
{PI} |
| 1477 |
\family default |
| 1478 |
\noun off |
| 1479 |
is defined in the file defining the built-in units in ASCEND. |
| 1480 |
One can add more units if desired at any time to ASCEND by defining one |
| 1481 |
or more personal units files ( |
| 1482 |
\noun default |
| 1483 |
Chapter |
| 1484 |
\noun off |
| 1485 |
|
| 1486 |
\begin_inset LatexCommand \vref{cha:units} |
| 1487 |
|
| 1488 |
\end_inset |
| 1489 |
|
| 1490 |
|
| 1491 |
\noun default |
| 1492 |
|
| 1493 |
\noun off |
| 1494 |
tells you how to do this). |
| 1495 |
\end_layout |
| 1496 |
|
| 1497 |
\begin_layout Standard |
| 1498 |
\begin_inset Marginal |
| 1499 |
status collapsed |
| 1500 |
|
| 1501 |
\begin_layout Standard |
| 1502 |
universal constant |
| 1503 |
\begin_inset LatexCommand \index{universal constant} |
| 1504 |
|
| 1505 |
\end_inset |
| 1506 |
|
| 1507 |
definition |
| 1508 |
\end_layout |
| 1509 |
|
| 1510 |
\end_inset |
| 1511 |
|
| 1512 |
|
| 1513 |
\begin_inset Float figure |
| 1514 |
wide false |
| 1515 |
sideways false |
| 1516 |
status open |
| 1517 |
|
| 1518 |
\begin_layout LyX-Code |
| 1519 |
\begin_inset ERT |
| 1520 |
status open |
| 1521 |
|
| 1522 |
\begin_layout Standard |
| 1523 |
|
| 1524 |
|
| 1525 |
\backslash |
| 1526 |
begin{ascend} |
| 1527 |
\end_layout |
| 1528 |
|
| 1529 |
\begin_layout Standard |
| 1530 |
|
| 1531 |
UNIVERSAL CONSTANT circle_constant |
| 1532 |
\end_layout |
| 1533 |
|
| 1534 |
\begin_layout Standard |
| 1535 |
|
| 1536 |
REFINES real_constant :== 1{PI}; |
| 1537 |
\end_layout |
| 1538 |
|
| 1539 |
\begin_layout Standard |
| 1540 |
|
| 1541 |
|
| 1542 |
\backslash |
| 1543 |
end{ascend} |
| 1544 |
\end_layout |
| 1545 |
|
| 1546 |
\end_inset |
| 1547 |
|
| 1548 |
|
| 1549 |
\end_layout |
| 1550 |
|
| 1551 |
\begin_layout Caption |
| 1552 |
\begin_inset LatexCommand \label{fig:model1.universalConstant} |
| 1553 |
|
| 1554 |
\end_inset |
| 1555 |
|
| 1556 |
Type definition for |
| 1557 |
\family typewriter |
| 1558 |
circle_constant; |
| 1559 |
\family default |
| 1560 |
has value of |
| 1561 |
\family typewriter |
| 1562 |
1 {PI} |
| 1563 |
\family default |
| 1564 |
or 3.1415927 |
| 1565 |
\end_layout |
| 1566 |
|
| 1567 |
\end_inset |
| 1568 |
|
| 1569 |
|
| 1570 |
\end_layout |
| 1571 |
|
| 1572 |
\begin_layout Standard |
| 1573 |
We shall in fact find this constant useful in our program, and we can either |
| 1574 |
introduce a constant with this value or simply use the value |
| 1575 |
\family typewriter |
| 1576 |
1{PI} |
| 1577 |
\family default |
| 1578 |
in our program. |
| 1579 |
We shall choose to do the latter. |
| 1580 |
\end_layout |
| 1581 |
|
| 1582 |
\begin_layout Standard |
| 1583 |
It is time to write our first version for the model, which we do in Figure |
| 1584 |
|
| 1585 |
\begin_inset LatexCommand \ref{fig:model1.modelVessel} |
| 1586 |
|
| 1587 |
\end_inset |
| 1588 |
|
| 1589 |
|
| 1590 |
\noun off |
| 1591 |
( |
| 1592 |
\noun default |
| 1593 |
available as |
| 1594 |
\begin_inset LatexCommand \index{vesselPlain.a4c} |
| 1595 |
|
| 1596 |
\end_inset |
| 1597 |
|
| 1598 |
|
| 1599 |
\family typewriter |
| 1600 |
vesselPlain.a4c |
| 1601 |
\family default |
| 1602 |
in the ASCEND model library). |
| 1603 |
|
| 1604 |
\noun off |
| 1605 |
We first list any other files containing type definitions which this model |
| 1606 |
will use; here we list |
| 1607 |
\family typewriter |
| 1608 |
\noun default |
| 1609 |
"atoms.a4l" |
| 1610 |
\family default |
| 1611 |
\noun off |
| 1612 |
following the keyword |
| 1613 |
\family typewriter |
| 1614 |
\noun default |
| 1615 |
REQUIRE |
| 1616 |
\family default |
| 1617 |
\noun off |
| 1618 |
|
| 1619 |
\begin_inset LatexCommand \index{REQUIRE} |
| 1620 |
|
| 1621 |
\end_inset |
| 1622 |
|
| 1623 |
. |
| 1624 |
ASCEND is sensitive to case so pay attention to where we use and do not |
| 1625 |
use capital letters. |
| 1626 |
Keywords are always capitalized. |
| 1627 |
Often for clarification we use capital letters in a name we use for a variable |
| 1628 |
or label (e.g., we use |
| 1629 |
\family typewriter |
| 1630 |
\noun default |
| 1631 |
D |
| 1632 |
\family default |
| 1633 |
\noun off |
| 1634 |
for diameter rather than |
| 1635 |
\family typewriter |
| 1636 |
\noun default |
| 1637 |
d |
| 1638 |
\family default |
| 1639 |
\noun off |
| 1640 |
). |
| 1641 |
Note that all ASCEND statements end with a semicolon (i.e., with |
| 1642 |
\noun default |
| 1643 |
' |
| 1644 |
\family typewriter |
| 1645 |
; |
| 1646 |
\family default |
| 1647 |
' |
| 1648 |
\noun off |
| 1649 |
) and not at the end of a line and that blank lines have no impact. |
| 1650 |
Comments are between opening and closing parenthesis/asterisk pairs, i.e., |
| 1651 |
' |
| 1652 |
\family typewriter |
| 1653 |
\noun default |
| 1654 |
(* |
| 1655 |
\family default |
| 1656 |
\noun off |
| 1657 |
' and ' |
| 1658 |
\family typewriter |
| 1659 |
\noun default |
| 1660 |
*) |
| 1661 |
\family default |
| 1662 |
\noun off |
| 1663 |
'. |
| 1664 |
\end_layout |
| 1665 |
|
| 1666 |
\begin_layout Standard |
| 1667 |
\begin_inset Marginal |
| 1668 |
status collapsed |
| 1669 |
|
| 1670 |
\begin_layout Standard |
| 1671 |
the first version of the code for vessel |
| 1672 |
\end_layout |
| 1673 |
|
| 1674 |
\end_inset |
| 1675 |
|
| 1676 |
|
| 1677 |
\begin_inset Float figure |
| 1678 |
wide false |
| 1679 |
sideways false |
| 1680 |
status open |
| 1681 |
|
| 1682 |
\begin_layout LyX-Code |
| 1683 |
\begin_inset ERT |
| 1684 |
status open |
| 1685 |
|
| 1686 |
\begin_layout Standard |
| 1687 |
|
| 1688 |
|
| 1689 |
\backslash |
| 1690 |
begin{ascend} |
| 1691 |
\end_layout |
| 1692 |
|
| 1693 |
\begin_layout Standard |
| 1694 |
|
| 1695 |
REQUIRE "atoms.a4l"; |
| 1696 |
\end_layout |
| 1697 |
|
| 1698 |
\begin_layout Standard |
| 1699 |
|
| 1700 |
MODEL vessel; |
| 1701 |
\end_layout |
| 1702 |
|
| 1703 |
\begin_layout Standard |
| 1704 |
|
| 1705 |
(* variables *) |
| 1706 |
\end_layout |
| 1707 |
|
| 1708 |
\begin_layout Standard |
| 1709 |
|
| 1710 |
side_area, end_area IS_A area; |
| 1711 |
\end_layout |
| 1712 |
|
| 1713 |
\begin_layout Standard |
| 1714 |
|
| 1715 |
vessel_vol, wall_vol IS_A volume; |
| 1716 |
\end_layout |
| 1717 |
|
| 1718 |
\begin_layout Standard |
| 1719 |
|
| 1720 |
wall_thickness, H, D IS_A distance; |
| 1721 |
\end_layout |
| 1722 |
|
| 1723 |
\begin_layout Standard |
| 1724 |
|
| 1725 |
H_to_D_ratio IS_A factor; |
| 1726 |
\end_layout |
| 1727 |
|
| 1728 |
\begin_layout Standard |
| 1729 |
|
| 1730 |
metal_density IS_A mass_density; |
| 1731 |
\end_layout |
| 1732 |
|
| 1733 |
\begin_layout Standard |
| 1734 |
|
| 1735 |
metal_mass IS_A mass; |
| 1736 |
\end_layout |
| 1737 |
|
| 1738 |
\begin_layout Standard |
| 1739 |
|
| 1740 |
\end_layout |
| 1741 |
|
| 1742 |
\begin_layout Standard |
| 1743 |
|
| 1744 |
(* equations *) |
| 1745 |
\end_layout |
| 1746 |
|
| 1747 |
\begin_layout Standard |
| 1748 |
|
| 1749 |
FlatEnds:end_area = 1{PI} * D^2 / 4; |
| 1750 |
\end_layout |
| 1751 |
|
| 1752 |
\begin_layout Standard |
| 1753 |
|
| 1754 |
Sides:side_area = 1{PI} * D * H; |
| 1755 |
\end_layout |
| 1756 |
|
| 1757 |
\begin_layout Standard |
| 1758 |
|
| 1759 |
Cylinder:vessel_vol = end_area * H; |
| 1760 |
\end_layout |
| 1761 |
|
| 1762 |
\begin_layout Standard |
| 1763 |
|
| 1764 |
Metal_volume:(side_area + 2 * end_area) * |
| 1765 |
\end_layout |
| 1766 |
|
| 1767 |
\begin_layout Standard |
| 1768 |
|
| 1769 |
wall_thickness = wall_vol; |
| 1770 |
\end_layout |
| 1771 |
|
| 1772 |
\begin_layout Standard |
| 1773 |
|
| 1774 |
HD_definition:D * H_to_D_ratio = H; |
| 1775 |
\end_layout |
| 1776 |
|
| 1777 |
\begin_layout Standard |
| 1778 |
|
| 1779 |
VesselMass:metal_mass = metal_density * wall_vol; |
| 1780 |
\end_layout |
| 1781 |
|
| 1782 |
\begin_layout Standard |
| 1783 |
|
| 1784 |
END vessel; |
| 1785 |
\end_layout |
| 1786 |
|
| 1787 |
\begin_layout Standard |
| 1788 |
|
| 1789 |
|
| 1790 |
\backslash |
| 1791 |
end{ascend} |
| 1792 |
\end_layout |
| 1793 |
|
| 1794 |
\end_inset |
| 1795 |
|
| 1796 |
|
| 1797 |
\end_layout |
| 1798 |
|
| 1799 |
\begin_layout Caption |
| 1800 |
\begin_inset LatexCommand \label{fig:model1.modelVessel} |
| 1801 |
|
| 1802 |
\end_inset |
| 1803 |
|
| 1804 |
First version of the type definition for |
| 1805 |
\family typewriter |
| 1806 |
vessel |
| 1807 |
\family default |
| 1808 |
. |
| 1809 |
|
| 1810 |
\end_layout |
| 1811 |
|
| 1812 |
\end_inset |
| 1813 |
|
| 1814 |
|
| 1815 |
\end_layout |
| 1816 |
|
| 1817 |
\begin_layout Standard |
| 1818 |
Our model definition has the following structure for it so far: |
| 1819 |
\end_layout |
| 1820 |
|
| 1821 |
\begin_layout Itemize |
| 1822 |
|
| 1823 |
\family typewriter |
| 1824 |
MODEL |
| 1825 |
\family default |
| 1826 |
|
| 1827 |
\begin_inset LatexCommand \index{MODEL} |
| 1828 |
|
| 1829 |
\end_inset |
| 1830 |
|
| 1831 |
statement |
| 1832 |
\end_layout |
| 1833 |
|
| 1834 |
\begin_layout Itemize |
| 1835 |
list of variable we intend to use in the type definition |
| 1836 |
\end_layout |
| 1837 |
|
| 1838 |
\begin_layout Itemize |
| 1839 |
equations |
| 1840 |
\end_layout |
| 1841 |
|
| 1842 |
\begin_layout Itemize |
| 1843 |
|
| 1844 |
\family typewriter |
| 1845 |
END |
| 1846 |
\family default |
| 1847 |
|
| 1848 |
\begin_inset LatexCommand \index{END} |
| 1849 |
|
| 1850 |
\end_inset |
| 1851 |
|
| 1852 |
statement |
| 1853 |
\end_layout |
| 1854 |
|
| 1855 |
\begin_layout Standard |
| 1856 |
While we have put the statements in this order, we could mix up and intermix |
| 1857 |
the middle two types of statements, even going to the extreme of defining |
| 1858 |
the variables after we first use them. |
| 1859 |
The |
| 1860 |
\family typewriter |
| 1861 |
MODEL |
| 1862 |
\family default |
| 1863 |
and |
| 1864 |
\family typewriter |
| 1865 |
END |
| 1866 |
\family default |
| 1867 |
statements begin and end the type definition. |
| 1868 |
\end_layout |
| 1869 |
|
| 1870 |
\begin_layout Standard |
| 1871 |
You should see little that surprises you in the syntax here. |
| 1872 |
However, you may have noted that we have created a definition that says |
| 1873 |
absolutely nothing about how to use the variables and equations listed. |
| 1874 |
There is no solution procedure buried in this type definition. |
| 1875 |
In ASCEND the idea of solving is separate from saying what we intend to |
| 1876 |
solve. |
| 1877 |
Also note that we have not said anything about the values for any of the |
| 1878 |
variables nor what we intend to calculate and what variables we intend |
| 1879 |
to treat as fixed input. |
| 1880 |
\end_layout |
| 1881 |
|
| 1882 |
\begin_layout Section |
| 1883 |
Editing, compiling and browsing an ASCEND model |
| 1884 |
\end_layout |
| 1885 |
|
| 1886 |
\begin_layout Standard |
| 1887 |
Could we compile an instance of a vessel given this definition? If there |
| 1888 |
had been some arrays in our definition for which we did not say how many |
| 1889 |
items were in the arrays, we could not. |
| 1890 |
However, here we could compile an instance, putting aside storage space |
| 1891 |
for each of the variables and somehow capturing the equations relating |
| 1892 |
them. |
| 1893 |
\end_layout |
| 1894 |
|
| 1895 |
\begin_layout Standard |
| 1896 |
\begin_inset Marginal |
| 1897 |
status open |
| 1898 |
|
| 1899 |
\begin_layout Standard |
| 1900 |
Do not alter the models subdirectory |
| 1901 |
\end_layout |
| 1902 |
|
| 1903 |
\end_inset |
| 1904 |
|
| 1905 |
When we compile new models, we need a place to store them. |
| 1906 |
One possibility would be to put them into the |
| 1907 |
\family typewriter |
| 1908 |
models |
| 1909 |
\family default |
| 1910 |
|
| 1911 |
\begin_inset LatexCommand \index{models} |
| 1912 |
|
| 1913 |
\end_inset |
| 1914 |
|
| 1915 |
subdirectory of the ASCEND installation |
| 1916 |
\begin_inset Foot |
| 1917 |
status collapsed |
| 1918 |
|
| 1919 |
\begin_layout Standard |
| 1920 |
On windows this might be |
| 1921 |
\family typewriter |
| 1922 |
c: |
| 1923 |
\backslash |
| 1924 |
Program File |
| 1925 |
\backslash |
| 1926 |
ASCEND |
| 1927 |
\backslash |
| 1928 |
models |
| 1929 |
\family default |
| 1930 |
. |
| 1931 |
On Linux, this might be |
| 1932 |
\family typewriter |
| 1933 |
/usr/share/ascend/models |
| 1934 |
\family default |
| 1935 |
. |
| 1936 |
The location can vary depending on how you went about installing ASCEND. |
| 1937 |
\end_layout |
| 1938 |
|
| 1939 |
\end_inset |
| 1940 |
|
| 1941 |
. |
| 1942 |
However, you really should leave the contents of this subdirectory untouched |
| 1943 |
-- always. |
| 1944 |
Hopefully the files will be read-only from your user account. |
| 1945 |
We count on being able to replace the model library totally every time |
| 1946 |
you install a new version of ASCEND. |
| 1947 |
Whenever we add new model libraries or corrected versions of previously |
| 1948 |
existing model libraries, we put them in this subdirectory. |
| 1949 |
This subdirectory belongs to us (the developers of the system): hands off, |
| 1950 |
please. |
| 1951 |
\end_layout |
| 1952 |
|
| 1953 |
\begin_layout Standard |
| 1954 |
\begin_inset Marginal |
| 1955 |
status open |
| 1956 |
|
| 1957 |
\begin_layout Standard |
| 1958 |
rather put your things into the ascdata |
| 1959 |
\begin_inset LatexCommand \index{ascdata} |
| 1960 |
|
| 1961 |
\end_inset |
| 1962 |
|
| 1963 |
subdirectory (you own it) |
| 1964 |
\end_layout |
| 1965 |
|
| 1966 |
\end_inset |
| 1967 |
|
| 1968 |
To avoid this problem, ASCEND also creates a subdirectory called |
| 1969 |
\family typewriter |
| 1970 |
ascdata |
| 1971 |
\family default |
| 1972 |
that it will not touch when you install a new version of ASCEND. |
| 1973 |
It will look in this subdirectory first when looking for a file to load |
| 1974 |
when you have not given a full path name for finding that file. |
| 1975 |
The install process for ASCEND will place |
| 1976 |
\family typewriter |
| 1977 |
ascdata |
| 1978 |
\family default |
| 1979 |
into your home directory |
| 1980 |
\begin_inset LatexCommand \ref{id:#id(pgfId-1007944)} |
| 1981 |
|
| 1982 |
\end_inset |
| 1983 |
|
| 1984 |
|
| 1985 |
\begin_inset Foot |
| 1986 |
status collapsed |
| 1987 |
|
| 1988 |
\begin_layout Standard |
| 1989 |
On Windows, your home directory will normally be the My Documents folder. |
| 1990 |
On Linux, it will normally be |
| 1991 |
\family typewriter |
| 1992 |
/home/ |
| 1993 |
\emph on |
| 1994 |
username |
| 1995 |
\family default |
| 1996 |
\emph default |
| 1997 |
. |
| 1998 |
Note that in both systems, you can set an |
| 1999 |
\begin_inset Quotes eld |
| 2000 |
\end_inset |
| 2001 |
|
| 2002 |
environment |
| 2003 |
\begin_inset Quotes erd |
| 2004 |
\end_inset |
| 2005 |
|
| 2006 |
variable to designate your home directory. |
| 2007 |
\end_layout |
| 2008 |
|
| 2009 |
\end_inset |
| 2010 |
|
| 2011 |
|
| 2012 |
\noun off |
| 2013 |
. |
| 2014 |
ASCEND tells you where it has placed this subdirectory when you install |
| 2015 |
it. |
| 2016 |
However, if you did not note where that was, then you will have to search |
| 2017 |
for it (using a tool like "FIND file or folder"). |
| 2018 |
\end_layout |
| 2019 |
|
| 2020 |
\begin_layout Standard |
| 2021 |
It is within the folder |
| 2022 |
\family typewriter |
| 2023 |
ascdata |
| 2024 |
\family default |
| 2025 |
that you should place any ASCEND models you create. |
| 2026 |
When running a script (which we shall talk about later), ASCEND first looks |
| 2027 |
in this subdirectory for files, and then it looks in the models subdirectory. |
| 2028 |
It stops looking when it finds the first available version of the file. |
| 2029 |
\end_layout |
| 2030 |
|
| 2031 |
\begin_layout Standard |
| 2032 |
\begin_inset Marginal |
| 2033 |
status collapsed |
| 2034 |
|
| 2035 |
\begin_layout Standard |
| 2036 |
create a text file containing the model definition |
| 2037 |
\end_layout |
| 2038 |
|
| 2039 |
\end_inset |
| 2040 |
|
| 2041 |
Next open an editor |
| 2042 |
\begin_inset LatexCommand \index{text editors} |
| 2043 |
|
| 2044 |
\end_inset |
| 2045 |
|
| 2046 |
, such as |
| 2047 |
\family typewriter |
| 2048 |
emacs |
| 2049 |
\family default |
| 2050 |
|
| 2051 |
\begin_inset LatexCommand \index{emacs} |
| 2052 |
|
| 2053 |
\end_inset |
| 2054 |
|
| 2055 |
, |
| 2056 |
\family typewriter |
| 2057 |
gedit |
| 2058 |
\family default |
| 2059 |
|
| 2060 |
\begin_inset LatexCommand \index{gedit} |
| 2061 |
|
| 2062 |
\end_inset |
| 2063 |
|
| 2064 |
, |
| 2065 |
\family typewriter |
| 2066 |
vi |
| 2067 |
\family default |
| 2068 |
|
| 2069 |
\begin_inset LatexCommand \index{vi} |
| 2070 |
|
| 2071 |
\end_inset |
| 2072 |
|
| 2073 |
, |
| 2074 |
\family typewriter |
| 2075 |
vim |
| 2076 |
\family default |
| 2077 |
|
| 2078 |
\begin_inset LatexCommand \index{vim} |
| 2079 |
|
| 2080 |
\end_inset |
| 2081 |
|
| 2082 |
, Notepad |
| 2083 |
\begin_inset LatexCommand \index{Notepad} |
| 2084 |
|
| 2085 |
\end_inset |
| 2086 |
|
| 2087 |
or TextPad |
| 2088 |
\begin_inset LatexCommand \index{TextPad} |
| 2089 |
|
| 2090 |
\end_inset |
| 2091 |
|
| 2092 |
. |
| 2093 |
Now type in or, better yet, cut-and-paste the statements in Figure |
| 2094 |
\begin_inset LatexCommand \ref{fig:model1.modelVessel} |
| 2095 |
|
| 2096 |
\end_inset |
| 2097 |
|
| 2098 |
|
| 2099 |
\noun off |
| 2100 |
. |
| 2101 |
Be very careful to match the use of capital and small letters. |
| 2102 |
Do not worry about blanks between symbols but do not embed blanks within |
| 2103 |
symbols. |
| 2104 |
In other words, do not put a blank in the middle of the symbol |
| 2105 |
\family typewriter |
| 2106 |
\noun default |
| 2107 |
side_wall |
| 2108 |
\family default |
| 2109 |
\noun off |
| 2110 |
but do not worry about putting zero or more blanks between |
| 2111 |
\family typewriter |
| 2112 |
\noun default |
| 2113 |
side_wall |
| 2114 |
\family default |
| 2115 |
\noun off |
| 2116 |
and |
| 2117 |
\family typewriter |
| 2118 |
\noun default |
| 2119 |
= |
| 2120 |
\family default |
| 2121 |
\noun off |
| 2122 |
in an equation. |
| 2123 |
\end_layout |
| 2124 |
|
| 2125 |
\begin_layout Standard |
| 2126 |
When you are finished, be sure to save the file as a text file. |
| 2127 |
Call it |
| 2128 |
\family typewriter |
| 2129 |
vesselPlain.a4c |
| 2130 |
\family default |
| 2131 |
. |
| 2132 |
The " |
| 2133 |
\family typewriter |
| 2134 |
.a4c |
| 2135 |
\family default |
| 2136 |
" stands for "ASCEND 4 Code". |
| 2137 |
Many Windows editors will append " |
| 2138 |
\family typewriter |
| 2139 |
.txt |
| 2140 |
\family default |
| 2141 |
" to the file name. |
| 2142 |
Remove the |
| 2143 |
\family typewriter |
| 2144 |
.txt |
| 2145 |
\family default |
| 2146 |
ending off the file name -- do not let Microsoft bully you into thinking |
| 2147 |
you should not -- and change it to " |
| 2148 |
\family typewriter |
| 2149 |
.a4c |
| 2150 |
\begin_inset LatexCommand \index{a4c} |
| 2151 |
|
| 2152 |
\end_inset |
| 2153 |
|
| 2154 |
|
| 2155 |
\family default |
| 2156 |
". |
| 2157 |
|
| 2158 |
\end_layout |
| 2159 |
|
| 2160 |
\begin_layout Standard |
| 2161 |
(This model is also available as |
| 2162 |
\family typewriter |
| 2163 |
vesselPlain.a4c |
| 2164 |
\family default |
| 2165 |
in the ASCEND models library, but we suggest it would be better for you |
| 2166 |
to go through the exercise of creating your own version here. |
| 2167 |
At the least copy the library file to your ASCEND space so you can play |
| 2168 |
with your own version at this time.) |
| 2169 |
\end_layout |
| 2170 |
|
| 2171 |
\begin_layout Standard |
| 2172 |
When you are done, you should have a text file called |
| 2173 |
\family typewriter |
| 2174 |
vesselPlain.a4c |
| 2175 |
\family default |
| 2176 |
stored in your ASCEND/models/vessel subdirectory. |
| 2177 |
It should contain precisely the statements in Figure |
| 2178 |
\begin_inset LatexCommand \ref{fig:model1.modelVessel} |
| 2179 |
|
| 2180 |
\end_inset |
| 2181 |
|
| 2182 |
|
| 2183 |
\noun off |
| 2184 |
with care having been taken to match capital and lower case letters as |
| 2185 |
shown there. |
| 2186 |
\end_layout |
| 2187 |
|
| 2188 |
\begin_layout Standard |
| 2189 |
\begin_inset Marginal |
| 2190 |
status collapsed |
| 2191 |
|
| 2192 |
\begin_layout Standard |
| 2193 |
start the ASCEND system. |
| 2194 |
Move and resize the windows to make yourself comfortable. |
| 2195 |
\end_layout |
| 2196 |
|
| 2197 |
\end_inset |
| 2198 |
|
| 2199 |
Start the ASCEND system by double clicking on the ASCEND icon if you are |
| 2200 |
on Windows or typing |
| 2201 |
\family typewriter |
| 2202 |
ascend |
| 2203 |
\family default |
| 2204 |
at the command line if you are using a Linux machine |
| 2205 |
\begin_inset Foot |
| 2206 |
status collapsed |
| 2207 |
|
| 2208 |
\begin_layout Standard |
| 2209 |
Depending on the Linux version you have installed, you might find that the |
| 2210 |
command is |
| 2211 |
\family typewriter |
| 2212 |
ascend4 |
| 2213 |
\family default |
| 2214 |
or that you have an ASCEND option in your GNOME 'Applications' menu. |
| 2215 |
\end_layout |
| 2216 |
|
| 2217 |
\end_inset |
| 2218 |
|
| 2219 |
. |
| 2220 |
Four windows will appear, three smaller ones and one larger one that will, |
| 2221 |
if left unattended, disappear by itself in a few seconds. |
| 2222 |
Move the three smaller ones around on your screen so they do not overlap |
| 2223 |
or so they overlap very little. |
| 2224 |
Resize them if you want to. |
| 2225 |
You might start by putting the one called Script |
| 2226 |
\begin_inset LatexCommand \index{Script window} |
| 2227 |
|
| 2228 |
\end_inset |
| 2229 |
|
| 2230 |
in the upper left, the one called Library |
| 2231 |
\begin_inset LatexCommand \index{Library window} |
| 2232 |
|
| 2233 |
\end_inset |
| 2234 |
|
| 2235 |
in the upper right and the one called Console |
| 2236 |
\begin_inset LatexCommand \index{Console} |
| 2237 |
|
| 2238 |
\end_inset |
| 2239 |
|
| 2240 |
in the lower right. |
| 2241 |
We shall assume you have placed them in these positions in the following |
| 2242 |
so, even if that is not your favorite placement, it might be useful to |
| 2243 |
use it for now. |
| 2244 |
\end_layout |
| 2245 |
|
| 2246 |
\begin_layout Standard |
| 2247 |
\begin_inset Marginal |
| 2248 |
status collapsed |
| 2249 |
|
| 2250 |
\begin_layout Standard |
| 2251 |
note that each window by itself looks pretty nonthreatening |
| 2252 |
\end_layout |
| 2253 |
|
| 2254 |
\end_inset |
| 2255 |
|
| 2256 |
As you can see, each window by itself looks like a pretty normal window. |
| 2257 |
Each has buttons across the top under which one will find different tools |
| 2258 |
to run. |
| 2259 |
Each also has one to three sub-windows for displaying things. |
| 2260 |
Each has a Help button that you can push at any time that you want to read |
| 2261 |
all kinds of detailed things about the window |
| 2262 |
\begin_inset Foot |
| 2263 |
status collapsed |
| 2264 |
|
| 2265 |
\begin_layout Standard |
| 2266 |
assuming you have got the help files installed on your system, which you |
| 2267 |
may not find you have. |
| 2268 |
\end_layout |
| 2269 |
|
| 2270 |
\end_inset |
| 2271 |
|
| 2272 |
. |
| 2273 |
For the moment we will provide you with the "just-in-time" details here |
| 2274 |
so you do not need to be sidetracked just yet by pushing these Help buttons. |
| 2275 |
\end_layout |
| 2276 |
|
| 2277 |
\begin_layout Standard |
| 2278 |
\begin_inset Marginal |
| 2279 |
status collapsed |
| 2280 |
|
| 2281 |
\begin_layout Standard |
| 2282 |
hey, where did that window go? I want it back NOW! |
| 2283 |
\end_layout |
| 2284 |
|
| 2285 |
\end_inset |
| 2286 |
|
| 2287 |
If you ever lose a window, open the Script window and under the Tools |
| 2288 |
\begin_inset LatexCommand \index{Tools} |
| 2289 |
|
| 2290 |
\end_inset |
| 2291 |
|
| 2292 |
button, select the window you wish to open. |
| 2293 |
You cannot lose the Script window unless you shut down ASCEND. |
| 2294 |
For other windows in ASCEND, you can close them and re-open them as required. |
| 2295 |
Any window that you closed can usually be restored by going back to the |
| 2296 |
Script window and selected it from the Tools menu there. |
| 2297 |
\end_layout |
| 2298 |
|
| 2299 |
\begin_layout Standard |
| 2300 |
\begin_inset Marginal |
| 2301 |
status collapsed |
| 2302 |
|
| 2303 |
\begin_layout Standard |
| 2304 |
How do I quit |
| 2305 |
\begin_inset LatexCommand \index{quit ASCEND} |
| 2306 |
|
| 2307 |
\end_inset |
| 2308 |
|
| 2309 |
ASCEND? |
| 2310 |
\end_layout |
| 2311 |
|
| 2312 |
\end_inset |
| 2313 |
|
| 2314 |
To exit |
| 2315 |
\begin_inset LatexCommand \index{exit ASCEND} |
| 2316 |
|
| 2317 |
\end_inset |
| 2318 |
|
| 2319 |
ASCEND, close the Script window. |
| 2320 |
You will be asked to confirm that you want to exit ASCEND. |
| 2321 |
If you have simulations in memory this will stop you from losing your results. |
| 2322 |
\end_layout |
| 2323 |
|
| 2324 |
\begin_layout Standard |
| 2325 |
\begin_inset Marginal |
| 2326 |
status collapsed |
| 2327 |
|
| 2328 |
\begin_layout Standard |
| 2329 |
saving |
| 2330 |
\begin_inset LatexCommand \index{saving window position} |
| 2331 |
|
| 2332 |
\end_inset |
| 2333 |
|
| 2334 |
window positions |
| 2335 |
\begin_inset LatexCommand \index{window position} |
| 2336 |
|
| 2337 |
\end_inset |
| 2338 |
|
| 2339 |
|
| 2340 |
\end_layout |
| 2341 |
|
| 2342 |
\end_inset |
| 2343 |
|
| 2344 |
ASCEND will not remember your window locations automatically. |
| 2345 |
If you like where you have placed the windows for ASCEND on your display, |
| 2346 |
go to the Script window and select 'Save all appearances |
| 2347 |
\begin_inset LatexCommand \index{window locations, save} |
| 2348 |
|
| 2349 |
\end_inset |
| 2350 |
|
| 2351 |
|
| 2352 |
\begin_inset LatexCommand \index{appearances, save all} |
| 2353 |
|
| 2354 |
\end_inset |
| 2355 |
|
| 2356 |
' under the View |
| 2357 |
\begin_inset LatexCommand \index{View} |
| 2358 |
|
| 2359 |
\end_inset |
| 2360 |
|
| 2361 |
menu. |
| 2362 |
A similar tool exists for each window for saving only its position. |
| 2363 |
\end_layout |
| 2364 |
|
| 2365 |
\begin_layout Standard |
| 2366 |
\begin_inset Marginal |
| 2367 |
status collapsed |
| 2368 |
|
| 2369 |
\begin_layout Standard |
| 2370 |
start by loading and compiling using tools in the Library window |
| 2371 |
\end_layout |
| 2372 |
|
| 2373 |
\end_inset |
| 2374 |
|
| 2375 |
We shall start with the Library window in the upper right. |
| 2376 |
This window provides you with the tools to load and compile files containing |
| 2377 |
type definitions. |
| 2378 |
You can also display |
| 2379 |
\begin_inset LatexCommand \index{display} |
| 2380 |
|
| 2381 |
\end_inset |
| 2382 |
|
| 2383 |
the code for the different types you have loaded. |
| 2384 |
\end_layout |
| 2385 |
|
| 2386 |
\begin_layout Standard |
| 2387 |
\begin_inset Marginal |
| 2388 |
status collapsed |
| 2389 |
|
| 2390 |
\begin_layout Standard |
| 2391 |
use the left mouse button unless we tell you otherwise (however, on you |
| 2392 |
own explore using the right mouse button in any of the windows) |
| 2393 |
\end_layout |
| 2394 |
|
| 2395 |
\end_inset |
| 2396 |
|
| 2397 |
Let's load your file. |
| 2398 |
Under the File button select the 'Read types from File |
| 2399 |
\begin_inset LatexCommand \index{Read Types from File} |
| 2400 |
|
| 2401 |
\end_inset |
| 2402 |
|
| 2403 |
' tool. |
| 2404 |
You select this tool by clicking on it using the left mouse button - i.e., |
| 2405 |
the button you should have expected to use. |
| 2406 |
A window will appear asking you to find the file you want to read into |
| 2407 |
ASCEND. |
| 2408 |
Navigate to where you stored |
| 2409 |
\family typewriter |
| 2410 |
vesselPlain.a4c |
| 2411 |
\family default |
| 2412 |
(in the subdirectory |
| 2413 |
\family typewriter |
| 2414 |
ascdata |
| 2415 |
\family default |
| 2416 |
) and select that file. |
| 2417 |
If you have the wrong ending on the file (you left |
| 2418 |
\family typewriter |
| 2419 |
.txt |
| 2420 |
\family default |
| 2421 |
or you forgot to put |
| 2422 |
\family typewriter |
| 2423 |
.a4c |
| 2424 |
\family default |
| 2425 |
as the ending), tell the system to list all files and pick the one you |
| 2426 |
want. |
| 2427 |
The |
| 2428 |
\family typewriter |
| 2429 |
.a4c |
| 2430 |
\family default |
| 2431 |
is used by the system to list only the files it thinks you might want to |
| 2432 |
load, but ASCEND isn't fussy. |
| 2433 |
It will attempt to load any file you pick. |
| 2434 |
\end_layout |
| 2435 |
|
| 2436 |
\begin_layout Standard |
| 2437 |
Look in the Console window at the lower right, and, if the file loads without |
| 2438 |
any errors being listed there, you can skip past the next bit to where |
| 2439 |
you should start to compile an instance. |
| 2440 |
The next bit has some useful hints on how to debug your models. |
| 2441 |
If you want some debugging experience, put a known error into your |
| 2442 |
\family typewriter |
| 2443 |
vesselPlain.a4c |
| 2444 |
\family default |
| 2445 |
file and see what happens. |
| 2446 |
This move will give you a reason to read the following section. |
| 2447 |
\end_layout |
| 2448 |
|
| 2449 |
\begin_layout Standard |
| 2450 |
\begin_inset Marginal |
| 2451 |
status open |
| 2452 |
|
| 2453 |
\begin_layout Standard |
| 2454 |
Do not ignore the diagnostics |
| 2455 |
\begin_inset LatexCommand \index{diagnostics} |
| 2456 |
|
| 2457 |
\end_inset |
| 2458 |
|
| 2459 |
that might appear in the Console window |
| 2460 |
\end_layout |
| 2461 |
|
| 2462 |
\end_inset |
| 2463 |
|
| 2464 |
If the Console window in the lower right starts filling with several tens |
| 2465 |
of lines of diagnostics, look to see if you included the |
| 2466 |
\family typewriter |
| 2467 |
REQUIRE |
| 2468 |
\family default |
| 2469 |
|
| 2470 |
\begin_inset LatexCommand \index{REQUIRE} |
| 2471 |
|
| 2472 |
\end_inset |
| 2473 |
|
| 2474 |
statement at the beginning of your model file. |
| 2475 |
Without that statement, ASCEND is missing all the definitions for the types |
| 2476 |
of variables in your model, and it will go wild telling you so |
| 2477 |
\begin_inset Foot |
| 2478 |
status collapsed |
| 2479 |
|
| 2480 |
\begin_layout Standard |
| 2481 |
It might also be choking on a Word document because you forgot to save |
| 2482 |
it as a text file. |
| 2483 |
\end_layout |
| 2484 |
|
| 2485 |
\end_inset |
| 2486 |
|
| 2487 |
. |
| 2488 |
\end_layout |
| 2489 |
|
| 2490 |
\begin_layout Standard |
| 2491 |
While loading the files containing these types, ASCEND will look very closely |
| 2492 |
at the syntax and will give you all kinds of diagnostic messages in the |
| 2493 |
Console window (lower right) if you have done something wrong. |
| 2494 |
It will also at times spew out some warning messages |
| 2495 |
\begin_inset LatexCommand \index{warning messages} |
| 2496 |
|
| 2497 |
\end_inset |
| 2498 |
|
| 2499 |
if you have done something thought to be poor modeling style. |
| 2500 |
You must heed the error messages as the file will not load if there are |
| 2501 |
any. |
| 2502 |
ASCEND will tell you if it did not load the file. |
| 2503 |
|
| 2504 |
\end_layout |
| 2505 |
|
| 2506 |
\begin_layout Standard |
| 2507 |
You should consider heeding the warnings if you get any. |
| 2508 |
If you ignore them now, they may come back and haunt you later. |
| 2509 |
However, there are times when we issue a warning but everything will work, |
| 2510 |
and you will think we were not too clever. |
| 2511 |
Our response: better modeling style |
| 2512 |
\begin_inset LatexCommand \index{modeling style} |
| 2513 |
|
| 2514 |
\end_inset |
| 2515 |
|
| 2516 |
can eliminate these warnings. |
| 2517 |
(It's been our system so we get to have the last word.) |
| 2518 |
\end_layout |
| 2519 |
|
| 2520 |
\begin_layout Standard |
| 2521 |
\begin_inset Marginal |
| 2522 |
status collapsed |
| 2523 |
|
| 2524 |
\begin_layout Standard |
| 2525 |
how do I jump |
| 2526 |
\begin_inset LatexCommand \index{jump to line} |
| 2527 |
|
| 2528 |
\end_inset |
| 2529 |
|
| 2530 |
|
| 2531 |
\begin_inset LatexCommand \index{line numbers} |
| 2532 |
|
| 2533 |
\end_inset |
| 2534 |
|
| 2535 |
to line 100 of a file when using some of the standard editors? |
| 2536 |
\end_layout |
| 2537 |
|
| 2538 |
\end_inset |
| 2539 |
|
| 2540 |
The error and warning messages will contain a line number in the file where |
| 2541 |
the error has occurred. |
| 2542 |
This will be the line number as counted by an editor with the first line |
| 2543 |
being line 1 in the file. |
| 2544 |
Editors always provide you with a means to get directly to a line number |
| 2545 |
in a file. |
| 2546 |
Find out how to do that or you will not be too happy with debugging a large |
| 2547 |
file. |
| 2548 |
\end_layout |
| 2549 |
|
| 2550 |
\begin_layout Standard |
| 2551 |
You will be in the debug mode for a new system so do not expect it to be |
| 2552 |
totally obvious the first few times you make an error. |
| 2553 |
We have tried to use language that should be meaningful, but we may have |
| 2554 |
failed or the error may be pretty subtle and not possible for us to anticipate |
| 2555 |
how to describe it in your terms. |
| 2556 |
(Send us a bug report if you have any good ideas on language.) |
| 2557 |
\end_layout |
| 2558 |
|
| 2559 |
\begin_layout Standard |
| 2560 |
\begin_inset Marginal |
| 2561 |
status collapsed |
| 2562 |
|
| 2563 |
\begin_layout Standard |
| 2564 |
reloading a file |
| 2565 |
\begin_inset LatexCommand \index{reloading a file} |
| 2566 |
|
| 2567 |
\end_inset |
| 2568 |
|
| 2569 |
|
| 2570 |
\begin_inset LatexCommand \index{file, reloading} |
| 2571 |
|
| 2572 |
\end_inset |
| 2573 |
|
| 2574 |
overwrites the previous version |
| 2575 |
\end_layout |
| 2576 |
|
| 2577 |
\end_inset |
| 2578 |
|
| 2579 |
You can reload any file your have corrected using the Read types from file |
| 2580 |
tool under the File menu. |
| 2581 |
It will overwrite the previous version of the file only if the file has |
| 2582 |
changed since it was last loaded (note that we do not reload those big |
| 2583 |
files unless you make a change even if you tell us to). |
| 2584 |
\end_layout |
| 2585 |
|
| 2586 |
\begin_layout Standard |
| 2587 |
\begin_inset Marginal |
| 2588 |
status collapsed |
| 2589 |
|
| 2590 |
\begin_layout Standard |
| 2591 |
displaying the code |
| 2592 |
\end_layout |
| 2593 |
|
| 2594 |
\end_inset |
| 2595 |
|
| 2596 |
You can display the code you have written. |
| 2597 |
Select the model vessel in the right window of the Library. |
| 2598 |
Then under the Display |
| 2599 |
\begin_inset LatexCommand \index{Display window} |
| 2600 |
|
| 2601 |
\end_inset |
| 2602 |
|
| 2603 |
menu at the top, select the tool Code. |
| 2604 |
The Display window will open displaying the code for this model. |
| 2605 |
\end_layout |
| 2606 |
|
| 2607 |
\begin_layout Standard |
| 2608 |
\begin_inset Marginal |
| 2609 |
status collapsed |
| 2610 |
|
| 2611 |
\begin_layout Standard |
| 2612 |
now compile as " |
| 2613 |
\family typewriter |
| 2614 |
v |
| 2615 |
\family default |
| 2616 |
" |
| 2617 |
\end_layout |
| 2618 |
|
| 2619 |
\end_inset |
| 2620 |
|
| 2621 |
Okay, you have your file loaded without getting any diagnostics. |
| 2622 |
You are ready to compile |
| 2623 |
\begin_inset LatexCommand \index{compile} |
| 2624 |
|
| 2625 |
\end_inset |
| 2626 |
|
| 2627 |
. |
| 2628 |
In the Library window, look in the left window and select the file |
| 2629 |
\family typewriter |
| 2630 |
vesselPlain.a4c |
| 2631 |
\family default |
| 2632 |
. |
| 2633 |
It contains the type definition you wish to compile. |
| 2634 |
You should see the type vessel appear in the right window. |
| 2635 |
Select vessel. |
| 2636 |
Under the Edit button, select Create simulation. |
| 2637 |
A small window opens and asks you to name the simulation. |
| 2638 |
Call it |
| 2639 |
\family typewriter |
| 2640 |
v |
| 2641 |
\family default |
| 2642 |
-- yes, just the letter "v", and select "OK". |
| 2643 |
Short names for instances often seem to be preferable. |
| 2644 |
|
| 2645 |
\end_layout |
| 2646 |
|
| 2647 |
\begin_layout Standard |
| 2648 |
Look again in the Console window for diagnostics. |
| 2649 |
If everything worked without error, you will see some statistics telling |
| 2650 |
you how many models, relations and so forth you have created during the |
| 2651 |
compile step. |
| 2652 |
\end_layout |
| 2653 |
|
| 2654 |
\begin_layout Standard |
| 2655 |
\begin_inset Marginal |
| 2656 |
status collapsed |
| 2657 |
|
| 2658 |
\begin_layout Standard |
| 2659 |
and pass the instance |
| 2660 |
\begin_inset LatexCommand \index{instance} |
| 2661 |
|
| 2662 |
\end_inset |
| 2663 |
|
| 2664 |
to the Browser |
| 2665 |
\begin_inset LatexCommand \index{Browser} |
| 2666 |
|
| 2667 |
\end_inset |
| 2668 |
|
| 2669 |
|
| 2670 |
\end_layout |
| 2671 |
|
| 2672 |
\end_inset |
| 2673 |
|
| 2674 |
Select |
| 2675 |
\family typewriter |
| 2676 |
v IS A vessel |
| 2677 |
\family default |
| 2678 |
in the bottom of the Library window. |
| 2679 |
Then under the Export |
| 2680 |
\begin_inset LatexCommand \index{Export} |
| 2681 |
|
| 2682 |
\end_inset |
| 2683 |
|
| 2684 |
button, select 'Simulation to Browser |
| 2685 |
\begin_inset LatexCommand \index{Export Simulation to Browser} |
| 2686 |
|
| 2687 |
\end_inset |
| 2688 |
|
| 2689 |
' to export |
| 2690 |
\family typewriter |
| 2691 |
v |
| 2692 |
\family default |
| 2693 |
to the Browser tool set. |
| 2694 |
The Browser window will open and contain |
| 2695 |
\family typewriter |
| 2696 |
v |
| 2697 |
\family default |
| 2698 |
. |
| 2699 |
It might be useful to enlarge this window and move it down a bit, placing |
| 2700 |
it a bit to the right of the center of your screen. |
| 2701 |
(Remember you can save this positioning and sizing of the Browser window |
| 2702 |
by going under the View menu and picking 'Save appearance'.) |
| 2703 |
\end_layout |
| 2704 |
|
| 2705 |
\begin_layout Standard |
| 2706 |
\begin_inset Marginal |
| 2707 |
status collapsed |
| 2708 |
|
| 2709 |
\begin_layout Standard |
| 2710 |
examine |
| 2711 |
\family typewriter |
| 2712 |
v |
| 2713 |
\family default |
| 2714 |
by playing with it in the Browser |
| 2715 |
\end_layout |
| 2716 |
|
| 2717 |
\end_inset |
| 2718 |
|
| 2719 |
In the left upper window of the Browser, you will find |
| 2720 |
\family typewriter |
| 2721 |
v |
| 2722 |
\family default |
| 2723 |
to be the current object. |
| 2724 |
Listed in the right window are all the parts of the current object. |
| 2725 |
You will see the variables listed here along with an indication of their |
| 2726 |
type. |
| 2727 |
For example, you will find |
| 2728 |
\family typewriter |
| 2729 |
Cylinder IS A relation |
| 2730 |
\family default |
| 2731 |
and |
| 2732 |
\family typewriter |
| 2733 |
D IS A distance |
| 2734 |
\family default |
| 2735 |
listed, among many others. |
| 2736 |
|
| 2737 |
\family typewriter |
| 2738 |
Cylinder |
| 2739 |
\family default |
| 2740 |
is one of the equations you wrote describing the model while |
| 2741 |
\family typewriter |
| 2742 |
D |
| 2743 |
\family default |
| 2744 |
was the diameter of the vessel. |
| 2745 |
|
| 2746 |
\end_layout |
| 2747 |
|
| 2748 |
\begin_layout Standard |
| 2749 |
\begin_inset Marginal |
| 2750 |
status collapsed |
| 2751 |
|
| 2752 |
\begin_layout Standard |
| 2753 |
included flags |
| 2754 |
\begin_inset LatexCommand \index{included flags} |
| 2755 |
|
| 2756 |
\end_inset |
| 2757 |
|
| 2758 |
|
| 2759 |
\begin_inset LatexCommand \index{flag, included} |
| 2760 |
|
| 2761 |
\end_inset |
| 2762 |
|
| 2763 |
for relations |
| 2764 |
\end_layout |
| 2765 |
|
| 2766 |
\end_inset |
| 2767 |
|
| 2768 |
If you pick any of the parts in the right or bottom windows, it becomes |
| 2769 |
the current object; its parts then show in the right window. |
| 2770 |
For example, a relation has a boolean part (a flag that takes the value |
| 2771 |
|
| 2772 |
\family typewriter |
| 2773 |
TRUE |
| 2774 |
\family default |
| 2775 |
or |
| 2776 |
\family typewriter |
| 2777 |
FALSE |
| 2778 |
\family default |
| 2779 |
) indicating whether or not it is to be included when ASCEND solves the |
| 2780 |
equations you defined for the model. |
| 2781 |
\end_layout |
| 2782 |
|
| 2783 |
\begin_layout Standard |
| 2784 |
If you wish to display the current value for this flag, pick 'Display Atom |
| 2785 |
Values |
| 2786 |
\begin_inset LatexCommand \index{Display Atom Values} |
| 2787 |
|
| 2788 |
\end_inset |
| 2789 |
|
| 2790 |
' under the View menu. |
| 2791 |
This tool toggles a switch that causes either the value or the type to |
| 2792 |
show for a variable, a constant or a relation in the upper right window |
| 2793 |
of the Browser. |
| 2794 |
Try toggling it back and forth and looking at different things in the Browser. |
| 2795 |
\end_layout |
| 2796 |
|
| 2797 |
\begin_layout Standard |
| 2798 |
Pick each of the tools under View and note what happens to the displaying |
| 2799 |
of things in the Browser. |
| 2800 |
\end_layout |
| 2801 |
|
| 2802 |
\begin_layout Standard |
| 2803 |
Across the bottom of the Browser window note the buttons you can select |
| 2804 |
labeled |
| 2805 |
\family typewriter |
| 2806 |
RV |
| 2807 |
\family default |
| 2808 |
, |
| 2809 |
\family typewriter |
| 2810 |
DV |
| 2811 |
\family default |
| 2812 |
and so forth. |
| 2813 |
If you have made the Browser window large enough, you will see to the right |
| 2814 |
of these buttons the type of objects whose value you want to appear or |
| 2815 |
not in the lower Browser window as you toggle each button. |
| 2816 |
Toggle each of these buttons and see if the lower display changes. |
| 2817 |
If it does not, then this type of part is not in the current object. |
| 2818 |
\end_layout |
| 2819 |
|
| 2820 |
\begin_layout Section |
| 2821 |
Solving |
| 2822 |
\begin_inset LatexCommand \index{Solving} |
| 2823 |
|
| 2824 |
\end_inset |
| 2825 |
|
| 2826 |
an ASCEND instance |
| 2827 |
\end_layout |
| 2828 |
|
| 2829 |
\begin_layout Standard |
| 2830 |
Well, you have been patient. |
| 2831 |
While there are lots of interesting tools left to explore in the Browser, |
| 2832 |
perhaps it is time to try to solve this model. |
| 2833 |
To solve |
| 2834 |
\family typewriter |
| 2835 |
v |
| 2836 |
\family default |
| 2837 |
, make it the current object (it alone should be listed in the upper left |
| 2838 |
window of the Browser). |
| 2839 |
Then, under the Export |
| 2840 |
\begin_inset LatexCommand \index{Export to Solver} |
| 2841 |
|
| 2842 |
\end_inset |
| 2843 |
|
| 2844 |
menu, select 'to Solver'. |
| 2845 |
The Solver window will open, along with a smaller window labeled Eligible |
| 2846 |
\begin_inset LatexCommand \index{window, Eligible} |
| 2847 |
|
| 2848 |
\end_inset |
| 2849 |
|
| 2850 |
|
| 2851 |
\begin_inset LatexCommand \index{Eligible window} |
| 2852 |
|
| 2853 |
\end_inset |
| 2854 |
|
| 2855 |
. |
| 2856 |
Move the Eligible window up a bit so it does not cover any or very little |
| 2857 |
of the Solver window. |
| 2858 |
Move the Solver window to the lower left and enlarge it so you can see |
| 2859 |
all of its contents. |
| 2860 |
|
| 2861 |
\end_layout |
| 2862 |
|
| 2863 |
\begin_layout Standard |
| 2864 |
\begin_inset Marginal |
| 2865 |
status collapsed |
| 2866 |
|
| 2867 |
\begin_layout Standard |
| 2868 |
if ASCEND stops responding |
| 2869 |
\begin_inset LatexCommand \index{responding, ASCEND stops} |
| 2870 |
|
| 2871 |
\end_inset |
| 2872 |
|
| 2873 |
, hunt down one of those "nasty" windows with a "yellow lock |
| 2874 |
\begin_inset LatexCommand \index{yellow lock} |
| 2875 |
|
| 2876 |
\end_inset |
| 2877 |
|
| 2878 |
" and close it properly |
| 2879 |
\end_layout |
| 2880 |
|
| 2881 |
\end_inset |
| 2882 |
|
| 2883 |
This Eligible window is 'modal': if it is open and you do not do something |
| 2884 |
to make it happy and go away, it will stop you from doing anything else |
| 2885 |
in the ASCEND system. |
| 2886 |
Such windows appear with a black lock icon in a yellow field -- we shall |
| 2887 |
call it a "yellow lock." They demand you attend to them |
| 2888 |
\emph on |
| 2889 |
now |
| 2890 |
\emph default |
| 2891 |
. |
| 2892 |
A good solution would be for such a window to stay open and on top of all |
| 2893 |
the other open windows. |
| 2894 |
Unfortunately we have not been able under all window managers to stop it |
| 2895 |
from ducking under another window. |
| 2896 |
If you ever find ASCEND unwilling to respond, iconify the other windows |
| 2897 |
to get them out of the way, until you find one of these windows. |
| 2898 |
On the PC you can go to the icon bar at the bottom of your screen and, |
| 2899 |
by clicking on the window, bring it to the top. |
| 2900 |
Then do whatever it takes to make it happy and close properly -- such as |
| 2901 |
cancel it. |
| 2902 |
If you are not careful here, for example, this window will hide under the |
| 2903 |
Solver window before you are through with it. |
| 2904 |
\end_layout |
| 2905 |
|
| 2906 |
\begin_layout Standard |
| 2907 |
\begin_inset Marginal |
| 2908 |
status open |
| 2909 |
|
| 2910 |
\begin_layout Standard |
| 2911 |
is our problem well-posed |
| 2912 |
\begin_inset LatexCommand \index{well-posed} |
| 2913 |
|
| 2914 |
\end_inset |
| 2915 |
|
| 2916 |
? |
| 2917 |
\end_layout |
| 2918 |
|
| 2919 |
\end_inset |
| 2920 |
|
| 2921 |
The Solver window contains the information we need to see to explain why |
| 2922 |
the Eligible window opened in the first place. |
| 2923 |
Examine the information the Solver displays. |
| 2924 |
It tells you that |
| 2925 |
\family typewriter |
| 2926 |
v |
| 2927 |
\family default |
| 2928 |
has 6 relations defining it and that all are equalities and included. |
| 2929 |
It has no inequalities. |
| 2930 |
On the right side we see there are 10 variables and all are 'free |
| 2931 |
\begin_inset LatexCommand \index{free variables} |
| 2932 |
|
| 2933 |
\end_inset |
| 2934 |
|
| 2935 |
.' A free variable is one for which you want the system to compute a value. |
| 2936 |
Hmm, 6 equations in 10 variables. |
| 2937 |
Something is wrong here. |
| 2938 |
For a well-posed problem, you want 6 equations in 6 variables (i.e., square |
| 2939 |
\begin_inset LatexCommand \index{square} |
| 2940 |
|
| 2941 |
\end_inset |
| 2942 |
|
| 2943 |
). |
| 2944 |
ASCEND reports that the system is underspecified |
| 2945 |
\begin_inset LatexCommand \index{underspecified} |
| 2946 |
|
| 2947 |
\end_inset |
| 2948 |
|
| 2949 |
by 4. |
| 2950 |
This means you need to pick four of the variables and declare them to be |
| 2951 |
fixed |
| 2952 |
\begin_inset LatexCommand \index{fixed} |
| 2953 |
|
| 2954 |
\end_inset |
| 2955 |
|
| 2956 |
. |
| 2957 |
You will also have to pick values for these fixed variables before you |
| 2958 |
can solve for the remaining 6. |
| 2959 |
For such a small problem as this one, this task is not formidable. |
| 2960 |
For a model with 50,000 equations and 60,000 variables, one would quit |
| 2961 |
and go home. |
| 2962 |
We have exposed a need here. |
| 2963 |
We certainly would like ASCEND to help us here for this small problem. |
| 2964 |
But we insist that it help us in major ways to make the 50,000 equation, |
| 2965 |
60,000 variable problem possible. |
| 2966 |
\end_layout |
| 2967 |
|
| 2968 |
\begin_layout Standard |
| 2969 |
\begin_inset Marginal |
| 2970 |
status collapsed |
| 2971 |
|
| 2972 |
\begin_layout Standard |
| 2973 |
picking variables we are going to fix |
| 2974 |
\end_layout |
| 2975 |
|
| 2976 |
\end_inset |
| 2977 |
|
| 2978 |
Okay, the small help such as needed here is why the Eligible window opened. |
| 2979 |
Let's return to it. |
| 2980 |
It lists all the variables of those not yet fixed that are eligible to |
| 2981 |
be fixed and still leave us a calculation that has a chance to solve. |
| 2982 |
The algorithm to find eligible variables does an quick analysis of the |
| 2983 |
structure of the equations. |
| 2984 |
The variables it lists are those that can be fixed |
| 2985 |
\emph on |
| 2986 |
without |
| 2987 |
\emph default |
| 2988 |
the system becoming numerically singular. |
| 2989 |
So any variables that are not shown |
| 2990 |
\emph on |
| 2991 |
cannot possibly |
| 2992 |
\emph default |
| 2993 |
help you. |
| 2994 |
\end_layout |
| 2995 |
|
| 2996 |
\begin_layout Standard |
| 2997 |
So look at the list and decide what you would like to fix for your first |
| 2998 |
calculation with this model. |
| 2999 |
Diameter ( |
| 3000 |
\family typewriter |
| 3001 |
v.D |
| 3002 |
\family default |
| 3003 |
) seems a good choice. |
| 3004 |
Now you can see why we called the instance just plain old |
| 3005 |
\family typewriter |
| 3006 |
v |
| 3007 |
\family default |
| 3008 |
. |
| 3009 |
A longer name would get tiring here. |
| 3010 |
Anyway, pick |
| 3011 |
\family typewriter |
| 3012 |
v.D |
| 3013 |
\family default |
| 3014 |
. |
| 3015 |
Immediately the list reappears with |
| 3016 |
\family typewriter |
| 3017 |
v.D |
| 3018 |
\family default |
| 3019 |
no longer on it. |
| 3020 |
ASCEND has just repeated the eligibility analysis, and found that more |
| 3021 |
variables still need to be fixed. |
| 3022 |
\end_layout |
| 3023 |
|
| 3024 |
\begin_layout Standard |
| 3025 |
We have three more to pick. |
| 3026 |
On the list are both vessel height, |
| 3027 |
\family typewriter |
| 3028 |
v.H |
| 3029 |
\family default |
| 3030 |
, and |
| 3031 |
\family typewriter |
| 3032 |
v.H_to_D_ratio |
| 3033 |
\family default |
| 3034 |
. |
| 3035 |
We certainly cannot pick both of these. |
| 3036 |
One implies the other if we know a value for |
| 3037 |
\family typewriter |
| 3038 |
v.D |
| 3039 |
\family default |
| 3040 |
. |
| 3041 |
Pick |
| 3042 |
\family typewriter |
| 3043 |
v.H_to_D_ratio |
| 3044 |
\family default |
| 3045 |
. |
| 3046 |
Note that |
| 3047 |
\family typewriter |
| 3048 |
v.H |
| 3049 |
\family default |
| 3050 |
is no longer eligible. |
| 3051 |
Good. |
| 3052 |
We would be worried if it were still there. |
| 3053 |
\end_layout |
| 3054 |
|
| 3055 |
\begin_layout Standard |
| 3056 |
We see |
| 3057 |
\family typewriter |
| 3058 |
v.metal_density |
| 3059 |
\emph on |
| 3060 |
. |
| 3061 |
|
| 3062 |
\family default |
| 3063 |
\emph default |
| 3064 |
Pick it. |
| 3065 |
Strange. |
| 3066 |
Metal mass and volume stayed eligible. |
| 3067 |
Why? If we pick metal mass, wall thickness is implied, and the same is |
| 3068 |
true if we were to pick metal volume. |
| 3069 |
However, as it seems much more natural to pick |
| 3070 |
\family typewriter |
| 3071 |
wall_thickness |
| 3072 |
\family default |
| 3073 |
, make that the last variable you choose. |
| 3074 |
The Solver window now says this problem is square (i.e., it has 6 equations |
| 3075 |
in the same number of unknowns). |
| 3076 |
Table |
| 3077 |
\begin_inset LatexCommand \ref{tab:model1.variableFixed} |
| 3078 |
|
| 3079 |
\end_inset |
| 3080 |
|
| 3081 |
|
| 3082 |
\noun off |
| 3083 |
summarizes the four variables we have elected here to fix. |
| 3084 |
\end_layout |
| 3085 |
|
| 3086 |
\begin_layout Standard |
| 3087 |
\begin_inset Float table |
| 3088 |
wide false |
| 3089 |
sideways false |
| 3090 |
status open |
| 3091 |
|
| 3092 |
\begin_layout Caption |
| 3093 |
\begin_inset LatexCommand \label{tab:model1.variableFixed} |
| 3094 |
|
| 3095 |
\end_inset |
| 3096 |
|
| 3097 |
Variables we have fixed |
| 3098 |
\begin_inset LatexCommand \index{fixed variables} |
| 3099 |
|
| 3100 |
\end_inset |
| 3101 |
|
| 3102 |
|
| 3103 |
\end_layout |
| 3104 |
|
| 3105 |
\begin_layout Standard |
| 3106 |
\begin_inset Tabular |
| 3107 |
<lyxtabular version="3" rows="5" columns="1"> |
| 3108 |
<features> |
| 3109 |
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0"> |
| 3110 |
<row topline="true" bottomline="true"> |
| 3111 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3112 |
\begin_inset Text |
| 3113 |
|
| 3114 |
\begin_layout Standard |
| 3115 |
variable |
| 3116 |
\end_layout |
| 3117 |
|
| 3118 |
\end_inset |
| 3119 |
</cell> |
| 3120 |
</row> |
| 3121 |
<row topline="true"> |
| 3122 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3123 |
\begin_inset Text |
| 3124 |
|
| 3125 |
\begin_layout Standard |
| 3126 |
|
| 3127 |
\family typewriter |
| 3128 |
D |
| 3129 |
\end_layout |
| 3130 |
|
| 3131 |
\end_inset |
| 3132 |
</cell> |
| 3133 |
</row> |
| 3134 |
<row topline="true"> |
| 3135 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3136 |
\begin_inset Text |
| 3137 |
|
| 3138 |
\begin_layout Standard |
| 3139 |
|
| 3140 |
\family typewriter |
| 3141 |
H_to_D_ratio |
| 3142 |
\end_layout |
| 3143 |
|
| 3144 |
\end_inset |
| 3145 |
</cell> |
| 3146 |
</row> |
| 3147 |
<row topline="true"> |
| 3148 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3149 |
\begin_inset Text |
| 3150 |
|
| 3151 |
\begin_layout Standard |
| 3152 |
|
| 3153 |
\family typewriter |
| 3154 |
meta_density |
| 3155 |
\end_layout |
| 3156 |
|
| 3157 |
\end_inset |
| 3158 |
</cell> |
| 3159 |
</row> |
| 3160 |
<row topline="true" bottomline="true"> |
| 3161 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3162 |
\begin_inset Text |
| 3163 |
|
| 3164 |
\begin_layout Standard |
| 3165 |
|
| 3166 |
\family typewriter |
| 3167 |
wall_thickness |
| 3168 |
\end_layout |
| 3169 |
|
| 3170 |
\end_inset |
| 3171 |
</cell> |
| 3172 |
</row> |
| 3173 |
</lyxtabular> |
| 3174 |
|
| 3175 |
\end_inset |
| 3176 |
|
| 3177 |
|
| 3178 |
\end_layout |
| 3179 |
|
| 3180 |
\end_inset |
| 3181 |
|
| 3182 |
|
| 3183 |
\end_layout |
| 3184 |
|
| 3185 |
\begin_layout Standard |
| 3186 |
\begin_inset Marginal |
| 3187 |
status collapsed |
| 3188 |
|
| 3189 |
\begin_layout Standard |
| 3190 |
ASCEND partitions the problem into smaller problems for solving |
| 3191 |
\end_layout |
| 3192 |
|
| 3193 |
\end_inset |
| 3194 |
|
| 3195 |
Toward the bottom right of the |
| 3196 |
\series bold |
| 3197 |
Solver |
| 3198 |
\series default |
| 3199 |
window, we see there are 6 "blocks |
| 3200 |
\begin_inset LatexCommand \index{blocks} |
| 3201 |
|
| 3202 |
\end_inset |
| 3203 |
|
| 3204 |
." What are blocks? ASCEND has examined the equations and, in this case, |
| 3205 |
has discovered that not all the equations have to be solved simultaneously. |
| 3206 |
There are 6 blocks of equations which it can solve in sequence. |
| 3207 |
6 blocks and 6 equations means that ASCEND has found a way to solve the |
| 3208 |
model by solving 6 individual equations in sequence -- i.e., one at a time. |
| 3209 |
This is a good thing: it usually means that the solver will have less problems |
| 3210 |
with locating the overall solution. |
| 3211 |
\end_layout |
| 3212 |
|
| 3213 |
\begin_layout Standard |
| 3214 |
As well as breaking down the system into blocks, ASCEND has the ability |
| 3215 |
to rearrange some simple algebraic equations so that unknown variables |
| 3216 |
can be evaluated directly from the known values, with no need for iterative |
| 3217 |
numerical methods. |
| 3218 |
This is only possible if there is just one equation in the block. |
| 3219 |
In fact, this problem, with the 4 variables we selected to be fixed, can |
| 3220 |
be solved entirely without iteration. |
| 3221 |
\end_layout |
| 3222 |
|
| 3223 |
\begin_layout Standard |
| 3224 |
\begin_inset Marginal |
| 3225 |
status open |
| 3226 |
|
| 3227 |
\begin_layout Standard |
| 3228 |
displaying the incidence matrix |
| 3229 |
\begin_inset LatexCommand \index{incidence matrix} |
| 3230 |
|
| 3231 |
\end_inset |
| 3232 |
|
| 3233 |
|
| 3234 |
\end_layout |
| 3235 |
|
| 3236 |
\end_inset |
| 3237 |
|
| 3238 |
Can we see what ASCEND has just discovered? It turns out we can (we would |
| 3239 |
not have asked if we could not). |
| 3240 |
Under the Display menu on the Solver, select the 'Incidence matrix tool |
| 3241 |
\begin_inset LatexCommand \index{incidence matrix tool} |
| 3242 |
|
| 3243 |
\end_inset |
| 3244 |
|
| 3245 |
'. |
| 3246 |
A window pops open showing us the incidence of variables in the equations |
| 3247 |
and display them in the order that ASCEND has found to solve them, also |
| 3248 |
known as a sparsity matrix |
| 3249 |
\begin_inset LatexCommand \index{sparsity matrix} |
| 3250 |
|
| 3251 |
\end_inset |
| 3252 |
|
| 3253 |
or sparsity pattern |
| 3254 |
\begin_inset LatexCommand \index{sparsity pattern} |
| 3255 |
|
| 3256 |
\end_inset |
| 3257 |
|
| 3258 |
. |
| 3259 |
The dark squares are incidences under the variables for which we are solving; |
| 3260 |
the lighter looking 'X' symbols to the right side are incidences for the |
| 3261 |
fixed (known) variables. |
| 3262 |
Click on the incidence in the upper left corner. |
| 3263 |
ASCEND immediately identifies it for us as the |
| 3264 |
\family typewriter |
| 3265 |
end_area |
| 3266 |
\family default |
| 3267 |
. |
| 3268 |
It identifies the equation as the one we labeled |
| 3269 |
\family typewriter |
| 3270 |
FlatEnds |
| 3271 |
\family default |
| 3272 |
. |
| 3273 |
We can go back to our model and find the equation ASCEND will solve first. |
| 3274 |
The other variable in this equation is in the set we fixed; pick it and |
| 3275 |
discover it is |
| 3276 |
\family typewriter |
| 3277 |
D |
| 3278 |
\family default |
| 3279 |
, the vessel diameter. |
| 3280 |
Of course we can compute the area of the ends given the diameter. |
| 3281 |
The |
| 3282 |
\emph on |
| 3283 |
end_area |
| 3284 |
\emph default |
| 3285 |
is |
| 3286 |
\begin_inset Formula $\pi D^{2}/4$ |
| 3287 |
\end_inset |
| 3288 |
|
| 3289 |
. |
| 3290 |
\end_layout |
| 3291 |
|
| 3292 |
\begin_layout Standard |
| 3293 |
Play with the other incidences here. |
| 3294 |
See what the other equations are and the order ASCEND will use to solve |
| 3295 |
them. |
| 3296 |
\end_layout |
| 3297 |
|
| 3298 |
\begin_layout Standard |
| 3299 |
Okay, we return to our task of solving. |
| 3300 |
We need next to supply values for the variables we have selected to be |
| 3301 |
fixed. |
| 3302 |
Again, the approach we are going to take is acceptable for this small problem, |
| 3303 |
but we would not want to have to do what we are about to do for a large |
| 3304 |
problem. |
| 3305 |
Fortunately, we really have thought about these issues and have some nice |
| 3306 |
approaches that work even for extremely large problem -- like 100,000 equations. |
| 3307 |
\end_layout |
| 3308 |
|
| 3309 |
\begin_layout Standard |
| 3310 |
\begin_inset Marginal |
| 3311 |
status collapsed |
| 3312 |
|
| 3313 |
\begin_layout Standard |
| 3314 |
which variables are currently fixed for this problem? |
| 3315 |
\end_layout |
| 3316 |
|
| 3317 |
\end_inset |
| 3318 |
|
| 3319 |
Let's see. |
| 3320 |
Do you remember the variables we fixed? What if you do not? Well, we go |
| 3321 |
back to the Browser. |
| 3322 |
Be sure |
| 3323 |
\family typewriter |
| 3324 |
v |
| 3325 |
\family default |
| 3326 |
remains the current object (it alone is in the upper left window). |
| 3327 |
Under the Find menu select 'by Type |
| 3328 |
\begin_inset LatexCommand \index{Find by Type} |
| 3329 |
|
| 3330 |
\end_inset |
| 3331 |
|
| 3332 |
.' A small window opens with default information in it saying it will find |
| 3333 |
for us all objects contained in the current object |
| 3334 |
\family typewriter |
| 3335 |
v |
| 3336 |
\family default |
| 3337 |
of type |
| 3338 |
\family typewriter |
| 3339 |
solver_var |
| 3340 |
\family default |
| 3341 |
whose |
| 3342 |
\family typewriter |
| 3343 |
fixed |
| 3344 |
\family default |
| 3345 |
flags are set to |
| 3346 |
\family typewriter |
| 3347 |
TRUE |
| 3348 |
\family default |
| 3349 |
. |
| 3350 |
These are precisely the attributes for the variables we have fixed. |
| 3351 |
Select OK and a list of the four variables we fixed earlier appears. |
| 3352 |
\end_layout |
| 3353 |
|
| 3354 |
\begin_layout Standard |
| 3355 |
\begin_inset Marginal |
| 3356 |
status collapsed |
| 3357 |
|
| 3358 |
\begin_layout Standard |
| 3359 |
specifying values for the fixed variables - this approach is useful for |
| 3360 |
small problems |
| 3361 |
\end_layout |
| 3362 |
|
| 3363 |
\end_inset |
| 3364 |
|
| 3365 |
For each variable on this list, we should supply a value. |
| 3366 |
Select |
| 3367 |
\family typewriter |
| 3368 |
D |
| 3369 |
\family default |
| 3370 |
in the lower window of the Browser using the right (the right, not the |
| 3371 |
left -- make |
| 3372 |
\family typewriter |
| 3373 |
v |
| 3374 |
\family default |
| 3375 |
the current object and do it again) mouse button. |
| 3376 |
A window opens in which we input a value for |
| 3377 |
\family typewriter |
| 3378 |
D |
| 3379 |
\family default |
| 3380 |
. |
| 3381 |
Put in the value 4 in the left window and ft in the right. |
| 3382 |
Continue by putting in the values for the variables as listed in Table |
| 3383 |
|
| 3384 |
\begin_inset LatexCommand \ref{tab:model1.valuesFixedVars} |
| 3385 |
|
| 3386 |
\end_inset |
| 3387 |
|
| 3388 |
|
| 3389 |
\noun off |
| 3390 |
. |
| 3391 |
These values immediately appear in the Browser window as you enter them. |
| 3392 |
If you did not fully appreciate the proper handling of dimension and units |
| 3393 |
before, you just got a taste of its advantages. |
| 3394 |
|
| 3395 |
\noun default |
| 3396 |
You |
| 3397 |
\noun off |
| 3398 |
did not have to worry about specifying these things in consistent preselected |
| 3399 |
units |
| 3400 |
\noun default |
| 3401 |
-- ASCEND did this for you. |
| 3402 |
\end_layout |
| 3403 |
|
| 3404 |
\begin_layout Standard |
| 3405 |
\begin_inset Float table |
| 3406 |
wide false |
| 3407 |
sideways false |
| 3408 |
status open |
| 3409 |
|
| 3410 |
\begin_layout Caption |
| 3411 |
\begin_inset LatexCommand \label{tab:model1.valuesFixedVars} |
| 3412 |
|
| 3413 |
\end_inset |
| 3414 |
|
| 3415 |
Values to use for fixed variables |
| 3416 |
\end_layout |
| 3417 |
|
| 3418 |
\begin_layout Standard |
| 3419 |
\begin_inset Tabular |
| 3420 |
<lyxtabular version="3" rows="5" columns="3"> |
| 3421 |
<features> |
| 3422 |
<column alignment="center" valignment="top" leftline="true" width="0"> |
| 3423 |
<column alignment="center" valignment="top" leftline="true" width="0"> |
| 3424 |
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0"> |
| 3425 |
<row topline="true" bottomline="true"> |
| 3426 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3427 |
\begin_inset Text |
| 3428 |
|
| 3429 |
\begin_layout Standard |
| 3430 |
variable |
| 3431 |
\end_layout |
| 3432 |
|
| 3433 |
\end_inset |
| 3434 |
</cell> |
| 3435 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3436 |
\begin_inset Text |
| 3437 |
|
| 3438 |
\begin_layout Standard |
| 3439 |
value |
| 3440 |
\end_layout |
| 3441 |
|
| 3442 |
\end_inset |
| 3443 |
</cell> |
| 3444 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3445 |
\begin_inset Text |
| 3446 |
|
| 3447 |
\begin_layout Standard |
| 3448 |
units |
| 3449 |
\end_layout |
| 3450 |
|
| 3451 |
\end_inset |
| 3452 |
</cell> |
| 3453 |
</row> |
| 3454 |
<row topline="true"> |
| 3455 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3456 |
\begin_inset Text |
| 3457 |
|
| 3458 |
\begin_layout Standard |
| 3459 |
|
| 3460 |
\family typewriter |
| 3461 |
D |
| 3462 |
\end_layout |
| 3463 |
|
| 3464 |
\end_inset |
| 3465 |
</cell> |
| 3466 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3467 |
\begin_inset Text |
| 3468 |
|
| 3469 |
\begin_layout Standard |
| 3470 |
4 |
| 3471 |
\end_layout |
| 3472 |
|
| 3473 |
\end_inset |
| 3474 |
</cell> |
| 3475 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3476 |
\begin_inset Text |
| 3477 |
|
| 3478 |
\begin_layout Standard |
| 3479 |
|
| 3480 |
\family typewriter |
| 3481 |
ft |
| 3482 |
\end_layout |
| 3483 |
|
| 3484 |
\end_inset |
| 3485 |
</cell> |
| 3486 |
</row> |
| 3487 |
<row topline="true"> |
| 3488 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3489 |
\begin_inset Text |
| 3490 |
|
| 3491 |
\begin_layout Standard |
| 3492 |
|
| 3493 |
\family typewriter |
| 3494 |
H_to_D_ratio |
| 3495 |
\end_layout |
| 3496 |
|
| 3497 |
\end_inset |
| 3498 |
</cell> |
| 3499 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3500 |
\begin_inset Text |
| 3501 |
|
| 3502 |
\begin_layout Standard |
| 3503 |
3 |
| 3504 |
\end_layout |
| 3505 |
|
| 3506 |
\end_inset |
| 3507 |
</cell> |
| 3508 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3509 |
\begin_inset Text |
| 3510 |
|
| 3511 |
\begin_layout Standard |
| 3512 |
|
| 3513 |
\end_layout |
| 3514 |
|
| 3515 |
\end_inset |
| 3516 |
</cell> |
| 3517 |
</row> |
| 3518 |
<row topline="true"> |
| 3519 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3520 |
\begin_inset Text |
| 3521 |
|
| 3522 |
\begin_layout Standard |
| 3523 |
|
| 3524 |
\family typewriter |
| 3525 |
meta_density |
| 3526 |
\end_layout |
| 3527 |
|
| 3528 |
\end_inset |
| 3529 |
</cell> |
| 3530 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3531 |
\begin_inset Text |
| 3532 |
|
| 3533 |
\begin_layout Standard |
| 3534 |
5000 |
| 3535 |
\end_layout |
| 3536 |
|
| 3537 |
\end_inset |
| 3538 |
</cell> |
| 3539 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3540 |
\begin_inset Text |
| 3541 |
|
| 3542 |
\begin_layout Standard |
| 3543 |
|
| 3544 |
\family typewriter |
| 3545 |
kg/m^3 |
| 3546 |
\end_layout |
| 3547 |
|
| 3548 |
\end_inset |
| 3549 |
</cell> |
| 3550 |
</row> |
| 3551 |
<row topline="true" bottomline="true"> |
| 3552 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3553 |
\begin_inset Text |
| 3554 |
|
| 3555 |
\begin_layout Standard |
| 3556 |
|
| 3557 |
\family typewriter |
| 3558 |
wall_thickness |
| 3559 |
\end_layout |
| 3560 |
|
| 3561 |
\end_inset |
| 3562 |
</cell> |
| 3563 |
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> |
| 3564 |
\begin_inset Text |
| 3565 |
|
| 3566 |
\begin_layout Standard |
| 3567 |
5 |
| 3568 |
\end_layout |
| 3569 |
|
| 3570 |
\end_inset |
| 3571 |
</cell> |
| 3572 |
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> |
| 3573 |
\begin_inset Text |
| 3574 |
|
| 3575 |
\begin_layout Standard |
| 3576 |
|
| 3577 |
\family typewriter |
| 3578 |
mm |
| 3579 |
\end_layout |
| 3580 |
|
| 3581 |
\end_inset |
| 3582 |
</cell> |
| 3583 |
</row> |
| 3584 |
</lyxtabular> |
| 3585 |
|
| 3586 |
\end_inset |
| 3587 |
|
| 3588 |
|
| 3589 |
\end_layout |
| 3590 |
|
| 3591 |
\end_inset |
| 3592 |
|
| 3593 |
|
| 3594 |
\end_layout |
| 3595 |
|
| 3596 |
\begin_layout Standard |
| 3597 |
You can now solve this model. |
| 3598 |
Go the Solver window and, under the Execute menu, select Solve. |
| 3599 |
You will get a message telling you the model solved. |
| 3600 |
Dismiss that message and return to the Browser window to examine the results. |
| 3601 |
You should see the following results: |
| 3602 |
\end_layout |
| 3603 |
|
| 3604 |
\begin_layout LyX-Code |
| 3605 |
\begin_inset ERT |
| 3606 |
status open |
| 3607 |
|
| 3608 |
\begin_layout Standard |
| 3609 |
|
| 3610 |
|
| 3611 |
\backslash |
| 3612 |
begin{ascend} |
| 3613 |
\end_layout |
| 3614 |
|
| 3615 |
\begin_layout Standard |
| 3616 |
|
| 3617 |
D = 1.21922 meter |
| 3618 |
\end_layout |
| 3619 |
|
| 3620 |
\begin_layout Standard |
| 3621 |
|
| 3622 |
H = 3.65765 meter |
| 3623 |
\end_layout |
| 3624 |
|
| 3625 |
\begin_layout Standard |
| 3626 |
|
| 3627 |
H_to_D_ratio = 3 |
| 3628 |
\end_layout |
| 3629 |
|
| 3630 |
\begin_layout Standard |
| 3631 |
|
| 3632 |
end_area = 1.16748 meter^2 |
| 3633 |
\end_layout |
| 3634 |
|
| 3635 |
\begin_layout Standard |
| 3636 |
|
| 3637 |
metal_density = 5000 kilogram/meter^3 |
| 3638 |
\end_layout |
| 3639 |
|
| 3640 |
\begin_layout Standard |
| 3641 |
|
| 3642 |
metal_mass = 408.62 kilogram |
| 3643 |
\end_layout |
| 3644 |
|
| 3645 |
\begin_layout Standard |
| 3646 |
|
| 3647 |
side_area = 14.0098 meter^2 |
| 3648 |
\end_layout |
| 3649 |
|
| 3650 |
\begin_layout Standard |
| 3651 |
|
| 3652 |
vessel_vol = 4.27025 meter^3 |
| 3653 |
\end_layout |
| 3654 |
|
| 3655 |
\begin_layout Standard |
| 3656 |
|
| 3657 |
wall_thickness = 0.005 meter |
| 3658 |
\end_layout |
| 3659 |
|
| 3660 |
\begin_layout Standard |
| 3661 |
|
| 3662 |
wall_vol = 0.0817239 meter^3 |
| 3663 |
\end_layout |
| 3664 |
|
| 3665 |
\begin_layout Standard |
| 3666 |
|
| 3667 |
|
| 3668 |
\backslash |
| 3669 |
end{ascend} |
| 3670 |
\end_layout |
| 3671 |
|
| 3672 |
\end_inset |
| 3673 |
|
| 3674 |
|
| 3675 |
\end_layout |
| 3676 |
|
| 3677 |
\begin_layout LyX-Code |
| 3678 |
|
| 3679 |
\end_layout |
| 3680 |
|
| 3681 |
\begin_layout Standard |
| 3682 |
\begin_inset Note Note |
| 3683 |
status collapsed |
| 3684 |
|
| 3685 |
\begin_layout Standard |
| 3686 |
Some of this stuff appears to have changed in the PDF.... |
| 3687 |
\end_layout |
| 3688 |
|
| 3689 |
\end_inset |
| 3690 |
|
| 3691 |
|
| 3692 |
\end_layout |
| 3693 |
|
| 3694 |
\begin_layout Standard |
| 3695 |
\begin_inset Marginal |
| 3696 |
status collapsed |
| 3697 |
|
| 3698 |
\begin_layout Standard |
| 3699 |
alter the units used for displaying values |
| 3700 |
\end_layout |
| 3701 |
|
| 3702 |
\end_inset |
| 3703 |
|
| 3704 |
You may wish to alter the units used to display these results. |
| 3705 |
For example, you enter the diameter |
| 3706 |
\emph on |
| 3707 |
D |
| 3708 |
\emph default |
| 3709 |
in ft. |
| 3710 |
You may wish to reassure yourself the |
| 3711 |
\family typewriter |
| 3712 |
1.21922 meter |
| 3713 |
\family default |
| 3714 |
is 4 ft. |
| 3715 |
Go to the Script window and under the Tools menu select |
| 3716 |
\emph on |
| 3717 |
' |
| 3718 |
\emph default |
| 3719 |
Measuring units'. |
| 3720 |
The |
| 3721 |
\series bold |
| 3722 |
Units |
| 3723 |
\series default |
| 3724 |
window |
| 3725 |
\begin_inset LatexCommand \index{Units window} |
| 3726 |
|
| 3727 |
\end_inset |
| 3728 |
|
| 3729 |
|
| 3730 |
\begin_inset LatexCommand \index{window, Units} |
| 3731 |
|
| 3732 |
\end_inset |
| 3733 |
|
| 3734 |
will open. |
| 3735 |
Enlarge it appropriately and then place it to the top and far right of |
| 3736 |
your display. |
| 3737 |
\end_layout |
| 3738 |
|
| 3739 |
\begin_layout Standard |
| 3740 |
There are two ways you can reset the units for displaying length. |
| 3741 |
\end_layout |
| 3742 |
|
| 3743 |
\begin_layout Enumerate |
| 3744 |
Length is a basic dimension in ASCEND so under the |
| 3745 |
\emph on |
| 3746 |
Display |
| 3747 |
\emph default |
| 3748 |
button select Length. |
| 3749 |
A side window will open with all the alternate units supported in ASCEND |
| 3750 |
for length. |
| 3751 |
Select ft. |
| 3752 |
\end_layout |
| 3753 |
|
| 3754 |
\begin_layout Enumerate |
| 3755 |
Or, in the lower part of the Units window is a frame labeled 'Set units'. |
| 3756 |
Clear and then type |
| 3757 |
\family typewriter |
| 3758 |
ft |
| 3759 |
\family default |
| 3760 |
then hit Enter. |
| 3761 |
\end_layout |
| 3762 |
|
| 3763 |
\begin_layout Standard |
| 3764 |
In either way, the units for all length variables will switch to ft. |
| 3765 |
Look at the values in the Browser window. |
| 3766 |
\end_layout |
| 3767 |
|
| 3768 |
\begin_layout Standard |
| 3769 |
The left upper window of the Units window contains many variable types that |
| 3770 |
have composite dimensions. |
| 3771 |
For example, you will find volume there. |
| 3772 |
Pick it and the right window fills with all the alternative units in which |
| 3773 |
you can express volume. |
| 3774 |
\end_layout |
| 3775 |
|
| 3776 |
\begin_layout Standard |
| 3777 |
Play with changing the units for displaying the various variables in the |
| 3778 |
vessel instance v. |
| 3779 |
|
| 3780 |
\end_layout |
| 3781 |
|
| 3782 |
\begin_layout Standard |
| 3783 |
One point - the left window displaying types having composite dimensions |
| 3784 |
will display only one type for each composite dimension. |
| 3785 |
If the atom types you have loaded were to include volume_difference as |
| 3786 |
well as volume, then only one of the two types, volume or volume_difference, |
| 3787 |
will be listed here. |
| 3788 |
Changing the units to express either changes the units for both. |
| 3789 |
\end_layout |
| 3790 |
|
| 3791 |
\begin_layout Standard |
| 3792 |
\begin_inset Marginal |
| 3793 |
status collapsed |
| 3794 |
|
| 3795 |
\begin_layout Standard |
| 3796 |
returning to a consistent set of units |
| 3797 |
\end_layout |
| 3798 |
|
| 3799 |
\end_inset |
| 3800 |
|
| 3801 |
When you are done, you may wish to return to a consistent set, such as SI |
| 3802 |
\begin_inset LatexCommand \index{SI} |
| 3803 |
|
| 3804 |
\end_inset |
| 3805 |
|
| 3806 |
. |
| 3807 |
Under the Display button are different sets; pick |
| 3808 |
\emph on |
| 3809 |
SI (MKS) set |
| 3810 |
\emph default |
| 3811 |
. |
| 3812 |
\end_layout |
| 3813 |
|
| 3814 |
\begin_layout Standard |
| 3815 |
\begin_inset Marginal |
| 3816 |
status collapsed |
| 3817 |
|
| 3818 |
\begin_layout Standard |
| 3819 |
now we can solve the model in other ways |
| 3820 |
\end_layout |
| 3821 |
|
| 3822 |
\end_inset |
| 3823 |
|
| 3824 |
We can now resolve our vessel instance in any number of different ways. |
| 3825 |
For example we can ask what the diameter would be if we had a volume of |
| 3826 |
|
| 3827 |
\emph on |
| 3828 |
250 ft3 |
| 3829 |
\emph default |
| 3830 |
. |
| 3831 |
To accomplish this calculation, we need first to make |
| 3832 |
\emph on |
| 3833 |
vessel_volume |
| 3834 |
\emph default |
| 3835 |
a variable whose value we wish to fix. |
| 3836 |
When we do this the model will be overspecified. |
| 3837 |
ASCEND will indicate this problem to us and offer us a list of variables |
| 3838 |
- including the vessel diameter |
| 3839 |
\emph on |
| 3840 |
D |
| 3841 |
\emph default |
| 3842 |
, one of which we will have to "unfix |
| 3843 |
\begin_inset LatexCommand \index{unfix} |
| 3844 |
|
| 3845 |
\end_inset |
| 3846 |
|
| 3847 |
." Finally we need to alter the value of |
| 3848 |
\emph on |
| 3849 |
vessel_volume |
| 3850 |
\emph default |
| 3851 |
to the desired value and solve. |
| 3852 |
Explicit instructions to accomplish these steps are as follows. |
| 3853 |
\end_layout |
| 3854 |
|
| 3855 |
\begin_layout Itemize |
| 3856 |
In the |
| 3857 |
\series bold |
| 3858 |
Browser |
| 3859 |
\series default |
| 3860 |
window, make |
| 3861 |
\emph on |
| 3862 |
vessel_volume |
| 3863 |
\emph default |
| 3864 |
the current object (select it using the left mouse button). |
| 3865 |
The right window of the |
| 3866 |
\series bold |
| 3867 |
Browser |
| 3868 |
\series default |
| 3869 |
display the parts of the |
| 3870 |
\emph on |
| 3871 |
vessel_volume |
| 3872 |
\emph default |
| 3873 |
, among them is the fixed flag with a value of |
| 3874 |
\emph on |
| 3875 |
FALSE |
| 3876 |
\emph default |
| 3877 |
. |
| 3878 |
|
| 3879 |
\end_layout |
| 3880 |
|
| 3881 |
\begin_layout Itemize |
| 3882 |
(If you do not see the value for fixed but rather its type as a boolean, |
| 3883 |
under the |
| 3884 |
\emph on |
| 3885 |
View |
| 3886 |
\emph default |
| 3887 |
button at the top, select |
| 3888 |
\emph on |
| 3889 |
Display Atom Values. |
| 3890 |
\emph default |
| 3891 |
) |
| 3892 |
\end_layout |
| 3893 |
|
| 3894 |
\begin_layout Itemize |
| 3895 |
Pick fixed with the right mouse button, and, in the small window that opens, |
| 3896 |
delete the value |
| 3897 |
\emph on |
| 3898 |
FALSE |
| 3899 |
\emph default |
| 3900 |
, enter the value |
| 3901 |
\emph on |
| 3902 |
TRUE |
| 3903 |
\emph default |
| 3904 |
and select |
| 3905 |
\emph on |
| 3906 |
OK |
| 3907 |
\emph default |
| 3908 |
. |
| 3909 |
\end_layout |
| 3910 |
|
| 3911 |
\begin_layout Itemize |
| 3912 |
Now make v the current object by picking it in the left window of the |
| 3913 |
\series bold |
| 3914 |
Browser |
| 3915 |
\series default |
| 3916 |
. |
| 3917 |
\end_layout |
| 3918 |
|
| 3919 |
\begin_layout Itemize |
| 3920 |
Export v to the Solver again by selecting to Solver under the Export button. |
| 3921 |
A window entitled Overspecified |
| 3922 |
\begin_inset LatexCommand \index{Overspecified} |
| 3923 |
|
| 3924 |
\end_inset |
| 3925 |
|
| 3926 |
will appear listing the variables v.D, v.H_to_D_ratio and v.vessel_volume. |
| 3927 |
Pick v.D and hit the OK button; ASCEND will reset its fixed flag to FALSE. |
| 3928 |
\end_layout |
| 3929 |
|
| 3930 |
\begin_layout Itemize |
| 3931 |
Finally, return to the |
| 3932 |
\series bold |
| 3933 |
Browser |
| 3934 |
\series default |
| 3935 |
window and select |
| 3936 |
\emph on |
| 3937 |
vessel_volume |
| 3938 |
\emph default |
| 3939 |
with the right mouse button. |
| 3940 |
In the small window that appears type |
| 3941 |
\emph on |
| 3942 |
250 |
| 3943 |
\emph default |
| 3944 |
in the left window, |
| 3945 |
\emph on |
| 3946 |
ft^3 |
| 3947 |
\emph default |
| 3948 |
in the right, and hit the |
| 3949 |
\emph on |
| 3950 |
OK |
| 3951 |
\emph default |
| 3952 |
button. |
| 3953 |
\end_layout |
| 3954 |
|
| 3955 |
\begin_layout Itemize |
| 3956 |
Under the |
| 3957 |
\emph on |
| 3958 |
Execute |
| 3959 |
\emph default |
| 3960 |
button in the |
| 3961 |
\series bold |
| 3962 |
Solver |
| 3963 |
\series default |
| 3964 |
window, select |
| 3965 |
\emph on |
| 3966 |
Solve |
| 3967 |
\emph default |
| 3968 |
. |
| 3969 |
\end_layout |
| 3970 |
|
| 3971 |
\begin_layout Standard |
| 3972 |
Note the |
| 3973 |
\series bold |
| 3974 |
Solver |
| 3975 |
\series default |
| 3976 |
reports only 4 blocks for 6 equations. |
| 3977 |
This time it has to solve some equations simultaneously. |
| 3978 |
In the |
| 3979 |
\series bold |
| 3980 |
Solver |
| 3981 |
\series default |
| 3982 |
window, under the |
| 3983 |
\emph on |
| 3984 |
Display |
| 3985 |
\emph default |
| 3986 |
button, select the |
| 3987 |
\emph on |
| 3988 |
Incidence matrix |
| 3989 |
\emph default |
| 3990 |
tool. |
| 3991 |
You will see that the first three equations must be solved together as |
| 3992 |
a single block of equations. |
| 3993 |
\end_layout |
| 3994 |
|
| 3995 |
\begin_layout Standard |
| 3996 |
\begin_inset Marginal |
| 3997 |
status collapsed |
| 3998 |
|
| 3999 |
\begin_layout Standard |
| 4000 |
clearing all the fixed flags |
| 4001 |
\end_layout |
| 4002 |
|
| 4003 |
\end_inset |
| 4004 |
|
| 4005 |
For a more complicated model you may wish to start over on the process of |
| 4006 |
selecting which variables are fixed. |
| 4007 |
You can set the fixed flags for all the variables in a problem to FALSE |
| 4008 |
all at once -- without knowing which are currently set to TRUE. |
| 4009 |
In the Browser window, under the Edit button, select the Run method tool. |
| 4010 |
A window will open that displays a list of default methods that are automatical |
| 4011 |
ly attached to every model in ASCEND. |
| 4012 |
One is called ClearAll. |
| 4013 |
Pick it and hit OK. |
| 4014 |
All the fixed flags for the entire model will now be reset to FALSE. |
| 4015 |
Can you think of a way to check if this is true? (Do you remember how to |
| 4016 |
check which variables are currently fixed? Repeat that check and you should |
| 4017 |
find no variables are on the list.) |
| 4018 |
\end_layout |
| 4019 |
|
| 4020 |
\begin_layout Standard |
| 4021 |
You might now want to play by changing what you calculate and fix. |
| 4022 |
\end_layout |
| 4023 |
|
| 4024 |
\begin_layout Section |
| 4025 |
Discussion |
| 4026 |
\end_layout |
| 4027 |
|
| 4028 |
\begin_layout Standard |
| 4029 |
You have just completed the creation and solving of a very small model in |
| 4030 |
ASCEND. |
| 4031 |
In doing so, you have been exposed to some interesting issues. |
| 4032 |
How can we separate the concept of the model from how we intend to solve |
| 4033 |
it? How do we make a model to be well-posed -- i.e., a model involving n |
| 4034 |
equations in n unknowns -- so we can solve it? How should one handle the |
| 4035 |
units for the variables in a modeling system? What we have shown you here |
| 4036 |
is for a small model. |
| 4037 |
We still need to show you how one can make a large model well-posed, for |
| 4038 |
example. |
| 4039 |
You will start to understand how one can do this in the next chapter. |
| 4040 |
\end_layout |
| 4041 |
|
| 4042 |
\begin_layout Standard |
| 4043 |
The next chapter is crucial for you to understand if you want to begin to |
| 4044 |
understand how we approach good modeling practice. |
| 4045 |
Please do continue with it. |
| 4046 |
As it uses the vessel model, it would, of course, be best to continue with |
| 4047 |
that chapter now. |
| 4048 |
\end_layout |
| 4049 |
|
| 4050 |
\end_body |
| 4051 |
\end_document |