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

Contents of /trunk/models/atoms.a4l

Parent Directory Parent Directory | Revision Log Revision Log


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

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