20 static const double Tmn = 182.56;
21 static const double Tmx = 1000.0;
22 static const double Tc=537.68;
23 static const double Roc=197.60;
24 static const double To=300;
25 static const double R=82.99504;
26 static const double Gamma=9.611604E-6;
27 static const double u0=3.4058439E5;
28 static const double s0=1.1080254E3;
29 static const double Tp=400;
30 static const double Pc=2.6199E6;
31 static const double M=100.20;
34 static const double Ahept[]= {
48 static const double F[]= {
60 static const double D[]= {
70 static const double G[]= {
79 double 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;
101 double Heptane::Cprime(
int j,
double T2inverse,
double T3inverse,
double T4inverse)
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;
121 double Heptane::I(
int j,
double ergho,
double Gamma)
127 return Rho * Rho / 2;
129 return pow(Rho, 5.0)/ 5;
131 return 1 / Gamma - (Gamma * Rho * Rho + 2) * ergho / (2 * Gamma);
137 double Heptane::H(
int i,
double egrho)
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);
206 double Heptane::Psat()
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;
221 double Heptane::ldens()
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);
238 double Heptane::Tcrit()
242 double Heptane::Pcrit()
246 double Heptane::Vcrit()
250 double Heptane::Tmin()
254 double Heptane::Tmax()
258 double Heptane::MolWt()
Base class for exceptions thrown by Cantera classes.
Contains declarations for string manipulation functions within Cantera.
Namespace for the Cantera kernel.