:class:`Mixture` ================ .. py:class:: ansys.chemkin.core.mixture.Mixture(chem: ansys.chemkin.core.chemistry.Chemistry) define a mixture based on the gas species in the given chemistry set. .. py:currentmodule:: Mixture Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~list_composition` - List the mixture composition. * - :py:attr:`~find_equilibrium` - Create the equilibrium state mixture corresponding to mixture itself. * - :py:attr:`~hml` - Get enthalpy of the mixture. * - :py:attr:`~cpbl` - Get specific heat capacity of the mixture. * - :py:attr:`~rop` - Get species rate of productions. * - :py:attr:`~rxn_rates` - Get molar reaction rates. * - :py:attr:`~species_cp` - Get species specific heat capacity at constant pressure. * - :py:attr:`~species_h` - Get species enthalpy. * - :py:attr:`~species_visc` - Get species viscosity. * - :py:attr:`~species_cond` - Get species conductivity. * - :py:attr:`~species_diffusion_coeffs` - Get species diffusion coefficients. * - :py:attr:`~mixture_viscosity` - Get viscosity of the gas mixture. * - :py:attr:`~mixture_conductivity` - Get conductivity of the gas mixture. * - :py:attr:`~mixture_diffusion_coeffs` - Get mixture-averaged species diffusion coefficients of the gas mixture. * - :py:attr:`~mixture_binary_diffusion_coeffs` - Get multi-component species binary diffusion coefficients. * - :py:attr:`~mixture_thermal_diffusion_coeffs` - Get thermal diffusivity of the gas mixture. * - :py:attr:`~vol_hrr` - Get volumetric heat release rate. * - :py:attr:`~rop_mass` - Get species mass rates of production. * - :py:attr:`~list_rop` - List species molar production rate. * - :py:attr:`~list_rop_mass` - List species mass rate of production in descending order. * - :py:attr:`~list_reaction_rates` - List information about reaction rate in descending order. * - :py:attr:`~x_by_equivalence_ratio` - Set mole fractions using equivalence ratio. * - :py:attr:`~y_by_equivalence_ratio` - Set mass fractions using equivalence ratio. * - :py:attr:`~get_egr_mole_fraction` - Compute the EGR composition in mole fraction. * - :py:attr:`~validate` - Check whether the mixture is fully defined. * - :py:attr:`~use_realgas_cubic_eos` - Turn ON the real-gas cubic EOS. * - :py:attr:`~use_idealgas_law` - Turn on the ideal gas law to compute mixture properties. * - :py:attr:`~set_realgas_mixing_rule` - Set the mixing rule for calculating the real-gas mixture properties. .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~chemid` - Get chemistry set index. * - :py:attr:`~kk` - Get the number of gas species. * - :py:attr:`~pressure` - Get gas mixture pressure [dynes/cm2]. * - :py:attr:`~temperature` - Get gas mixture temperature. * - :py:attr:`~volume` - Get mixture volume. * - :py:attr:`~x` - Get mixture mole fraction. * - :py:attr:`~y` - Get mixture mass fraction. * - :py:attr:`~concentration` - Get mixture molar concentrations. * - :py:attr:`~eos` - Get the available real-gas EOS model that is provided in the mechanism. * - :py:attr:`~wt` - Get species molecular masses. * - :py:attr:`~wtm` - Get mean molar mass of the gas mixture. * - :py:attr:`~rho` - Get mixture mass density. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~transport_data` - * - :py:attr:`~userealgas` - * - :py:attr:`~mole_fractions` - * - :py:attr:`~mass_fractions` - * - :py:attr:`~species_molar_weight` - * - :py:attr:`~mean_molar_weight` - .. tab-item:: Static methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~normalize` - Normalize the mixture composition. * - :py:attr:`~mean_molar_mass` - Get mean molar mass of the gas mixture. * - :py:attr:`~mole_fraction_to_mass_fraction` - Convert mole fraction to mass fraction. * - :py:attr:`~mass_fraction_to_mole_fraction` - Convert mass fraction to mole fraction. * - :py:attr:`~mass_fraction_to_concentration` - Convert mass fractions to molar concentrations. * - :py:attr:`~mole_fraction_to_concentration` - Convert mole fractions to molar concentrations. * - :py:attr:`~density` - Get mass density from the given mixture condition. * - :py:attr:`~mixture_specific_heat` - Get mixture specific heat capacity at constant pressure. * - :py:attr:`~mixture_enthalpy` - Get mixture enthalpy. * - :py:attr:`~rate_of_production` - Get species molar rate of production. * - :py:attr:`~reaction_rates` - Get the molar rates of the gas reactions. Import detail ------------- .. code-block:: python from ansys.chemkin.core.mixture import Mixture Property detail --------------- .. py:property:: chemid :type: int Get chemistry set index. .. py:property:: kk :type: int Get the number of gas species. .. py:property:: pressure :type: float Get gas mixture pressure [dynes/cm2]. .. py:property:: temperature :type: float Get gas mixture temperature. .. py:property:: volume :type: float Get mixture volume. .. py:property:: x :type: numpy.typing.NDArray[numpy.double] Get mixture mole fraction. .. py:property:: y :type: numpy.typing.NDArray[numpy.double] Get mixture mass fraction. .. py:property:: concentration :type: numpy.typing.NDArray[numpy.double] Get mixture molar concentrations. .. py:property:: eos :type: int Get the available real-gas EOS model that is provided in the mechanism. .. py:property:: wt :type: numpy.typing.NDArray[numpy.double] Get species molecular masses. .. py:property:: wtm :type: float Get mean molar mass of the gas mixture. .. py:property:: rho :type: float Get mixture mass density. Attribute detail ---------------- .. py:attribute:: transport_data .. py:attribute:: userealgas .. py:attribute:: mole_fractions .. py:attribute:: mass_fractions .. py:attribute:: species_molar_weight .. py:attribute:: mean_molar_weight Method detail ------------- .. py:method:: normalize(frac: numpy.typing.ArrayLike) -> tuple[int, numpy.typing.NDArray[numpy.double]] :staticmethod: Normalize the mixture composition. .. py:method:: mean_molar_mass(frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) -> float :staticmethod: Get mean molar mass of the gas mixture. .. py:method:: mole_fraction_to_mass_fraction(molefrac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double]) -> numpy.typing.NDArray[numpy.double] :staticmethod: Convert mole fraction to mass fraction. .. py:method:: mass_fraction_to_mole_fraction(massfrac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double]) -> numpy.typing.NDArray[numpy.double] :staticmethod: Convert mass fraction to mole fraction. .. py:method:: mass_fraction_to_concentration(chemid: int, p: float, t: float, massfrac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double]) -> numpy.typing.NDArray[numpy.double] :staticmethod: Convert mass fractions to molar concentrations. .. py:method:: mole_fraction_to_concentration(chemid: int, p: float, t: float, molefrac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double]) -> numpy.typing.NDArray[numpy.double] :staticmethod: Convert mole fractions to molar concentrations. .. py:method:: list_composition(mode: str, option: str = ' ', bound: float = 0.0) List the mixture composition. .. py:method:: density(chemid: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) -> float :staticmethod: Get mass density from the given mixture condition. .. py:method:: mixture_specific_heat(chemid: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) -> float :staticmethod: Get mixture specific heat capacity at constant pressure. .. py:method:: mixture_enthalpy(chemid: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) -> float :staticmethod: Get mixture enthalpy. .. py:method:: rate_of_production(chemid: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) -> numpy.typing.NDArray[numpy.double] :staticmethod: Get species molar rate of production. .. py:method:: reaction_rates(chemid: int, numbreaction: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) -> tuple[numpy.typing.NDArray[numpy.double], numpy.typing.NDArray[numpy.double]] :staticmethod: Get the molar rates of the gas reactions. .. py:method:: find_equilibrium() Create the equilibrium state mixture corresponding to mixture itself. .. py:method:: hml() -> float Get enthalpy of the mixture. .. py:method:: cpbl() -> float Get specific heat capacity of the mixture. .. py:method:: rop() -> numpy.typing.NDArray[numpy.double] Get species rate of productions. .. py:method:: rxn_rates() -> tuple[numpy.typing.NDArray[numpy.double], numpy.typing.NDArray[numpy.double]] Get molar reaction rates. .. py:method:: species_cp() -> numpy.typing.NDArray[numpy.double] Get species specific heat capacity at constant pressure. .. py:method:: species_h() -> numpy.typing.NDArray[numpy.double] Get species enthalpy. .. py:method:: species_visc() -> numpy.typing.NDArray[numpy.double] Get species viscosity. .. py:method:: species_cond() -> numpy.typing.NDArray[numpy.double] Get species conductivity. .. py:method:: species_diffusion_coeffs() -> numpy.typing.NDArray[numpy.double] Get species diffusion coefficients. .. py:method:: mixture_viscosity() -> float Get viscosity of the gas mixture. .. py:method:: mixture_conductivity() -> float Get conductivity of the gas mixture. .. py:method:: mixture_diffusion_coeffs() -> numpy.typing.NDArray[numpy.double] Get mixture-averaged species diffusion coefficients of the gas mixture. .. py:method:: mixture_binary_diffusion_coeffs() -> numpy.typing.NDArray[numpy.double] Get multi-component species binary diffusion coefficients. .. py:method:: mixture_thermal_diffusion_coeffs() -> numpy.typing.NDArray[numpy.double] Get thermal diffusivity of the gas mixture. .. py:method:: vol_hrr() -> float Get volumetric heat release rate. .. py:method:: rop_mass() -> numpy.typing.NDArray[numpy.double] Get species mass rates of production. .. py:method:: list_rop(threshold: float = 0.0) -> tuple[numpy.typing.NDArray[numpy.int32], numpy.typing.NDArray[numpy.double]] List species molar production rate. .. py:method:: list_rop_mass(threshold: float = 0.0) -> tuple[numpy.typing.NDArray[numpy.int32], numpy.typing.NDArray[numpy.double]] List species mass rate of production in descending order. .. py:method:: list_reaction_rates(threshold: float = 0.0) -> tuple[numpy.typing.NDArray[numpy.int32], numpy.typing.NDArray[numpy.double]] List information about reaction rate in descending order. .. py:method:: x_by_equivalence_ratio(chemistryset: ansys.chemkin.core.chemistry.Chemistry, fuel_molefrac: numpy.typing.NDArray[numpy.double], oxid_molefrac: numpy.typing.NDArray[numpy.double], add_molefrac: numpy.typing.NDArray[numpy.double], products: list[str], equivalenceratio: float, threshold: float = 1e-10) -> int Set mole fractions using equivalence ratio. .. py:method:: y_by_equivalence_ratio(chemistryset: ansys.chemkin.core.chemistry.Chemistry, fuel_massfrac: numpy.typing.NDArray[numpy.double], oxid_massfrac: numpy.typing.NDArray[numpy.double], add_massfrac: numpy.typing.NDArray[numpy.double], products: list[str], equivalenceratio: float, threshold: float = 1e-10) -> int Set mass fractions using equivalence ratio. .. py:method:: get_egr_mole_fraction(egr_ratio: float, threshold: float = 1e-08) -> numpy.typing.NDArray[numpy.double] Compute the EGR composition in mole fraction. .. py:method:: validate() -> int Check whether the mixture is fully defined. .. py:method:: use_realgas_cubic_eos() Turn ON the real-gas cubic EOS. .. py:method:: use_idealgas_law() Turn on the ideal gas law to compute mixture properties. .. py:method:: set_realgas_mixing_rule(rule: int = 0) Set the mixing rule for calculating the real-gas mixture properties.