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