lair.meteorology.ideal_gas_law#
- lair.meteorology.ideal_gas_law(solve_for, p=None, V=None, T=None, m=None, n=None, N=None, rho=None, alpha=None, R=None)[source]#
Ideal gas law equation solver. Solver attempts to solve for the specified variable using the following forms of the ideal gas law:
pV = nR*T pV = mRT pV = NkbT p = ρRT pα = RT
Input variables must be able to solve for the desired variable using the above equations without intermediate steps. All inputs must be in SI.
p : pressure (Pa) V : volume (m^3) T : temperature (K) m : mass (kg) n : moles (mol) N : number of molecules (#) ρ : density (kg/m^3) α : specific volume (m^3/kg) R : specific gas constant (J/kg/K)
Can be used to solve for pressure, volume, temperature, density, mass, moles, or number of molecules.