carmapy.Gas

Contents

carmapy.Gas#

class carmapy.Gas(name, igas, nmr=-1, **kwargs)#

An object representing a limiting gas resevoir for a condensate. Attributes not defined in **kwargs will 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 simulation

  • nmr (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

  1. 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 vp in baryes, T in K, and P in baryes.

  2. The surface tension of the condensate is calculated as follows:

    surften = surften_0 - surften_slope * (T)

    with T in K and surften in dyne / cm

  3. If 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_dif

    where R is the ideal gas constant

  4. The gas.boundary dictionary 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.

References

Attributes

boundary

The boundary conditions for the gas (see note 4)

coldia

Collisional diameter of the condensate [cm]

gcomp

Integer that indicates composition (1 Water, 2 H2SO4, 0 other)

hill_formula

The chemical formula of the condensate in hill notation

is_typeIII

True if condensation reaction is a Type III reaction (see Helling & Woitke 2006) [1]

lat_heat_e

Latent heat of evaporation, if not provided derived from other inputs (see note 3)

rho_cond

Density of the condensate formed by the gas [g/cm³]

stofact

The stoichiometry factor between the gas phase and the condensate

surften_0

Surface tension at 0 K assuming linear trend holds (see note 2) [dyne/cm]

surften_slope

Slope of surface tension with temperature (see note 2) [dyne/cm/K]

vp_logpcoeff

Coeficcent to pressure term in vapor pressure equation (see note 1)

vp_metcoeff

Coeficcient to metallicity term in vapor pressure equation (see note 1)

vp_offset

Constant term in vapor pressure equation (see note 1)

vp_tcoeff

Coeficcient to temperature term in vapor pressure equation (see note 1) [K]

wtmol

Molar mass of the condensate formed by the gas [g/mol]

wtmol_dif

Molar mass of the gas phase of the gas [g/mol]