aerosandbox.atmosphere.thermodynamics.gas ========================================= .. py:module:: aerosandbox.atmosphere.thermodynamics.gas Attributes ---------- .. autoapisummary:: aerosandbox.atmosphere.thermodynamics.gas.universal_gas_constant aerosandbox.atmosphere.thermodynamics.gas.g Classes ------- .. autoapisummary:: aerosandbox.atmosphere.thermodynamics.gas.PerfectGas Module Contents --------------- .. py:data:: universal_gas_constant :value: 8.31432 .. py:class:: 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) 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 .. py:attribute:: pressure :value: 101325 .. py:attribute:: temperature :value: 288.15 .. py:attribute:: specific_heat_constant_pressure :value: 1006 .. py:attribute:: specific_heat_constant_volume :value: 717 .. py:attribute:: molecular_mass :value: 0.0289644 .. py:attribute:: effective_collision_diameter :value: 3.65e-10 .. py:method:: __repr__() .. py:property:: density .. py:property:: speed_of_sound .. py:property:: specific_gas_constant .. py:property:: ratio_of_specific_heats .. py:method:: specific_enthalpy_change(start_temperature, end_temperature) Returns the change in specific enthalpy that would occur from a given temperature change via a thermodynamic process. :param start_temperature: Starting temperature [K] :param end_temperature: Ending temperature [K] Returns: The change in specific enthalpy, in J/kg. .. py:method:: specific_internal_energy_change(start_temperature, end_temperature) Returns the change in specific internal energy that would occur from a given temperature change via a thermodynamic process. :param start_temperature: Starting temperature [K] :param end_temperature: Ending temperature [K] Returns: The change in specific internal energy, in J/kg. .. py:property:: specific_volume 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.) .. py:property:: specific_enthalpy Gives the specific enthalpy, often denoted `h`. Enthalpy here is in units of J/kg. .. py:property:: specific_internal_energy Gives the specific internal energy, often denoted `u`. Internal energy here is in units of J/kg. .. py:method:: 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) Puts this gas under a thermodynamic process. Equations here: https://en.wikipedia.org/wiki/Ideal_gas_law :param process: Type of process. One of: * "isobaric" * "isochoric" * "isothermal" * "isentropic" * "polytropic" The `process` must be specified. :param You must specifiy exactly one of the following arguments: * `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] :param polytropic_n: If you specified the process type to be "polytropic", you must provide the polytropic index :param `n` to be used here. (Reminder: PV^n = constant) :param inplace: Specifies whether to return the result in-place or to allocate a new PerfectGas object in memory :param for the result.: :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. .. py:data:: g :value: []