carmapy.Gas#
- class carmapy.Gas(name, igas, nmr=-1, **kwargs)#
An object representing a limiting gas resevoir for a condensate. Attributes not defined in
**kwargswill be populated from carmapy defaults, if available- Parameters:
name (
str) – The name of the gas resevoir. Note currently we name the gas resevoir with the name of the condensate, not the gas phase (ie Mg2SiO4 not Mg)igas (
int) – The index of the gas in the Carma simulationnmr (
TypeAliasType) – The number mixing ratio. If a float is provided represents the number mixing ratio at the bottom of the atmosphere; if an array then represents the mixing ratio at each “center” location. Can be provided at anytime before simulation run, by default -1 (not initialized)
Notes
The vapor pressure of the condensate is calculated as follows:
vp = 1e6 * 10**(offset - vp_tcoeff/T - vp_metcoeff * met - vp_logp_oeff * log10(P*1e-6))with
vpin baryes,Tin K, andPin baryes.The surface tension of the condensate is calculated as follows:
surften = surften_0 - surften_slope * (T)with
Tin K andsurftenin dyne / cmIf not directly given, the latent heat of evaportation is calculated folowing Charnay et al. 2015 [2]
lat_heat_e = vp_coeff * log(10) * R/wtmol_difwhere R is the ideal gas constant
- The
gas.boundarydictionary is structured as follows: [“bot_conc”] describes the number mixing ratio of the gas at the base of the atmosphere (only used if the bottom gas boundary condition is set to “fixed_conc”). If not set, uses the value of gas.nmr at the bottom of the atmosphere instead.
[“top_conc”] describes the number mixing ratio of the gas at the top of the atmosphere (only used if the top gas boundary condition is set to “fixed_conc”). Will throw an error if used but not set.
[“bot_flux”] describes the upwards flux of the gas to the base of the atmosphere (only used if the bottom gas boundary condition is set to “fixed_flux”) [g/cm^2/s]. Defaults to 0 if not set.
[“top_flux”] describes the downwards flux of the gas at the top of the atmosphere (only used if the top gas boundary condition is set to “fixed_flux”). [g/cm^2/s] Defaults to 0 if not set.
- The
References
Attributes
boundaryThe boundary conditions for the gas (see note 4)
coldiaCollisional diameter of the condensate [cm]
gcompInteger that indicates composition (1 Water, 2 H2SO4, 0 other)
hill_formulaThe chemical formula of the condensate in hill notation
is_typeIIITrue if condensation reaction is a Type III reaction (see Helling & Woitke 2006) [1]
lat_heat_eLatent heat of evaporation, if not provided derived from other inputs (see note 3)
rho_condDensity of the condensate formed by the gas [g/cm³]
stofactThe stoichiometry factor between the gas phase and the condensate
surften_0Surface tension at 0 K assuming linear trend holds (see note 2) [dyne/cm]
surften_slopeSlope of surface tension with temperature (see note 2) [dyne/cm/K]
vp_logpcoeffCoeficcent to pressure term in vapor pressure equation (see note 1)
vp_metcoeffCoeficcient to metallicity term in vapor pressure equation (see note 1)
vp_offsetConstant term in vapor pressure equation (see note 1)
vp_tcoeffCoeficcient to temperature term in vapor pressure equation (see note 1) [K]
wtmolMolar mass of the condensate formed by the gas [g/mol]
wtmol_difMolar mass of the gas phase of the gas [g/mol]