ReactorModel#

class ansys.chemkin.core.reactormodel.ReactorModel(reactor_condition: ansys.chemkin.core.inlet.Stream, label: str)#

Serve as a generic Chemkin reactor model framework.

Overview#

usefullkeywords

Specify all necessary keywords explicitly.

setkeyword

Set a Chemkin keyword and its parameter.

removekeyword

Remove an existing Chemkin keyword and its parameter.

showkeywordinputlines

List all currently-defined keywords and their parameters line by line.

createkeywordinputlines

Create keyword input lines for Chemkin applications.

showkeywordinputlines_with_tag

List all currently-defined keywords.

createkeywordinputlines_with_tag

Create keyword input lines for Chemkin applications.

setprofile

Set a Chemkin profile and its parameter.

createprofileinputlines

Create profile keyword input lines for Chemkin applications.

createspeciesinputlines

Create keyword input lines.

createspeciesinputlineswithaddon

Create keyword input lines.

chemid

Get chemistry set index.

set_molefractions

Reset the reactor species mole fractions.

set_massfractions

Reset the reactor species mass fractions.

list_composition

List the gas mixture composition inside the reactor.

setsensitivityanalysis

Switch ON/OFF A-factor sensitivity analysis.

set_rop_analysis

Switch ON/OFF the ROP (Rate Of Production) analysis.

userealgas_eos

Set the option to turn ON/OFF the real gas model.

setrealgasmixingmodel

Set the real gas mixing rule/model.

setrunstatus

Set the simulation run status.

getrunstatus

Get the reactor model simulation status.

run

Serve as a generic Chemkin run reactor model method.

setsolutionspeciesfracmode

Set the type of species fractions in the solution.

getrawsolutionstatus

Get the status of the post-process.

getmixturesolutionstatus

Get the status of the post-process.

get_solution_size

Get the number of reactors and the number of solution points.

getnumbersolutionpoints

Get the number of solution points per reactor.

parsespeciessolutiondata

Parse the 2-D species fraction solution data.

process_solution

Post-process solution.

temperature

Get reactor initial temperature.

pressure

Get reactor pressure.

massfraction

Get the gas species mass fractions.

molefraction

Get the gas species mole fractions.

concentration

Get the gas species molar concentrations.

gasratemultiplier

Get the value of the gas-phase reaction rate multiplier.

std_output

Get text output status.

xml_output

Get XML solution output status.

realgas

Get the real gas EOS status.

Import detail#

from ansys.chemkin.core.reactormodel import ReactorModel

Property detail#

property ReactorModel.temperature: float#

Get reactor initial temperature.

property ReactorModel.pressure: float#

Get reactor pressure.

property ReactorModel.massfraction: float#

Get the gas species mass fractions.

property ReactorModel.molefraction: numpy.typing.NDArray[numpy.double]#

Get the gas species mole fractions.

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

Get the gas species molar concentrations.

property ReactorModel.gasratemultiplier: float#

Get the value of the gas-phase reaction rate multiplier.

property ReactorModel.std_output: bool#

Get text output status.

property ReactorModel.xml_output: bool#

Get XML solution output status.

property ReactorModel.realgas: bool#

Get the real gas EOS status.

Attribute detail#

ReactorModel.label#
ReactorModel.runstatus = -100#

Method detail#

ReactorModel.usefullkeywords(mode: bool)#

Specify all necessary keywords explicitly.

ReactorModel.setkeyword(key: str, value: bool | float | str)#

Set a Chemkin keyword and its parameter.

ReactorModel.removekeyword(key: str)#

Remove an existing Chemkin keyword and its parameter.

ReactorModel.showkeywordinputlines()#

List all currently-defined keywords and their parameters line by line.

ReactorModel.createkeywordinputlines() tuple[int, int]#

Create keyword input lines for Chemkin applications.

ReactorModel.showkeywordinputlines_with_tag(tag: str = '')#

List all currently-defined keywords.

ReactorModel.createkeywordinputlines_with_tag(tag: str = '') tuple[int, int]#

Create keyword input lines for Chemkin applications.

ReactorModel.setprofile(key: str, x: numpy.typing.NDArray[numpy.double], y: numpy.typing.NDArray[numpy.double]) int#

Set a Chemkin profile and its parameter.

ReactorModel.createprofileinputlines() tuple[int, int, list[str]]#

Create profile keyword input lines for Chemkin applications.

ReactorModel.createspeciesinputlines(solvertype: int, threshold: float = 1e-12, molefrac: numpy.typing.NDArray[numpy.double] = None) tuple[int, list[str]]#

Create keyword input lines.

ReactorModel.createspeciesinputlineswithaddon(key: str = 'XEST', threshold: float = 1e-12, molefrac: numpy.typing.NDArray[numpy.double] = None, addon: str = '') tuple[int, list[str]]#

Create keyword input lines.

ReactorModel.chemid() int#

Get chemistry set index.

ReactorModel.set_molefractions(molefrac: numpy.typing.NDArray[numpy.double])#

Reset the reactor species mole fractions.

ReactorModel.set_massfractions(massfrac: numpy.typing.NDArray[numpy.double])#

Reset the reactor species mass fractions.

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

List the gas mixture composition inside the reactor.

ReactorModel.setsensitivityanalysis(mode: bool = True, absolute_tolerance: float | None = None, relative_tolerance: float | None = None, temperature_threshold: float | None = None, species_threshold: float | None = None)#

Switch ON/OFF A-factor sensitivity analysis.

ReactorModel.set_rop_analysis(mode=True, threshold=None)#

Switch ON/OFF the ROP (Rate Of Production) analysis.

ReactorModel.userealgas_eos(mode: bool)#

Set the option to turn ON/OFF the real gas model.

ReactorModel.setrealgasmixingmodel(model: int)#

Set the real gas mixing rule/model.

ReactorModel.setrunstatus(code: int)#

Set the simulation run status.

ReactorModel.getrunstatus(mode: str = 'silent') int#

Get the reactor model simulation status.

ReactorModel.run() int#

Serve as a generic Chemkin run reactor model method.

ReactorModel.setsolutionspeciesfracmode(mode: str = 'mass')#

Set the type of species fractions in the solution.

ReactorModel.getrawsolutionstatus() bool#

Get the status of the post-process.

ReactorModel.getmixturesolutionstatus() bool#

Get the status of the post-process.

ReactorModel.get_solution_size() tuple[int, int]#

Get the number of reactors and the number of solution points.

ReactorModel.getnumbersolutionpoints() int#

Get the number of solution points per reactor.

ReactorModel.parsespeciessolutiondata(frac: numpy.typing.NDArray[numpy.double])#

Parse the 2-D species fraction solution data.

ReactorModel.process_solution()#

Post-process solution.