bioniumx.physics.mean_molecular_weight

bioniumx.physics.mean_molecular_weight(abundances: dict) float[source]

Calculate the mean molecular weight of an atmosphere.

Parameters:

abundances (dict) – Dictionary of molecular formulas and their mole fractions. E.g., {“H2”: 0.85, “He”: 0.15}. Fractions will be normalized to sum to 1.

Returns:

mu – Mean molecular weight in g/mol (equivalent to amu).

Return type:

float

Examples

>>> mu_earth = mean_molecular_weight({"N2": 0.78, "O2": 0.21, "Ar": 0.01})