20static const double Tmn = 182.56;
21static const double Tmx = 1000.0;
22static const double Tc=537.68;
23static const double Roc=197.60;
24static const double To=300;
25static const double R=82.99504;
26static const double Gamma=9.611604E-6;
27static const double u0=3.4058439E5;
28static const double s0=1.1080254E3;
29static const double Tp=400;
30static const double Pc=2.6199E6;
31static const double M=100.20;
34static const double Ahept[]= {
48static const double F[]= {
60static const double D[]= {
70static const double G[]= {
79double Heptane::C(
int j,
double Tinverse,
double T2inverse,
double T3inverse,
double T4inverse)
83 return Ahept[0] * R * T -
85 Ahept[2] * T2inverse +
86 Ahept[3] * T3inverse -
89 return Ahept[5] * R * T -
93 return Ahept[9] * (Ahept[6] + Ahept[7] * Tinverse);
95 return Ahept[8] * T2inverse;
105 return Ahept[0] * R -
106 -2 * Ahept[2] * T3inverse +
107 -3 * Ahept[3] * T4inverse -
108 -4 * Ahept[4] * pow(T, -5.0);
110 return Ahept[5] * R -
111 -1 * Ahept[7] * T2inverse;
113 return Ahept[9] * (-1 * Ahept[7] * T2inverse);
115 return -2 * Ahept[8] * T3inverse;
127 return Rho * Rho / 2;
129 return pow(Rho, 5.0)/ 5;
131 return 1 / Gamma - (Gamma * Rho * Rho + 2) * ergho / (2 * Gamma);
144 return pow(Rho,3) * (1 + Gamma * Rho * Rho) * egrho;
152 double Tinverse = 1.0/T;
153 double T2inverse = pow(T, -2);
154 double T3inverse = pow(T, -3);
155 double T4inverse = pow(T, -4);
156 double egrho = exp(-Gamma*Rho*Rho);
160 for (i=1; i<=5; i++) {
161 sum += G[i]*(pow(T,i) - pow(To,i))/
double(i);
163 sum += G[0]*log(T/To);
164 for (i=0; i<=6; i++) {
165 sum += (
C(i, Tinverse, T2inverse, T3inverse, T4inverse) - T*
Cprime(i,T2inverse, T3inverse, T4inverse))*
I(i,egrho, Gamma);
168 return sum + m_energy_offset;
173 double T2inverse = pow(T, -2);
174 double T3inverse = pow(T, -3);
175 double T4inverse = pow(T, -4);
176 double egrho = exp(-Gamma*Rho*Rho);
179 for (
int i=2; i<=5; i++) {
180 sum += G[i]*(pow(T,i-1) - pow(To,i-1))/
double(i-1);
182 sum += G[1]*log(T/To);
183 sum -= G[0]*(1.0/T - 1.0/To);
184 for (
int i=0; i<=6; i++) {
185 sum -=
Cprime(i,T2inverse, T3inverse, T4inverse)*
I(i,egrho, Gamma);
187 sum += s0 - R*log(Rho);
188 return sum + m_entropy_offset;
193 double Tinverse = pow(T,-1);
194 double T2inverse = pow(T, -2);
195 double T3inverse = pow(T, -3);
196 double T4inverse = pow(T, -4);
197 double egrho = exp(-Gamma*Rho*Rho);
200 for (
int i=0; i<=3; i++) {
201 P +=
C(i,Tinverse, T2inverse, T3inverse, T4inverse)*
H(i,egrho);
209 if ((T < Tmn) || (T > Tc)) {
211 "Temperature out of range. T = {}", T);
213 for (
int i=1; i<=8; i++) {
214 sum += F[i-1] * pow((T/Tp -1),
double(i-1));
217 log = ((Tc/T)-1)*sum;
223 double xx=1-(T/Tc), sum=0;
224 if ((T < Tmn) || (T > Tc)) {
226 "Temperature out of range. T = {}", T);
228 for (
int i=1; i<=6; i++) {
229 sum+=D[i-1]*pow(xx,
double(i-1)/3.0);
Base class for exceptions thrown by Cantera classes.
double Vcrit()
Critical specific volume [m^3/kg].
double Tmax()
Maximum temperature for which the equation of state is valid.
double Tmin()
Minimum temperature for which the equation of state is valid.
double MolWt()
Molecular weight [kg/kmol].
double I(int i, double, double)
double sp()
Entropy. See Reynolds eqn (16) section 2.
double Tcrit()
Critical temperature [K].
double H(int i, double egrho)
double C(int jm, double, double, double, double)
double Pp()
Pressure. Equation P-2 in Reynolds.
double Pcrit()
Critical pressure [Pa].
double Psat()
Pressure at Saturation. Equation S-2 in Reynolds.
double ldens()
liquid density. Equation D2 in Reynolds.
double Cprime(int i, double, double, double)
derivative of C(i)
Namespace for the Cantera kernel.
Contains declarations for string manipulation functions within Cantera.