Cantera  3.2.0a4
Loading...
Searching...
No Matches
ctreactor Library

Generated CLib API for Cantera's ReactorBase class. More...

Collaboration diagram for ctreactor Library:

Detailed Description

Generated CLib API for Cantera's ReactorBase class.

Warning
This library is an experimental part of the Cantera API and may be changed or removed without notice.

Functions

int32_t reactor_new (const char *model, int32_t contents, int32_t clone, const char *name)
 Create a ReactorBase object of the specified type and contents.
 
int32_t reactor_newSurface (int32_t contents, int32_t reactorsLen, const int32_t *reactors, int32_t clone, const char *name)
 Create a ReactorSurface object with the specified contents and adjacent reactors participating in surface reactions.
 
int32_t reactor_type (int32_t handle, int32_t bufLen, char *buf)
 String indicating the reactor model implemented.
 
int32_t reactor_name (int32_t handle, int32_t bufLen, char *buf)
 Return the name of this reactor.
 
int32_t reactor_setName (int32_t handle, const char *name)
 Set the name of this reactor.
 
int32_t reactor_contents (int32_t handle)
 Access the Solution object used to represent the contents of this reactor.
 
int32_t reactor_setInitialVolume (int32_t handle, double vol)
 Set the initial reactor volume.
 
int32_t reactor_setChemistry (int32_t handle, int32_t cflag)
 Enable or disable changes in reactor composition due to chemical reactions.
 
int32_t reactor_setEnergy (int32_t handle, int32_t eflag)
 Set the energy equation on or off.
 
double reactor_mass (int32_t handle)
 Returns the mass (kg) of the reactor's contents.
 
double reactor_volume (int32_t handle)
 Returns the current volume (m^3) of the reactor.
 
double reactor_density (int32_t handle)
 Returns the current density (kg/m^3) of the reactor's contents.
 
double reactor_temperature (int32_t handle)
 Returns the current temperature (K) of the reactor's contents.
 
double reactor_enthalpy_mass (int32_t handle)
 Returns the current enthalpy (J/kg) of the reactor's contents.
 
double reactor_intEnergy_mass (int32_t handle)
 Returns the current internal energy (J/kg) of the reactor's contents.
 
double reactor_pressure (int32_t handle)
 Returns the current pressure (Pa) of the reactor.
 
double reactor_massFraction (int32_t handle, int32_t k)
 Return the mass fraction of the k-th species.
 
int32_t reactor_nSensParams (int32_t handle)
 Number of sensitivity parameters associated with this reactor.
 
int32_t reactor_addSensitivityReaction (int32_t handle, int32_t rxn)
 Add a sensitivity parameter associated with the reaction number rxn
 
int32_t reactor_addSurface (int32_t handle, int32_t surf)
 Add a ReactorSurface object to a Reactor object.
 
int32_t reactor_setMassFlowRate (int32_t handle, double mdot)
 Set the mass flow rate through the reactor [kg/s].
 
double reactor_area (int32_t handle)
 The cross-sectional area of the reactor [m^2].
 
int32_t reactor_setArea (int32_t handle, double area)
 Sets the area of the reactor [m^2].
 
int32_t reactor_del (int32_t handle)
 Delete ReactorBase object.
 
int32_t reactor_cabinetSize ()
 Return size of ReactorBase storage.
 

Function Documentation

◆ reactor_new()

int32_t reactor_new ( const char *  model,
int32_t  contents,
int32_t  clone,
const char *  name 
)

Create a ReactorBase object of the specified type and contents.

Wraps C++ constructor: shared_ptr<ReactorBase> newReactorBase(const string&, shared_ptr<Solution>, bool, const string&)

Parameters
modelUndocumented.
contentsInteger handle to Solution object. Undocumented.
cloneUndocumented.
nameUndocumented.
Returns
Handle to stored ReactorBase object or -1 for exception handling.

Definition at line 46 of file ctreactor.cpp.

◆ reactor_newSurface()

int32_t reactor_newSurface ( int32_t  contents,
int32_t  reactorsLen,
const int32_t *  reactors,
int32_t  clone,
const char *  name 
)

Create a ReactorSurface object with the specified contents and adjacent reactors participating in surface reactions.

Wraps C++ constructor: shared_ptr<ReactorSurface> newReactorSurface(shared_ptr<Solution>, const vector<shared_ptr<ReactorBase>>&, bool, const string&)

Parameters
contentsInteger handle to Solution object. Solution (Interface) object to model the thermodynamic properties and reactions occurring in the reactor
[in]reactorsLenLength of array reserved for reactors.
reactorsMemory holding ReactorBase objects. List of Reactors adjacent to this surface, whose contents participate in reactions occurring on this surface.
cloneDetermines whether to clone sol so that the internal state of this surface is independent of the original Interface object and any Solution objects used by other reactors in the network except those in the reactors list.
nameName of the reactor surface.
Returns
Handle to stored ReactorSurface object or -1 for exception handling.

Definition at line 57 of file ctreactor.cpp.

◆ reactor_type()

int32_t reactor_type ( int32_t  handle,
int32_t  bufLen,
char *  buf 
)

String indicating the reactor model implemented.

Wraps C++ getter: virtual string ReactorBase::type()

Parameters
handleHandle to queried ReactorBase object.
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 72 of file ctreactor.cpp.

◆ reactor_name()

int32_t reactor_name ( int32_t  handle,
int32_t  bufLen,
char *  buf 
)

Return the name of this reactor.

Wraps C++ getter: string ReactorBase::name()

Parameters
handleHandle to queried ReactorBase object.
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 84 of file ctreactor.cpp.

◆ reactor_setName()

int32_t reactor_setName ( int32_t  handle,
const char *  name 
)

Set the name of this reactor.

Wraps C++ setter: void ReactorBase::setName(const string&)

Parameters
handleHandle to queried ReactorBase object.
nameUndocumented.

Definition at line 96 of file ctreactor.cpp.

◆ reactor_contents()

int32_t reactor_contents ( int32_t  handle)

Access the Solution object used to represent the contents of this reactor.

Wraps C++ accessor: shared_ptr<Solution> ReactorBase::contents4()

Parameters
handleHandle to queried ReactorBase object.
Returns
Handle to stored Solution object or -1 for exception handling.

Definition at line 107 of file ctreactor.cpp.

◆ reactor_setInitialVolume()

int32_t reactor_setInitialVolume ( int32_t  handle,
double  vol 
)

Set the initial reactor volume.

Wraps C++ setter: virtual void ReactorBase::setInitialVolume(double)

Parameters
handleHandle to queried ReactorBase object.
volUndocumented.

Definition at line 117 of file ctreactor.cpp.

◆ reactor_setChemistry()

int32_t reactor_setChemistry ( int32_t  handle,
int32_t  cflag 
)

Enable or disable changes in reactor composition due to chemical reactions.

Wraps C++ setter: virtual void ReactorBase::setChemistry(bool)

Parameters
handleHandle to queried ReactorBase object.
cflagUndocumented.

Definition at line 128 of file ctreactor.cpp.

◆ reactor_setEnergy()

int32_t reactor_setEnergy ( int32_t  handle,
int32_t  eflag 
)

Set the energy equation on or off.

Wraps C++ setter: virtual void ReactorBase::setEnergy(int)

Parameters
handleHandle to queried ReactorBase object.
eflagUndocumented.

Definition at line 140 of file ctreactor.cpp.

◆ reactor_mass()

double reactor_mass ( int32_t  handle)

Returns the mass (kg) of the reactor's contents.

Wraps C++ getter: double ReactorBase::mass()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 151 of file ctreactor.cpp.

◆ reactor_volume()

double reactor_volume ( int32_t  handle)

Returns the current volume (m^3) of the reactor.

Wraps C++ getter: double ReactorBase::volume()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 161 of file ctreactor.cpp.

◆ reactor_density()

double reactor_density ( int32_t  handle)

Returns the current density (kg/m^3) of the reactor's contents.

Wraps C++ getter: double ReactorBase::density()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 171 of file ctreactor.cpp.

◆ reactor_temperature()

double reactor_temperature ( int32_t  handle)

Returns the current temperature (K) of the reactor's contents.

Wraps C++ getter: double ReactorBase::temperature()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 181 of file ctreactor.cpp.

◆ reactor_enthalpy_mass()

double reactor_enthalpy_mass ( int32_t  handle)

Returns the current enthalpy (J/kg) of the reactor's contents.

Wraps C++ getter: double ReactorBase::enthalpy_mass()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 191 of file ctreactor.cpp.

◆ reactor_intEnergy_mass()

double reactor_intEnergy_mass ( int32_t  handle)

Returns the current internal energy (J/kg) of the reactor's contents.

Wraps C++ getter: double ReactorBase::intEnergy_mass()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 201 of file ctreactor.cpp.

◆ reactor_pressure()

double reactor_pressure ( int32_t  handle)

Returns the current pressure (Pa) of the reactor.

Wraps C++ getter: double ReactorBase::pressure()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 211 of file ctreactor.cpp.

◆ reactor_massFraction()

double reactor_massFraction ( int32_t  handle,
int32_t  k 
)

Return the mass fraction of the k-th species.

Wraps C++ method: double ReactorBase::massFraction(size_t)

Parameters
handleHandle to queried ReactorBase object.
kUndocumented.

Definition at line 221 of file ctreactor.cpp.

◆ reactor_nSensParams()

int32_t reactor_nSensParams ( int32_t  handle)

Number of sensitivity parameters associated with this reactor.

Wraps C++ getter: virtual size_t ReactorBase::nSensParams()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 231 of file ctreactor.cpp.

◆ reactor_addSensitivityReaction()

int32_t reactor_addSensitivityReaction ( int32_t  handle,
int32_t  rxn 
)

Add a sensitivity parameter associated with the reaction number rxn

Wraps C++ setter: virtual void ReactorBase::addSensitivityReaction(size_t)

Parameters
handleHandle to queried ReactorBase object.
rxnUndocumented.

Definition at line 241 of file ctreactor.cpp.

◆ reactor_addSurface()

int32_t reactor_addSurface ( int32_t  handle,
int32_t  surf 
)

Add a ReactorSurface object to a Reactor object.

Wraps C++ setter: void ReactorBase::addSurface(shared_ptr<ReactorBase>)

Parameters
handleHandle to queried ReactorBase object.
surfInteger handle to ReactorBase object. Undocumented.

Definition at line 252 of file ctreactor.cpp.

◆ reactor_setMassFlowRate()

int32_t reactor_setMassFlowRate ( int32_t  handle,
double  mdot 
)

Set the mass flow rate through the reactor [kg/s].

Wraps C++ setter: void FlowReactor::setMassFlowRate(double)

Parameters
handleHandle to queried FlowReactor object.
mdotUndocumented.

Definition at line 263 of file ctreactor.cpp.

◆ reactor_area()

double reactor_area ( int32_t  handle)

The cross-sectional area of the reactor [m^2].

Wraps C++ getter: double FlowReactor::area()

Parameters
handleHandle to queried FlowReactor object.

Definition at line 274 of file ctreactor.cpp.

◆ reactor_setArea()

int32_t reactor_setArea ( int32_t  handle,
double  area 
)

Sets the area of the reactor [m^2].

Wraps C++ setter: void FlowReactor::setArea(double)

Parameters
handleHandle to queried FlowReactor object.
areaUndocumented.

Definition at line 284 of file ctreactor.cpp.

◆ reactor_del()

int32_t reactor_del ( int32_t  handle)

Delete ReactorBase object.

Wraps C++ destructor: undefined

Parameters
handleHandle to ReactorBase object.
Returns
Zero for success and -1 for exception handling.

Definition at line 295 of file ctreactor.cpp.

◆ reactor_cabinetSize()

int32_t reactor_cabinetSize ( )

Return size of ReactorBase storage.

Wraps C++ reserved CLib function: custom code

Returns
Size or -1 for exception handling.

Definition at line 306 of file ctreactor.cpp.