Cantera  3.2.0a2
Loading...
Searching...
No Matches
interfaces/clib/include/cantera_clib/ctreactor.h
Go to the documentation of this file.
1/**
2 * CTREACTOR - Generated CLib %Cantera interface library.
3 *
4 * @file ctreactor.h
5 *
6 * Generated CLib API for %Cantera's ReactorBase 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 CTREACTOR_H
25#define CTREACTOR_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31 /**
32 * @defgroup CAPIctreactor ctreactor Library
33 * Generated CLib API for %Cantera's ReactorBase 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 CAPIctreactor
43 * @{
44 */
45
46 /**
47 * Create a ReactorBase object of the specified type and contents.
48 *
49 * Wraps C++ constructor: `shared_ptr<ReactorBase> newReactorBase(const string&, shared_ptr<Solution>, const string&)`
50 *
51 * @param model Undocumented.
52 * @param contents Integer handle to Solution object. Undocumented.
53 * @param name Undocumented.
54 * @returns Handle to stored ReactorBase object or -1 for exception handling.
55 */
56 int32_t reactor_new(const char* model, int32_t contents, const char* name);
57
58 /**
59 * String indicating the reactor model implemented.
60 *
61 * Wraps C++ getter: `virtual string ReactorBase::type()`
62 *
63 * @param handle Handle to queried ReactorBase object.
64 * @param[in] bufLen Length of reserved array.
65 * @param[out] buf Returned string value.
66 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
67 */
68 int32_t reactor_type(int32_t handle, int32_t bufLen, char* buf);
69
70 /**
71 * Return the name of this reactor.
72 *
73 * Wraps C++ getter: `string ReactorBase::name()`
74 *
75 * @param handle Handle to queried ReactorBase object.
76 * @param[in] bufLen Length of reserved array.
77 * @param[out] buf Returned string value.
78 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
79 */
80 int32_t reactor_name(int32_t handle, int32_t bufLen, char* buf);
81
82 /**
83 * Set the name of this reactor.
84 *
85 * Wraps C++ setter: `void ReactorBase::setName(const string&)`
86 *
87 * @param handle Handle to queried ReactorBase object.
88 * @param name Undocumented.
89 */
90 int32_t reactor_setName(int32_t handle, const char* name);
91
92 /**
93 * Set the initial reactor volume.
94 *
95 * Wraps C++ setter: `virtual void ReactorBase::setInitialVolume(double)`
96 *
97 * @param handle Handle to queried ReactorBase object.
98 * @param vol Undocumented.
99 */
100 int32_t reactor_setInitialVolume(int32_t handle, double vol);
101
102 /**
103 * Enable or disable changes in reactor composition due to chemical reactions.
104 *
105 * Wraps C++ setter: `virtual void ReactorBase::setChemistry(bool)`
106 *
107 * @param handle Handle to queried ReactorBase object.
108 * @param cflag Undocumented.
109 */
110 int32_t reactor_setChemistry(int32_t handle, int32_t cflag);
111
112 /**
113 * Set the energy equation on or off.
114 *
115 * Wraps C++ setter: `virtual void ReactorBase::setEnergy(int)`
116 *
117 * @param handle Handle to queried ReactorBase object.
118 * @param eflag Undocumented.
119 */
120 int32_t reactor_setEnergy(int32_t handle, int32_t eflag);
121
122 /**
123 * Returns the mass (kg) of the reactor's contents.
124 *
125 * Wraps C++ getter: `double ReactorBase::mass()`
126 *
127 * @param handle Handle to queried ReactorBase object.
128 */
129 double reactor_mass(int32_t handle);
130
131 /**
132 * Returns the current volume (m^3) of the reactor.
133 *
134 * Wraps C++ getter: `double ReactorBase::volume()`
135 *
136 * @param handle Handle to queried ReactorBase object.
137 */
138 double reactor_volume(int32_t handle);
139
140 /**
141 * Returns the current density (kg/m^3) of the reactor's contents.
142 *
143 * Wraps C++ getter: `double ReactorBase::density()`
144 *
145 * @param handle Handle to queried ReactorBase object.
146 */
147 double reactor_density(int32_t handle);
148
149 /**
150 * Returns the current temperature (K) of the reactor's contents.
151 *
152 * Wraps C++ getter: `double ReactorBase::temperature()`
153 *
154 * @param handle Handle to queried ReactorBase object.
155 */
156 double reactor_temperature(int32_t handle);
157
158 /**
159 * Returns the current enthalpy (J/kg) of the reactor's contents.
160 *
161 * Wraps C++ getter: `double ReactorBase::enthalpy_mass()`
162 *
163 * @param handle Handle to queried ReactorBase object.
164 */
165 double reactor_enthalpy_mass(int32_t handle);
166
167 /**
168 * Returns the current internal energy (J/kg) of the reactor's contents.
169 *
170 * Wraps C++ getter: `double ReactorBase::intEnergy_mass()`
171 *
172 * @param handle Handle to queried ReactorBase object.
173 */
174 double reactor_intEnergy_mass(int32_t handle);
175
176 /**
177 * Returns the current pressure (Pa) of the reactor.
178 *
179 * Wraps C++ getter: `double ReactorBase::pressure()`
180 *
181 * @param handle Handle to queried ReactorBase object.
182 */
183 double reactor_pressure(int32_t handle);
184
185 /**
186 * Return the mass fraction of the
187 *
188 * Wraps C++ method: `double ReactorBase::massFraction(size_t)`
189 *
190 * @param handle Handle to queried ReactorBase object.
191 * @param k Undocumented.
192 */
193 double reactor_massFraction(int32_t handle, int32_t k);
194
195 /**
196 * Number of sensitivity parameters associated with this reactor.
197 *
198 * Wraps C++ getter: `virtual size_t ReactorBase::nSensParams()`
199 *
200 * @param handle Handle to queried ReactorBase object.
201 */
202 int32_t reactor_nSensParams(int32_t handle);
203
204 /**
205 * Add a sensitivity parameter associated with the reaction number
206 *
207 * Wraps C++ setter: `virtual void ReactorBase::addSensitivityReaction(size_t)`
208 *
209 * @param handle Handle to queried ReactorBase object.
210 * @param rxn Undocumented.
211 */
212 int32_t reactor_addSensitivityReaction(int32_t handle, int32_t rxn);
213
214 /**
215 * Add a ReactorSurface object to a Reactor object.
216 *
217 * Wraps C++ setter: `void ReactorBase::addSurface(shared_ptr<ReactorBase>)`
218 *
219 * @param handle Handle to queried ReactorBase object.
220 * @param surf Integer handle to ReactorBase object. Undocumented.
221 */
222 int32_t reactor_addSurface(int32_t handle, int32_t surf);
223
224 /**
225 * Set the mass flow rate through the reactor [kg/s].
226 *
227 * Wraps C++ setter: `void FlowReactor::setMassFlowRate(double)`
228 *
229 * @param handle Handle to queried FlowReactor object.
230 * @param mdot Undocumented.
231 */
232 int32_t reactor_setMassFlowRate(int32_t handle, double mdot);
233
234 /**
235 * The cross-sectional area of the reactor [m^2].
236 *
237 * Wraps C++ getter: `double FlowReactor::area()`
238 *
239 * @param handle Handle to queried FlowReactor object.
240 */
241 double reactor_area(int32_t handle);
242
243 /**
244 * Sets the area of the reactor [m^2].
245 *
246 * Wraps C++ setter: `void FlowReactor::setArea(double)`
247 *
248 * @param handle Handle to queried FlowReactor object.
249 * @param area Undocumented.
250 */
251 int32_t reactor_setArea(int32_t handle, double area);
252
253 /**
254 * Delete ReactorBase object.
255 *
256 * Wraps C++ destructor: `undefined`
257 *
258 * @param handle Handle to ReactorBase object.
259 * @returns Zero for success and -1 for exception handling.
260 */
261 int32_t reactor_del(int32_t handle);
262
263 /**
264 * Return size of ReactorBase storage.
265 *
266 * Wraps C++ reserved CLib function: `custom code`
267 *
268 * @returns Size or -1 for exception handling.
269 */
270 int32_t reactor_cabinetSize();
271
272 /**
273 * Return handle to parent of ReactorBase object.
274 *
275 * Wraps C++ reserved CLib function: `custom code`
276 *
277 * @param handle Handle to queried ReactorBase object.
278 * @returns Parent handle or -1 for exception handling.
279 */
280 int32_t reactor_parentHandle(int32_t handle);
281
282 /**
283 * @}
284 */
285
286#ifdef __cplusplus
287}
288#endif
289
290#endif // CTREACTOR_H
int32_t reactor_nSensParams(int32_t handle)
Number of sensitivity parameters associated with this reactor.
double reactor_volume(int32_t handle)
Returns the current volume (m^3) of the reactor.
int32_t reactor_parentHandle(int32_t handle)
Return handle to parent of ReactorBase object.
int32_t reactor_setName(int32_t handle, const char *name)
Set the name of this reactor.
Definition ctreactor.cpp:76
int32_t reactor_del(int32_t handle)
Delete ReactorBase object.
double reactor_enthalpy_mass(int32_t handle)
Returns the current enthalpy (J/kg) of the reactor's contents.
double reactor_pressure(int32_t handle)
Returns the current pressure (Pa) of the reactor.
int32_t reactor_addSurface(int32_t handle, int32_t surf)
Add a ReactorSurface object to a Reactor object.
double reactor_mass(int32_t handle)
Returns the mass (kg) of the reactor's contents.
int32_t reactor_setArea(int32_t handle, double area)
Sets the area of the reactor [m^2].
int32_t reactor_new(const char *model, int32_t contents, const char *name)
Create a ReactorBase object of the specified type and contents.
Definition ctreactor.cpp:42
int32_t reactor_setMassFlowRate(int32_t handle, double mdot)
Set the mass flow rate through the reactor [kg/s].
double reactor_area(int32_t handle)
The cross-sectional area of the reactor [m^2].
int32_t reactor_setEnergy(int32_t handle, int32_t eflag)
Set the energy equation on or off.
int32_t reactor_setInitialVolume(int32_t handle, double vol)
Set the initial reactor volume.
Definition ctreactor.cpp:87
double reactor_temperature(int32_t handle)
Returns the current temperature (K) of the reactor's contents.
int32_t reactor_setChemistry(int32_t handle, int32_t cflag)
Enable or disable changes in reactor composition due to chemical reactions.
Definition ctreactor.cpp:98
double reactor_massFraction(int32_t handle, int32_t k)
Return the mass fraction of the.
double reactor_intEnergy_mass(int32_t handle)
Returns the current internal energy (J/kg) of the reactor's contents.
int32_t reactor_addSensitivityReaction(int32_t handle, int32_t rxn)
Add a sensitivity parameter associated with the reaction number.
double reactor_density(int32_t handle)
Returns the current density (kg/m^3) of the reactor's contents.
int32_t reactor_type(int32_t handle, int32_t bufLen, char *buf)
String indicating the reactor model implemented.
Definition ctreactor.cpp:52
int32_t reactor_name(int32_t handle, int32_t bufLen, char *buf)
Return the name of this reactor.
Definition ctreactor.cpp:64
int32_t reactor_cabinetSize()
Return size of ReactorBase storage.