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