aerosandbox.atmosphere.thermodynamics.gas
#
Module Contents#
Classes#
Provides a class for an ideal, calorically perfect gas. |
Attributes#
- class aerosandbox.atmosphere.thermodynamics.gas.PerfectGas(pressure=101325, temperature=273.15 + 15, specific_heat_constant_pressure=1006, specific_heat_constant_volume=717, molecular_mass=0.0289644, effective_collision_diameter=3.65e-10)[source]#
Provides a class for an ideal, calorically perfect gas.
- Specifically, this gas:
Has PV = nRT (ideal)
Has constant heat capacities C_V, C_P (independent of temperature and pressure).
Is in thermodynamic equilibrium
Is not chemically reacting
Has internal energy and enthalpy purely as functions of temperature
- Parameters:
pressure (Union[float, aerosandbox.numpy.ndarray]) –
temperature (Union[float, aerosandbox.numpy.ndarray]) –
specific_heat_constant_pressure (float) –
specific_heat_constant_volume (float) –
molecular_mass (float) –
effective_collision_diameter (float) –
- property specific_volume[source]#
Gives the specific volume, often denoted v.
(Note the lowercase; “V” is often the volume of a specific amount of gas, and this presents a potential point of confusion.)
- property specific_enthalpy[source]#
Gives the specific enthalpy, often denoted h.
Enthalpy here is in units of J/kg.
- property specific_internal_energy[source]#
Gives the specific internal energy, often denoted u.
Internal energy here is in units of J/kg.
- specific_enthalpy_change(start_temperature, end_temperature)[source]#
Returns the change in specific enthalpy that would occur from a given temperature change via a thermodynamic process.
- Parameters:
start_temperature – Starting temperature [K]
end_temperature – Ending temperature [K]
Returns: The change in specific enthalpy, in J/kg.
- specific_internal_energy_change(start_temperature, end_temperature)[source]#
Returns the change in specific internal energy that would occur from a given temperature change via a thermodynamic process.
- Parameters:
start_temperature – Starting temperature [K]
end_temperature – Ending temperature [K]
Returns: The change in specific internal energy, in J/kg.
- process(process='isentropic', new_pressure=None, new_temperature=None, new_density=None, enthalpy_addition_at_constant_pressure=None, enthalpy_addition_at_constant_volume=None, polytropic_n=None, inplace=False)[source]#
Puts this gas under a thermodynamic process.
Equations here: https://en.wikipedia.org/wiki/Ideal_gas_law
- Parameters:
process (str) –
Type of process. One of:
”isobaric”
”isochoric”
”isothermal”
”isentropic”
”polytropic”
The process must be specified.
arguments (You must specifiy exactly one of the following) –
new_pressure: the new pressure after the process [Pa].
new_temperature: the new temperature after the process [K]
new_density: the new density after the process [kg/m^3]
enthalpy_addition_at_constant_pressure: [J/kg]
enthalpy_addition_at_constant_volume: [J/kg]
polytropic_n (float) – If you specified the process type to be “polytropic”, you must provide the polytropic index
(Reminder (n to be used here.) – PV^n = constant)
inplace – Specifies whether to return the result in-place or to allocate a new PerfectGas object in memory
result. (for the) –
new_pressure (float) –
new_temperature (float) –
new_density (float) –
enthalpy_addition_at_constant_pressure (float) –
enthalpy_addition_at_constant_volume (float) –
- Returns:
If inplace is False (default), returns a new PerfectGas object that represents the gas after the change.
If inplace is True, nothing is returned.
- Return type: