Cantera  3.2.0a5
Loading...
Searching...
No Matches
cttrans.h
Go to the documentation of this file.
1/**
2 * CTTRANS - Generated CLib %Cantera interface library.
3 *
4 * @file cttrans.h
5 *
6 * Generated CLib API for %Cantera's Transport 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 CTTRANS_H
25#define CTTRANS_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 CAPIcttrans cttrans Library
35 * Generated CLib API for %Cantera's Transport 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 CAPIcttrans
45 * @{
46 */
47
48 /**
49 * Identifies the model represented by this Transport object.
50 *
51 * Wraps C++ getter: `virtual string Transport::transportModel()`
52 *
53 * @param handle Handle to queried Transport 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 trans_transportModel(int32_t handle, int32_t bufLen, char* buf);
59
60 /**
61 * Get the dynamic viscosity [Pa·s].
62 *
63 * Wraps C++ getter: `virtual double Transport::viscosity()`
64 *
65 * @param handle Handle to queried Transport object.
66 */
67 double trans_viscosity(int32_t handle);
68
69 /**
70 * Get the mixture thermal conductivity [W/m/K].
71 *
72 * Wraps C++ getter: `virtual double Transport::thermalConductivity()`
73 *
74 * @param handle Handle to queried Transport object.
75 */
76 double trans_thermalConductivity(int32_t handle);
77
78 /**
79 * Get the electrical conductivity [siemens/m].
80 *
81 * Wraps C++ getter: `virtual double Transport::electricalConductivity()`
82 *
83 * @param handle Handle to queried Transport object.
84 */
85 double trans_electricalConductivity(int32_t handle);
86
87 /**
88 * Return a vector of thermal diffusion coefficients [kg/m/s].
89 *
90 * Wraps C++ getter: `virtual void Transport::getThermalDiffCoeffs(double* const)`
91 *
92 * @param handle Handle to queried Transport object.
93 * @param[in] dtLen Length of array reserved for dt.
94 * @param dt On return, dt will contain the species thermal diffusion coefficients. Dimension dt at least as large as the number of species.
95 */
96 int32_t trans_getThermalDiffCoeffs(int32_t handle, int32_t dtLen, double* dt);
97
98 /**
99 * Return a vector of mixture averaged diffusion coefficients [m²/s].
100 *
101 * Wraps C++ getter: `virtual void Transport::getMixDiffCoeffs(double* const)`
102 *
103 * @param handle Handle to queried Transport object.
104 * @param[in] dLen Length of array reserved for d.
105 * @param d Return vector of mixture averaged diffusion coefficients; length is the number of species.
106 */
107 int32_t trans_getMixDiffCoeffs(int32_t handle, int32_t dLen, double* d);
108
109 /**
110 * Returns the matrix of binary diffusion coefficients [m²/s].
111 *
112 * Wraps C++ method: `virtual void Transport::getBinaryDiffCoeffs(const size_t, double* const)`
113 *
114 * @param handle Handle to queried Transport object.
115 * @param[in] ld Leading dimension of the flattened array `d` used to store the diffusion coefficient matrix; usually equal to the number of species.
116 * @param[in] dLen Length of array reserved for d.
117 * @param[out] d Diffusion coefficient matrix stored in column-major (Fortran) order, such that
118 */
119 int32_t trans_getBinaryDiffCoeffs(int32_t handle, const int32_t ld, int32_t dLen, double* d);
120
121 /**
122 * Return the multicomponent diffusion coefficients [m²/s].
123 *
124 * Wraps C++ method: `virtual void Transport::getMultiDiffCoeffs(const size_t, double* const)`
125 *
126 * @param handle Handle to queried Transport object.
127 * @param[in] ld Leading dimension of the flattened array `d` used to store the diffusion coefficient matrix; usually equal to the number of species.
128 * @param[in] dLen Length of array reserved for d.
129 * @param[out] d Diffusion coefficient matrix stored in column-major (Fortran) order, such that
130 */
131 int32_t trans_getMultiDiffCoeffs(int32_t handle, const int32_t ld, int32_t dLen, double* d);
132
133 /**
134 * Get the molar fluxes [kmol/m²/s], given the thermodynamic state at two nearby points.
135 *
136 * Wraps C++ method: `virtual void Transport::getMolarFluxes(const double* const, const double* const, const double, double* const)`
137 *
138 * @param handle Handle to queried Transport object.
139 * @param[in] state1Len Length of array reserved for state1.
140 * @param[in] state1 Array of temperature, density, and mass fractions for state 1.
141 * @param[in] state2Len Length of array reserved for state2.
142 * @param[in] state2 Array of temperature, density, and mass fractions for state 2.
143 * @param[in] delta Distance [m] from state 1 to state 2.
144 * @param[in] cfluxesLen Length of array reserved for cfluxes.
145 * @param[out] cfluxes Array containing the diffusive molar fluxes of species from `state1` to `state2`; Length is number of species.
146 */
147 int32_t trans_getMolarFluxes(int32_t handle, int32_t state1Len, const double* state1, int32_t state2Len, const double* state2, const double delta, int32_t cfluxesLen, double* cfluxes);
148
149 /**
150 * Get the mass fluxes [kg/m²/s], given the thermodynamic state at two nearby points.
151 *
152 * Wraps C++ method: `virtual void Transport::getMassFluxes(const double*, const double*, double, double*)`
153 *
154 * @param handle Handle to queried Transport object.
155 * @param[in] state1Len Length of array reserved for state1.
156 * @param[in] state1 Array of temperature, density, and mass fractions for state 1.
157 * @param[in] state2Len Length of array reserved for state2.
158 * @param[in] state2 Array of temperature, density, and mass fractions for state 2.
159 * @param[in] delta Distance [m] from state 1 to state 2.
160 * @param[in] mfluxesLen Length of array reserved for mfluxes.
161 * @param[out] mfluxes Array containing the diffusive mass fluxes of species from `state1` to `state2`; length is number of species.
162 */
163 int32_t trans_getMassFluxes(int32_t handle, int32_t state1Len, const double* state1, int32_t state2Len, const double* state2, double delta, int32_t mfluxesLen, double* mfluxes);
164
165 /**
166 * Delete Transport object.
167 *
168 * Wraps C++ destructor: `undefined`
169 *
170 * @param handle Handle to Transport object.
171 * @returns Zero for success and -1 for exception handling.
172 */
173 int32_t trans_del(int32_t handle);
174
175 /**
176 * Return size of Transport storage.
177 *
178 * Wraps C++ reserved CLib function: `custom code`
179 *
180 * @returns Size or -1 for exception handling.
181 */
182 int32_t trans_cabinetSize();
183
184 /**
185 * @}
186 */
187
188#ifdef __cplusplus
189}
190#endif
191
192#endif // CTTRANS_H
int32_t trans_getMultiDiffCoeffs(int32_t handle, const int32_t ld, int32_t dLen, double *d)
Return the multicomponent diffusion coefficients [m²/s].
Definition cttrans.cpp:116
double trans_viscosity(int32_t handle)
Get the dynamic viscosity [Pa·s].
Definition cttrans.cpp:49
double trans_electricalConductivity(int32_t handle)
Get the electrical conductivity [siemens/m].
Definition cttrans.cpp:69
int32_t trans_transportModel(int32_t handle, int32_t bufLen, char *buf)
Identifies the model represented by this Transport object.
Definition cttrans.cpp:37
int32_t trans_getBinaryDiffCoeffs(int32_t handle, const int32_t ld, int32_t dLen, double *d)
Returns the matrix of binary diffusion coefficients [m²/s].
Definition cttrans.cpp:105
int32_t trans_getThermalDiffCoeffs(int32_t handle, int32_t dtLen, double *dt)
Return a vector of thermal diffusion coefficients [kg/m/s].
Definition cttrans.cpp:79
int32_t trans_getMassFluxes(int32_t handle, int32_t state1Len, const double *state1, int32_t state2Len, const double *state2, double delta, int32_t mfluxesLen, double *mfluxes)
Get the mass fluxes [kg/m²/s], given the thermodynamic state at two nearby points.
Definition cttrans.cpp:138
int32_t trans_getMixDiffCoeffs(int32_t handle, int32_t dLen, double *d)
Return a vector of mixture averaged diffusion coefficients [m²/s].
Definition cttrans.cpp:92
int32_t trans_del(int32_t handle)
Delete Transport object.
Definition cttrans.cpp:149
int32_t trans_getMolarFluxes(int32_t handle, int32_t state1Len, const double *state1, int32_t state2Len, const double *state2, const double delta, int32_t cfluxesLen, double *cfluxes)
Get the molar fluxes [kmol/m²/s], given the thermodynamic state at two nearby points.
Definition cttrans.cpp:127
double trans_thermalConductivity(int32_t handle)
Get the mixture thermal conductivity [W/m/K].
Definition cttrans.cpp:59
int32_t trans_cabinetSize()
Return size of Transport storage.
Definition cttrans.cpp:160