Cantera  3.2.0a5
Loading...
Searching...
No Matches
ctthermo.h
Go to the documentation of this file.
1/**
2 * CTTHERMO - Generated CLib %Cantera interface library.
3 *
4 * @file ctthermo.h
5 *
6 * Generated CLib API for %Cantera's ThermoPhase 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 CTTHERMO_H
25#define CTTHERMO_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 CAPIctthermo ctthermo Library
35 * Generated CLib API for %Cantera's ThermoPhase 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 CAPIctthermo
45 * @{
46 */
47
48 /**
49 * Return the name of the phase.
50 *
51 * Wraps C++ getter: `string Phase::name()`
52 *
53 * @param handle Handle to queried Phase object.
54 * @param[in] bufLen Length of reserved array.
55 * @param[out] buf Returned string value.
56 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
57 */
58 int32_t thermo_name(int32_t handle, int32_t bufLen, char* buf);
59
60 /**
61 * Sets the string name for the phase.
62 *
63 * Wraps C++ setter: `void Phase::setName(const string&)`
64 *
65 * @param handle Handle to queried Phase object.
66 * @param nm String name of the phase
67 */
68 int32_t thermo_setName(int32_t handle, const char* nm);
69
70 /**
71 * String indicating the thermodynamic model implemented.
72 *
73 * Wraps C++ getter: `string ThermoPhase::type()`
74 *
75 * @param handle Handle to queried ThermoPhase 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 thermo_type(int32_t handle, int32_t bufLen, char* buf);
81
82 /**
83 * Number of elements.
84 *
85 * Wraps C++ getter: `size_t Phase::nElements()`
86 *
87 * @param handle Handle to queried Phase object.
88 */
89 int32_t thermo_nElements(int32_t handle);
90
91 /**
92 * Returns the number of species in the phase.
93 *
94 * Wraps C++ getter: `size_t Phase::nSpecies()`
95 *
96 * @param handle Handle to queried Phase object.
97 */
98 int32_t thermo_nSpecies(int32_t handle);
99
100 /**
101 * Temperature (K).
102 *
103 * Wraps C++ getter: `double Phase::temperature()`
104 *
105 * @param handle Handle to queried Phase object.
106 */
107 double thermo_temperature(int32_t handle);
108
109 /**
110 * Set the internally stored temperature of the phase (K).
111 *
112 * Wraps C++ setter: `virtual void Phase::setTemperature(double)`
113 *
114 * @param handle Handle to queried Phase object.
115 * @param temp Temperature in Kelvin
116 */
117 int32_t thermo_setTemperature(int32_t handle, double temp);
118
119 /**
120 * Return the thermodynamic pressure (Pa).
121 *
122 * Wraps C++ getter: `virtual double Phase::pressure()`
123 *
124 * @param handle Handle to queried Phase object.
125 */
126 double thermo_pressure(int32_t handle);
127
128 /**
129 * Set the internally stored pressure (Pa) at constant temperature and composition.
130 *
131 * Wraps C++ setter: `virtual void Phase::setPressure(double)`
132 *
133 * @param handle Handle to queried Phase object.
134 * @param p input Pressure (Pa)
135 */
136 int32_t thermo_setPressure(int32_t handle, double p);
137
138 /**
139 * Density (kg/m^3).
140 *
141 * Wraps C++ getter: `virtual double Phase::density()`
142 *
143 * @param handle Handle to queried Phase object.
144 */
145 double thermo_density(int32_t handle);
146
147 /**
148 * Set the internally stored density (kg/m^3) of the phase.
149 *
150 * Wraps C++ setter: `virtual void Phase::setDensity(const double)`
151 *
152 * @param handle Handle to queried Phase object.
153 * @param[in] density_ density (kg/m^3).
154 */
155 int32_t thermo_setDensity(int32_t handle, const double density_);
156
157 /**
158 * Molar density (kmol/m^3).
159 *
160 * Wraps C++ getter: `virtual double Phase::molarDensity()`
161 *
162 * @param handle Handle to queried Phase object.
163 */
164 double thermo_molarDensity(int32_t handle);
165
166 /**
167 * The mean molecular weight. Units: (kg/kmol)
168 *
169 * Wraps C++ getter: `double Phase::meanMolecularWeight()`
170 *
171 * @param handle Handle to queried Phase object.
172 */
173 double thermo_meanMolecularWeight(int32_t handle);
174
175 /**
176 * Return the mole fraction of a single species.
177 *
178 * Wraps C++ method: `double Phase::moleFraction(size_t)`
179 *
180 * @param handle Handle to queried Phase object.
181 * @param k species index
182 */
183 double thermo_moleFraction(int32_t handle, int32_t k);
184
185 /**
186 * Return the mass fraction of a single species.
187 *
188 * Wraps C++ method: `double Phase::massFraction(size_t)`
189 *
190 * @param handle Handle to queried Phase object.
191 * @param k species index
192 */
193 double thermo_massFraction(int32_t handle, int32_t k);
194
195 /**
196 * Get the species mole fraction vector.
197 *
198 * Wraps C++ getter: `void Phase::getMoleFractions(double* const)`
199 *
200 * Uses:
201 * - `size_t Phase::nSpecies()`
202 *
203 * @param handle Handle to queried Phase object.
204 * @param[in] xLen Length of array reserved for x.
205 * @param x On return, x contains the mole fractions. Must have a length greater than or equal to the number of species.
206 */
207 int32_t thermo_getMoleFractions(int32_t handle, int32_t xLen, double* x);
208
209 /**
210 * Get the species mass fractions.
211 *
212 * Wraps C++ getter: `void Phase::getMassFractions(double* const)`
213 *
214 * Uses:
215 * - `size_t Phase::nSpecies()`
216 *
217 * @param handle Handle to queried Phase object.
218 * @param[in] yLen Length of array reserved for y.
219 * @param[out] y Array of mass fractions, length nSpecies()
220 */
221 int32_t thermo_getMassFractions(int32_t handle, int32_t yLen, double* y);
222
223 /**
224 * Set the mole fractions to the specified values.
225 *
226 * Wraps C++ setter: `virtual void Phase::setMoleFractions(const double* const)`
227 *
228 * Uses:
229 * - `size_t Phase::nSpecies()`
230 *
231 * @param handle Handle to queried Phase object.
232 * @param[in] xLen Length of array reserved for x.
233 * @param x Array of unnormalized mole fraction values (input). Must have a length greater than or equal to the number of species, m_kk.
234 */
235 int32_t thermo_setMoleFractions(int32_t handle, int32_t xLen, const double* x);
236
237 /**
238 * Set the mass fractions to the specified values and normalize them.
239 *
240 * Wraps C++ setter: `virtual void Phase::setMassFractions(const double* const)`
241 *
242 * Uses:
243 * - `size_t Phase::nSpecies()`
244 *
245 * @param handle Handle to queried Phase object.
246 * @param[in] yLen Length of array reserved for y.
247 * @param[in] y Array of unnormalized mass fraction values. Length must be greater than or equal to the number of species. The Phase object will normalize this vector before storing its contents.
248 */
249 int32_t thermo_setMassFractions(int32_t handle, int32_t yLen, const double* y);
250
251 /**
252 * Set the mole fractions of a group of species by name.
253 *
254 * Wraps C++ setter: `void Phase::setMoleFractionsByName(const string&)`
255 *
256 * @param handle Handle to queried Phase object.
257 * @param x string x in the form of a composition map
258 */
259 int32_t thermo_setMoleFractionsByName(int32_t handle, const char* x);
260
261 /**
262 * Set the species mass fractions by name.
263 *
264 * Wraps C++ setter: `void Phase::setMassFractionsByName(const string&)`
265 *
266 * @param handle Handle to queried Phase object.
267 * @param x String containing a composition map
268 */
269 int32_t thermo_setMassFractionsByName(int32_t handle, const char* x);
270
271 /**
272 * Return a read-only reference to the vector of atomic weights.
273 *
274 * Wraps C++ getter: `const vector<double>& Phase::atomicWeights()`
275 *
276 * Uses:
277 * - `size_t Phase::nElements()`
278 *
279 * @param handle Handle to queried Phase object.
280 * @param[in] bufLen Length of reserved array.
281 * @param[out] buf Returned array value.
282 * @returns Actual length of value array or -1 for exception handling.
283 */
284 int32_t thermo_atomicWeights(int32_t handle, int32_t bufLen, double* buf);
285
286 /**
287 * Copy the vector of molecular weights into array weights.
288 *
289 * Wraps C++ getter: `void Phase::getMolecularWeights(double*)`
290 *
291 * Uses:
292 * - `size_t Phase::nSpecies()`
293 *
294 * @param handle Handle to queried Phase object.
295 * @param[in] weightsLen Length of array reserved for weights.
296 * @param weights Output array of molecular weights (kg/kmol)
297 */
298 int32_t thermo_getMolecularWeights(int32_t handle, int32_t weightsLen, double* weights);
299
300 /**
301 * Copy the vector of species charges into array charges.
302 *
303 * Wraps C++ getter: `void Phase::getCharges(double*)`
304 *
305 * Uses:
306 * - `size_t Phase::nElements()`
307 *
308 * @param handle Handle to queried Phase object.
309 * @param[in] chargesLen Length of array reserved for charges.
310 * @param charges Output array of species charges (elem. charge)
311 */
312 int32_t thermo_getCharges(int32_t handle, int32_t chargesLen, double* charges);
313
314 /**
315 * Name of the element with index m.
316 *
317 * Wraps C++ method: `string Phase::elementName(size_t)`
318 *
319 * @param handle Handle to queried Phase object.
320 * @param m Element index.
321 * @param[in] bufLen Length of reserved array.
322 * @param[out] buf Returned string value.
323 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
324 */
325 int32_t thermo_elementName(int32_t handle, int32_t m, int32_t bufLen, char* buf);
326
327 /**
328 * Name of the species with index k.
329 *
330 * Wraps C++ method: `string Phase::speciesName(size_t)`
331 *
332 * @param handle Handle to queried Phase object.
333 * @param k index of the species
334 * @param[in] bufLen Length of reserved array.
335 * @param[out] buf Returned string value.
336 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
337 */
338 int32_t thermo_speciesName(int32_t handle, int32_t k, int32_t bufLen, char* buf);
339
340 /**
341 * Return the index of element named 'name'.
342 *
343 * Wraps C++ method: `custom code`
344 *
345 * Uses:
346 * - ` elementIndex(const string&, bool)`
347 *
348 * @param handle Handle to queried Phase object.
349 * @param name Name of the element
350 */
351 int32_t thermo_elementIndex(int32_t handle, const char* name);
352
353 /**
354 * Returns the index of a species named 'name' within the Phase object.
355 *
356 * Wraps C++ method: `custom code`
357 *
358 * Uses:
359 * - ` speciesIndex(const string&, bool)`
360 *
361 * @param handle Handle to queried Phase object.
362 * @param name String name of the species. It may also be in the form phaseName:speciesName
363 */
364 int32_t thermo_speciesIndex(int32_t handle, const char* name);
365
366 /**
367 * Number of atoms of element `m` in species `k`.
368 *
369 * Wraps C++ method: `double Phase::nAtoms(size_t, size_t)`
370 *
371 * @param handle Handle to queried Phase object.
372 * @param k species index
373 * @param m element index
374 */
375 double thermo_nAtoms(int32_t handle, int32_t k, int32_t m);
376
377 /**
378 * Add an element.
379 *
380 * Wraps C++ method: `size_t Phase::addElement(const string&, double, int, double, int)`
381 *
382 * @param handle Handle to queried Phase object.
383 * @param symbol Atomic symbol string.
384 * @param weight Atomic mass in amu.
385 * @param atomicNumber Atomic number of the element (unitless)
386 * @param entropy298 Entropy of the element at 298 K and 1 bar in its most stable form. The default is the value ENTROPY298_UNKNOWN, which is interpreted as an unknown, and if used will cause Cantera to throw an error.
387 * @param elem_type Specifies the type of the element constraint equation. This defaults to CT_ELEM_TYPE_ABSPOS, that is, an element.
388 */
389 int32_t thermo_addElement(int32_t handle, const char* symbol, double weight, int32_t atomicNumber, double entropy298, int32_t elem_type);
390
391 /**
392 * Returns the reference pressure in Pa.
393 *
394 * Wraps C++ getter: `virtual double ThermoPhase::refPressure()`
395 *
396 * @param handle Handle to queried ThermoPhase object.
397 */
398 double thermo_refPressure(int32_t handle);
399
400 /**
401 * Minimum temperature for which the thermodynamic data for the species or phase are valid.
402 *
403 * Wraps C++ method: `virtual double ThermoPhase::minTemp(size_t)`
404 *
405 * @param handle Handle to queried ThermoPhase object.
406 * @param k index of the species. Default is -1, which will return the max of the min value over all species.
407 */
408 double thermo_minTemp(int32_t handle, int32_t k);
409
410 /**
411 * Maximum temperature for which the thermodynamic data for the species are valid.
412 *
413 * Wraps C++ method: `virtual double ThermoPhase::maxTemp(size_t)`
414 *
415 * @param handle Handle to queried ThermoPhase object.
416 * @param k index of the species. Default is -1, which will return the min of the max value over all species.
417 */
418 double thermo_maxTemp(int32_t handle, int32_t k);
419
420 /**
421 * Molar enthalpy. Units: J/kmol.
422 *
423 * Wraps C++ getter: `virtual double ThermoPhase::enthalpy_mole()`
424 *
425 * @param handle Handle to queried ThermoPhase object.
426 */
427 double thermo_enthalpy_mole(int32_t handle);
428
429 /**
430 * Specific enthalpy. Units: J/kg.
431 *
432 * Wraps C++ getter: `double ThermoPhase::enthalpy_mass()`
433 *
434 * @param handle Handle to queried ThermoPhase object.
435 */
436 double thermo_enthalpy_mass(int32_t handle);
437
438 /**
439 * Molar entropy. Units: J/kmol/K.
440 *
441 * Wraps C++ getter: `virtual double ThermoPhase::entropy_mole()`
442 *
443 * @param handle Handle to queried ThermoPhase object.
444 */
445 double thermo_entropy_mole(int32_t handle);
446
447 /**
448 * Specific entropy. Units: J/kg/K.
449 *
450 * Wraps C++ getter: `double ThermoPhase::entropy_mass()`
451 *
452 * @param handle Handle to queried ThermoPhase object.
453 */
454 double thermo_entropy_mass(int32_t handle);
455
456 /**
457 * Molar internal energy. Units: J/kmol.
458 *
459 * Wraps C++ getter: `virtual double ThermoPhase::intEnergy_mole()`
460 *
461 * @param handle Handle to queried ThermoPhase object.
462 */
463 double thermo_intEnergy_mole(int32_t handle);
464
465 /**
466 * Specific internal energy. Units: J/kg.
467 *
468 * Wraps C++ getter: `double ThermoPhase::intEnergy_mass()`
469 *
470 * @param handle Handle to queried ThermoPhase object.
471 */
472 double thermo_intEnergy_mass(int32_t handle);
473
474 /**
475 * Molar Gibbs function. Units: J/kmol.
476 *
477 * Wraps C++ getter: `virtual double ThermoPhase::gibbs_mole()`
478 *
479 * @param handle Handle to queried ThermoPhase object.
480 */
481 double thermo_gibbs_mole(int32_t handle);
482
483 /**
484 * Specific Gibbs function. Units: J/kg.
485 *
486 * Wraps C++ getter: `double ThermoPhase::gibbs_mass()`
487 *
488 * @param handle Handle to queried ThermoPhase object.
489 */
490 double thermo_gibbs_mass(int32_t handle);
491
492 /**
493 * Molar heat capacity at constant pressure. Units: J/kmol/K.
494 *
495 * Wraps C++ getter: `virtual double ThermoPhase::cp_mole()`
496 *
497 * @param handle Handle to queried ThermoPhase object.
498 */
499 double thermo_cp_mole(int32_t handle);
500
501 /**
502 * Specific heat at constant pressure. Units: J/kg/K.
503 *
504 * Wraps C++ getter: `double ThermoPhase::cp_mass()`
505 *
506 * @param handle Handle to queried ThermoPhase object.
507 */
508 double thermo_cp_mass(int32_t handle);
509
510 /**
511 * Molar heat capacity at constant volume. Units: J/kmol/K.
512 *
513 * Wraps C++ getter: `virtual double ThermoPhase::cv_mole()`
514 *
515 * @param handle Handle to queried ThermoPhase object.
516 */
517 double thermo_cv_mole(int32_t handle);
518
519 /**
520 * Specific heat at constant volume. Units: J/kg/K.
521 *
522 * Wraps C++ getter: `double ThermoPhase::cv_mass()`
523 *
524 * @param handle Handle to queried ThermoPhase object.
525 */
526 double thermo_cv_mass(int32_t handle);
527
528 /**
529 * Get the species chemical potentials. Units: J/kmol.
530 *
531 * Wraps C++ getter: `virtual void ThermoPhase::getChemPotentials(double*)`
532 *
533 * @param handle Handle to queried ThermoPhase object.
534 * @param[in] muLen Length of array reserved for mu.
535 * @param mu Output vector of species chemical potentials. Length: m_kk. Units: J/kmol
536 */
537 int32_t thermo_getChemPotentials(int32_t handle, int32_t muLen, double* mu);
538
539 /**
540 * Get the species electrochemical potentials.
541 *
542 * Wraps C++ getter: `void ThermoPhase::getElectrochemPotentials(double*)`
543 *
544 * @param handle Handle to queried ThermoPhase object.
545 * @param[in] muLen Length of array reserved for mu.
546 * @param mu Output vector of species electrochemical potentials. Length: m_kk. Units: J/kmol
547 */
548 int32_t thermo_getElectrochemPotentials(int32_t handle, int32_t muLen, double* mu);
549
550 /**
551 * Returns the electric potential of this phase (V).
552 *
553 * Wraps C++ getter: `double ThermoPhase::electricPotential()`
554 *
555 * @param handle Handle to queried ThermoPhase object.
556 */
557 double thermo_electricPotential(int32_t handle);
558
559 /**
560 * Set the electric potential of this phase (V).
561 *
562 * Wraps C++ setter: `void ThermoPhase::setElectricPotential(double)`
563 *
564 * @param handle Handle to queried ThermoPhase object.
565 * @param v Input value of the electric potential in Volts
566 */
567 int32_t thermo_setElectricPotential(int32_t handle, double v);
568
569 /**
570 * Return the volumetric thermal expansion coefficient. Units: 1/K.
571 *
572 * Wraps C++ getter: `virtual double ThermoPhase::thermalExpansionCoeff()`
573 *
574 * @param handle Handle to queried ThermoPhase object.
575 */
576 double thermo_thermalExpansionCoeff(int32_t handle);
577
578 /**
579 * Returns the isothermal compressibility. Units: 1/Pa.
580 *
581 * Wraps C++ getter: `virtual double ThermoPhase::isothermalCompressibility()`
582 *
583 * @param handle Handle to queried ThermoPhase object.
584 */
585 double thermo_isothermalCompressibility(int32_t handle);
586
587 /**
588 * Returns an array of partial molar enthalpies for the species in the mixture.
589 *
590 * Wraps C++ getter: `virtual void ThermoPhase::getPartialMolarEnthalpies(double*)`
591 *
592 * @param handle Handle to queried ThermoPhase object.
593 * @param[in] hbarLen Length of array reserved for hbar.
594 * @param hbar Output vector of species partial molar enthalpies. Length: m_kk. units are J/kmol.
595 */
596 int32_t thermo_getPartialMolarEnthalpies(int32_t handle, int32_t hbarLen, double* hbar);
597
598 /**
599 * Returns an array of partial molar entropies of the species in the solution.
600 *
601 * Wraps C++ getter: `virtual void ThermoPhase::getPartialMolarEntropies(double*)`
602 *
603 * @param handle Handle to queried ThermoPhase object.
604 * @param[in] sbarLen Length of array reserved for sbar.
605 * @param sbar Output vector of species partial molar entropies. Length = m_kk. units are J/kmol/K.
606 */
607 int32_t thermo_getPartialMolarEntropies(int32_t handle, int32_t sbarLen, double* sbar);
608
609 /**
610 * Return an array of partial molar internal energies for the species in the mixture.
611 *
612 * Wraps C++ getter: `virtual void ThermoPhase::getPartialMolarIntEnergies(double*)`
613 *
614 * @param handle Handle to queried ThermoPhase object.
615 * @param[in] ubarLen Length of array reserved for ubar.
616 * @param ubar Output vector of species partial molar internal energies. Length = m_kk. units are J/kmol.
617 */
618 int32_t thermo_getPartialMolarIntEnergies(int32_t handle, int32_t ubarLen, double* ubar);
619
620 /**
621 * Return an array of partial molar heat capacities for the species in the mixture.
622 *
623 * Wraps C++ getter: `virtual void ThermoPhase::getPartialMolarCp(double*)`
624 *
625 * @param handle Handle to queried ThermoPhase object.
626 * @param[in] cpbarLen Length of array reserved for cpbar.
627 * @param cpbar Output vector of species partial molar heat capacities at constant pressure. Length = m_kk. units are J/kmol/K.
628 */
629 int32_t thermo_getPartialMolarCp(int32_t handle, int32_t cpbarLen, double* cpbar);
630
631 /**
632 * Return an array of partial molar volumes for the species in the mixture.
633 *
634 * Wraps C++ getter: `virtual void ThermoPhase::getPartialMolarVolumes(double*)`
635 *
636 * @param handle Handle to queried ThermoPhase object.
637 * @param[in] vbarLen Length of array reserved for vbar.
638 * @param vbar Output vector of species partial molar volumes. Length = m_kk. units are m^3/kmol.
639 */
640 int32_t thermo_getPartialMolarVolumes(int32_t handle, int32_t vbarLen, double* vbar);
641
642 /**
643 * Set the temperature (K), pressure (Pa), and mole fractions.
644 *
645 * Wraps C++ method: `virtual void ThermoPhase::setState_TPX(double, double, const double*)`
646 *
647 * @param handle Handle to queried ThermoPhase object.
648 * @param t Temperature (K)
649 * @param p Pressure (Pa)
650 * @param[in] xLen Length of array reserved for x.
651 * @param x Vector of mole fractions. Length is equal to m_kk.
652 */
653 int32_t thermo_setState_TPX(int32_t handle, double t, double p, int32_t xLen, const double* x);
654
655 /**
656 * Set the temperature (K), pressure (Pa), and mole fractions.
657 *
658 * Wraps C++ method: `virtual void ThermoPhase::setState_TPX(double, double, const string&)`
659 *
660 * @param handle Handle to queried ThermoPhase object.
661 * @param t Temperature (K)
662 * @param p Pressure (Pa)
663 * @param x String containing a composition map of the mole fractions. Species not in the composition map are assumed to have zero mole fraction
664 */
665 int32_t thermo_setState_TPX_byName(int32_t handle, double t, double p, const char* x);
666
667 /**
668 * Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
669 *
670 * Wraps C++ method: `virtual void ThermoPhase::setState_TPY(double, double, const double*)`
671 *
672 * @param handle Handle to queried ThermoPhase object.
673 * @param t Temperature (K)
674 * @param p Pressure (Pa)
675 * @param[in] yLen Length of array reserved for y.
676 * @param y Vector of mass fractions. Length is equal to m_kk.
677 */
678 int32_t thermo_setState_TPY(int32_t handle, double t, double p, int32_t yLen, const double* y);
679
680 /**
681 * Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
682 *
683 * Wraps C++ method: `virtual void ThermoPhase::setState_TPY(double, double, const string&)`
684 *
685 * @param handle Handle to queried ThermoPhase object.
686 * @param t Temperature (K)
687 * @param p Pressure (Pa)
688 * @param y String containing a composition map of the mass fractions. Species not in the composition map are assumed to have zero mass fraction
689 */
690 int32_t thermo_setState_TPY_byName(int32_t handle, double t, double p, const char* y);
691
692 /**
693 * Set the temperature (K) and pressure (Pa)
694 *
695 * Wraps C++ method: `virtual void ThermoPhase::setState_TP(double, double)`
696 *
697 * @param handle Handle to queried ThermoPhase object.
698 * @param t Temperature (K)
699 * @param p Pressure (Pa)
700 */
701 int32_t thermo_setState_TP(int32_t handle, double t, double p);
702
703 /**
704 * Set the internally stored temperature (K) and density (kg/m^3)
705 *
706 * Wraps C++ method: `void Phase::setState_TD(double, double)`
707 *
708 * @param handle Handle to queried Phase object.
709 * @param t Temperature in kelvin
710 * @param rho Density (kg/m^3)
711 */
712 int32_t thermo_setState_TD(int32_t handle, double t, double rho);
713
714 /**
715 * Set the density (kg/m**3) and pressure (Pa) at constant composition.
716 *
717 * Wraps C++ method: `virtual void ThermoPhase::setState_DP(double, double)`
718 *
719 * @param handle Handle to queried ThermoPhase object.
720 * @param rho Density (kg/m^3)
721 * @param p Pressure (Pa)
722 */
723 int32_t thermo_setState_DP(int32_t handle, double rho, double p);
724
725 /**
726 * Set the internally stored specific enthalpy (J/kg) and pressure (Pa) of the phase.
727 *
728 * Wraps C++ method: `virtual void ThermoPhase::setState_HP(double, double)`
729 *
730 * @param handle Handle to queried ThermoPhase object.
731 * @param h Specific enthalpy (J/kg)
732 * @param p Pressure (Pa)
733 */
734 int32_t thermo_setState_HP(int32_t handle, double h, double p);
735
736 /**
737 * Set the specific internal energy (J/kg) and specific volume (m^3/kg).
738 *
739 * Wraps C++ method: `virtual void ThermoPhase::setState_UV(double, double)`
740 *
741 * @param handle Handle to queried ThermoPhase object.
742 * @param u specific internal energy (J/kg)
743 * @param v specific volume (m^3/kg).
744 */
745 int32_t thermo_setState_UV(int32_t handle, double u, double v);
746
747 /**
748 * Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
749 *
750 * Wraps C++ method: `virtual void ThermoPhase::setState_SV(double, double)`
751 *
752 * @param handle Handle to queried ThermoPhase object.
753 * @param s specific entropy (J/kg/K)
754 * @param v specific volume (m^3/kg).
755 */
756 int32_t thermo_setState_SV(int32_t handle, double s, double v);
757
758 /**
759 * Set the specific entropy (J/kg/K) and pressure (Pa).
760 *
761 * Wraps C++ method: `virtual void ThermoPhase::setState_SP(double, double)`
762 *
763 * @param handle Handle to queried ThermoPhase object.
764 * @param s specific entropy (J/kg/K)
765 * @param p specific pressure (Pa).
766 */
767 int32_t thermo_setState_SP(int32_t handle, double s, double p);
768
769 /**
770 * Set the specific entropy (J/kg/K) and temperature (K).
771 *
772 * Wraps C++ method: `virtual void ThermoPhase::setState_ST(double, double)`
773 *
774 * @param handle Handle to queried ThermoPhase object.
775 * @param s specific entropy (J/kg/K)
776 * @param t temperature (K)
777 */
778 int32_t thermo_setState_ST(int32_t handle, double s, double t);
779
780 /**
781 * Set the temperature (K) and specific volume (m^3/kg).
782 *
783 * Wraps C++ method: `virtual void ThermoPhase::setState_TV(double, double)`
784 *
785 * @param handle Handle to queried ThermoPhase object.
786 * @param t temperature (K)
787 * @param v specific volume (m^3/kg)
788 */
789 int32_t thermo_setState_TV(int32_t handle, double t, double v);
790
791 /**
792 * Set the pressure (Pa) and specific volume (m^3/kg).
793 *
794 * Wraps C++ method: `virtual void ThermoPhase::setState_PV(double, double)`
795 *
796 * @param handle Handle to queried ThermoPhase object.
797 * @param p pressure (Pa)
798 * @param v specific volume (m^3/kg)
799 */
800 int32_t thermo_setState_PV(int32_t handle, double p, double v);
801
802 /**
803 * Set the specific internal energy (J/kg) and pressure (Pa).
804 *
805 * Wraps C++ method: `virtual void ThermoPhase::setState_UP(double, double)`
806 *
807 * @param handle Handle to queried ThermoPhase object.
808 * @param u specific internal energy (J/kg)
809 * @param p pressure (Pa)
810 */
811 int32_t thermo_setState_UP(int32_t handle, double u, double p);
812
813 /**
814 * Set the specific volume (m^3/kg) and the specific enthalpy (J/kg)
815 *
816 * Wraps C++ method: `virtual void ThermoPhase::setState_VH(double, double)`
817 *
818 * @param handle Handle to queried ThermoPhase object.
819 * @param v specific volume (m^3/kg)
820 * @param h specific enthalpy (J/kg)
821 */
822 int32_t thermo_setState_VH(int32_t handle, double v, double h);
823
824 /**
825 * Set the temperature (K) and the specific enthalpy (J/kg)
826 *
827 * Wraps C++ method: `virtual void ThermoPhase::setState_TH(double, double)`
828 *
829 * @param handle Handle to queried ThermoPhase object.
830 * @param t temperature (K)
831 * @param h specific enthalpy (J/kg)
832 */
833 int32_t thermo_setState_TH(int32_t handle, double t, double h);
834
835 /**
836 * Set the specific entropy (J/kg/K) and the specific enthalpy (J/kg)
837 *
838 * Wraps C++ method: `virtual void ThermoPhase::setState_SH(double, double)`
839 *
840 * @param handle Handle to queried ThermoPhase object.
841 * @param s specific entropy (J/kg/K)
842 * @param h specific enthalpy (J/kg)
843 */
844 int32_t thermo_setState_SH(int32_t handle, double s, double h);
845
846 /**
847 * Equilibrate a ThermoPhase object.
848 *
849 * Wraps C++ method: `void ThermoPhase::equilibrate(const string&, const string&, double, int, int, int)`
850 *
851 * @param handle Handle to queried ThermoPhase object.
852 * @param XY String representation of what two properties are being held constant
853 * @param solver Name of the solver to be used to equilibrate the phase. If solver = 'element_potential', the ChemEquil element potential solver will be used. If solver = 'vcs', the VCS solver will be used. If solver = 'gibbs', the MultiPhaseEquil solver will be used. If solver = 'auto', the solvers will be tried in order if the initial solver(s) fail.
854 * @param rtol Relative tolerance
855 * @param max_steps Maximum number of steps to take to find the solution
856 * @param max_iter For the 'gibbs' and 'vcs' solvers, this is the maximum number of outer temperature or pressure iterations to take when T and/or P is not held fixed.
857 * @param estimate_equil For MultiPhaseEquil solver, an integer indicating whether the solver should estimate its own initial condition. If 0, the initial mole fraction vector in the ThermoPhase object is used as the initial condition. If 1, the initial mole fraction vector is used if the element abundances are satisfied. If -1, the initial mole fraction vector is thrown out, and an estimate is formulated.
858 */
859 int32_t thermo_equilibrate(int32_t handle, const char* XY, const char* solver, double rtol, int32_t max_steps, int32_t max_iter, int32_t estimate_equil);
860
861 /**
862 * Critical temperature (K).
863 *
864 * Wraps C++ getter: `virtual double ThermoPhase::critTemperature()`
865 *
866 * @param handle Handle to queried ThermoPhase object.
867 */
868 double thermo_critTemperature(int32_t handle);
869
870 /**
871 * Critical pressure (Pa).
872 *
873 * Wraps C++ getter: `virtual double ThermoPhase::critPressure()`
874 *
875 * @param handle Handle to queried ThermoPhase object.
876 */
877 double thermo_critPressure(int32_t handle);
878
879 /**
880 * Critical density (kg/m3).
881 *
882 * Wraps C++ getter: `virtual double ThermoPhase::critDensity()`
883 *
884 * @param handle Handle to queried ThermoPhase object.
885 */
886 double thermo_critDensity(int32_t handle);
887
888 /**
889 * Return the fraction of vapor at the current conditions.
890 *
891 * Wraps C++ getter: `virtual double ThermoPhase::vaporFraction()`
892 *
893 * @param handle Handle to queried ThermoPhase object.
894 */
895 double thermo_vaporFraction(int32_t handle);
896
897 /**
898 * Return the saturation temperature given the pressure.
899 *
900 * Wraps C++ method: `virtual double ThermoPhase::satTemperature(double)`
901 *
902 * @param handle Handle to queried ThermoPhase object.
903 * @param p Pressure (Pa)
904 */
905 double thermo_satTemperature(int32_t handle, double p);
906
907 /**
908 * Return the saturation pressure given the temperature.
909 *
910 * Wraps C++ method: `virtual double ThermoPhase::satPressure(double)`
911 *
912 * @param handle Handle to queried ThermoPhase object.
913 * @param t Temperature (Kelvin)
914 */
915 double thermo_satPressure(int32_t handle, double t);
916
917 /**
918 * Set the state to a saturated system at a particular pressure.
919 *
920 * Wraps C++ method: `virtual void ThermoPhase::setState_Psat(double, double)`
921 *
922 * @param handle Handle to queried ThermoPhase object.
923 * @param p Pressure (Pa)
924 * @param x Fraction of vapor
925 */
926 int32_t thermo_setState_Psat(int32_t handle, double p, double x);
927
928 /**
929 * Set the state to a saturated system at a particular temperature.
930 *
931 * Wraps C++ method: `virtual void ThermoPhase::setState_Tsat(double, double)`
932 *
933 * @param handle Handle to queried ThermoPhase object.
934 * @param t Temperature (kelvin)
935 * @param x Fraction of vapor
936 */
937 int32_t thermo_setState_Tsat(int32_t handle, double t, double x);
938
939 /**
940 * Return a vector of surface coverages.
941 *
942 * Wraps C++ getter: `void SurfPhase::getCoverages(double*)`
943 *
944 * @param handle Handle to queried SurfPhase object.
945 * @param[in] thetaLen Length of array reserved for theta.
946 * @param theta Array theta must be at least as long as the number of species.
947 */
948 int32_t surf_getCoverages(int32_t handle, int32_t thetaLen, double* theta);
949
950 /**
951 * Set the surface site fractions to a specified state.
952 *
953 * Wraps C++ setter: `void SurfPhase::setCoverages(const double*)`
954 *
955 * @param handle Handle to queried SurfPhase object.
956 * @param[in] thetaLen Length of array reserved for theta.
957 * @param theta This is the surface site fraction for the kth species in the surface phase. This is a dimensionless quantity.
958 */
959 int32_t surf_setCoverages(int32_t handle, int32_t thetaLen, const double* theta);
960
961 /**
962 * Get the species concentrations (kmol/m^3).
963 *
964 * Wraps C++ getter: `virtual void Phase::getConcentrations(double* const)`
965 *
966 * @param handle Handle to queried Phase object.
967 * @param[in] cLen Length of array reserved for c.
968 * @param[out] c The vector of species concentrations. Units are kmol/m^3. The length of the vector must be greater than or equal to the number of species within the phase.
969 */
970 int32_t thermo_getConcentrations(int32_t handle, int32_t cLen, double* c);
971
972 /**
973 * Set the concentrations to the specified values within the phase.
974 *
975 * Wraps C++ setter: `virtual void Phase::setConcentrations(const double* const)`
976 *
977 * @param handle Handle to queried Phase object.
978 * @param[in] concLen Length of array reserved for conc.
979 * @param[in] conc Array of concentrations in dimensional units. For bulk phases c[k] is the concentration of the kth species in kmol/m3. For surface phases, c[k] is the concentration in kmol/m2. The length of the vector is the number of species in the phase.
980 */
981 int32_t thermo_setConcentrations(int32_t handle, int32_t concLen, const double* conc);
982
983 /**
984 * Returns the site density.
985 *
986 * Wraps C++ getter: `double SurfPhase::siteDensity()`
987 *
988 * @param handle Handle to queried SurfPhase object.
989 */
990 double surf_siteDensity(int32_t handle);
991
992 /**
993 * Set the site density of the surface phase (kmol m-2)
994 *
995 * Wraps C++ setter: `void SurfPhase::setSiteDensity(double)`
996 *
997 * @param handle Handle to queried SurfPhase object.
998 * @param n0 Site density of the surface phase (kmol m-2)
999 */
1000 int32_t surf_setSiteDensity(int32_t handle, double n0);
1001
1002 /**
1003 * Set the coverages from a string of colon-separated name:value pairs.
1004 *
1005 * Wraps C++ setter: `void SurfPhase::setCoveragesByName(const string&)`
1006 *
1007 * @param handle Handle to queried SurfPhase object.
1008 * @param cov String containing colon-separated name:value pairs
1009 */
1010 int32_t surf_setCoveragesByName(int32_t handle, const char* cov);
1011
1012 /**
1013 * Set the mixture composition according to the equivalence ratio.
1014 *
1015 * Wraps C++ method: `void ThermoPhase::setEquivalenceRatio(double, const string&, const string&)`
1016 *
1017 * @param handle Handle to queried ThermoPhase object.
1018 * @param phi equivalence ratio
1019 * @param fuelComp composition of the fuel
1020 * @param oxComp composition of the oxidizer
1021 */
1022 int32_t thermo_setEquivalenceRatio(int32_t handle, double phi, const char* fuelComp, const char* oxComp);
1023
1024 /**
1025 * returns a summary of the state of the phase as a string
1026 *
1027 * Wraps C++ method: `virtual string ThermoPhase::report(bool, double)`
1028 *
1029 * @param handle Handle to queried ThermoPhase object.
1030 * @param show_thermo If true, extra information is printed out about the thermodynamic state of the system.
1031 * @param threshold Show information about species with mole fractions greater than *threshold*.
1032 * @param[in] bufLen Length of reserved array.
1033 * @param[out] buf Returned string value.
1034 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
1035 */
1036 int32_t thermo_report(int32_t handle, int32_t show_thermo, double threshold, int32_t bufLen, char* buf);
1037
1038 /**
1039 * Print a summary of the state of the phase to the logger.
1040 *
1041 * Wraps C++ method: `custom code`
1042 *
1043 * Uses:
1044 * - `virtual string ThermoPhase::report(bool, double)`
1045 *
1046 * @param handle Handle to queried ThermoPhase object.
1047 * @param showThermo If true, extra information is printed out about the thermodynamic state of the system.
1048 * @param threshold Show information about species with mole fractions greater than
1049 * @returns Zero for success or -1 for exception handling.
1050 */
1051 int32_t thermo_print(int32_t handle, int32_t showThermo, double threshold);
1052
1053 /**
1054 * Delete ThermoPhase object.
1055 *
1056 * Wraps C++ destructor: `undefined`
1057 *
1058 * @param handle Handle to ThermoPhase object.
1059 * @returns Zero for success and -1 for exception handling.
1060 */
1061 int32_t thermo_del(int32_t handle);
1062
1063 /**
1064 * Return size of ThermoPhase storage.
1065 *
1066 * Wraps C++ reserved CLib function: `custom code`
1067 *
1068 * @returns Size or -1 for exception handling.
1069 */
1070 int32_t thermo_cabinetSize();
1071
1072 /**
1073 * @}
1074 */
1075
1076#ifdef __cplusplus
1077}
1078#endif
1079
1080#endif // CTTHERMO_H
double thermo_satTemperature(int32_t handle, double p)
Return the saturation temperature given the pressure.
Definition ctthermo.cpp:923
int32_t thermo_setState_VH(int32_t handle, double v, double h)
Set the specific volume (m^3/kg) and the specific enthalpy (J/kg)
Definition ctthermo.cpp:839
int32_t surf_setCoveragesByName(int32_t handle, const char *cov)
Set the coverages from a string of colon-separated name:value pairs.
int32_t thermo_speciesIndex(int32_t handle, const char *name)
Returns the index of a species named 'name' within the Phase object.
Definition ctthermo.cpp:360
int32_t thermo_speciesName(int32_t handle, int32_t k, int32_t bufLen, char *buf)
Name of the species with index k.
Definition ctthermo.cpp:336
double thermo_cv_mole(int32_t handle)
Molar heat capacity at constant volume.
Definition ctthermo.cpp:522
int32_t thermo_setState_TD(int32_t handle, double t, double rho)
Set the internally stored temperature (K) and density (kg/m^3)
Definition ctthermo.cpp:729
double thermo_intEnergy_mass(int32_t handle)
Specific internal energy.
Definition ctthermo.cpp:472
int32_t thermo_getConcentrations(int32_t handle, int32_t cLen, double *c)
Get the species concentrations (kmol/m^3).
Definition ctthermo.cpp:991
int32_t thermo_getMoleFractions(int32_t handle, int32_t xLen, double *x)
Get the species mole fraction vector.
Definition ctthermo.cpp:196
int32_t surf_setCoverages(int32_t handle, int32_t thetaLen, const double *theta)
Set the surface site fractions to a specified state.
Definition ctthermo.cpp:978
int32_t thermo_print(int32_t handle, int32_t showThermo, double threshold)
Print a summary of the state of the phase to the logger.
double thermo_cp_mass(int32_t handle)
Specific heat at constant pressure.
Definition ctthermo.cpp:512
int32_t thermo_setMassFractions(int32_t handle, int32_t yLen, const double *y)
Set the mass fractions to the specified values and normalize them.
Definition ctthermo.cpp:241
int32_t thermo_setState_ST(int32_t handle, double s, double t)
Set the specific entropy (J/kg/K) and temperature (K).
Definition ctthermo.cpp:795
int32_t thermo_setTemperature(int32_t handle, double temp)
Set the internally stored temperature of the phase (K).
Definition ctthermo.cpp:103
double thermo_maxTemp(int32_t handle, int32_t k)
Maximum temperature for which the thermodynamic data for the species are valid.
Definition ctthermo.cpp:412
double thermo_pressure(int32_t handle)
Return the thermodynamic pressure (Pa).
Definition ctthermo.cpp:114
double thermo_density(int32_t handle)
Density (kg/m^3).
Definition ctthermo.cpp:135
int32_t thermo_getElectrochemPotentials(int32_t handle, int32_t muLen, double *mu)
Get the species electrochemical potentials.
Definition ctthermo.cpp:555
double thermo_enthalpy_mole(int32_t handle)
Molar enthalpy.
Definition ctthermo.cpp:422
int32_t thermo_setState_SH(int32_t handle, double s, double h)
Set the specific entropy (J/kg/K) and the specific enthalpy (J/kg)
Definition ctthermo.cpp:861
int32_t thermo_setMoleFractionsByName(int32_t handle, const char *x)
Set the mole fractions of a group of species by name.
Definition ctthermo.cpp:256
double thermo_cv_mass(int32_t handle)
Specific heat at constant volume.
Definition ctthermo.cpp:532
int32_t thermo_report(int32_t handle, int32_t show_thermo, double threshold, int32_t bufLen, char *buf)
returns a summary of the state of the phase as a string
int32_t thermo_setState_TH(int32_t handle, double t, double h)
Set the temperature (K) and the specific enthalpy (J/kg)
Definition ctthermo.cpp:850
int32_t thermo_del(int32_t handle)
Delete ThermoPhase object.
int32_t thermo_setState_SP(int32_t handle, double s, double p)
Set the specific entropy (J/kg/K) and pressure (Pa).
Definition ctthermo.cpp:784
int32_t thermo_setState_TV(int32_t handle, double t, double v)
Set the temperature (K) and specific volume (m^3/kg).
Definition ctthermo.cpp:806
double thermo_vaporFraction(int32_t handle)
Return the fraction of vapor at the current conditions.
Definition ctthermo.cpp:913
int32_t thermo_addElement(int32_t handle, const char *symbol, double weight, int32_t atomicNumber, double entropy298, int32_t elem_type)
Add an element.
Definition ctthermo.cpp:382
int32_t thermo_getPartialMolarIntEnergies(int32_t handle, int32_t ubarLen, double *ubar)
Return an array of partial molar internal energies for the species in the mixture.
Definition ctthermo.cpp:635
double thermo_massFraction(int32_t handle, int32_t k)
Return the mass fraction of a single species.
Definition ctthermo.cpp:186
double thermo_gibbs_mole(int32_t handle)
Molar Gibbs function.
Definition ctthermo.cpp:482
int32_t surf_getCoverages(int32_t handle, int32_t thetaLen, double *theta)
Return a vector of surface coverages.
Definition ctthermo.cpp:965
int32_t thermo_setState_TPX_byName(int32_t handle, double t, double p, const char *x)
Set the temperature (K), pressure (Pa), and mole fractions.
Definition ctthermo.cpp:685
double thermo_critDensity(int32_t handle)
Critical density (kg/m3).
Definition ctthermo.cpp:903
int32_t thermo_nElements(int32_t handle)
Number of elements.
Definition ctthermo.cpp:73
double thermo_meanMolecularWeight(int32_t handle)
The mean molecular weight.
Definition ctthermo.cpp:166
int32_t thermo_setState_Tsat(int32_t handle, double t, double x)
Set the state to a saturated system at a particular temperature.
Definition ctthermo.cpp:954
int32_t thermo_setState_PV(int32_t handle, double p, double v)
Set the pressure (Pa) and specific volume (m^3/kg).
Definition ctthermo.cpp:817
double thermo_enthalpy_mass(int32_t handle)
Specific enthalpy.
Definition ctthermo.cpp:432
int32_t thermo_elementIndex(int32_t handle, const char *name)
Return the index of element named 'name'.
Definition ctthermo.cpp:348
int32_t thermo_type(int32_t handle, int32_t bufLen, char *buf)
String indicating the thermodynamic model implemented.
Definition ctthermo.cpp:61
int32_t thermo_nSpecies(int32_t handle)
Returns the number of species in the phase.
Definition ctthermo.cpp:83
double surf_siteDensity(int32_t handle)
Returns the site density.
double thermo_entropy_mass(int32_t handle)
Specific entropy.
Definition ctthermo.cpp:452
int32_t thermo_setName(int32_t handle, const char *nm)
Sets the string name for the phase.
Definition ctthermo.cpp:50
int32_t thermo_getCharges(int32_t handle, int32_t chargesLen, double *charges)
Copy the vector of species charges into array charges.
Definition ctthermo.cpp:309
int32_t thermo_setState_HP(int32_t handle, double h, double p)
Set the internally stored specific enthalpy (J/kg) and pressure (Pa) of the phase.
Definition ctthermo.cpp:751
int32_t thermo_setState_TPY(int32_t handle, double t, double p, int32_t yLen, const double *y)
Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
Definition ctthermo.cpp:696
int32_t thermo_equilibrate(int32_t handle, const char *XY, const char *solver, double rtol, int32_t max_steps, int32_t max_iter, int32_t estimate_equil)
Equilibrate a ThermoPhase object.
Definition ctthermo.cpp:872
double thermo_intEnergy_mole(int32_t handle)
Molar internal energy.
Definition ctthermo.cpp:462
double thermo_critTemperature(int32_t handle)
Critical temperature (K).
Definition ctthermo.cpp:883
int32_t thermo_name(int32_t handle, int32_t bufLen, char *buf)
Return the name of the phase.
Definition ctthermo.cpp:38
int32_t thermo_setState_TPX(int32_t handle, double t, double p, int32_t xLen, const double *x)
Set the temperature (K), pressure (Pa), and mole fractions.
Definition ctthermo.cpp:674
int32_t thermo_getChemPotentials(int32_t handle, int32_t muLen, double *mu)
Get the species chemical potentials.
Definition ctthermo.cpp:542
double thermo_electricPotential(int32_t handle)
Returns the electric potential of this phase (V).
Definition ctthermo.cpp:568
int32_t thermo_getPartialMolarEnthalpies(int32_t handle, int32_t hbarLen, double *hbar)
Returns an array of partial molar enthalpies for the species in the mixture.
Definition ctthermo.cpp:609
int32_t thermo_setState_Psat(int32_t handle, double p, double x)
Set the state to a saturated system at a particular pressure.
Definition ctthermo.cpp:943
double thermo_refPressure(int32_t handle)
Returns the reference pressure in Pa.
Definition ctthermo.cpp:392
int32_t thermo_cabinetSize()
Return size of ThermoPhase storage.
double thermo_isothermalCompressibility(int32_t handle)
Returns the isothermal compressibility.
Definition ctthermo.cpp:599
int32_t thermo_setPressure(int32_t handle, double p)
Set the internally stored pressure (Pa) at constant temperature and composition.
Definition ctthermo.cpp:124
double thermo_gibbs_mass(int32_t handle)
Specific Gibbs function.
Definition ctthermo.cpp:492
double thermo_moleFraction(int32_t handle, int32_t k)
Return the mole fraction of a single species.
Definition ctthermo.cpp:176
int32_t thermo_getPartialMolarCp(int32_t handle, int32_t cpbarLen, double *cpbar)
Return an array of partial molar heat capacities for the species in the mixture.
Definition ctthermo.cpp:648
int32_t thermo_setState_UP(int32_t handle, double u, double p)
Set the specific internal energy (J/kg) and pressure (Pa).
Definition ctthermo.cpp:828
double thermo_molarDensity(int32_t handle)
Molar density (kmol/m^3).
Definition ctthermo.cpp:156
double thermo_minTemp(int32_t handle, int32_t k)
Minimum temperature for which the thermodynamic data for the species or phase are valid.
Definition ctthermo.cpp:402
int32_t thermo_setEquivalenceRatio(int32_t handle, double phi, const char *fuelComp, const char *oxComp)
Set the mixture composition according to the equivalence ratio.
int32_t thermo_setMassFractionsByName(int32_t handle, const char *x)
Set the species mass fractions by name.
Definition ctthermo.cpp:267
double thermo_satPressure(int32_t handle, double t)
Return the saturation pressure given the temperature.
Definition ctthermo.cpp:933
int32_t thermo_getPartialMolarVolumes(int32_t handle, int32_t vbarLen, double *vbar)
Return an array of partial molar volumes for the species in the mixture.
Definition ctthermo.cpp:661
double thermo_thermalExpansionCoeff(int32_t handle)
Return the volumetric thermal expansion coefficient.
Definition ctthermo.cpp:589
int32_t thermo_setState_DP(int32_t handle, double rho, double p)
Set the density (kg/m**3) and pressure (Pa) at constant composition.
Definition ctthermo.cpp:740
int32_t thermo_setState_TP(int32_t handle, double t, double p)
Set the temperature (K) and pressure (Pa)
Definition ctthermo.cpp:718
double thermo_critPressure(int32_t handle)
Critical pressure (Pa).
Definition ctthermo.cpp:893
int32_t thermo_atomicWeights(int32_t handle, int32_t bufLen, double *buf)
Return a read-only reference to the vector of atomic weights.
Definition ctthermo.cpp:278
int32_t thermo_setState_TPY_byName(int32_t handle, double t, double p, const char *y)
Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
Definition ctthermo.cpp:707
int32_t thermo_setMoleFractions(int32_t handle, int32_t xLen, const double *x)
Set the mole fractions to the specified values.
Definition ctthermo.cpp:226
int32_t thermo_getMassFractions(int32_t handle, int32_t yLen, double *y)
Get the species mass fractions.
Definition ctthermo.cpp:211
int32_t thermo_elementName(int32_t handle, int32_t m, int32_t bufLen, char *buf)
Name of the element with index m.
Definition ctthermo.cpp:324
double thermo_temperature(int32_t handle)
Temperature (K).
Definition ctthermo.cpp:93
double thermo_cp_mole(int32_t handle)
Molar heat capacity at constant pressure.
Definition ctthermo.cpp:502
int32_t thermo_setDensity(int32_t handle, const double density_)
Set the internally stored density (kg/m^3) of the phase.
Definition ctthermo.cpp:145
int32_t thermo_getMolecularWeights(int32_t handle, int32_t weightsLen, double *weights)
Copy the vector of molecular weights into array weights.
Definition ctthermo.cpp:294
int32_t surf_setSiteDensity(int32_t handle, double n0)
Set the site density of the surface phase (kmol m-2)
int32_t thermo_getPartialMolarEntropies(int32_t handle, int32_t sbarLen, double *sbar)
Returns an array of partial molar entropies of the species in the solution.
Definition ctthermo.cpp:622
double thermo_entropy_mole(int32_t handle)
Molar entropy.
Definition ctthermo.cpp:442
int32_t thermo_setElectricPotential(int32_t handle, double v)
Set the electric potential of this phase (V).
Definition ctthermo.cpp:578
int32_t thermo_setState_UV(int32_t handle, double u, double v)
Set the specific internal energy (J/kg) and specific volume (m^3/kg).
Definition ctthermo.cpp:762
int32_t thermo_setConcentrations(int32_t handle, int32_t concLen, const double *conc)
Set the concentrations to the specified values within the phase.
int32_t thermo_setState_SV(int32_t handle, double s, double v)
Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
Definition ctthermo.cpp:773
double thermo_nAtoms(int32_t handle, int32_t k, int32_t m)
Number of atoms of element m in species k.
Definition ctthermo.cpp:372