Cantera  3.2.0a5
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 phase, int32_t clone, const char *name)
 Create a ReactorBase object of the specified type and contents.
 
int32_t reactor_newSurface (int32_t phase, 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_phase (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.
 
double reactor_area (int32_t handle)
 Returns an area associated with a reactor [m²].
 
int32_t reactor_setArea (int32_t handle, double a)
 Set an area associated with a reactor [m²].
 
int32_t reactor_chemistryEnabled (int32_t handle)
 Returns true if changes in the reactor composition due to chemical reactions are enabled.
 
int32_t reactor_setChemistryEnabled (int32_t handle, int32_t cflag)
 Enable or disable changes in reactor composition due to chemical reactions.
 
int32_t reactor_energyEnabled (int32_t handle)
 Returns true if solution of the energy equation is enabled.
 
int32_t reactor_setEnergyEnabled (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_massFractions (int32_t handle, int32_t bufLen, double *buf)
 Return the vector of species mass fractions.
 
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.
 
double reactor_massFlowRate (int32_t handle)
 Mass flow rate through the reactor [kg/s].
 
int32_t reactor_setMassFlowRate (int32_t handle, double mdot)
 Set the mass flow rate through the reactor [kg/s].
 
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  phase,
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.
phaseInteger 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  phase,
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
phaseInteger 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_phase()

int32_t reactor_phase ( int32_t  handle)

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

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

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_area()

double reactor_area ( int32_t  handle)

Returns an area associated with a reactor [m²].

Wraps C++ getter: virtual double ReactorBase::area()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 128 of file ctreactor.cpp.

◆ reactor_setArea()

int32_t reactor_setArea ( int32_t  handle,
double  a 
)

Set an area associated with a reactor [m²].

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

Parameters
handleHandle to queried ReactorBase object.
aUndocumented.

Definition at line 138 of file ctreactor.cpp.

◆ reactor_chemistryEnabled()

int32_t reactor_chemistryEnabled ( int32_t  handle)

Returns true if changes in the reactor composition due to chemical reactions are enabled.

Wraps C++ getter: virtual bool ReactorBase::chemistryEnabled()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 149 of file ctreactor.cpp.

◆ reactor_setChemistryEnabled()

int32_t reactor_setChemistryEnabled ( int32_t  handle,
int32_t  cflag 
)

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

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

Parameters
handleHandle to queried ReactorBase object.
cflagUndocumented.

Definition at line 160 of file ctreactor.cpp.

◆ reactor_energyEnabled()

int32_t reactor_energyEnabled ( int32_t  handle)

Returns true if solution of the energy equation is enabled.

Wraps C++ getter: virtual bool ReactorBase::energyEnabled()

Parameters
handleHandle to queried ReactorBase object.

Definition at line 172 of file ctreactor.cpp.

◆ reactor_setEnergyEnabled()

int32_t reactor_setEnergyEnabled ( int32_t  handle,
int32_t  eflag 
)

Set the energy equation on or off.

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

Parameters
handleHandle to queried ReactorBase object.
eflagUndocumented.

Definition at line 183 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 195 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 205 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 215 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 225 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 235 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.
Deprecated:
Per C++ annotation: To be removed after Cantera 3.2.

Definition at line 245 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 255 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 265 of file ctreactor.cpp.

◆ reactor_massFractions()

int32_t reactor_massFractions ( int32_t  handle,
int32_t  bufLen,
double *  buf 
)

Return the vector of species mass fractions.

Wraps C++ getter: const double* ReactorBase::massFractions()

Parameters
handleHandle to queried ReactorBase object.
[in]bufLenLength of reserved array.
[out]bufReturned array value.
Returns
Actual length of value array or -1 for exception handling.

Definition at line 275 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 287 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 297 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.
Deprecated:
Per C++ annotation: Unused. To be removed after Cantera 3.2.

Definition at line 308 of file ctreactor.cpp.

◆ reactor_massFlowRate()

double reactor_massFlowRate ( int32_t  handle)

Mass flow rate through the reactor [kg/s].

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

Parameters
handleHandle to queried FlowReactor object.

Definition at line 319 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 329 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 340 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 351 of file ctreactor.cpp.