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.

get_profile_value

Get the y value at given x from the profile data.

createprofileinputlines

Create profile keyword input lines for Chemkin applications.

createspeciesinputlines

Create keyword input lines.

createspeciesinputlineswithaddon

Create keyword input lines.

create_inletspeciesinputlines

Create keyword input lines.

clear_all_keywords

Delete all existing keyword components.

chemid

Get chemistry set index.

set_molefractions

Set the reactor species mole fractions.

set_massfractions

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

activate_surface_chemistry

Activate the surface chemistry.

verify_surface_chemistry

Verify whether the reactor model is surfac chemistry capable.

no_surface_mechanism_declaration

Inform users surface chemistry is not available for this reactor.

no_surface_material

Send surface material not found message.

get_material_names

Get all surface material names.

get_site_species_names

Get site species names on the surface materials.

get_bulk_species_names

Get bulk species names on the surface materials.

get_total_site_species

Get total number of site species from all materials.

get_total_bulk_species

Get total number of bulk species from all materials.

check_material_area_fraction

Verify the surface area fraction is given.

get_material_area_fraction

Get the surface area fraction.

set_material_area_fraction

Set the value of the surface area fraction.

check_material_temperature

Verify the surface temperature is given.

get_material_temperature

Get the surface temperature.

set_material_temperature

Set the value of the surface temperature.

get_all_surface_temperature

Get the temperatures of all materials in the mechanism.

get_site_fraction

Get the surface site fractions.

set_site_fraction

Set the surface site fractions.

get_all_site_fractions

Get site fractions of all materials in the mechanism.

get_bulk_activity

Get the bulk species activities.

set_bulk_activity

Set the bulk species activities.

get_all_bulk_growth_rates

Get bulk growth rates of all materials in the mechanism.

set_init_surface_coverage

Set up the initial surface coverage arrays.

set_surface_chemistry_keywords

Set up surface chemistry related keywords.

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.

get_numb_material

Get the number of surface material.

surface_ratemultiplier

Get the value of the surface reaction rate multiplier.

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.

property ReactorModel.get_numb_material: int#

Get the number of surface material.

property ReactorModel.surface_ratemultiplier: float#

Get the value of the surface reaction rate multiplier.

Attribute detail#

ReactorModel.label#
ReactorModel.runstatus = -100#
ReactorModel.has_surface_chemistry#
ReactorModel.numbmaterials = 0#
ReactorModel.surface_chemistry: Any = None#

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.get_profile_value(key: str, x: float) float#

Get the y value at given x from the profile data.

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.create_inletspeciesinputlines(inlet_name: str, threshold: float = 1e-12, molefrac: numpy.typing.NDArray[numpy.double] = None) tuple[int, list[str]]#

Create keyword input lines.

ReactorModel.clear_all_keywords()#

Delete all existing keyword components.

ReactorModel.chemid() int#

Get chemistry set index.

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

Set the reactor species mole fractions.

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

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

ReactorModel.activate_surface_chemistry(chem: ansys.chemkin.core.chemistry.Chemistry, mode: str = 'normal')#

Activate the surface chemistry.

ReactorModel.verify_surface_chemistry() bool#

Verify whether the reactor model is surfac chemistry capable.

ReactorModel.no_surface_mechanism_declaration()#

Inform users surface chemistry is not available for this reactor.

ReactorModel.no_surface_material(mat_name: str)#

Send surface material not found message.

ReactorModel.get_material_names() list[str]#

Get all surface material names.

ReactorModel.get_site_species_names() list[list[str]]#

Get site species names on the surface materials.

ReactorModel.get_bulk_species_names() list[list[str]]#

Get bulk species names on the surface materials.

ReactorModel.get_total_site_species() int#

Get total number of site species from all materials.

ReactorModel.get_total_bulk_species() int#

Get total number of bulk species from all materials.

ReactorModel.check_material_area_fraction(mat_name: str) int#

Verify the surface area fraction is given.

ReactorModel.get_material_area_fraction(mat_name: str) float#

Get the surface area fraction.

ReactorModel.set_material_area_fraction(mat_name: str, fraction: float)#

Set the value of the surface area fraction.

ReactorModel.check_material_temperature(mat_name: str) int#

Verify the surface temperature is given.

ReactorModel.get_material_temperature(mat_name: str) float#

Get the surface temperature.

ReactorModel.set_material_temperature(mat_name: str, temp: float)#

Set the value of the surface temperature.

ReactorModel.get_all_surface_temperature() numpy.typing.NDArray[numpy.double]#

Get the temperatures of all materials in the mechanism.

ReactorModel.get_site_fraction(mat_name: str) numpy.typing.NDArray[numpy.double]#

Get the surface site fractions.

ReactorModel.set_site_fraction(mat_name: str, recipe: list[tuple[str, float]])#

Set the surface site fractions.

ReactorModel.get_all_site_fractions() numpy.typing.NDArray[numpy.double]#

Get site fractions of all materials in the mechanism.

ReactorModel.get_bulk_activity(mat_name: str) numpy.typing.NDArray[numpy.double]#

Get the bulk species activities.

ReactorModel.set_bulk_activity(mat_name: str, recipe: list[tuple[str, float]])#

Set the bulk species activities.

ReactorModel.get_all_bulk_growth_rates() numpy.typing.NDArray[numpy.double]#

Get bulk growth rates of all materials in the mechanism.

ReactorModel.set_init_surface_coverage() tuple[numpy.typing.NDArray[numpy.double], numpy.typing.NDArray[numpy.double]]#

Set up the initial surface coverage arrays.

ReactorModel.set_surface_chemistry_keywords()#

Set up surface chemistry related keywords.