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

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

Collaboration diagram for ctdomain Library:

Detailed Description

Generated CLib API for Cantera's Domain1D class.

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

Functions

int32_t domain_newFlow1D (const char *domainType, int32_t solution, const char *id)
 Create a Flow1D object of the specified type.
 
int32_t domain_newBoundary1D (const char *domainType, int32_t solution, const char *id)
 Create a Boundary1D object of the specified type.
 
int32_t domain_type (int32_t handle, int32_t bufLen, char *buf)
 String indicating the domain implemented.
 
int32_t domain_index (int32_t handle, int32_t n, int32_t j)
 Returns the index of the solution vector, which corresponds to component n at grid point j.
 
int32_t domain_nComponents (int32_t handle)
 Number of components at each grid point.
 
int32_t domain_nPoints (int32_t handle)
 Number of grid points in this domain.
 
int32_t domain_componentName (int32_t handle, int32_t n, int32_t bufLen, char *buf)
 Name of component n.
 
int32_t domain_componentIndex (int32_t handle, const char *name)
 Index of component with name name.
 
double domain_value (int32_t handle, const char *component)
 Set a single component value at a boundary.
 
int32_t domain_setValue (int32_t handle, const char *component, double value)
 Set a single component value in a flow domain or at a boundary.
 
int32_t domain_values (int32_t handle, const char *component, int32_t bufLen, double *buf)
 Retrieve component values.
 
int32_t domain_setValues (int32_t handle, const char *component, int32_t valuesLen, const double *values)
 Specify component values.
 
int32_t domain_residuals (int32_t handle, const char *component, int32_t bufLen, double *buf)
 Retrieve internal work array values for a component.
 
int32_t domain_setProfile (int32_t handle, const char *component, int32_t posLen, const double *pos, int32_t valuesLen, const double *values)
 Specify a profile for a component.
 
int32_t domain_setFlatProfile (int32_t handle, const char *component, double value)
 Specify a flat profile for a component.
 
int32_t domain_setBounds (int32_t handle, int32_t n, double lower, double upper)
 Set the upper and lower bounds for a solution component, n.
 
double domain_lowerBound (int32_t handle, int32_t n)
 Lower bound on the nth component.
 
double domain_upperBound (int32_t handle, int32_t n)
 Upper bound on the nth component.
 
int32_t domain_setSteadyTolerances (int32_t handle, double rtol, double atol, int32_t n)
 Set tolerances for steady-state mode.
 
int32_t domain_setTransientTolerances (int32_t handle, double rtol, double atol, int32_t n)
 Set tolerances for time-stepping mode.
 
double domain_rtol (int32_t handle, int32_t n)
 Relative tolerance of the nth component.
 
double domain_atol (int32_t handle, int32_t n)
 Absolute tolerance of the nth component.
 
int32_t domain_setupGrid (int32_t handle, int32_t gridLen, const double *grid)
 Set up initial grid.
 
int32_t domain_setupUniformGrid (int32_t handle, int32_t points, double length, double start)
 Set up uniform grid.
 
int32_t domain_setID (int32_t handle, const char *s)
 Specify an identifying tag for this domain.
 
int32_t domain_grid (int32_t handle, int32_t bufLen, double *buf)
 Access the array of grid coordinates [m].
 
int32_t bdry_setMdot (int32_t handle, double mdot)
 Set the total mass flow rate [kg/m²/s].
 
int32_t bdry_setTemperature (int32_t handle, double t)
 Set the temperature.
 
int32_t bdry_setSpreadRate (int32_t handle, double V0)
 Set tangential velocity gradient [1/s] at this boundary.
 
int32_t bdry_setMoleFractions (int32_t handle, const char *xin)
 Set the mole fractions by specifying a string.
 
double bdry_mdot (int32_t handle)
 The total mass flow rate [kg/m2/s].
 
double bdry_temperature (int32_t handle)
 Temperature [K].
 
double bdry_spreadRate (int32_t handle)
 Tangential velocity gradient [1/s] at this boundary.
 
double bdry_massFraction (int32_t handle, int32_t k)
 Mass fraction of species k.
 
int32_t domain_setTransport (int32_t handle, int32_t trans)
 Set transport model to existing instance.
 
int32_t flow_enableSoret (int32_t handle, int32_t withSoret)
 Enable thermal diffusion, also known as Soret diffusion.
 
int32_t flow_setPressure (int32_t handle, double p)
 Set the pressure.
 
double flow_pressure (int32_t handle)
 The current pressure [Pa].
 
int32_t flow_setFixedTempProfile (int32_t handle, int32_t zfixedLen, double *zfixed, int32_t tfixedLen, double *tfixed)
 Sometimes it is desired to carry out the simulation using a specified temperature profile, rather than computing it by solving the energy equation.
 
int32_t flow_solveEnergyEqn (int32_t handle, int32_t j)
 Specify that the energy equation should be solved at point j.
 
int32_t reactingsurf_enableCoverageEquations (int32_t handle, int32_t docov)
 Set whether to solve the equations for the surface species coverages.
 
int32_t domain_del (int32_t handle)
 Delete Domain1D object.
 
int32_t domain_cabinetSize ()
 Return size of Domain1D storage.
 

Function Documentation

◆ domain_newFlow1D()

int32_t domain_newFlow1D ( const char *  domainType,
int32_t  solution,
const char *  id 
)

Create a Flow1D object of the specified type.

Wraps C++ constructor: shared_ptr<Flow1D> newFlow1D(const string&, shared_ptr<Solution>, const string&)

Parameters
domainTypestring identifying domain type.
solutionInteger handle to Solution object. Solution holding ThermoPhase, Kinetics and Transport objects.
idstring identifier describing domain. If omitted, id defaults to the domain type identifier.
Returns
Handle to stored Flow1D object or -1 for exception handling.

Definition at line 53 of file ctdomain.cpp.

◆ domain_newBoundary1D()

int32_t domain_newBoundary1D ( const char *  domainType,
int32_t  solution,
const char *  id 
)

Create a Boundary1D object of the specified type.

Wraps C++ constructor: shared_ptr<Boundary1D> newBoundary1D(const string&, shared_ptr<Solution>, const string&)

Parameters
domainTypestring identifying domain type.
solutionInteger handle to Solution object. Solution holding ThermoPhase, Kinetics and Transport objects.
idstring identifier describing domain. If omitted, id defaults to the domain type identifier.
Returns
Handle to stored Boundary1D object or -1 for exception handling.

Definition at line 63 of file ctdomain.cpp.

◆ domain_type()

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

String indicating the domain implemented.

Wraps C++ getter: string Domain1D::type()

Parameters
handleHandle to queried Domain1D 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 73 of file ctdomain.cpp.

◆ domain_index()

int32_t domain_index ( int32_t  handle,
int32_t  n,
int32_t  j 
)

Returns the index of the solution vector, which corresponds to component n at grid point j.

Wraps C++ method: size_t Domain1D::index(size_t, size_t)

Parameters
handleHandle to queried Domain1D object.
ncomponent index
jgrid point index

Definition at line 85 of file ctdomain.cpp.

◆ domain_nComponents()

int32_t domain_nComponents ( int32_t  handle)

Number of components at each grid point.

Wraps C++ getter: size_t Domain1D::nComponents()

Parameters
handleHandle to queried Domain1D object.

Definition at line 95 of file ctdomain.cpp.

◆ domain_nPoints()

int32_t domain_nPoints ( int32_t  handle)

Number of grid points in this domain.

Wraps C++ getter: size_t Domain1D::nPoints()

Parameters
handleHandle to queried Domain1D object.

Definition at line 105 of file ctdomain.cpp.

◆ domain_componentName()

int32_t domain_componentName ( int32_t  handle,
int32_t  n,
int32_t  bufLen,
char *  buf 
)

Name of component n.

May be overloaded.

Wraps C++ method: virtual string Domain1D::componentName(size_t)

Parameters
handleHandle to queried Domain1D object.
nUndocumented.
[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 115 of file ctdomain.cpp.

◆ domain_componentIndex()

int32_t domain_componentIndex ( int32_t  handle,
const char *  name 
)

Index of component with name name.

Wraps C++ method: virtual size_t Domain1D::componentIndex(const string&)

Parameters
handleHandle to queried Domain1D object.
namename of component

Definition at line 127 of file ctdomain.cpp.

◆ domain_value()

double domain_value ( int32_t  handle,
const char *  component 
)

Set a single component value at a boundary.

Wraps C++ method: virtual double Domain1D::value(const string&)

Parameters
handleHandle to queried Domain1D object.
componentName of the component.

Definition at line 137 of file ctdomain.cpp.

◆ domain_setValue()

int32_t domain_setValue ( int32_t  handle,
const char *  component,
double  value 
)

Set a single component value in a flow domain or at a boundary.

Wraps C++ method: virtual void Domain1D::setValue(const string&, double)

Parameters
handleHandle to queried Domain1D object.
componentName of the component.
valueValue of the component.

Definition at line 147 of file ctdomain.cpp.

◆ domain_values()

int32_t domain_values ( int32_t  handle,
const char *  component,
int32_t  bufLen,
double *  buf 
)

Retrieve component values.

Wraps C++ method: vector<double> Domain1D::values(const string&)

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

Definition at line 158 of file ctdomain.cpp.

◆ domain_setValues()

int32_t domain_setValues ( int32_t  handle,
const char *  component,
int32_t  valuesLen,
const double *  values 
)

Specify component values.

Wraps C++ method: virtual void Domain1D::setValues(const string&, const vector<double>&)

Parameters
handleHandle to queried Domain1D object.
componentName of the component.
[in]valuesLenLength of vector reserved for values.
[in]valuesVector of length nPoints() containing values at grid points.

Definition at line 170 of file ctdomain.cpp.

◆ domain_residuals()

int32_t domain_residuals ( int32_t  handle,
const char *  component,
int32_t  bufLen,
double *  buf 
)

Retrieve internal work array values for a component.

Wraps C++ method: vector<double> Domain1D::residuals(const string&)

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

Definition at line 182 of file ctdomain.cpp.

◆ domain_setProfile()

int32_t domain_setProfile ( int32_t  handle,
const char *  component,
int32_t  posLen,
const double *  pos,
int32_t  valuesLen,
const double *  values 
)

Specify a profile for a component.

Wraps C++ method: virtual void Domain1D::setProfile(const string&, const vector<double>&, const vector<double>&)

Parameters
handleHandle to queried Domain1D object.
componentUndocumented.
[in]posLenLength of vector reserved for pos.
posUndocumented.
[in]valuesLenLength of vector reserved for values.
valuesUndocumented.

Definition at line 194 of file ctdomain.cpp.

◆ domain_setFlatProfile()

int32_t domain_setFlatProfile ( int32_t  handle,
const char *  component,
double  value 
)

Specify a flat profile for a component.

Wraps C++ method: virtual void Domain1D::setFlatProfile(const string&, double)

Parameters
handleHandle to queried Domain1D object.
componentName of the component.
valueConstant value.

Definition at line 207 of file ctdomain.cpp.

◆ domain_setBounds()

int32_t domain_setBounds ( int32_t  handle,
int32_t  n,
double  lower,
double  upper 
)

Set the upper and lower bounds for a solution component, n.

Wraps C++ method: void Domain1D::setBounds(size_t, double, double)

Parameters
handleHandle to queried Domain1D object.
nsolution component index
lowerlower bound on component n
upperupper bound on component n

Definition at line 218 of file ctdomain.cpp.

◆ domain_lowerBound()

double domain_lowerBound ( int32_t  handle,
int32_t  n 
)

Lower bound on the nth component.

Wraps C++ method: double Domain1D::lowerBound(size_t)

Parameters
handleHandle to queried Domain1D object.
nUndocumented.

Definition at line 229 of file ctdomain.cpp.

◆ domain_upperBound()

double domain_upperBound ( int32_t  handle,
int32_t  n 
)

Upper bound on the nth component.

Wraps C++ method: double Domain1D::upperBound(size_t)

Parameters
handleHandle to queried Domain1D object.
nUndocumented.

Definition at line 239 of file ctdomain.cpp.

◆ domain_setSteadyTolerances()

int32_t domain_setSteadyTolerances ( int32_t  handle,
double  rtol,
double  atol,
int32_t  n 
)

Set tolerances for steady-state mode.

Wraps C++ method: void Domain1D::setSteadyTolerances(double, double, size_t)

Parameters
handleHandle to queried Domain1D object.
rtolRelative tolerance
atolAbsolute tolerance
ncomponent index these tolerances apply to. If set to -1 (the default), these tolerances will be applied to all solution components.

Definition at line 249 of file ctdomain.cpp.

◆ domain_setTransientTolerances()

int32_t domain_setTransientTolerances ( int32_t  handle,
double  rtol,
double  atol,
int32_t  n 
)

Set tolerances for time-stepping mode.

Wraps C++ method: void Domain1D::setTransientTolerances(double, double, size_t)

Parameters
handleHandle to queried Domain1D object.
rtolRelative tolerance
atolAbsolute tolerance
ncomponent index these tolerances apply to. If set to -1 (the default), these tolerances will be applied to all solution components.

Definition at line 260 of file ctdomain.cpp.

◆ domain_rtol()

double domain_rtol ( int32_t  handle,
int32_t  n 
)

Relative tolerance of the nth component.

Wraps C++ method: double Domain1D::rtol(size_t)

Parameters
handleHandle to queried Domain1D object.
nUndocumented.

Definition at line 271 of file ctdomain.cpp.

◆ domain_atol()

double domain_atol ( int32_t  handle,
int32_t  n 
)

Absolute tolerance of the nth component.

Wraps C++ method: double Domain1D::atol(size_t)

Parameters
handleHandle to queried Domain1D object.
nUndocumented.

Definition at line 281 of file ctdomain.cpp.

◆ domain_setupGrid()

int32_t domain_setupGrid ( int32_t  handle,
int32_t  gridLen,
const double *  grid 
)

Set up initial grid.

Wraps C++ setter: void Domain1D::setupGrid(const vector<double>&)

Parameters
handleHandle to queried Domain1D object.
[in]gridLenLength of vector reserved for grid.
gridUndocumented.

Definition at line 291 of file ctdomain.cpp.

◆ domain_setupUniformGrid()

int32_t domain_setupUniformGrid ( int32_t  handle,
int32_t  points,
double  length,
double  start 
)

Set up uniform grid.

Wraps C++ method: void Domain1D::setupUniformGrid(size_t, double, double)

Parameters
handleHandle to queried Domain1D object.
pointsNumber of grid points
lengthLength of domain
startStart position of domain (default=0.)

Definition at line 303 of file ctdomain.cpp.

◆ domain_setID()

int32_t domain_setID ( int32_t  handle,
const char *  s 
)

Specify an identifying tag for this domain.

Wraps C++ setter: void Domain1D::setID(const string&)

Parameters
handleHandle to queried Domain1D object.
sUndocumented.

Definition at line 314 of file ctdomain.cpp.

◆ domain_grid()

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

Access the array of grid coordinates [m].

Wraps C++ getter: vector<double>& Domain1D::grid()

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

Definition at line 325 of file ctdomain.cpp.

◆ bdry_setMdot()

int32_t bdry_setMdot ( int32_t  handle,
double  mdot 
)

Set the total mass flow rate [kg/m²/s].

Wraps C++ setter: virtual void Boundary1D::setMdot(double)

Parameters
handleHandle to queried Boundary1D object.
mdotUndocumented.

Definition at line 339 of file ctdomain.cpp.

◆ bdry_setTemperature()

int32_t bdry_setTemperature ( int32_t  handle,
double  t 
)

Set the temperature.

Wraps C++ setter: virtual void Boundary1D::setTemperature(double)

Parameters
handleHandle to queried Boundary1D object.
tUndocumented.

Definition at line 350 of file ctdomain.cpp.

◆ bdry_setSpreadRate()

int32_t bdry_setSpreadRate ( int32_t  handle,
double  V0 
)

Set tangential velocity gradient [1/s] at this boundary.

Wraps C++ setter: virtual void Boundary1D::setSpreadRate(double)

Parameters
handleHandle to queried Boundary1D object.
V0Undocumented.

Definition at line 361 of file ctdomain.cpp.

◆ bdry_setMoleFractions()

int32_t bdry_setMoleFractions ( int32_t  handle,
const char *  xin 
)

Set the mole fractions by specifying a string.

Wraps C++ setter: virtual void Boundary1D::setMoleFractions(const string&)

Parameters
handleHandle to queried Boundary1D object.
xinUndocumented.

Definition at line 372 of file ctdomain.cpp.

◆ bdry_mdot()

double bdry_mdot ( int32_t  handle)

The total mass flow rate [kg/m2/s].

Wraps C++ getter: virtual double Boundary1D::mdot()

Parameters
handleHandle to queried Boundary1D object.

Definition at line 383 of file ctdomain.cpp.

◆ bdry_temperature()

double bdry_temperature ( int32_t  handle)

Temperature [K].

Wraps C++ getter: virtual double Boundary1D::temperature()

Parameters
handleHandle to queried Boundary1D object.

Definition at line 393 of file ctdomain.cpp.

◆ bdry_spreadRate()

double bdry_spreadRate ( int32_t  handle)

Tangential velocity gradient [1/s] at this boundary.

Wraps C++ getter: virtual double Boundary1D::spreadRate()

Parameters
handleHandle to queried Boundary1D object.

Definition at line 403 of file ctdomain.cpp.

◆ bdry_massFraction()

double bdry_massFraction ( int32_t  handle,
int32_t  k 
)

Mass fraction of species k.

Wraps C++ method: virtual double Boundary1D::massFraction(size_t)

Parameters
handleHandle to queried Boundary1D object.
kUndocumented.

Definition at line 413 of file ctdomain.cpp.

◆ domain_setTransport()

int32_t domain_setTransport ( int32_t  handle,
int32_t  trans 
)

Set transport model to existing instance.

Wraps C++ setter: virtual void Domain1D::setTransport(shared_ptr<Transport>)

Parameters
handleHandle to queried Domain1D object.
transInteger handle to Transport object. Undocumented.

Definition at line 423 of file ctdomain.cpp.

◆ flow_enableSoret()

int32_t flow_enableSoret ( int32_t  handle,
int32_t  withSoret 
)

Enable thermal diffusion, also known as Soret diffusion.

Wraps C++ setter: void Flow1D::enableSoret(bool)

Parameters
handleHandle to queried Flow1D object.
withSoretUndocumented.

Definition at line 434 of file ctdomain.cpp.

◆ flow_setPressure()

int32_t flow_setPressure ( int32_t  handle,
double  p 
)

Set the pressure.

Wraps C++ setter: void Flow1D::setPressure(double)

Parameters
handleHandle to queried Flow1D object.
pUndocumented.

Definition at line 446 of file ctdomain.cpp.

◆ flow_pressure()

double flow_pressure ( int32_t  handle)

The current pressure [Pa].

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

Parameters
handleHandle to queried Flow1D object.

Definition at line 457 of file ctdomain.cpp.

◆ flow_setFixedTempProfile()

int32_t flow_setFixedTempProfile ( int32_t  handle,
int32_t  zfixedLen,
double *  zfixed,
int32_t  tfixedLen,
double *  tfixed 
)

Sometimes it is desired to carry out the simulation using a specified temperature profile, rather than computing it by solving the energy equation.

Wraps C++ method: void Flow1D::setFixedTempProfile(vector<double>&, vector<double>&)

Parameters
handleHandle to queried Flow1D object.
[in]zfixedLenLength of vector reserved for zfixed.
zfixedUndocumented.
[in]tfixedLenLength of vector reserved for tfixed.
tfixedUndocumented.

Definition at line 467 of file ctdomain.cpp.

◆ flow_solveEnergyEqn()

int32_t flow_solveEnergyEqn ( int32_t  handle,
int32_t  j 
)

Specify that the energy equation should be solved at point j.

Wraps C++ setter: void Flow1D::solveEnergyEqn(size_t)

Parameters
handleHandle to queried Flow1D object.
jPoint at which to enable the energy equation. npos means all points.

Definition at line 480 of file ctdomain.cpp.

◆ reactingsurf_enableCoverageEquations()

int32_t reactingsurf_enableCoverageEquations ( int32_t  handle,
int32_t  docov 
)

Set whether to solve the equations for the surface species coverages.

Wraps C++ setter: void ReactingSurf1D::enableCoverageEquations(bool)

Parameters
handleHandle to queried ReactingSurf1D object.
docovUndocumented.

Definition at line 491 of file ctdomain.cpp.

◆ domain_del()

int32_t domain_del ( int32_t  handle)

Delete Domain1D object.

Wraps C++ destructor: undefined

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

Definition at line 503 of file ctdomain.cpp.

◆ domain_cabinetSize()

int32_t domain_cabinetSize ( )

Return size of Domain1D storage.

Wraps C++ reserved CLib function: custom code

Returns
Size or -1 for exception handling.

Definition at line 514 of file ctdomain.cpp.