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