PLUTO
|
Compute the mean molecular weight. More...
#include "pluto.h"
Go to the source code of this file.
Functions | |
double | MeanMolecularWeight (double *v) |
Compute the mean molecular weight.
Compute and return the mean molecular weight as a function of the gas composition under non-equilibrium conditions. The mean molecular weight is usually needed to compute the temperature or mass density from the particle number density:
where is the atomic mass unit while
is the number density of all particles. The Mean molecular weight is defined as the average mass of a particle of gas in terms of the atomic mass unit and it is expressed by the weighted sum of the mass of particles in atomic mass unit divided by total number of particles (see book by Ryan & Norton [Eq. 1.7])
where
H2_COOL: to compute we proceed as follows:
Putting it all together:
where
MINEq: please see Eq. [12] of Tesileanu (2008)
SNEq: the derivation is similar to H2_COOL with yielding
where one electron from metals is assumed.
No Chemistry: in case where chemical reaction are not incuded, the mean molecular weight is computed from the mass fractions assuming a fully ionized gas:
References
Definition in file mean_mol_weight.c.
double MeanMolecularWeight | ( | double * | v | ) |
Return the mean molecular weight.
[in] | v | array of primitive variables (including ions) |
Definition at line 120 of file mean_mol_weight.c.