Chemistry#

class ansys.chemkin.core.chemistry.Chemistry(chem: str = '', surf: str = '', therm: str = '', tran: str = '', label: str = '')#

Define and preprocess Chemkin chemistry set.

Overview#

preprocess_transportdata

Instruct the preprocessor to include the transport data.

set_file_names

Assign all input files of the chemistry set.

preprocess

Run Chemkin preprocessor.

verify_realgas_model

Verify the availability of real-gas data in the mechanism.

verify_transport_data

Verify the availability of transport property data in the mechanism.

verify_surface_mechanism

Verify the availability of surface chemistry data in the mechanism.

get_specindex

Get index of the gas species.

species_cp

Get species specific heat capacity at constant pressure.

species_cv

Get species specific heat capacity at constant volume.

species_h

Get species enthalpy.

species_u

Get species internal energy.

species_visc

Get species viscosity.

species_cond

Get species conductivity.

species_diffusioncoeffs

Get species diffusion coefficients.

species_composition

Get elemental composition of a species.

use_realgas_cubic_eos

Turn ON the real-gas cubic EOS.

use_idealgas_law

Turn on the ideal gas law to compute mixture properties.

get_reaction_parameters

Get the Arrhenius reaction rate parameters of all gas-phase reactions.

set_reaction_afactor

Set the Arrhenius A-Factor of the given reaction.

get_reaction_afactor

Get the Arrhenius A-Factor of the given reaction.

get_gas_reaction_string

Get the reaction string of the given reaction index.

save

Store the work spaces of the current Chemistry Set.

activate

Activate the work spaces of the Chemistry Set.

chemfile

Get gas-phase mechanism file name of this chemistry set.

thermfile

Get thermodynamic data filename of this chemistry set.

tranfile

Get transport data filename of this chemistry set.

summaryfile

Get the name of the summary file from the preprocessor.

surffile

Get surface mechanism filename of this chemistry set.

species_symbols

Get list of gas species symbols.

element_symbols

Get the list of element symbols.

chemid

Get chemistry set index.

surfchem

Get surface chemistry status.

kk

Get number of gas species.

mm

Get number of elements in the chemistry set.

ii_gas

Get number of gas-phase reactions.

awt

Compute atomic masses.

wt

Compute gas species molecular masses.

eos

Get the available real-gas EOS model.

Import detail#

from ansys.chemkin.core.chemistry import Chemistry

Property detail#

property Chemistry.chemfile: str#

Get gas-phase mechanism file name of this chemistry set.

property Chemistry.thermfile: str#

Get thermodynamic data filename of this chemistry set.

property Chemistry.tranfile: str#

Get transport data filename of this chemistry set.

property Chemistry.summaryfile: str#

Get the name of the summary file from the preprocessor.

property Chemistry.surffile: str#

Get surface mechanism filename of this chemistry set.

property Chemistry.species_symbols#

Get list of gas species symbols.

property Chemistry.element_symbols#

Get the list of element symbols.

property Chemistry.chemid: int#

Get chemistry set index.

property Chemistry.surfchem: int#

Get surface chemistry status.

property Chemistry.kk: int#

Get number of gas species.

property Chemistry.mm: int#

Get number of elements in the chemistry set.

property Chemistry.ii_gas: int#

Get number of gas-phase reactions.

property Chemistry.awt: numpy.typing.NDArray[numpy.double]#

Compute atomic masses.

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

Compute gas species molecular masses.

property Chemistry.eos: int#

Get the available real-gas EOS model.

Attribute detail#

Chemistry.realgas_cueos = ['ideal gas', 'Van der Waals', 'Redlich-Kwong', 'Soave', 'Aungier', 'Peng-Robinson']#
Chemistry.realgas_mixing_rules = ['Van der Waals', 'pseudocritical']#
Chemistry.userealgas = False#
Chemistry.ksymbol: list[str] = []#
Chemistry.esymbol: list[str] = []#
Chemistry.label = ' '#
Chemistry.number_species#
Chemistry.number_elements#
Chemistry.number_gas_reactions#
Chemistry.atomic_weight#
Chemistry.species_molar_weight#

Method detail#

Chemistry.preprocess_transportdata()#

Instruct the preprocessor to include the transport data.

Chemistry.set_file_names(chem: str = '', surf: str = '', therm: str = '', tran: str = '')#

Assign all input files of the chemistry set.

Chemistry.preprocess() int#

Run Chemkin preprocessor.

Chemistry.verify_realgas_model()#

Verify the availability of real-gas data in the mechanism.

Chemistry.verify_transport_data() bool#

Verify the availability of transport property data in the mechanism.

Chemistry.verify_surface_mechanism() bool#

Verify the availability of surface chemistry data in the mechanism.

Chemistry.get_specindex(specname: str) int#

Get index of the gas species.

Chemistry.species_cp(temp: float = 0.0, pres: float | None = None) numpy.typing.NDArray[numpy.double]#

Get species specific heat capacity at constant pressure.

Chemistry.species_cv(temp: float = 0.0, pres: float | None = None) numpy.typing.NDArray[numpy.double]#

Get species specific heat capacity at constant volume.

Chemistry.species_h(temp: float = 0.0, pres: float | None = None) numpy.typing.NDArray[numpy.double]#

Get species enthalpy.

Chemistry.species_u(temp: float = 0.0, pres: float | None = None) numpy.typing.NDArray[numpy.double]#

Get species internal energy.

Chemistry.species_visc(temp: float = 0.0) numpy.typing.NDArray[numpy.double]#

Get species viscosity.

Chemistry.species_cond(temp: float = 0.0) numpy.typing.NDArray[numpy.double]#

Get species conductivity.

Chemistry.species_diffusioncoeffs(press: float = 0.0, temp: float = 0.0) numpy.typing.NDArray[numpy.double]#

Get species diffusion coefficients.

Chemistry.species_composition(elemindex: int = -1, specindex: int = -1) int#

Get elemental composition of a species.

Chemistry.use_realgas_cubic_eos()#

Turn ON the real-gas cubic EOS.

Chemistry.use_idealgas_law()#

Turn on the ideal gas law to compute mixture properties.

Chemistry.get_reaction_parameters() tuple[numpy.typing.NDArray[numpy.double], numpy.typing.NDArray[numpy.double], numpy.typing.NDArray[numpy.double]]#

Get the Arrhenius reaction rate parameters of all gas-phase reactions.

Chemistry.set_reaction_afactor(reaction_index: int, a_factor: float)#

Set the Arrhenius A-Factor of the given reaction.

Chemistry.get_reaction_afactor(reaction_index: int) float#

Get the Arrhenius A-Factor of the given reaction.

Chemistry.get_gas_reaction_string(reaction_index: int) str#

Get the reaction string of the given reaction index.

Chemistry.save()#

Store the work spaces of the current Chemistry Set.

Chemistry.activate()#

Activate the work spaces of the Chemistry Set.