34typedef Cabinet<Domain1D> Domain1DCabinet;
35template<> Domain1DCabinet* Domain1DCabinet::s_storage = 0;
37typedef Cabinet<Flow1D> Flow1DCabinet;
38template<> Flow1DCabinet* Flow1DCabinet::s_storage;
40typedef Cabinet<Boundary1D> Boundary1DCabinet;
41template<> Boundary1DCabinet* Boundary1DCabinet::s_storage;
43typedef Cabinet<Transport> TransportCabinet;
44template<> TransportCabinet* TransportCabinet::s_storage;
46typedef Cabinet<Solution> SolutionCabinet;
47template<> SolutionCabinet* SolutionCabinet::s_storage;
57 return Domain1DCabinet::add(
newFlow1D(domainType, SolutionCabinet::at(solution),
id));
67 return Domain1DCabinet::add(
newBoundary1D(domainType, SolutionCabinet::at(solution),
id));
73 int32_t
domain_type(int32_t handle, int32_t bufLen,
char* buf)
77 string out = Domain1DCabinet::at(handle)->type();
79 return int(out.size()) + 1;
89 return Domain1DCabinet::at(handle)->index(n, j);
99 return Domain1DCabinet::at(handle)->nComponents();
109 return Domain1DCabinet::at(handle)->nPoints();
119 string out = Domain1DCabinet::at(handle)->componentName(n);
121 return int(out.size()) + 1;
131 return Domain1DCabinet::at(handle)->componentIndex(name);
141 Domain1DCabinet::at(handle)->setBounds(n, lower, upper);
152 return Domain1DCabinet::at(handle)->lowerBound(n);
162 return Domain1DCabinet::at(handle)->upperBound(n);
172 Domain1DCabinet::at(handle)->setSteadyTolerances(rtol, atol, n);
183 Domain1DCabinet::at(handle)->setTransientTolerances(rtol, atol, n);
194 return Domain1DCabinet::at(handle)->rtol(n);
204 return Domain1DCabinet::at(handle)->atol(n);
214 const vector<double> grid_(grid, grid + gridLen);
215 Domain1DCabinet::at(handle)->setupGrid(grid_);
226 Domain1DCabinet::at(handle)->setupUniformGrid(points, length, start);
237 Domain1DCabinet::at(handle)->setID(s);
248 auto& obj = Domain1DCabinet::at(handle);
250 vector<double>& out = obj->grid();
251 std::copy(out.begin(), out.end(), buf);
252 return int(out.size());
262 Domain1DCabinet::as<Boundary1D>(handle)->setMdot(mdot);
273 Domain1DCabinet::as<Boundary1D>(handle)->setTemperature(t);
284 Domain1DCabinet::as<Boundary1D>(handle)->setSpreadRate(V0);
295 Domain1DCabinet::as<Boundary1D>(handle)->setMoleFractions(xin);
306 return Domain1DCabinet::as<Boundary1D>(handle)->mdot();
316 return Domain1DCabinet::as<Boundary1D>(handle)->temperature();
326 return Domain1DCabinet::as<Boundary1D>(handle)->spreadRate();
336 return Domain1DCabinet::as<Boundary1D>(handle)->massFraction(k);
346 Domain1DCabinet::at(handle)->setTransport(TransportCabinet::at(trans));
357 bool withSoret_ = (withSoret != 0);
358 Domain1DCabinet::as<Flow1D>(handle)->enableSoret(withSoret_);
369 Domain1DCabinet::as<Flow1D>(handle)->setPressure(p);
380 return Domain1DCabinet::as<Flow1D>(handle)->pressure();
390 vector<double> zfixed_(zfixed, zfixed + zfixedLen);
391 vector<double> tfixed_(tfixed, tfixed + tfixedLen);
392 Domain1DCabinet::as<Flow1D>(handle)->setFixedTempProfile(zfixed_, tfixed_);
403 Domain1DCabinet::as<Flow1D>(handle)->solveEnergyEqn(j);
414 bool docov_ = (docov != 0);
415 Domain1DCabinet::as<ReactingSurf1D>(handle)->enableCoverageEquations(docov_);
426 Domain1DCabinet::del(handle);
438 return Domain1DCabinet::size();
450 return Domain1DCabinet::parent(handle);
Boundary objects for one-dimensional simulations.
Header file defining class TransportFactory (see TransportFactory)
CTDOMAIN - Generated CLib Cantera interface library.
int32_t domain_cabinetSize()
Return size of Domain1D storage.
double bdry_spreadRate(int32_t handle)
Tangential velocity gradient [1/s] at this boundary.
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_setupUniformGrid(int32_t handle, int32_t points, double length, double start)
Set up uniform grid.
double bdry_temperature(int32_t handle)
Temperature [K].
int32_t domain_grid(int32_t handle, int32_t bufLen, double *buf)
Access the array of grid coordinates [m].
int32_t domain_componentName(int32_t handle, int32_t n, int32_t bufLen, char *buf)
Name of component.
int32_t flow_enableSoret(int32_t handle, int32_t withSoret)
Enable thermal diffusion, also known as Soret diffusion.
int32_t flow_solveEnergyEqn(int32_t handle, int32_t j)
Specify that the energy equation should be solved at point.
int32_t domain_setID(int32_t handle, const char *s)
Specify an identifying tag for this domain.
int32_t domain_nPoints(int32_t handle)
Number of grid points in this domain.
double domain_upperBound(int32_t handle, int32_t n)
Upper bound on the nth component.
int32_t domain_setTransientTolerances(int32_t handle, double rtol, double atol, int32_t n)
Set tolerances for time-stepping mode.
int32_t bdry_setSpreadRate(int32_t handle, double V0)
Set tangential velocity gradient [1/s] at this boundary.
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,...
double bdry_mdot(int32_t handle)
The total mass flow rate [kg/m2/s].
int32_t domain_setupGrid(int32_t handle, int32_t gridLen, const double *grid)
Set up initial grid.
int32_t domain_del(int32_t handle)
Delete Domain1D object.
int32_t domain_newBoundary1D(const char *domainType, int32_t solution, const char *id)
Create a Boundary1D object of the specified type.
int32_t domain_nComponents(int32_t handle)
Number of components at each grid point.
double bdry_massFraction(int32_t handle, int32_t k)
Mass fraction of species k.
int32_t domain_parentHandle(int32_t handle)
Return handle to parent of Domain1D object.
int32_t reactingsurf_enableCoverageEquations(int32_t handle, int32_t docov)
Set whether to solve the equations for the surface species coverages.
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 bdry_setTemperature(int32_t handle, double t)
Set the temperature.
double domain_lowerBound(int32_t handle, int32_t n)
Lower bound on the nth component.
int32_t domain_setTransport(int32_t handle, int32_t trans)
Set transport model to existing instance.
int32_t domain_type(int32_t handle, int32_t bufLen, char *buf)
String indicating the domain implemented.
int32_t flow_setPressure(int32_t handle, double p)
Set the pressure.
int32_t bdry_setMoleFractions(int32_t handle, const char *xin)
Set the mole fractions by specifying a string.
int32_t domain_newFlow1D(const char *domainType, int32_t solution, const char *id)
Create a Flow1D object of the specified type.
int32_t domain_setSteadyTolerances(int32_t handle, double rtol, double atol, int32_t n)
Set tolerances for steady-state mode.
double flow_pressure(int32_t handle)
The current pressure [Pa].
int32_t bdry_setMdot(int32_t handle, double mdot)
Set the total mass flow rate [kg/m²/s].
int32_t domain_componentIndex(int32_t handle, const char *name)
index of component with name
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.
size_t copyString(const string &source, char *dest, size_t length)
Copy the contents of a string into a char array of a given length.
shared_ptr< Flow1D > newFlow1D(const string &domainType, shared_ptr< Solution > solution, const string &id)
Create a Flow1D object of the specified type.
shared_ptr< Boundary1D > newBoundary1D(const string &domainType, shared_ptr< Solution > solution, const string &id)
Create a Boundary1D object of the specified type.
Namespace for the Cantera kernel.
T handleAllExceptions(T ctErrorCode, T otherErrorCode)
Exception handler used at language interface boundaries.
Contains declarations for string manipulation functions within Cantera.