Cantera  2.3.0
ct.h
Go to the documentation of this file.
1 /**
2  * @file ct.h
3  */
4 
5 // This file is part of Cantera. See License.txt in the top-level directory or
6 // at http://www.cantera.org/license.txt for license and copyright information.
7 
8 #ifndef CTC_CT_H
9 #define CTC_CT_H
10 
11 #include "clib_defs.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17  CANTERA_CAPI int ct_appdelete();
18 
19  CANTERA_CAPI int thermo_newFromXML(int mxml);
20  CANTERA_CAPI int thermo_del(int n);
21  CANTERA_CAPI size_t thermo_nElements(int n);
22  CANTERA_CAPI size_t thermo_nSpecies(int n);
23  CANTERA_CAPI double thermo_temperature(int n);
24  CANTERA_CAPI int thermo_setTemperature(int n, double t);
25  CANTERA_CAPI double thermo_density(int n);
26  CANTERA_CAPI int thermo_setDensity(int n, double rho);
27  CANTERA_CAPI double thermo_molarDensity(int n);
28  CANTERA_CAPI int thermo_setMolarDensity(int n, double ndens);
29  CANTERA_CAPI double thermo_meanMolecularWeight(int n);
30  CANTERA_CAPI double thermo_moleFraction(int n, size_t k);
31  CANTERA_CAPI double thermo_massFraction(int n, size_t k);
32  CANTERA_CAPI int thermo_getMoleFractions(int n, size_t lenx, double* x);
33  CANTERA_CAPI int thermo_getMassFractions(int n, size_t leny, double* y);
34  CANTERA_CAPI int thermo_setMoleFractions(int n, size_t lenx,
35  double* x, int norm);
36  CANTERA_CAPI int thermo_setMassFractions(int n, size_t leny,
37  double* y, int norm);
38  CANTERA_CAPI int thermo_setMoleFractionsByName(int n, const char* x);
39  CANTERA_CAPI int thermo_setMassFractionsByName(int n, const char* y);
40  CANTERA_CAPI int thermo_getAtomicWeights(int n, size_t lenm, double* atw);
41  CANTERA_CAPI int thermo_getMolecularWeights(int n, size_t lenm, double* mw);
42  CANTERA_CAPI int thermo_getElementName(int n, size_t k, size_t lennm, char* nm);
43  CANTERA_CAPI int thermo_getSpeciesName(int n, size_t m, size_t lennm, char* nm);
44  CANTERA_CAPI int thermo_getName(int n, size_t lennm, char* nm);
45  CANTERA_CAPI int thermo_setName(int n, const char* nm);
46  CANTERA_CAPI size_t thermo_elementIndex(int n, const char* nm);
47  CANTERA_CAPI size_t thermo_speciesIndex(int n, const char* nm);
48  CANTERA_CAPI int thermo_report(int nth,
49  int ibuf, char* buf, int show_thermo);
50  CANTERA_CAPI int thermo_print(int nth, int show_thermo, double threshold);
51  CANTERA_CAPI double thermo_nAtoms(int n, size_t k, size_t m);
52  CANTERA_CAPI int thermo_addElement(int n, const char* name, double weight);
53  CANTERA_CAPI int thermo_eosType(int n);
54  CANTERA_CAPI double thermo_refPressure(int n);
55  CANTERA_CAPI double thermo_minTemp(int n, int k);
56  CANTERA_CAPI double thermo_maxTemp(int n, int k);
57  CANTERA_CAPI double thermo_enthalpy_mole(int n);
58  CANTERA_CAPI double thermo_intEnergy_mole(int n);
59  CANTERA_CAPI double thermo_entropy_mole(int n);
60  CANTERA_CAPI double thermo_gibbs_mole(int n);
61  CANTERA_CAPI double thermo_cp_mole(int n);
62  CANTERA_CAPI double thermo_cv_mole(int n);
63  CANTERA_CAPI double thermo_pressure(int n);
64  CANTERA_CAPI int thermo_setPressure(int n, double p);
65  CANTERA_CAPI double thermo_enthalpy_mass(int n);
66  CANTERA_CAPI double thermo_intEnergy_mass(int n);
67  CANTERA_CAPI double thermo_entropy_mass(int n);
68  CANTERA_CAPI double thermo_gibbs_mass(int n);
69  CANTERA_CAPI double thermo_cp_mass(int n);
70  CANTERA_CAPI double thermo_cv_mass(int n);
71  CANTERA_CAPI double thermo_electricPotential(int n);
72  CANTERA_CAPI double thermo_thermalExpansionCoeff(int n);
73  CANTERA_CAPI double thermo_isothermalCompressibility(int n);
74  CANTERA_CAPI int thermo_chemPotentials(int n, size_t lenm, double* murt);
75  CANTERA_CAPI int thermo_elementPotentials(int n, size_t lenm, double* lambda);
76  CANTERA_CAPI int thermo_getEnthalpies_RT(int n, size_t lenm, double* h_rt);
77  CANTERA_CAPI int thermo_getEntropies_R(int n, size_t lenm, double* s_r);
78  CANTERA_CAPI int thermo_getCp_R(int n, size_t lenm, double* cp_r);
79  CANTERA_CAPI int thermo_setElectricPotential(int n, double v);
80  CANTERA_CAPI int thermo_set_RP(int n, double* vals);
81  CANTERA_CAPI int thermo_set_HP(int n, double* vals);
82  CANTERA_CAPI int thermo_set_UV(int n, double* vals);
83  CANTERA_CAPI int thermo_set_SV(int n, double* vals);
84  CANTERA_CAPI int thermo_set_SP(int n, double* vals);
85  CANTERA_CAPI int thermo_set_ST(int n, double* vals);
86  CANTERA_CAPI int thermo_set_TV(int n, double* vals);
87  CANTERA_CAPI int thermo_set_PV(int n, double* vals);
88  CANTERA_CAPI int thermo_set_UP(int n, double* vals);
89  CANTERA_CAPI int thermo_set_VH(int n, double* vals);
90  CANTERA_CAPI int thermo_set_TH(int n, double* vals);
91  CANTERA_CAPI int thermo_set_SH(int n, double* vals);
92  CANTERA_CAPI int thermo_equilibrate(int n, const char* XY, int solver,
93  double rtol, int maxsteps, int maxiter,
94  int loglevel);
95 
96  CANTERA_CAPI double thermo_critTemperature(int n);
97  CANTERA_CAPI double thermo_critPressure(int n);
98  CANTERA_CAPI double thermo_critDensity(int n);
99  CANTERA_CAPI double thermo_vaporFraction(int n);
100  CANTERA_CAPI double thermo_satTemperature(int n, double p);
101  CANTERA_CAPI double thermo_satPressure(int n, double t);
102  CANTERA_CAPI int thermo_setState_Psat(int n, double p, double x);
103  CANTERA_CAPI int thermo_setState_Tsat(int n, double t, double x);
104 
105  CANTERA_CAPI size_t kin_newFromXML(int mxml, int iphase,
106  int neighbor1, int neighbor2, int neighbor3,
107  int neighbor4);
108  CANTERA_CAPI int kin_del(int n);
109  CANTERA_CAPI size_t kin_nSpecies(int n);
110  CANTERA_CAPI size_t kin_nReactions(int n);
111  CANTERA_CAPI size_t kin_nPhases(int n);
112  CANTERA_CAPI size_t kin_phaseIndex(int n, const char* ph);
113  CANTERA_CAPI size_t kin_reactionPhaseIndex(int n);
114  CANTERA_CAPI double kin_reactantStoichCoeff(int n, int i, int k);
115  CANTERA_CAPI double kin_productStoichCoeff(int n, int i, int k);
116  CANTERA_CAPI int kin_reactionType(int n, int i);
117  CANTERA_CAPI int kin_getFwdRatesOfProgress(int n, size_t len, double* fwdROP);
118  CANTERA_CAPI int kin_getRevRatesOfProgress(int n, size_t len, double* revROP);
119  CANTERA_CAPI int kin_getNetRatesOfProgress(int n, size_t len, double* netROP);
120  CANTERA_CAPI int kin_getEquilibriumConstants(int n, size_t len, double* kc);
121 
122  CANTERA_CAPI int kin_getFwdRateConstants(int n, size_t len, double* kfwd);
123  CANTERA_CAPI int kin_getRevRateConstants(int n, int doIrreversible, size_t len, double* krev);
124  CANTERA_CAPI int kin_getDelta(int n, int job, size_t len, double* delta);
125  CANTERA_CAPI int kin_getCreationRates(int n, size_t len, double* cdot);
126  CANTERA_CAPI int kin_getDestructionRates(int n, size_t len, double* ddot);
127  CANTERA_CAPI int kin_getNetProductionRates(int n, size_t len, double* wdot);
128  CANTERA_CAPI int kin_getSourceTerms(int n, size_t len, double* ydot);
129  CANTERA_CAPI double kin_multiplier(int n, int i);
130  CANTERA_CAPI int kin_getReactionString(int n, int i, int len, char* buf);
131  CANTERA_CAPI int kin_setMultiplier(int n, int i, double v);
132 
133  CANTERA_CAPI int kin_isReversible(int n, int i);
134  CANTERA_CAPI int kin_type(int n);
135  CANTERA_CAPI size_t kin_start(int n, int p);
136  CANTERA_CAPI size_t kin_speciesIndex(int n, const char* nm, const char* ph);
137  CANTERA_CAPI int kin_advanceCoverages(int n, double tstep);
138  CANTERA_CAPI size_t kin_phase(int n, size_t i);
139 
140  CANTERA_CAPI size_t trans_new(const char* model, int th, int loglevel);
141  CANTERA_CAPI int trans_del(int n);
142  CANTERA_CAPI double trans_viscosity(int n);
143  CANTERA_CAPI double trans_electricalConductivity(int n);
144  CANTERA_CAPI double trans_thermalConductivity(int n);
145  CANTERA_CAPI int trans_getThermalDiffCoeffs(int n, int ldt, double* dt);
146  CANTERA_CAPI int trans_getMixDiffCoeffs(int n, int ld, double* d);
147  CANTERA_CAPI int trans_getBinDiffCoeffs(int n, int ld, double* d);
148  CANTERA_CAPI int trans_getMultiDiffCoeffs(int n, int ld, double* d);
149  CANTERA_CAPI int trans_setParameters(int n, int type, int k, double* d);
150  CANTERA_CAPI int trans_getMolarFluxes(int n, const double* state1,
151  const double* state2, double delta, double* fluxes);
152  CANTERA_CAPI int trans_getMassFluxes(int n, const double* state1,
153  const double* state2, double delta, double* fluxes);
154 
155  CANTERA_CAPI int ct_getCanteraError(int buflen, char* buf);
156  CANTERA_CAPI int ct_setLogWriter(void* logger);
157  CANTERA_CAPI int ct_addCanteraDirectory(size_t buflen, const char* buf);
158  CANTERA_CAPI int ct_getDataDirectories(int buflen, char* buf, const char* sep);
159  CANTERA_CAPI int ct_getCanteraVersion(int buflen, char* buf);
160  CANTERA_CAPI int ct_suppress_thermo_warnings(int suppress);
161  CANTERA_CAPI int ct_clearStorage();
162 
163  CANTERA_CAPI int ct_ck2cti(const char* in_file, const char* db_file,
164  const char* tr_file, const char* id_tag,
165  int debug, int validate);
166 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #endif