Cantera  3.2.0a2
Loading...
Searching...
No Matches
ctconnector.h
Go to the documentation of this file.
1/**
2 * CTCONNECTOR - Generated CLib %Cantera interface library.
3 *
4 * @file ctconnector.h
5 *
6 * Generated CLib API for %Cantera's ConnectorNode class.
7 *
8 * This library of functions is designed to encapsulate %Cantera functionality
9 * and make it available for use in languages and applications other than C++.
10 * A set of library functions is provided that are declared "extern C". All
11 * %Cantera objects are stored and referenced by integers - no pointers are
12 * passed to or from the calling application.
13 *
14 * This file was generated by sourcegen. It will be re-generated by the
15 * %Cantera build process. Do not manually edit.
16 *
17 * @warning This library is an experimental part of the %Cantera API and
18 * may be changed without notice.
19 */
20
21// This file is part of Cantera. See License.txt in the top-level directory or
22// at https://cantera.org/license.txt for license and copyright information.
23
24#ifndef CTCONNECTOR_H
25#define CTCONNECTOR_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31 /**
32 * @defgroup CAPIctconnector ctconnector Library
33 * Generated CLib API for %Cantera's ConnectorNode class.
34 *
35 * @warning This library is an experimental part of the %Cantera API and
36 * may be changed or removed without notice.
37 *
38 * @ingroup CAPIindex
39 */
40
41 /**
42 * @addtogroup CAPIctconnector
43 * @{
44 */
45
46 /**
47 * Create a ConnectorNode object of the specified type.
48 *
49 * Wraps C++ constructor: `shared_ptr<ConnectorNode> newConnectorNode(const string&, shared_ptr<ReactorBase>, shared_ptr<ReactorBase>, const string&)`
50 *
51 * @param model String specifying reactor type.
52 * @param r0 Integer handle to ReactorBase object. First reactor.
53 * @param r1 Integer handle to ReactorBase object. Second reactor.
54 * @param name Name of the connector.
55 * @returns Handle to stored ConnectorNode object or -1 for exception handling.
56 */
57 int32_t connector_new(const char* model, int32_t r0, int32_t r1, const char* name);
58
59 /**
60 * String indicating the connector implemented.
61 *
62 * Wraps C++ getter: `virtual string ConnectorNode::type()`
63 *
64 * @param handle Handle to queried ConnectorNode object.
65 * @param[in] bufLen Length of reserved array.
66 * @param[out] buf Returned string value.
67 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
68 */
69 int32_t connector_type(int32_t handle, int32_t bufLen, char* buf);
70
71 /**
72 * Retrieve connector name.
73 *
74 * Wraps C++ getter: `string ConnectorNode::name()`
75 *
76 * @param handle Handle to queried ConnectorNode object.
77 * @param[in] bufLen Length of reserved array.
78 * @param[out] buf Returned string value.
79 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
80 */
81 int32_t connector_name(int32_t handle, int32_t bufLen, char* buf);
82
83 /**
84 * Set connector name.
85 *
86 * Wraps C++ setter: `void ConnectorNode::setName(const string&)`
87 *
88 * @param handle Handle to queried ConnectorNode object.
89 * @param name Undocumented.
90 */
91 int32_t connector_setName(int32_t handle, const char* name);
92
93 /**
94 * Set the primary mass flow controller.
95 *
96 * Wraps C++ setter: `virtual void FlowDevice::setPrimary(shared_ptr<ConnectorNode>)`
97 *
98 * @param handle Handle to queried FlowDevice object.
99 * @param primary Integer handle to ConnectorNode object. Undocumented.
100 */
101 int32_t flowdev_setPrimary(int32_t handle, int32_t primary);
102
103 /**
104 * Mass flow rate (kg/s).
105 *
106 * Wraps C++ getter: `double FlowDevice::massFlowRate()`
107 *
108 * @param handle Handle to queried FlowDevice object.
109 */
110 double flowdev_massFlowRate(int32_t handle);
111
112 /**
113 * Get the device coefficient (defined by derived class).
114 *
115 * Wraps C++ getter: `double FlowDevice::deviceCoefficient()`
116 *
117 * @param handle Handle to queried FlowDevice object.
118 */
119 double flowdev_deviceCoefficient(int32_t handle);
120
121 /**
122 * Set the device coefficient (defined by derived class).
123 *
124 * Wraps C++ setter: `void FlowDevice::setDeviceCoefficient(double)`
125 *
126 * @param handle Handle to queried FlowDevice object.
127 * @param c Undocumented.
128 */
129 int32_t flowdev_setDeviceCoefficient(int32_t handle, double c);
130
131 /**
132 * Set a function of pressure to modify the pressure response.
133 *
134 * Wraps C++ setter: `virtual void FlowDevice::setPressureFunction(shared_ptr<Func1>)`
135 *
136 * @param handle Handle to queried FlowDevice object.
137 * @param f Integer handle to Func1 object. Undocumented.
138 */
139 int32_t flowdev_setPressureFunction(int32_t handle, int32_t f);
140
141 /**
142 * Set a function of time to modulate the mass flow rate.
143 *
144 * Wraps C++ setter: `virtual void FlowDevice::setTimeFunction(shared_ptr<Func1>)`
145 *
146 * @param handle Handle to queried FlowDevice object.
147 * @param g Integer handle to Func1 object. Undocumented.
148 */
149 int32_t flowdev_setTimeFunction(int32_t handle, int32_t g);
150
151 /**
152 * Rate of volume change (m^3/s) for the adjacent reactors at current reactor network time.
153 *
154 * Wraps C++ getter: `virtual double WallBase::expansionRate()`
155 *
156 * @param handle Handle to queried WallBase object.
157 */
158 double wall_expansionRate(int32_t handle);
159
160 /**
161 * Heat flow rate through the wall (W) at current reactor network time.
162 *
163 * Wraps C++ getter: `virtual double WallBase::heatRate()`
164 *
165 * @param handle Handle to queried WallBase object.
166 */
167 double wall_heatRate(int32_t handle);
168
169 /**
170 * Area in (m^2).
171 *
172 * Wraps C++ getter: `double WallBase::area()`
173 *
174 * @param handle Handle to queried WallBase object.
175 */
176 double wall_area(int32_t handle);
177
178 /**
179 * Set the area [m^2].
180 *
181 * Wraps C++ setter: `virtual void WallBase::setArea(double)`
182 *
183 * @param handle Handle to queried WallBase object.
184 * @param a Undocumented.
185 */
186 int32_t wall_setArea(int32_t handle, double a);
187
188 /**
189 * Set the thermal resistance of the wall [K*m^2/W].
190 *
191 * Wraps C++ setter: `void Wall::setThermalResistance(double)`
192 *
193 * @param handle Handle to queried Wall object.
194 * @param Rth Undocumented.
195 */
196 int32_t wall_setThermalResistance(int32_t handle, double Rth);
197
198 /**
199 * Set the overall heat transfer coefficient [W/m^2/K].
200 *
201 * Wraps C++ setter: `void Wall::setHeatTransferCoeff(double)`
202 *
203 * @param handle Handle to queried Wall object.
204 * @param U Undocumented.
205 */
206 int32_t wall_setHeatTransferCoeff(int32_t handle, double U);
207
208 /**
209 * Specify the heat flux function
210 *
211 * Wraps C++ setter: `void Wall::setHeatFlux(shared_ptr<Func1>)`
212 *
213 * @param handle Handle to queried Wall object.
214 * @param q Integer handle to Func1 object. Undocumented.
215 */
216 int32_t wall_setHeatFlux(int32_t handle, int32_t q);
217
218 /**
219 * Set the expansion rate coefficient.
220 *
221 * Wraps C++ setter: `void Wall::setExpansionRateCoeff(double)`
222 *
223 * @param handle Handle to queried Wall object.
224 * @param k Undocumented.
225 */
226 int32_t wall_setExpansionRateCoeff(int32_t handle, double k);
227
228 /**
229 * Set the wall velocity to a specified function of time,
230 *
231 * Wraps C++ setter: `void Wall::setVelocity(shared_ptr<Func1>)`
232 *
233 * @param handle Handle to queried Wall object.
234 * @param f Integer handle to Func1 object. Undocumented.
235 */
236 int32_t wall_setVelocity(int32_t handle, int32_t f);
237
238 /**
239 * Set the emissivity.
240 *
241 * Wraps C++ setter: `void Wall::setEmissivity(double)`
242 *
243 * @param handle Handle to queried Wall object.
244 * @param epsilon Undocumented.
245 */
246 int32_t wall_setEmissivity(int32_t handle, double epsilon);
247
248 /**
249 * Delete ConnectorNode object.
250 *
251 * Wraps C++ destructor: `undefined`
252 *
253 * @param handle Handle to ConnectorNode object.
254 * @returns Zero for success and -1 for exception handling.
255 */
256 int32_t connector_del(int32_t handle);
257
258 /**
259 * Return size of ConnectorNode storage.
260 *
261 * Wraps C++ reserved CLib function: `custom code`
262 *
263 * @returns Size or -1 for exception handling.
264 */
265 int32_t connector_cabinetSize();
266
267 /**
268 * Return handle to parent of ConnectorNode object.
269 *
270 * Wraps C++ reserved CLib function: `custom code`
271 *
272 * @param handle Handle to queried ConnectorNode object.
273 * @returns Parent handle or -1 for exception handling.
274 */
275 int32_t connector_parentHandle(int32_t handle);
276
277 /**
278 * @}
279 */
280
281#ifdef __cplusplus
282}
283#endif
284
285#endif // CTCONNECTOR_H
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.