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

Contents of /trunk/models/atoms.a4l

Parent Directory Parent Directory | Revision Log Revision Log


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

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