pytmosph3r.chemistry.fastchemistry

Module Contents

fastchem_name(gas)[source]
create_tempfile(name='tmp')[source]
class FastChemistry(gases=None, filename=None)[source]

Bases: pytmosph3r.chemistry.chemistry.Chemistry

Chemistry model based on FastChem: https://github.com/exoclime/FastChem

Parameters:
build(atmosphere, input_atmosphere=None)[source]

General function that will be called to compute the chemistry after atmosphere has been initialized. It iterates over gases by calling compute_vmr() on each gas.

Parameters:
  • atmosphere (AltitudeAtmosphere) – Altitude-based atmosphere in which to compute the volume mixing ratios of gases.

  • input_atmosphere (InputAtmosphere, optional) – Input atmosphere if you need it (with input mix_ratios for example).

compute_vmr(gas, mix_ratio)[source]

This function can be overridden to compute the volume mixing ratio of a gas gas using mix_ratio, initialized to an array with the shape of the atmosphere.

Parameters:
  • gas (str) – Name of the gas

  • mix_ratio (array, np.ndarray) – Array full of ones of shape shape. The array is filled with the values in the atmosphere is the gas was already present, or else ones.

inputs()[source]