chemistry module

Methods related to the actual chemical processes used in EOM

chemistry.backwardEuler(density, PhotoDissRate, N, dt, iAlt)

Update the density using the backward euler method. Currently requires source and loss terms to be calculated and their derivatives.

chemistry.calcChemistry(u0, PhotoDissRate, N, temp, dt, chemsolver='simple', iAlt=None, usr=None)

Perform the chemistry update.

The #CHEMISTRY input flag determines the method to use, simple or explicit.

u0 : array
Input density at a single altitude for all species
PhotoDissRate : array
Input photo dissociation rates for all photo active species
N : float
Total number density at single altitude
temp : float
Temperature at single altitude
dt : float
Time step
chemsolver : char, optional
Specify which method to use to solve chemistry
iAlt : int, optional
Mainly used for debugging
chemistry.calcJacobian(density, PhotoDissRate, N)

Get jacobian maxtrix for backward euler.

chemistry.calcsourceterms(u, PhotoDissRate, N, dt, ialt)

Calculate the full time-dependent chemical sources and losses for the current time step explicitly.

chemistry.updateRates(temp)

Update chemical reaction rates given the temperature