exojax.atm package

Submodules

exojax.atm.amclouds module

Ackerman and Marley 2001 cloud model.

  • Ackerman and Marley (2001) ApJ 556, 872, hereafter AM01

exojax.atm.amclouds.VMRcloud(P, Pbase, fsed, VMRbase, kc=1)

VMR of clouds based on AM01.

Parameters
  • P – Pressure (bar)

  • Pbase – base pressure (bar)

  • fsed – fsed

  • VMRbase – VMR of condensate at cloud base

  • kc – constant ratio of condenstates to total mixing ratio

Returns

VMR of condensates

exojax.atm.amclouds.dtau_cloudgeo(Parr, muc, rhoc, mu, VMRc, rg, sigmag, g)

the optical depth using a geometric cross-section approximation, based on (16) in AM01.

Parameters
  • Parr – pressure array (bar)

  • muc – mass weight of condensate

  • rhoc – condensate density (g/cm3)

  • mu – mean molecular weight of atmosphere

  • VMRc – VMR array of condensate [Nlayer]

  • rg – rg parameter in the lognormal distribution of condensate size, defined by (9) in AM01

  • sigmag – sigmag parameter in the lognormal distribution of condensate size, defined by (9) in AM01

exojax.atm.amclouds.find_rw(rarr, vf, KzzpL)

finding rw from rarr and terminal velocity array.

Parameters
  • rarr – particle radius array (cm)

  • vf – terminal velocity (cm/s)

  • KzzpL – Kzz/L in Ackerman and Marley 2001

Returns

rw in Ackerman and Marley 2001

exojax.atm.amclouds.get_Pbase(Parr, Psat, VMR)

get Pbase from an intersection of a T-P profile and Psat(T) curves :param Parr: pressure array :param Psat: saturation pressure arrau :param VMR: VMR for vapor

Returns

base pressure

Return type

Pbase

exojax.atm.amclouds.get_rg(rw, fsed, alpha, sigmag)

compute rg of the lognormal size distribution defined by (9) in AM01. The computation is based on (13) in AM01.

Parameters
  • rw – rw (cm)

  • fsed – fsed

  • alpha – power of the condensate size distribution

  • sigmag – sigmag in the lognormal size distribution

Returns

exojax.atm.amclouds.get_rw(vfs, Kzz, L, rarr)

compute rw in AM01 implicitly defined by (11)

Parameters
  • vfs – terminal velocity (cm/s)

  • Kzz – diffusion coefficient (cm2/s)

  • L – typical convection scale (cm)

  • rarr – condensate scale array

Returns

rw (cm) in AM01. i.e. condensate size that balances an upward transport and sedimentation

Return type

rw

exojax.atm.atmprof module

Atmospheric profile function.

exojax.atm.atmprof.Hatm(g, T, mu)

pressure scale height assuming an isothermal atmosphere.

Parameters
  • g – gravity acceleration (cm/s2)

  • T – isothermal temperature (K)

  • mu – mean molecular weight

Returns

pressure scale height (cm)

exojax.atm.atmprof.Teff2Tirr(Teff, Tint)

Tirr from effective temperature and intrinsic temperature.

Parameters
  • Teff – effective temperature

  • Tint – intrinsic temperature

Returns

iradiation temperature

Return type

Tirr

Note

Here we assume A=0 (albedo) and beta=1 (fully-energy distributed)

exojax.atm.atmprof.Teq2Tirr(Teq, Tint)

Tirr from equilibrium temperature and intrinsic temperature.

Parameters
  • Teq – equilibrium temperature

  • Tint – intrinsic temperature

Returns

iradiation temperature

Return type

Tirr

Note

Here we assume A=0 (albedo) and beta=1 (fully-energy distributed)

exojax.atm.atmprof.atmprof_Guillot(Parr, g, kappa, gamma, Tint, Tirr, f=0.25)

Notes

Guillot (2010) Equation (29)

Parameters
  • Parr – pressure array (bar)

  • g – gravity (cm/s2)

  • kappa – thermal/IR opacity (kappa_th in Guillot 2010)

  • gamma – ratio of optical and IR opacity (kappa_v/kappa_th), gamma > 1 means thermal inversion

  • Tint – temperature equivalence of the intrinsic energy flow

  • Tirr – temperature equivalence of the irradiation

  • = 1 at the substellar point (f) – and f = 1/4 for an averaging over the whole planetary surface

  • = 1/2 for a day-side average (f) – and f = 1/4 for an averaging over the whole planetary surface

Returns

Tarr

exojax.atm.atmprof.atmprof_gray(Parr, g, kappa, Tint)
Parameters
  • Parr – pressure array (bar)

  • g – gravity (cm/s2)

  • kappa – infrared opacity

  • Tint – temperature equivalence of the intrinsic energy flow

exojax.atm.condinfo module

condensate information.

  • LF98 Lodders and Fegley (1998)

exojax.atm.idealgas module

Functions about ideal gas.

exojax.atm.idealgas.number_density(Parr, Tarr)

number density of ideal gas in cgs.

Parameters
  • Parr – pressure array (bar)

  • Tarr – temperature array (K)

Returns

number density (1/cm3)

exojax.atm.psat module

Saturation Vapor Pressure.

exojax.atm.psat.Psat_Fe_liquid(T)

Saturation Vapor Pressure for liquid Fe (Fe)

Note

Taken from Ackerman and Marley 2001 Appendix A (A4) see also their errata.

Parameters

T – temperature (K)

Returns

saturation vapor pressure (bar)

exojax.atm.psat.Psat_Fe_solid(T)

Saturation Vapor Pressure for Solid Fe (Fe)

Note

Taken from Ackerman and Marley 2001 Appendix A (A4) see also their errata.

Parameters

T – temperature (K)

Returns

saturation vapor pressure (bar)

exojax.atm.psat.Psat_enstatite_AM01(T)

Saturation Vapor Pressure for Enstatite (MgSiO3)

Note

Taken from Ackerman and Marley 2001 Appendix A (A4) see also their errata.

Parameters

T – temperature (K)

Returns

saturation vapor pressure (bar)

exojax.atm.simple_clouds module

cloud opacity.

exojax.atm.simple_clouds.powerlaw_clouds(nus, kappac0=0.01, nuc0=28571.0, alphac=1.0)

power-law cloud model.

Parameters
  • kappac0 – opacity (cm2/g) at nuc0

  • nuc0 – wavenumber for kappac0

  • alphac – power

Returns

cross section (cm2)

Note

alphac = - gamma of the definition in petitRadtrans. Also, default nuc0 corresponds to lambda0=0.35 um.

exojax.atm.viscosity module

Viscosity of droplets.

exojax.atm.viscosity.calc_vfactor(atm='H2', LJPparam=None)
Parameters
  • atm – molecule consisting of atmosphere, “H2”, “O2”, and “N2”

  • LJPparam – Custom Lennard-Jones Potential Parameters (d (cm) and epsilon/kB)

Returns

dynamic viscosity factor for Rosner eta = viscosity*T**0.66 applicable tempature range (K,K)

Return type

vfactor

Note

The dynamic viscosity is from the Rosner book (3-2-12) and caption in p106 Hirschfelder et al. (1954) within Trange.

exojax.atm.viscosity.eta_Rosner(T, vfactor)

dynamic viscocity by Rosner (2000)

Parameters
  • T – temperature (K)

  • vfactor – vfactor

Returns

dynamic viscosity (g/s/cm)

exojax.atm.viscosity.eta_Rosner_H2(T)

dynamic viscocity of the H2 atmosphere by Rosner (2000)

Parameters

T – temperature (K) (applicable from 179 to 11940K)

Returns

dynamic viscosity (g/s/cm)

exojax.atm.viscosity.get_LJPparam()

Lennard-Jones Potential Parameters.

Returns

Dict for Lennard-Jones Potential Parameters (d (cm)) LJPparam_epsilon_per_kB: Dict for Lennard-Jones Potential Parameters (epsilon/kB)

Return type

LJPparam_d

Note

Lennard-Jones Potential Parameters (LJPparam) were taken from p107, Table 3.2.1 of Transport process in chemically reacting flow systems by Daniel E. Rosner, originally from Svehla (1962).

exojax.atm.vterm module

Terminal velocity of cloud particles.

Note

The code in this module is based on Hans R Pruppacher and James D Klett. Microstructure of atmospheric clouds and precipitation and Akerman and Marley 2001.

exojax.atm.vterm.Ndavies(r, g, eta, drho, rho)

Davies (Best) number.

Parameters
  • r – particle size (cm)

  • g – gravity (cm/s2)

  • eta – dynamic viscosity (g/s/cm)

  • drho – density difference between condensates and atmosphere (g/cm3)

  • rho – atmosphere density (g/cm3)

Returns

Davies number (Best Number)

exojax.atm.vterm.vf(r, g, eta, rhoc, rho, Nkn=0.0)

terminal velocity.

Parameters
  • r – particle size (cm)

  • g – gravity (cm/s2)

  • eta – dynamic viscosity (g/s/cm)

  • rhoc – condensate density (g/cm3)

  • rho – atmosphere density (g/cm3)

  • Nkn – Knudsen number

Returns

terminal velocity (cm/s)

Example

>>> #terminal velocity at T=300K, for Earth atmosphere/gravity.
>>> g=980.
>>> drho=1.0
>>> rho=1.29*1.e-3 #g/cm3
>>> vfactor,Tr=vc.calc_vfactor(atm="Air")
>>> eta=vc.eta_Rosner(300.0,vfactor)
>>> r=jnp.logspace(-5,0,70)
>>> vf(r,g,eta,drho,rho) #terminal velocity (cm/s)
exojax.atm.vterm.vf_largeNre(r, g, eta, drho, rho)

terminal velocity ( Reynolds number > 500, Davies number >10**5 )

Parameters
  • r – particle size (cm)

  • g – gravity (cm/s2)

  • eta – dynamic viscosity (g/s/cm)

  • drho – density difference between condensates and atmosphere (g/cm3)

  • rho – atmosphere density (g/cm3)

Returns

terminal velocity (cm/s)

exojax.atm.vterm.vf_midNre(r, g, eta, drho, rho)

terminal velocity (2 < Reynolds number < 500, 42 < Davies number < 10**5)

Parameters
  • r – particle size (cm)

  • g – gravity (cm/s2)

  • eta – dynamic viscosity (g/s/cm)

  • drho – density difference between condensates and atmosphere (g/cm3)

  • rho – atmosphere density (g/cm3)

Returns

terminal velocity (cm/s)

exojax.atm.vterm.vf_stokes(r, g, eta, drho, Nkn=0.0)

terminal velocity of Stokes flow (Reynolds number < 2, Davies number < 42)

Parameters
  • r – particle size (cm)

  • g – gravity (cm/s2)

  • eta – dynamic viscosity (g/s/cm)

  • drho – density difference between condensates and atmosphere (g/cm3)

  • Nkn – Knudsen number

Returns

terminal velocity (cm/s)

Note

(1.0+1.255*Nkn) is the Cunningham factor

Note

See also (10-138) p415 in Hans R Pruppacher and James D Klett. Microstructure of atmospheric clouds and precipitation. In Microphysics of clouds and precipitation, pages 10–73. Springer, 2010. Equation (B1) in Appendix B of Ackerman and Marley 2001.

Module contents