35typedef Cabinet<ConnectorNode> ConnectorNodeCabinet;
36template<> ConnectorNodeCabinet* ConnectorNodeCabinet::s_storage = 0;
38typedef Cabinet<ReactorBase> ReactorBaseCabinet;
39template<> ReactorBaseCabinet* ReactorBaseCabinet::s_storage;
41typedef Cabinet<Func1> Func1Cabinet;
42template<> Func1Cabinet* Func1Cabinet::s_storage;
48 int32_t
connector_new(
const char* model, int32_t r0, int32_t r1,
const char* name)
52 return ConnectorNodeCabinet::add(
newConnectorNode(model, ReactorBaseCabinet::at(r0), ReactorBaseCabinet::at(r1), name));
62 string out = ConnectorNodeCabinet::at(handle)->type();
64 return int(out.size()) + 1;
74 string out = ConnectorNodeCabinet::at(handle)->name();
76 return int(out.size()) + 1;
86 ConnectorNodeCabinet::at(handle)->setName(name);
97 ConnectorNodeCabinet::as<FlowDevice>(handle)->setPrimary(ConnectorNodeCabinet::at(primary));
108 return ConnectorNodeCabinet::as<FlowDevice>(handle)->massFlowRate();
118 return ConnectorNodeCabinet::as<FlowDevice>(handle)->deviceCoefficient();
128 ConnectorNodeCabinet::as<FlowDevice>(handle)->setDeviceCoefficient(c);
139 ConnectorNodeCabinet::as<FlowDevice>(handle)->setPressureFunction(Func1Cabinet::at(f));
150 ConnectorNodeCabinet::as<FlowDevice>(handle)->setTimeFunction(Func1Cabinet::at(g));
161 return ConnectorNodeCabinet::as<WallBase>(handle)->expansionRate();
171 return ConnectorNodeCabinet::as<WallBase>(handle)->heatRate();
181 return ConnectorNodeCabinet::as<WallBase>(handle)->area();
191 ConnectorNodeCabinet::as<WallBase>(handle)->setArea(a);
202 ConnectorNodeCabinet::as<Wall>(handle)->setThermalResistance(Rth);
213 ConnectorNodeCabinet::as<Wall>(handle)->setHeatTransferCoeff(U);
224 ConnectorNodeCabinet::as<Wall>(handle)->setHeatFlux(Func1Cabinet::at(q));
235 ConnectorNodeCabinet::as<Wall>(handle)->setExpansionRateCoeff(k);
246 ConnectorNodeCabinet::as<Wall>(handle)->setVelocity(Func1Cabinet::at(f));
257 ConnectorNodeCabinet::as<Wall>(handle)->setEmissivity(epsilon);
268 ConnectorNodeCabinet::del(handle);
280 return ConnectorNodeCabinet::size();
292 return ConnectorNodeCabinet::parent(handle);
Header file for base class WallBase.
CTCONNECTOR - Generated CLib Cantera interface library.
Some flow devices derived from class FlowDevice.
int32_t flowdev_setTimeFunction(int32_t handle, int32_t g)
Set a function of time to modulate the mass flow rate.
double flowdev_massFlowRate(int32_t handle)
Mass flow rate (kg/s).
int32_t connector_del(int32_t handle)
Delete ConnectorNode object.
int32_t flowdev_setDeviceCoefficient(int32_t handle, double c)
Set the device coefficient (defined by derived class).
int32_t connector_setName(int32_t handle, const char *name)
Set connector name.
int32_t wall_setHeatTransferCoeff(int32_t handle, double U)
Set the overall heat transfer coefficient [W/m^2/K].
double wall_heatRate(int32_t handle)
Heat flow rate through the wall (W) at current reactor network time.
double flowdev_deviceCoefficient(int32_t handle)
Get the device coefficient (defined by derived class).
int32_t wall_setExpansionRateCoeff(int32_t handle, double k)
Set the expansion rate coefficient.
int32_t connector_new(const char *model, int32_t r0, int32_t r1, const char *name)
Create a ConnectorNode object of the specified type.
int32_t wall_setThermalResistance(int32_t handle, double Rth)
Set the thermal resistance of the wall [K*m^2/W].
int32_t wall_setVelocity(int32_t handle, int32_t f)
Set the wall velocity to a specified function of time,.
int32_t flowdev_setPrimary(int32_t handle, int32_t primary)
Set the primary mass flow controller.
int32_t connector_name(int32_t handle, int32_t bufLen, char *buf)
Retrieve connector name.
double wall_area(int32_t handle)
Area in (m^2).
int32_t flowdev_setPressureFunction(int32_t handle, int32_t f)
Set a function of pressure to modify the pressure response.
int32_t connector_cabinetSize()
Return size of ConnectorNode storage.
int32_t connector_parentHandle(int32_t handle)
Return handle to parent of ConnectorNode object.
int32_t wall_setArea(int32_t handle, double a)
Set the area [m^2].
int32_t connector_type(int32_t handle, int32_t bufLen, char *buf)
String indicating the connector implemented.
double wall_expansionRate(int32_t handle)
Rate of volume change (m^3/s) for the adjacent reactors at current reactor network time.
int32_t wall_setEmissivity(int32_t handle, double epsilon)
Set the emissivity.
int32_t wall_setHeatFlux(int32_t handle, int32_t q)
Specify the heat flux function.
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< ConnectorNode > newConnectorNode(const string &model, shared_ptr< ReactorBase > r0, shared_ptr< ReactorBase > r1, const string &name)
Create a ConnectorNode 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.