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