/[ascend]/trunk/models/atoms.a4l
ViewVC logotype

Contents of /trunk/models/atoms.a4l

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2471 - (show annotations) (download) (as text)
Sat May 28 10:24:10 2011 UTC (11 years, 8 months ago) by jpye
File MIME type: text/x-ascend
File size: 33338 byte(s)
Adding initial bindings to sun position calculation, some debugging completed. Testing is next.
1 (* ASCEND modelling environment
2 * Copyright (C) 1994-2007 Carnegie Mellon University
3 *
4 * The ASCEND Modeling Library is free software; you can redistribute
5 * it and/or modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * The ASCEND Modeling Library is distributed in hope that it
10 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with the program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA.
17 *)
18 REQUIRE "system.a4l"; (* => system.a4l, basemodel.a4l *)
19 REQUIRE "measures.a4l"; (* => measures.a4l *)
20 PROVIDE "atoms.a4l";
21 (*
22 Original Author: Joseph J. Zaher
23 Contributors: Ben Allan, Bob Huss, John Pye.
24
25 ASCEND atom definitions for engineering variable types.
26 Many of the anticipated dimensional variables which occur
27 in engineering design calculations are given to provide a
28 means of standardization. Chosen defaults, nominal, and
29 lower and upper bound values should be re-specified if
30 necessary to enhance the convergence properties of
31 specific models. Units to be displayed are to be controlled
32 using the UNITS tool kit of the environment.
33
34 If you add a new type here, you are encouraged to also make corresponding
35 changes to the syntax definition files pygtk/gnome/ascend.lang (for gedit
36 on GNOME) and ascend.syn (for TextPad on Windows).
37 *)
38
39 (* G E N E R I C C O N S T A N T S ( C H E M . E . B I A S )
40 -------------------------------------------------------------------- *)
41
42 CONSTANT constant
43 (* any sloppiness about what is a constant will yield a wild real *)
44 REFINES real_constant;
45
46 (* dimensionless *)
47
48 CONSTANT critical_compressibility REFINES real_constant DIMENSIONLESS;
49
50 CONSTANT acentric_factor REFINES real_constant DIMENSIONLESS;
51
52 CONSTANT UNIFAC_size REFINES real_constant DIMENSIONLESS;
53
54 CONSTANT Wilson_constant REFINES real_constant DIMENSIONLESS;
55
56 CONSTANT vapor_pressure_constant REFINES real_constant;
57
58 CONSTANT factor_constant REFINES real_constant DIMENSIONLESS;
59
60 (* angles *)
61 CONSTANT angle_constant
62 REFINES real_constant DIMENSION P;
63
64 CONSTANT solid_angle_constant
65 REFINES real_constant DIMENSION S;
66
67 (* molecular weight *)
68 CONSTANT molar_weight_constant
69 REFINES real_constant DIMENSION M/Q;
70
71 (* atomic mass *)
72 CONSTANT atomic_mass_constant
73 REFINES real_constant DIMENSION M;
74
75 (* temperatures *)
76 CONSTANT temperature_constant
77 REFINES real_constant DIMENSION TMP;
78
79 CONSTANT boiling_temperature
80 REFINES temperature_constant;
81
82 CONSTANT critical_temperature
83 REFINES temperature_constant;
84
85 CONSTANT reference_temperature
86 REFINES temperature_constant;
87
88 CONSTANT UNIFAC_a
89 REFINES temperature_constant;
90
91 (* pressures *)
92 CONSTANT pressure_constant
93 REFINES real_constant DIMENSION M/L/T^2;
94
95 CONSTANT critical_pressure
96 REFINES pressure_constant;
97
98 CONSTANT reference_pressure
99 REFINES pressure_constant;
100
101 (* molar volumes *)
102 CONSTANT molar_volume_constant
103 REFINES real_constant DIMENSION L^3/Q;
104
105 CONSTANT critical_volume
106 REFINES molar_volume_constant;
107
108 CONSTANT reference_molar_volume
109 REFINES molar_volume_constant;
110
111 (* mass densities *)
112 CONSTANT reference_mass_density
113 REFINES real_constant DIMENSION M/L^3;
114
115 (* molar energies *)
116 CONSTANT molar_energy_constant
117 REFINES real_constant DIMENSION M*L^2/T^2/Q;
118
119 CONSTANT reference_molar_energy
120 REFINES molar_energy_constant;
121
122 CONSTANT enthalpy_of_formation_constant
123 REFINES molar_energy_constant;
124
125 CONSTANT free_energy_of_formation_constant
126 REFINES molar_energy_constant;
127
128 CONSTANT heat_of_vaporization_constant
129 REFINES molar_energy_constant;
130
131 CONSTANT Wilson_energy_constant
132 REFINES molar_energy_constant;
133
134 (* molar entropies *)
135 CONSTANT molar_entropy_constant
136 REFINES real_constant DIMENSION M*L^2/T^2/Q/TMP;
137
138 CONSTANT reference_molar_entropy
139 REFINES molar_entropy_constant;
140
141 (* other strange correlation coefficients *)
142 CONSTANT heat_capacity_constant
143 REFINES real_constant;
144
145 CONSTANT heat_capacity_a_constant
146 REFINES heat_capacity_constant DIMENSION M*L^2/T^2/Q/TMP;
147
148 CONSTANT heat_capacity_b_constant
149 REFINES heat_capacity_constant DIMENSION M*L^2/T^2/Q/TMP^2;
150
151 CONSTANT heat_capacity_c_constant
152 REFINES heat_capacity_constant DIMENSION M*L^2/T^2/Q/TMP^3;
153
154 CONSTANT heat_capacity_d_constant
155 REFINES heat_capacity_constant DIMENSION M*L^2/T^2/Q/TMP^4;
156
157 (*
158 CONSTANT
159 REFINES real_constant DIMENSION;
160 *)
161
162 (* U N I V E R S A L C O N S T A N T S
163 -------------------------------------- *)
164
165 UNIVERSAL CONSTANT molar_gas_constant
166 (* DIMENSION M*L^2/T^2/Q/TMP *)
167 REFINES real_constant :== 1{GAS_C};
168
169 UNIVERSAL CONSTANT gravity_constant
170 (* DIMENSION L/T^2 *)
171 REFINES real_constant :== 1{EARTH_G};
172
173 UNIVERSAL CONSTANT circle_constant
174 REFINES real_constant :== 1{PI};
175
176 UNIVERSAL CONSTANT speed_of_light
177 REFINES real_constant :== 1{LIGHT_C};
178
179 UNIVERSAL CONSTANT planck_constant
180 (* DIMENSION M*L^2/T *)
181 REFINES real_constant :== 1{PLANCK_C};
182
183 UNIVERSAL CONSTANT avogadro_constant
184 REFINES real_constant :== 1{AVOGADRO_C};
185
186 UNIVERSAL CONSTANT permittivity_constant
187 (* DIMENSION E^2*T^4/M/L^3 *)
188 REFINES real_constant :== 1{EPSILON0};
189
190 UNIVERSAL CONSTANT permeability_constant
191 REFINES real_constant :== 1{MU0};
192
193 UNIVERSAL CONSTANT electron_charge
194 REFINES real_constant :== 1{eCHARGE};
195
196 UNIVERSAL CONSTANT electron_mass
197 REFINES real_constant :== 1{eMASS};
198
199 UNIVERSAL CONSTANT proton_mass
200 REFINES real_constant :== 1{pMASS};
201
202 (* B O O L E A N S *)
203
204 (* use these booleans *)
205 ATOM boolean_start_true REFINES boolean
206 DEFAULT TRUE;
207 END boolean_start_true;
208
209 ATOM boolean_start_false REFINES boolean
210 DEFAULT FALSE;
211 END boolean_start_false;
212
213 (* for backward compatibility *)
214 ATOM start_true REFINES boolean
215 DEFAULT TRUE;
216 END start_true;
217
218 ATOM start_false REFINES boolean
219 DEFAULT FALSE;
220 END start_false;
221
222
223 (* P A R A M E T E R S *)
224
225 UNIVERSAL ATOM bound_width REFINES real
226 (* not really a constant but a parameter to tell us how wide to
227 * put bounds from the current point, in relative terms.
228 * e.g. a.upper_bound := a + a.nominal * bound_width_instance;
229 *)
230 DIMENSIONLESS
231 DEFAULT 1.0e8;
232 END bound_width;
233
234 UNIVERSAL ATOM scaling_constant REFINES real
235 (* not really a constant but a parameter. which
236 * needs problem dependent information to be useful.
237 *)
238 DIMENSIONLESS
239 DEFAULT 1.0;
240 END scaling_constant;
241
242 UNIVERSAL ATOM ode_counter REFINES integer
243 DIMENSIONLESS
244 DEFAULT 1;
245 END ode_counter;
246
247 UNIVERSAL ATOM obs_counter REFINES integer
248 DIMENSIONLESS
249 DEFAULT 1;
250 END obs_counter;
251
252 ATOM real_parameter REFINES real;
253 END real_parameter;
254
255 ATOM length_parameter REFINES real_parameter
256 DIMENSION L
257 DEFAULT 1.0 {m};
258 END length_parameter;
259
260
261 (* D I M E N S I O N L E S S Q U A N T I T I E S
262 ---------------------------------------------- *)
263
264 ATOM positive_variable REFINES solver_var
265 (* one for the gams folks *)
266 DIMENSIONLESS
267 DEFAULT 1.0;
268 lower_bound := 0.0;
269 upper_bound := 1e20;
270 nominal := 1.0;
271 END positive_variable;
272
273 ATOM factor REFINES solver_var
274 DIMENSIONLESS
275 DEFAULT 1.0;
276 lower_bound := -1e50;
277 upper_bound := 1e50;
278 nominal := 1.0;
279 END factor;
280
281 ATOM variable REFINES solver_var
282 DIMENSIONLESS;
283 END variable;
284
285
286 ATOM fraction REFINES solver_var
287 DIMENSIONLESS
288 DEFAULT 0.5;
289 nominal := 1.0;
290 lower_bound := 0.0;
291 upper_bound := 1.0;
292 END fraction;
293
294 ATOM positive_factor REFINES factor;
295 lower_bound := 0.0;
296 END positive_factor;
297
298 ATOM small_factor REFINES factor;
299 lower_bound := -10.0;
300 upper_bound := 10.0;
301 END small_factor;
302
303 ATOM small_positive_factor REFINES factor;
304 lower_bound := 0.0;
305 upper_bound := 10.0;
306 END small_positive_factor;
307
308 ATOM reduced_pressure REFINES factor;
309 END reduced_pressure;
310
311 (* S U B S T I T U T I O N V A R I A B L E S
312 ------------------------------------------ *)
313 ATOM exp_sub REFINES factor ;
314 lower_bound := -1e50;
315 upper_bound := 100;
316 nominal := 1.0;
317 END exp_sub;
318
319 ATOM power_sub REFINES factor;
320 lower_bound := -25;
321 upper_bound := 25;
322 nominal := 1.0;
323 END power_sub;
324
325 (* T E M P E R A T U R E
326 --------------------- *)
327
328 ATOM temperature REFINES solver_var
329 DIMENSION TMP
330 DEFAULT 298.0{K};
331 lower_bound := 1.0e-6{K};
332 upper_bound := 10000{K};
333 nominal := 298.0{K};
334 END temperature;
335
336 ATOM inverse_temperature REFINES solver_var
337 DIMENSION 1/TMP
338 DEFAULT 0.00366099{1/K};
339 lower_bound := 0.0{1/K};
340 upper_bound := 1e50{1/K};
341 nominal := 0.00366099{1/K};
342 END inverse_temperature;
343
344 ATOM delta_temperature REFINES solver_var
345 DIMENSION TMP
346 DEFAULT 0.1{K};
347 lower_bound := -1000{K};
348 upper_bound := +1000{K};
349 nominal := 5{K};
350 END delta_temperature;
351
352 (* forces *)
353 ATOM force REFINES solver_var
354 DIMENSION M*L/T^2
355 DEFAULT 1.0{N};
356 lower_bound := -1e20{N};
357 upper_bound := 1e20{N};
358 nominal := 1.0{kN};
359 END force;
360
361 ATOM force_per_length REFINES solver_var
362 DIMENSION M/T^2
363 DEFAULT 1.0{N/m};
364 lower_bound := -1e20{N/m};
365 upper_bound := 1e20{N/m};
366 nominal := 1.0{N/m};
367 END force_per_length;
368
369 ATOM force_per_volume REFINES solver_var
370 DIMENSION M/T^2/L^2
371 DEFAULT 1.0{N/m^3};
372 lower_bound := -1e20{N/m^3};
373 upper_bound := 1e20{N/m^3};
374 nominal := 1.0{N/m^3};
375 END force_per_volume;
376
377 ATOM surface_tension REFINES solver_var
378 DIMENSION M/T^2
379 DEFAULT 1.0{N/m};
380 lower_bound := 0{N/m};
381 upper_bound := 1e20{N/m};
382 nominal := 1.0{N/m};
383 END surface_tension;
384
385 (* P R E S S U R E
386 --------------- *)
387
388 ATOM pressure REFINES solver_var
389 DIMENSION M/L/T^2
390 DEFAULT 1.0{atm};
391 lower_bound := 0.001{Pa};
392 upper_bound := 5000{atm};
393 nominal := 1.0{atm};
394 END pressure;
395
396 ATOM pressure_rate REFINES solver_var
397 DIMENSION M/L/T^3
398 DEFAULT -1 {kPa/s};
399 lower_bound := -5 {bar/s};
400 upper_bound := +5 {bar/s};
401 nominal := 1 {kPa/s};
402 END pressure_rate;
403
404 ATOM delta_pressure REFINES solver_var
405 DIMENSION M/L/T^2
406 DEFAULT 1.0{atm};
407 lower_bound := -1000{atm};
408 upper_bound := 1000{atm};
409 nominal := 1.0{atm};
410 END delta_pressure;
411
412 ATOM vapor_pressure REFINES pressure
413 DIMENSION M/L/T^2
414 DEFAULT 1.0{atm};
415 lower_bound := 0.001{Pa};
416 upper_bound := 5000{atm};
417 nominal := 0.5{atm};
418 END vapor_pressure;
419
420 ATOM k_constant REFINES solver_var
421 (* what IS this ? ? ? (it rings a bell...) *)
422 DIMENSION T^2/L^5
423 DEFAULT 1.0 {s^2/ft^5};
424 lower_bound := 0.001 {s^2/ft^5};
425 upper_bound := 5000 {s^2/ft^5};
426 nominal := 1.0 {s^2/ft^5};
427 END k_constant;
428
429 ATOM youngs_modulus REFINES solver_var
430 (* the measure of the physical stiffness of a material *)
431 DIMENSION M/L/T^2
432 DEFAULT 200 {GPa};
433 lower_bound := 0 {Pa};
434 upper_bound := 1500 {GPa};
435 nominal := 40 {GPa};
436 END youngs_modulus;
437
438 ATOM pressure_per_length REFINES solver_var
439 DIMENSION M/L^2/T^2
440 DEFAULT 50 {Pa/m};
441 lower_bound := -1e20{bar/m};
442 upper_bound := +1e20{bar/m};
443 nominal := 50 {Pa/m};
444 END pressure_per_length;
445
446
447 (* M A S S / M O L E Q U A N T I T I E S
448 -------------------------------------- *)
449
450 ATOM molar_mass REFINES solver_var
451 DIMENSION M/Q
452 DEFAULT 100.0{g/g_mole};
453 lower_bound := 0.0{g/g_mole};
454 upper_bound := 1e9{g/g_mole};
455 nominal := 100.0{g/g_mole};
456 END molar_mass;
457
458 ATOM mass REFINES solver_var
459 DIMENSION M
460 DEFAULT 10.0{kg};
461 lower_bound := 0.0{kg};
462 upper_bound := 1e50{kg};
463 nominal := 10.0{kg};
464 END mass;
465
466 ATOM mole_scale REFINES real DIMENSION Q DEFAULT 1 {mole};
467 END mole_scale;
468
469 ATOM mole REFINES solver_var
470 DIMENSION Q
471 DEFAULT 10.0{lb_mole};
472 lower_bound := 0.0{lb_mole};
473 upper_bound := 1e50{lb_mole};
474 nominal := 10.0{lb_mole};
475 END mole;
476
477 ATOM mass_rate REFINES solver_var
478 DIMENSION M/T
479 DEFAULT 50{g/s};
480 lower_bound := 0.0{g/s};
481 upper_bound := 1e50{g/s};
482 nominal := 100.0{g/s};
483 END mass_rate;
484
485 CONSTANT mass_rate_constant
486 REFINES real_constant DIMENSION M/T;
487
488 ATOM mass_flux REFINES solver_var
489 DIMENSION M/T/L^2
490 DEFAULT 10{kg/s/m^2};
491 lower_bound := -1e12{kg/s/m^2};
492 upper_bound := 1e12{kg/s/m^2};
493 nominal := 10.0{kg/s/m^2};
494 END mass_flux;
495
496 ATOM mass_rate_rate REFINES solver_var
497 DIMENSION M/T^2
498 DEFAULT 10{g/s/s};
499 lower_bound := -1e50{g/s/s};
500 upper_bound := 1e50{g/s/s};
501 nominal := 10.0{g/s/s};
502 END mass_rate_rate;
503
504 ATOM mass_rate_per_length REFINES solver_var
505 DIMENSION M/T/L
506 DEFAULT 0.1 {kg/s/m};
507 lower_bound := -1e50 {kg/s/m};
508 upper_bound := 1e50 {kg/s/m};
509 nominal := 1.0 {kg/s/m};
510 END mass_rate_per_length;
511
512
513 ATOM molar_rate_scale REFINES real DIMENSION Q/T DEFAULT 1 {mole/second};
514 END molar_rate_scale;
515
516 ATOM molar_rate REFINES solver_var
517 DIMENSION Q/T
518 DEFAULT 100.0{lb_mole/hour};
519 lower_bound := 0.0{lb_mole/hour};
520 upper_bound := 1e50{lb_mole/hour};
521 nominal := 100.0{lb_mole/hour};
522 END molar_rate;
523
524 ATOM conc_rate REFINES solver_var
525 DIMENSION Q/L^3/T
526 DEFAULT 100.0{lb_mole/ft^3/hour};
527 lower_bound := 0.0{lb_mole/ft^3/hour};
528 upper_bound := 1e50{lb_mole/ft^3/hour};
529 nominal := 100.0{lb_mole/ft^3/hour};
530 END conc_rate;
531
532
533 ATOM mole_fraction REFINES fraction
534 DIMENSIONLESS
535 DEFAULT 0.5;
536 lower_bound := 0.0;
537 nominal := 0.3;
538 upper_bound := 1.0;
539 END mole_fraction;
540
541 ATOM mass_fraction REFINES fraction
542 DIMENSIONLESS
543 DEFAULT 0.5;
544 lower_bound := 0.0;
545 nominal := 0.3;
546 upper_bound := 1.0;
547 END mass_fraction;
548
549
550 (* V O L U M E Q U A N T I T I E S
551 -------------------------------- *)
552
553 ATOM molar_volume REFINES solver_var
554 DIMENSION L^3/Q
555 DEFAULT 1000.0{cm^3/g_mole};
556 lower_bound := 0.0{cm^3/g_mole};
557 upper_bound := 1e50{cm^3/g_mole};
558 nominal := 1000.0{cm^3/g_mole};
559 END molar_volume;
560
561 ATOM volume_scale REFINES real DIMENSION L^3 DEFAULT 1.0 {m^3};
562 END volume_scale;
563
564 ATOM volume REFINES solver_var
565 DIMENSION L^3
566 DEFAULT 100.0{ft^3};
567 lower_bound := 0.0{ft^3};
568 upper_bound := 1e50{ft^3};
569 nominal := 100.0{ft^3};
570 END volume;
571
572 ATOM volume_rate_scale REFINES real DIMENSION L^3/T DEFAULT 1{m^3/s};
573 END volume_rate_scale;
574
575 ATOM volume_rate REFINES solver_var
576 DIMENSION L^3/T
577 DEFAULT 100.0{gpm};
578 lower_bound := 0.0{gpm};
579 upper_bound := 1e50{gpm};
580 nominal := 100.0{gpm};
581 END volume_rate;
582
583 ATOM volume_rate_square REFINES solver_var
584 DIMENSION L^6/T^2
585 DEFAULT 100.0{ft^6/s^2};
586 lower_bound := 0.0{ft^6/s^2};
587 upper_bound := 1e50{ft^6/s^2};
588 nominal := 100 {ft^6/s^2};
589 END volume_rate_square;
590
591 ATOM volume_expansivity REFINES solver_var
592 DIMENSION 1/TMP
593 DEFAULT 0.001{1/K};
594 lower_bound := 0.0{1/K};
595 upper_bound := 1e50{1/K};
596 nominal := 0.001{1/K};
597 END volume_expansivity;
598
599
600 (* D E N S I T Y Q U A N T I T I E S
601 ---------------------------------- *)
602
603 ATOM molar_density REFINES solver_var
604 DIMENSION Q/L^3
605 DEFAULT 0.1{mole/m^3};
606 lower_bound := 0.0{mole/m^3};
607 upper_bound := 1e50{mole/m^3};
608 nominal := 0.1{mole/m^3};
609 END molar_density;
610
611 ATOM mass_density REFINES solver_var
612 DIMENSION M/L^3
613 DEFAULT 1.0{g/cm^3};
614 lower_bound := 0.0{g/cm^3};
615 upper_bound := 1e50{g/cm^3};
616 nominal := 1.0{g/cm^3};
617 END mass_density;
618
619
620 (* E N E R G Y Q U A N T I T I E S
621 ------------------------------------ *)
622
623 ATOM molar_energy REFINES solver_var
624 DIMENSION M*L^2/T^2/Q
625 DEFAULT 10000.0{BTU/lb_mole};
626 lower_bound := -1e50{BTU/lb_mole};
627 upper_bound := 1e50{BTU/lb_mole};
628 nominal := 10000.0{BTU/lb_mole};
629 END molar_energy;
630
631 ATOM energy_scale REFINES real DIMENSION M*L^2/T^2 DEFAULT 1{joule};
632 END energy_scale;
633
634 ATOM energy REFINES solver_var
635 DIMENSION M*L^2/T^2
636 DEFAULT 100000.0{BTU};
637 lower_bound := -1e50{BTU};
638 upper_bound := 1e50{BTU};
639 nominal := 100000.0{BTU};
640 END energy;
641
642 ATOM energy_per_volume REFINES solver_var
643 DIMENSION M/L/T^2
644 DEFAULT 1000{kJ/L};
645 lower_bound := -1e50{kJ/L};
646 upper_bound := 1e50{kJ/L};
647 nominal := 1000{kJ/L};
648 END energy_per_volume;
649
650 ATOM energy_rate_scale REFINES real DIMENSION M*L^2/T^3 DEFAULT 1{watt};
651 END energy_rate_scale;
652
653 ATOM energy_rate REFINES solver_var
654 DIMENSION M*L^2/T^3
655 DEFAULT 100000.0{BTU/hour};
656 lower_bound := -1e50{BTU/hour};
657 upper_bound := 1e50{BTU/hour};
658 nominal := 100000.0{BTU/hour};
659 END energy_rate;
660
661 ATOM power_per_length REFINES solver_var
662 DIMENSION M*L/T^3
663 DEFAULT 1.0{kW/m};
664 lower_bound := -1e50{kW/m};
665 upper_bound := 1e50{kW/m};
666 nominal := 1.0{kW/m};
667 END power_per_length;
668
669 ATOM power_per_volume REFINES solver_var
670 DIMENSION M/L/T^3
671 DEFAULT 1.0{kW/m^3};
672 lower_bound := -1e50{kW/m^3};
673 upper_bound := 1e50{kW/m^3};
674 nominal := 1.0{kW/m^3};
675 END power_per_volume;
676
677 ATOM power_per_area REFINES solver_var
678 DIMENSION M/T^3
679 DEFAULT 1.0{kW/m^2};
680 lower_bound := -1e50{kW/m^3};
681 upper_bound := 1e50{kW/m^3};
682 nominal := 1.0{kW/m^3};
683 END power_per_area;
684
685 ATOM power_per_temperature REFINES solver_var
686 DIMENSION M*L^2/T^3/TMP
687 DEFAULT 1.0{kW/K};
688 lower_bound := -1e30{kW/K};
689 upper_bound := 1e30{kW/K};
690 nominal := 1.0 {kW/K};
691 END power_per_temperature;
692
693 ATOM irradiance REFINES solver_var
694 DIMENSION M/T^3
695 DEFAULT 1000{W/m^2};
696 lower_bound := 0{W/m^2};
697 upper_bound := 1.5{MW/m^2}; (* a bit more that the max possible from sunlight *)
698 nominal := 300{W/m^2};
699 END irradiance;
700
701 ATOM irradiation REFINES solver_var
702 DIMENSION M/T^2
703 DEFAULT 1000{J/m^2};
704 lower_bound := 0{J/m^2};
705 upper_bound := 1e50{J/m^2}; (* a bit more that the max possible from sunlight *)
706 nominal := 300{J/m^2};
707 END irradiation;
708
709
710 ATOM molar_heat_capacity REFINES solver_var
711 DIMENSION M*L^2/T^2/Q/TMP
712 DEFAULT 1.00e5{J/mole/K};
713 lower_bound := 0.0{J/mole/K};
714 upper_bound := 1e60{J/mole/K};
715 nominal := 1.00e5{J/mole/K};
716 END molar_heat_capacity;
717
718 ATOM molar_energy_rate REFINES solver_var
719 DIMENSION M*L^2/T^3/Q
720 DEFAULT 0 {BTU/lb_mole/h};
721 lower_bound := -1e50 {BTU/lb_mole/h};
722 upper_bound := 1e50 {BTU/lb_mole/h};
723 nominal := 10000.0 {BTU/lb_mole/h};
724 END molar_energy_rate;
725
726 (* E N T R O P Y Q U A N T I T I E S
727 ---------------------------------- *)
728
729 ATOM molar_entropy REFINES solver_var
730 DIMENSION M*L^2/T^2/Q/TMP
731 DEFAULT 100.0{BTU/lb_mole/R};
732 lower_bound := -1e50{BTU/lb_mole/R};
733 upper_bound := 1e50{BTU/lb_mole/R};
734 nominal := 100.0{BTU/lb_mole/R};
735 END molar_entropy;
736
737 ATOM entropy REFINES solver_var
738 DIMENSION M*L^2/T^2/TMP
739 DEFAULT 1000.0{BTU/R};
740 lower_bound := -1e50{BTU/R};
741 upper_bound := 1e50{BTU/R};
742 nominal := 1000.0{BTU/R};
743 END entropy;
744
745 ATOM entropy_rate REFINES solver_var
746 DIMENSION M*L^2/T^3/TMP
747 DEFAULT 1000.0{BTU/hour/R};
748 lower_bound := -1e50{BTU/hour/R};
749 upper_bound := 1e50{BTU/hour/R};
750 nominal := 1000.0{BTU/hour/R};
751 END entropy_rate;
752
753
754
755 (* E Q U I L I B R I U M Q U A N T I T I E S
756 ------------------------------------------ *)
757
758 ATOM partition_coefficient REFINES factor (* new *)
759 DEFAULT 1.0;
760 lower_bound := 1.0e-10;
761 upper_bound := 30.0;
762 nominal := 1.0;
763 END partition_coefficient;
764
765 ATOM relative_volatility REFINES partition_coefficient; (* new *)
766 END relative_volatility;
767
768
769 (* M O N E T A R Y Q U A N T I T I E S
770 ------------------------------------ *)
771
772 ATOM monetary_unit REFINES solver_var
773 DIMENSION C
774 DEFAULT 100.0{USD};
775 lower_bound := -1e50{USD};
776 upper_bound := 1e50{USD};
777 nominal := 100.0{USD};
778 END monetary_unit;
779
780 ATOM cost_per_volume REFINES solver_var
781 DIMENSION C/L^3
782 DEFAULT 1.0{USD/gallon};
783 lower_bound := 0.0{USD/gallon};
784 upper_bound := 1e50{USD/gallon};
785 nominal := 1.0{USD/gallon};
786 END cost_per_volume;
787
788 ATOM cost_per_mass REFINES solver_var
789 DIMENSION C/M
790 DEFAULT 1.0{USD/lbm};
791 lower_bound := 0.0{USD/lbm};
792 upper_bound := 1e50{USD/lbm};
793 nominal := 1.0{USD/lbm};
794 END cost_per_mass;
795
796 CONSTANT cost_per_mass_constant
797 REFINES real_constant DIMENSION C/M;
798
799 ATOM cost_per_mole REFINES solver_var
800 DIMENSION C/Q
801 DEFAULT 1.0{USD/lb_mole};
802 lower_bound := 0.0{USD/lb_mole};
803 upper_bound := 1e50{USD/lb_mole};
804 nominal := 1.0{USD/lb_mole};
805 END cost_per_mole;
806
807 ATOM cost_per_time REFINES solver_var
808 DIMENSION C/T
809 DEFAULT 1.0{USD/min};
810 lower_bound := 0.0{USD/min};
811 upper_bound := 1e50{USD/min};
812 nominal := 1.0{USD/min};
813 END cost_per_time;
814
815 ATOM cost_per_energy REFINES solver_var
816 DIMENSION C*T^2/M/L^2
817 DEFAULT 1.0{USD/BTU};
818 lower_bound := 0.0{USD/BTU};
819 upper_bound := 1e50{USD/BTU};
820 nominal := 1.0{USD/BTU};
821 END cost_per_energy;
822
823 CONSTANT cost_per_mass_per_distance_constant
824 REFINES real_constant DIMENSION C/M/L;
825
826
827 (* S U R V E Y I N G Q U A N T I T I E S
828 --------------------------------------- *)
829
830 ATOM distance REFINES solver_var
831 DIMENSION L
832 DEFAULT 10.0{ft};
833 lower_bound := 0.0{ft};
834 upper_bound := 1e50{ft};
835 nominal := 10.0{ft};
836 END distance;
837
838 CONSTANT distance_constant
839 REFINES real_constant DIMENSION L;
840
841 ATOM area REFINES solver_var
842 DIMENSION L^2
843 DEFAULT 1{m^2};
844 lower_bound := 0.0{m^2};
845 upper_bound := 1e50{m^2};
846 nominal := 1{m^2};
847 END area;
848
849 ATOM inverse_area REFINES solver_var
850 DIMENSION L^-2
851 DEFAULT 1{1/ft^2};
852 lower_bound := 0.0{1/ft^2};
853 upper_bound := 1e50{1/ft^2};
854 nominal := 1.0{1/ft^2};
855 END inverse_area;
856
857 ATOM angle REFINES solver_var
858 DIMENSION P
859 DEFAULT 1 {rad};
860 lower_bound := -1e50 {rad};
861 upper_bound := 1e50 {rad};
862 nominal := 1 {rad};
863 END angle;
864
865 ATOM solid_angle REFINES solver_var
866 DIMENSION S
867 DEFAULT 1 {srad};
868 lower_bound := -1e50 {srad};
869 upper_bound := 1e50 {srad};
870 nominal := 1 {srad};
871 END solid_angle;
872
873 (* M O T I O N Q U A N T I T I E S
874 --------------------------------- *)
875
876 ATOM time REFINES solver_var
877 DIMENSION T
878 DEFAULT 60.0{s};
879 lower_bound := -1e50{s};
880 upper_bound := 1e50{s};
881 nominal := 60.0{s};
882 END time;
883
884 ATOM speed REFINES solver_var
885 DIMENSION L/T
886 DEFAULT 3.0{ft/s};
887 lower_bound := -1e50{m/s};
888 upper_bound := 1e50{m/s};
889 nominal := 1.0{m/s};
890 END speed;
891
892 ATOM angular_speed REFINES solver_var
893 DIMENSION P/T
894 DEFAULT 1.0 {rad/s};
895 lower_bound := -1e50{rad/s};
896 upper_bound := 1e50{rad/s};
897 nominal := 1 {rad/s};
898 END angular_speed;
899
900 ATOM acceleration REFINES solver_var
901 DIMENSION L/T^2
902 DEFAULT 9.8{m/s^2};
903 lower_bound := -1e50{m/s^2};
904 upper_bound := 1e50{m/s^2};
905 nominal := 9.8{m/s^2};
906 END acceleration;
907
908 ATOM frequency REFINES solver_var
909 DIMENSION 1/T
910 DEFAULT 60.0{1/s};
911 lower_bound := 0.0{1/s};
912 upper_bound := 1e50{1/s};
913 nominal := 60.0{1/s};
914 END frequency;
915
916 ATOM stiffness REFINES solver_var
917 DIMENSION M/T^2
918 DEFAULT 1 {N/m};
919 lower_bound := 0 {N/m};
920 upper_bound := 1e12 {N/m};
921 nominal := 1 {N/m};
922 END stiffness;
923
924
925
926 (* T R A N S P O R T Q U A N T I T I E S
927 --------------------------------------- *)
928
929 ATOM viscosity REFINES solver_var
930 DIMENSION M/L/T
931 DEFAULT 1.0{cP};
932 lower_bound := 0.0{cP};
933 upper_bound := 1e50{cP};
934 nominal := 1.0{cP};
935 END viscosity;
936
937 ATOM kinematic_viscosity REFINES solver_var
938 DIMENSION L^2/T
939 DEFAULT 1e-6 {m^2/s};
940 lower_bound := 0.0 {m^2/s};
941 upper_bound := 1e50 {m^2/s};
942 nominal := 1.3 {g/s/m} * 0.001 {m^3/kg};
943 END kinematic_viscosity;
944
945 ATOM thermal_conductivity REFINES solver_var
946 DIMENSION M*L/T^3/TMP
947 DEFAULT 0.1{BTU/hour/ft/R};
948 lower_bound := 0.0{BTU/hour/ft/R};
949 upper_bound := 1e50{BTU/hour/ft/R};
950 nominal := 0.1{BTU/hour/ft/R};
951 END thermal_conductivity;
952
953 ATOM diffusivity REFINES solver_var
954 DIMENSION L^2/T
955 DEFAULT 1.0{cm^2/s};
956 lower_bound := 0.0{cm^2/s};
957 upper_bound := 1e50{cm^2/s};
958 nominal := 1.0{cm^2/s};
959 END diffusivity;
960
961
962 (* E L E C T R O - M A G N E T I C Q U A N T I T I E S
963 ---------------------------------------------------- *)
964
965 ATOM voltage REFINES solver_var
966 DIMENSION M*L^2/(T^3*E)
967 DEFAULT 10.0{volt};
968 lower_bound := -1e50{volt};
969 upper_bound := 1e50{volt};
970 nominal := 10.0{volt};
971 END voltage;
972
973 ATOM resistance REFINES solver_var
974 DIMENSION M*L^2/(E^2*T^3)
975 DEFAULT 10.0{ohm};
976 lower_bound := -1e50{ohm};
977 upper_bound := 1e50{ohm};
978 nominal := 10.0{ohm};
979 END resistance;
980
981 ATOM current REFINES solver_var
982 DIMENSION E
983 DEFAULT 1.0{amp};
984 lower_bound := -1e50{amp};
985 upper_bound := 1e50{amp};
986 nominal := 1.0{amp};
987 END current;
988
989 ATOM capacitance REFINES solver_var
990 DIMENSION E^2*T^4/M/L^2
991 DEFAULT 1.0{coulomb/volt};
992 lower_bound := -1e50{coulomb/volt};
993 upper_bound := 1e50{coulomb/volt};
994 nominal := 1.0{coulomb/volt};
995 END capacitance;
996
997 ATOM inductance REFINES solver_var
998 DIMENSION M*L^2/E^2/T^2
999 DEFAULT 1.0{volt*s/amp};
1000 lower_bound := -1e50{volt*s/amp};
1001 upper_bound := 1e50{volt*s/amp};
1002 nominal := 1.0{volt*s/amp};
1003 END inductance;
1004
1005 ATOM magnetic_field REFINES solver_var
1006 DIMENSION E/L
1007 DEFAULT 1.0{amp/m};
1008 lower_bound := -1e50{amp/m};
1009 upper_bound := 1e50{amp/m};
1010 nominal := 1.0{amp/m};
1011 END magnetic_field;
1012
1013 ATOM electric_field REFINES solver_var
1014 DIMENSION M*L/E/T^3
1015 DEFAULT 1.0{volt/m};
1016 lower_bound := -1e50{volt/m};
1017 upper_bound := 1e50{volt/m};
1018 nominal := 1.0{volt/m};
1019 END electric_field;
1020
1021 (* D I F F E R E N T I A L Q U A N T I T I E S
1022 ------------------------------------------- *)
1023
1024 ATOM delta_distance REFINES solver_var
1025 DIMENSION L
1026 DEFAULT 10.0{ft};
1027 lower_bound := -1e50{ft};
1028 upper_bound := 1e50{ft};
1029 nominal := 10.0{ft};
1030 END delta_distance;
1031
1032 ATOM delta_area REFINES solver_var
1033 DIMENSION L^2
1034 DEFAULT 1{m^2};
1035 lower_bound := -1e50{m^2};
1036 upper_bound := 1e50{m^2};
1037 nominal := 1{m^2};
1038 END delta_area;
1039
1040 ATOM temperature_rate REFINES solver_var
1041 DIMENSION TMP/T
1042 DEFAULT 0{K/s};
1043 lower_bound := -100{K/s};
1044 upper_bound := 100{K/s};
1045 nominal := 298.0{K/s};
1046 END temperature_rate;
1047
1048 ATOM delta_mass REFINES solver_var
1049 DIMENSION M
1050 DEFAULT 0.0{kg};
1051 lower_bound := -1e50{kg};
1052 upper_bound := 1e50{kg};
1053 nominal := 10.0{kg};
1054 END delta_mass;
1055
1056 ATOM delta_mole REFINES solver_var
1057 DIMENSION Q
1058 DEFAULT 0{lb_mole};
1059 lower_bound := -1e50{lb_mole};
1060 upper_bound := 1e50{lb_mole};
1061 nominal := 10.0{lb_mole};
1062 END delta_mole;
1063
1064 ATOM delta_mass_rate REFINES solver_var
1065 DIMENSION M/T
1066 DEFAULT 0{g/s};
1067 lower_bound := -1e50{g/s};
1068 upper_bound := 1e50{g/s};
1069 nominal := 100.0{g/s};
1070 END delta_mass_rate;
1071
1072 ATOM delta_molar_rate REFINES solver_var
1073 DIMENSION Q/T
1074 DEFAULT 0.0{lb_mole/hour};
1075 lower_bound := -1e50{lb_mole/hour};
1076 upper_bound := 1e50{lb_mole/hour};
1077 nominal := 100.0{lb_mole/hour};
1078 END delta_molar_rate;
1079
1080 ATOM delta_volume_rate REFINES solver_var
1081 DIMENSION L^3/T
1082 DEFAULT 0.0{gpm};
1083 lower_bound := -1e50{gpm};
1084 upper_bound := 1e50{gpm};
1085 nominal := 100.0{gpm};
1086 END delta_volume_rate;
1087
1088 ATOM density_rate REFINES solver_var
1089 DIMENSION M/L^3/T
1090 DEFAULT 0.0 {kg/m^3/s};
1091 lower_bound := -1e50 {kg/m^3/s};
1092 upper_bound := 1e50 {kg/m^3/s};
1093 nominal := 0.1 {kg/m^3/s};
1094 END density_rate;
1095
1096 ATOM delta_energy_rate REFINES solver_var
1097 DIMENSION M*L^2/T^3
1098 DEFAULT 0.0{BTU/hour};
1099 lower_bound := -1e50{BTU/hour};
1100 upper_bound := 1e50{BTU/hour};
1101 nominal := 100000.0{BTU/hour};
1102 END delta_energy_rate;
1103
1104 ATOM delta_molar_energy_rate REFINES solver_var
1105 DIMENSION M*L^2/T^3/Q
1106 DEFAULT 0 {BTU/lb_mole/h};
1107 lower_bound := -1e50 {BTU/lb_mole/h};
1108 upper_bound := 1e50 {BTU/lb_mole/h};
1109 nominal := 10000.0 {BTU/lb_mole/h};
1110 END delta_molar_energy_rate;
1111
1112 ATOM delta_entropy REFINES solver_var
1113 DIMENSION M*L^2/T^2/TMP
1114 DEFAULT 0.0{BTU/R};
1115 lower_bound := -1e50{BTU/R};
1116 upper_bound := 1e50{BTU/R};
1117 nominal := 1000.0{BTU/R};
1118 END delta_entropy;
1119
1120 ATOM delta_entropy_rate REFINES solver_var
1121 DIMENSION M*L^2/T^3/TMP
1122 DEFAULT 0.0{BTU/hour/R};
1123 lower_bound := -1e50{BTU/hour/R};
1124 upper_bound := 1e50{BTU/hour/R};
1125 nominal := 1000.0{BTU/hour/R};
1126 END delta_entropy_rate;
1127
1128
1129 (* C O N T R O L L E R Q U A N T I T I E S
1130 ---------------------------------------- *)
1131
1132 ATOM mass_sec REFINES solver_var
1133 DIMENSION M*T
1134 DEFAULT 0.0{kg*s};
1135 lower_bound := -1e50{kg*s};
1136 upper_bound := 1e50{kg*s};
1137 nominal := 10.0{kg*s};
1138 END mass_sec;
1139
1140 ATOM mole_sec REFINES solver_var
1141 DIMENSION Q*T
1142 DEFAULT 0.0{lb_mole*s};
1143 lower_bound := -1e50{lb_mole*s};
1144 upper_bound := 1e50{lb_mole*s};
1145 nominal := 10.0{lb_mole*s};
1146 END mole_sec;
1147
1148 (* D I F F E R E N T I A L S *)
1149
1150 ATOM rate REFINES solver_var
1151 DIMENSION T^-1
1152 DEFAULT 0{s^-1};
1153 lower_bound := -1e50{s^-1};
1154 upper_bound := 1e50{s^-1};
1155 nominal := 1{s^-1};
1156 END rate;
1157
1158 (* M E C H A N I C AL P R O P E R T I E S
1159 ---------------------------------------- *)
1160
1161 ATOM deflection REFINES solver_var (* to facilitate different display units for small values *)
1162 DIMENSION L
1163 DEFAULT 1 {mm};
1164 lower_bound := -10{m};
1165 upper_bound := 10{m};
1166 nominal := 5{mm};
1167 END deflection;
1168
1169 ATOM second_moment_of_area REFINES solver_var (* for use in beam bending problems *)
1170 DIMENSION L^4
1171 DEFAULT 6.67e5 {mm^4}; (* for 150UB14 Universal Beam, AISC (Australia) *)
1172 lower_bound := 0 {mm^4};
1173 upper_bound := 10000e6 {mm^4};
1174 nominal := 1e6 {mm^4}; (* this may be too high still *)
1175 END second_moment_of_area;
1176
1177 ATOM polar_moment_of_inertia REFINES solver_var (* for use in torsion problems *)
1178 DIMENSION L^4
1179 DEFAULT 28.2e3 {mm^4}; (* for 150UB14 Universal Beam, AISC (Australia) *)
1180 lower_bound := 0 {mm^4};
1181 upper_bound := 10000e3 {mm^4};
1182 nominal := 100e3 {mm^4}; (* this may be too high still *)
1183 END polar_moment_of_inertia;
1184
1185 CONSTANT second_moment_of_area_constant
1186 REFINES real_constant DIMENSION L^4;
1187
1188 CONSTANT length_constant
1189 REFINES real_constant DIMENSION L;
1190
1191 CONSTANT area_constant
1192 REFINES real_constant DIMENSION L^2;
1193
1194 ATOM moment REFINES solver_var
1195 DIMENSION M*L^2/T^2
1196 DEFAULT 1 {kN*m};
1197 lower_bound := -1e5 {kN*m};
1198 upper_bound := 1e5 {kN*m};
1199 nominal := 1 {kN*m};
1200 END moment;
1201
1202 ATOM stress REFINES solver_var
1203 DIMENSION M/L/T^2
1204 DEFAULT 1.0 {MPa};
1205 lower_bound := -5000 {MPa};
1206 upper_bound := 5000 {MPa};
1207 nominal := 1.0 {MPa};
1208 END stress;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22