exo_k.util.molar_mass

@author: jeremy leconte

Module Contents

class exo_k.util.molar_mass.Molar_mass[source]

Bases: exo_k.util.singleton.Singleton

A class to compute the molar mass (in kg/mol) of regular molecules with a name written in a regular way (e.g. CO2, H2O, etc.). This class can also store the molar mass of custom gases with arbitrary names (for example: My_gas, earth_background).

init(*args, **kwds)[source]

Initializes empty dictionary of custom molecular masses.

add_species(species_dict)[source]

Add one or several species weights to the database.

Parameters:

species_dict (dict) – Keys are gases names (they do not have to be real molecules). Values are molar masses in kg/mol.

fetch(molecule_name)[source]

Computes the molar mass of a molecule in kg/mol

Parameters:

molecule_name – str Name of the molecule.

Returns:

Molar mass in kg/mol.

Return type:

float

exo_k.util.molar_mass._atomic_mass_in_amu
exo_k.util.molar_mass._molar_mass_atoms