Mixture#

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.

Overview#

list_composition

List the mixture composition.

find_equilibrium

Create the equilibrium state mixture corresponding to mixture itself.

hml

Get enthalpy of the mixture.

cpbl

Get specific heat capacity of the mixture.

rop

Get species rate of productions.

rxn_rates

Get molar reaction rates.

species_cp

Get species specific heat capacity at constant pressure.

species_h

Get species enthalpy.

species_visc

Get species viscosity.

species_cond

Get species conductivity.

species_diffusion_coeffs

Get species diffusion coefficients.

mixture_viscosity

Get viscosity of the gas mixture.

mixture_conductivity

Get conductivity of the gas mixture.

mixture_diffusion_coeffs

Get mixture-averaged species diffusion coefficients of the gas mixture.

mixture_binary_diffusion_coeffs

Get multi-component species binary diffusion coefficients.

mixture_thermal_diffusion_coeffs

Get thermal diffusivity of the gas mixture.

vol_hrr

Get volumetric heat release rate.

rop_mass

Get species mass rates of production.

list_rop

List species molar production rate.

list_rop_mass

List species mass rate of production in descending order.

list_reaction_rates

List information about reaction rate in descending order.

x_by_equivalence_ratio

Set mole fractions using equivalence ratio.

y_by_equivalence_ratio

Set mass fractions using equivalence ratio.

get_egr_mole_fraction

Compute the EGR composition in mole fraction.

validate

Check whether the mixture is fully defined.

use_realgas_cubic_eos

Turn ON the real-gas cubic EOS.

use_idealgas_law

Turn on the ideal gas law to compute mixture properties.

set_realgas_mixing_rule

Set the mixing rule for calculating the real-gas mixture properties.

chemid

Get chemistry set index.

kk

Get the number of gas species.

pressure

Get gas mixture pressure [dynes/cm2].

temperature

Get gas mixture temperature.

volume

Get mixture volume.

x

Get mixture mole fraction.

y

Get mixture mass fraction.

concentration

Get mixture molar concentrations.

eos

Get the available real-gas EOS model that is provided in the mechanism.

wt

Get species molecular masses.

wtm

Get mean molar mass of the gas mixture.

rho

Get mixture mass density.

normalize

Normalize the mixture composition.

mean_molar_mass

Get mean molar mass of the gas mixture.

mole_fraction_to_mass_fraction

Convert mole fraction to mass fraction.

mass_fraction_to_mole_fraction

Convert mass fraction to mole fraction.

mass_fraction_to_concentration

Convert mass fractions to molar concentrations.

mole_fraction_to_concentration

Convert mole fractions to molar concentrations.

density

Get mass density from the given mixture condition.

mixture_specific_heat

Get mixture specific heat capacity at constant pressure.

mixture_enthalpy

Get mixture enthalpy.

rate_of_production

Get species molar rate of production.

reaction_rates

Get the molar rates of the gas reactions.

Import detail#

from ansys.chemkin.core.mixture import Mixture

Property detail#

property Mixture.chemid: int#

Get chemistry set index.

property Mixture.kk: int#

Get the number of gas species.

property Mixture.pressure: float#

Get gas mixture pressure [dynes/cm2].

property Mixture.temperature: float#

Get gas mixture temperature.

property Mixture.volume: float#

Get mixture volume.

property Mixture.x: numpy.typing.NDArray[numpy.double]#

Get mixture mole fraction.

property Mixture.y: numpy.typing.NDArray[numpy.double]#

Get mixture mass fraction.

property Mixture.concentration: numpy.typing.NDArray[numpy.double]#

Get mixture molar concentrations.

property Mixture.eos: int#

Get the available real-gas EOS model that is provided in the mechanism.

property Mixture.wt: numpy.typing.NDArray[numpy.double]#

Get species molecular masses.

property Mixture.wtm: float#

Get mean molar mass of the gas mixture.

property Mixture.rho: float#

Get mixture mass density.

Attribute detail#

Mixture.transport_data#
Mixture.userealgas#
Mixture.mole_fractions#
Mixture.mass_fractions#
Mixture.species_molar_weight#
Mixture.mean_molar_weight#

Method detail#

static Mixture.normalize(frac: numpy.typing.ArrayLike) tuple[int, numpy.typing.NDArray[numpy.double]]#

Normalize the mixture composition.

static Mixture.mean_molar_mass(frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) float#

Get mean molar mass of the gas mixture.

static Mixture.mole_fraction_to_mass_fraction(molefrac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double]) numpy.typing.NDArray[numpy.double]#

Convert mole fraction to mass fraction.

static Mixture.mass_fraction_to_mole_fraction(massfrac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double]) numpy.typing.NDArray[numpy.double]#

Convert mass fraction to mole fraction.

static Mixture.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]#

Convert mass fractions to molar concentrations.

static Mixture.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]#

Convert mole fractions to molar concentrations.

Mixture.list_composition(mode: str, option: str = ' ', bound: float = 0.0)#

List the mixture composition.

static Mixture.density(chemid: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) float#

Get mass density from the given mixture condition.

static Mixture.mixture_specific_heat(chemid: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) float#

Get mixture specific heat capacity at constant pressure.

static Mixture.mixture_enthalpy(chemid: int, p: float, t: float, frac: numpy.typing.NDArray[numpy.double], wt: numpy.typing.NDArray[numpy.double], mode: str) float#

Get mixture enthalpy.

static Mixture.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]#

Get species molar rate of production.

static Mixture.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]]#

Get the molar rates of the gas reactions.

Mixture.find_equilibrium()#

Create the equilibrium state mixture corresponding to mixture itself.

Mixture.hml() float#

Get enthalpy of the mixture.

Mixture.cpbl() float#

Get specific heat capacity of the mixture.

Mixture.rop() numpy.typing.NDArray[numpy.double]#

Get species rate of productions.

Mixture.rxn_rates() tuple[numpy.typing.NDArray[numpy.double], numpy.typing.NDArray[numpy.double]]#

Get molar reaction rates.

Mixture.species_cp() numpy.typing.NDArray[numpy.double]#

Get species specific heat capacity at constant pressure.

Mixture.species_h() numpy.typing.NDArray[numpy.double]#

Get species enthalpy.

Mixture.species_visc() numpy.typing.NDArray[numpy.double]#

Get species viscosity.

Mixture.species_cond() numpy.typing.NDArray[numpy.double]#

Get species conductivity.

Mixture.species_diffusion_coeffs() numpy.typing.NDArray[numpy.double]#

Get species diffusion coefficients.

Mixture.mixture_viscosity() float#

Get viscosity of the gas mixture.

Mixture.mixture_conductivity() float#

Get conductivity of the gas mixture.

Mixture.mixture_diffusion_coeffs() numpy.typing.NDArray[numpy.double]#

Get mixture-averaged species diffusion coefficients of the gas mixture.

Mixture.mixture_binary_diffusion_coeffs() numpy.typing.NDArray[numpy.double]#

Get multi-component species binary diffusion coefficients.

Mixture.mixture_thermal_diffusion_coeffs() numpy.typing.NDArray[numpy.double]#

Get thermal diffusivity of the gas mixture.

Mixture.vol_hrr() float#

Get volumetric heat release rate.

Mixture.rop_mass() numpy.typing.NDArray[numpy.double]#

Get species mass rates of production.

Mixture.list_rop(threshold: float = 0.0) tuple[numpy.typing.NDArray[numpy.int32], numpy.typing.NDArray[numpy.double]]#

List species molar production rate.

Mixture.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.

Mixture.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.

Mixture.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.

Mixture.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.

Mixture.get_egr_mole_fraction(egr_ratio: float, threshold: float = 1e-08) numpy.typing.NDArray[numpy.double]#

Compute the EGR composition in mole fraction.

Mixture.validate() int#

Check whether the mixture is fully defined.

Mixture.use_realgas_cubic_eos()#

Turn ON the real-gas cubic EOS.

Mixture.use_idealgas_law()#

Turn on the ideal gas law to compute mixture properties.

Mixture.set_realgas_mixing_rule(rule: int = 0)#

Set the mixing rule for calculating the real-gas mixture properties.