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

Annotation of /trunk/models/atoms.a4l

Parent Directory Parent Directory | Revision Log Revision Log


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

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