Difference between revisions of "The gases.def Input File"

From Planets
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
A typical gases.def file for the Earth case:
+
A typical ''gases.def'' file for the Earth case:
 
<pre>
 
<pre>
 
# gases
 
# gases
Line 18: Line 18:
 
</pre>
 
</pre>
  
'''Note''': Lines beginning with a hashtag are not read
+
* Note that the first line of the file is actually not read
 +
* The second line must contain the number of gases (here 3) accounted for
 +
* Then come the gas names (always 3 characters!), one per line. Here '''N2_''', '''CO2''' and '''H2O'''
 +
* Followed by the gas mixing ratios, if the gas concentration is assumed to be constant, or '''-1''' if it is variable. In the example given above ''N2'' and ''CO2'' will be taken as having constant mixing ratios of respectively ''0.9996119'' and ''0.375999962E-03'', whereas ''H2O'' will be variable.
  
 +
 +
Another example of a ''gases.def'' file, from the Early Mars case, where only two gases are considered, '''CO2''' and '''H2O''', with only ''H2O'' as variable:
 +
<pre>
 +
# gases
 +
2
 +
CO2
 +
H2O
 +
1.0
 +
-1
 +
 +
# First line is number of gases
 +
# Followed by gas names (always 3 characters)
 +
# and then mixing ratios.
 +
# mixing ratio -1 means the gas is variable.
 +
</pre>
  
 
== Technical aspects ==
 
== Technical aspects ==
In the code this file is read by ....
+
In the code this file is read by the ''su_gases'' routine, which handles only preset possibilities (gas names).
 +
 
 +
[[Category:Inputs]]
 +
 
 +
[[Category:Generic-Model]]

Latest revision as of 17:11, 20 March 2023

A typical gases.def file for the Earth case:

# gases
3
N2_
CO2
H2O
0.999611900E+00
0.375999962E-03
-1


# First line is number of gases
# Followed by gas names (always 3 characters)
# and then mixing ratios.
# mixing ratio -1 means the gas is variable.
  • Note that the first line of the file is actually not read
  • The second line must contain the number of gases (here 3) accounted for
  • Then come the gas names (always 3 characters!), one per line. Here N2_, CO2 and H2O
  • Followed by the gas mixing ratios, if the gas concentration is assumed to be constant, or -1 if it is variable. In the example given above N2 and CO2 will be taken as having constant mixing ratios of respectively 0.9996119 and 0.375999962E-03, whereas H2O will be variable.


Another example of a gases.def file, from the Early Mars case, where only two gases are considered, CO2 and H2O, with only H2O as variable:

# gases
2
CO2
H2O
1.0
-1

# First line is number of gases
# Followed by gas names (always 3 characters)
# and then mixing ratios.
# mixing ratio -1 means the gas is variable.

Technical aspects

In the code this file is read by the su_gases routine, which handles only preset possibilities (gas names).