Cantera  3.2.0a2
Loading...
Searching...
No Matches
ctreactornet Library

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

Collaboration diagram for ctreactornet Library:

Detailed Description

Generated CLib API for Cantera's ReactorNet class.

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

Functions

int32_t reactornet_new (int32_t reactorsLen, int32_t *reactors)
 Create a reactor network containing one or more coupled reactors.
 
int32_t reactornet_setInitialTime (int32_t handle, double time)
 Set the initial value of the independent variable (typically time).
 
int32_t reactornet_setMaxTimeStep (int32_t handle, double maxstep)
 Set the maximum integrator step.
 
int32_t reactornet_setTolerances (int32_t handle, double rtol, double atol)
 Set the relative and absolute tolerances for the integrator.
 
int32_t reactornet_setSensitivityTolerances (int32_t handle, double rtol, double atol)
 Set the relative and absolute tolerances for integrating the sensitivity equations.
 
int32_t reactornet_advance (int32_t handle, double t)
 Advance the state of all reactors in the independent variable (time or space).
 
double reactornet_step (int32_t handle)
 Advance the state of all reactors with respect to the independent variable (time or space).
 
double reactornet_time (int32_t handle)
 Current value of the simulation time [s], for reactor networks that are solved in the time domain.
 
double reactornet_rtol (int32_t handle)
 Relative tolerance.
 
double reactornet_atol (int32_t handle)
 Absolute integration tolerance.
 
double reactornet_sensitivity (int32_t handle, const char *component, int32_t p, int32_t reactor)
 Return the sensitivity of the component named.
 
int32_t reactornet_del (int32_t handle)
 Delete ReactorNet object.
 
int32_t reactornet_cabinetSize ()
 Return size of ReactorNet storage.
 
int32_t reactornet_parentHandle (int32_t handle)
 Return handle to parent of ReactorNet object.
 

Function Documentation

◆ reactornet_new()

int32_t reactornet_new ( int32_t  reactorsLen,
int32_t *  reactors 
)

Create a reactor network containing one or more coupled reactors.

Wraps C++ constructor: shared_ptr<ReactorNet> newReactorNet(vector<shared_ptr<ReactorBase>>&)

Parameters
[in]reactorsLenLength of array reserved for reactors.
reactorsMemory holding ReactorBase objects. A vector of shared pointers to the reactors to be linked together.
Returns
Handle to stored ReactorNet object or -1 for exception handling.

Definition at line 41 of file ctreactornet.cpp.

◆ reactornet_setInitialTime()

int32_t reactornet_setInitialTime ( int32_t  handle,
double  time 
)

Set the initial value of the independent variable (typically time).

Wraps C++ setter: void ReactorNet::setInitialTime(double)

Parameters
handleHandle to queried ReactorNet object.
timeUndocumented.

Definition at line 55 of file ctreactornet.cpp.

◆ reactornet_setMaxTimeStep()

int32_t reactornet_setMaxTimeStep ( int32_t  handle,
double  maxstep 
)

Set the maximum integrator step.

Wraps C++ setter: void ReactorNet::setMaxTimeStep(double)

Parameters
handleHandle to queried ReactorNet object.
maxstepUndocumented.

Definition at line 66 of file ctreactornet.cpp.

◆ reactornet_setTolerances()

int32_t reactornet_setTolerances ( int32_t  handle,
double  rtol,
double  atol 
)

Set the relative and absolute tolerances for the integrator.

Wraps C++ method: void ReactorNet::setTolerances(double, double)

Parameters
handleHandle to queried ReactorNet object.
rtolUndocumented.
atolUndocumented.

Definition at line 77 of file ctreactornet.cpp.

◆ reactornet_setSensitivityTolerances()

int32_t reactornet_setSensitivityTolerances ( int32_t  handle,
double  rtol,
double  atol 
)

Set the relative and absolute tolerances for integrating the sensitivity equations.

Wraps C++ method: void ReactorNet::setSensitivityTolerances(double, double)

Parameters
handleHandle to queried ReactorNet object.
rtolUndocumented.
atolUndocumented.

Definition at line 88 of file ctreactornet.cpp.

◆ reactornet_advance()

int32_t reactornet_advance ( int32_t  handle,
double  t 
)

Advance the state of all reactors in the independent variable (time or space).

Wraps C++ setter: void ReactorNet::advance(double)

Parameters
handleHandle to queried ReactorNet object.
tTime/distance to advance to (s or m).

Definition at line 99 of file ctreactornet.cpp.

◆ reactornet_step()

double reactornet_step ( int32_t  handle)

Advance the state of all reactors with respect to the independent variable (time or space).

Wraps C++ getter: double ReactorNet::step()

Parameters
handleHandle to queried ReactorNet object.

Definition at line 110 of file ctreactornet.cpp.

◆ reactornet_time()

double reactornet_time ( int32_t  handle)

Current value of the simulation time [s], for reactor networks that are solved in the time domain.

Wraps C++ getter: double ReactorNet::time()

Parameters
handleHandle to queried ReactorNet object.

Definition at line 120 of file ctreactornet.cpp.

◆ reactornet_rtol()

double reactornet_rtol ( int32_t  handle)

Relative tolerance.

Wraps C++ getter: double ReactorNet::rtol()

Parameters
handleHandle to queried ReactorNet object.

Definition at line 130 of file ctreactornet.cpp.

◆ reactornet_atol()

double reactornet_atol ( int32_t  handle)

Absolute integration tolerance.

Wraps C++ getter: double ReactorNet::atol()

Parameters
handleHandle to queried ReactorNet object.

Definition at line 140 of file ctreactornet.cpp.

◆ reactornet_sensitivity()

double reactornet_sensitivity ( int32_t  handle,
const char *  component,
int32_t  p,
int32_t  reactor 
)

Return the sensitivity of the component named.

Wraps C++ method: double ReactorNet::sensitivity(const string&, size_t, int)

Parameters
handleHandle to queried ReactorNet object.
componentUndocumented.
pUndocumented.
reactorUndocumented.

Definition at line 150 of file ctreactornet.cpp.

◆ reactornet_del()

int32_t reactornet_del ( int32_t  handle)

Delete ReactorNet object.

Wraps C++ destructor: undefined

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

Definition at line 160 of file ctreactornet.cpp.

◆ reactornet_cabinetSize()

int32_t reactornet_cabinetSize ( )

Return size of ReactorNet storage.

Wraps C++ reserved CLib function: custom code

Returns
Size or -1 for exception handling.

Definition at line 171 of file ctreactornet.cpp.

◆ reactornet_parentHandle()

int32_t reactornet_parentHandle ( int32_t  handle)

Return handle to parent of ReactorNet object.

Wraps C++ reserved CLib function: custom code

Parameters
handleHandle to queried ReactorNet object.
Returns
Parent handle or -1 for exception handling.

Definition at line 183 of file ctreactornet.cpp.