12 #define _CRTDBG_MAP_ALLOC
13 #define _CRT_SECURE_NO_WARNINGS
36 static const double n[]={
61 static const double d[]={
86 static const double t[]={
111 static const double c[]={
136 static const double a0[]={
144 static const double t0[]={
153 std::vector<double> a0_v(a0,a0+
sizeof(a0)/
sizeof(
double));
154 std::vector<double> t0_v(t0,t0+
sizeof(t0)/
sizeof(
double));
170 params.molemass = 17.03026;
172 params.ptriple = 6.09170982378;
173 params.accentricfactor = 0.25601;
182 EOSReference.assign(
"\"Eine neue Fundamentalgleichung fur Ammoniak (A new Equation of State for Ammonia)\""
183 " R. Tillner-Roth and F. Harms-Watzenberg and H.D. Baehr, "
184 "Deutscher Kaelte- und Klimatechnischer Verein Tagung 1993");
186 "A. Fenghour and W.A. Wakeham and V. Vesovic and J.T.R. Watson and J. Millat and E. Vogel"
187 "J. Phys. Chem. Ref. Data, Vol. 24, No. 5, 1995 \n\n"
188 "Conductivity: \"Thermal Conductivity of Ammonia in a Large"
189 "Temperature and Pressure Range Including the Critical Region\""
190 "by R. Tufeu, D.Y. Ivanov, Y. Garrabos, B. Le Neindre, "
191 "Bereicht der Bunsengesellschaft Phys. Chem. 88 (1984) 422-427\n\n"
192 "Does not include the critical enhancement. Comparison of EES (without enhancement) and Refprop (with enhancement) give "
193 "errors in saturated liquid and saturated vapor conductivities of \n\n"
194 "T < 325K, error < 0.1%\n"
195 "325K < T < 355 K, error <1%\n\n"
196 "Most practical conditions will be in the <325K range\n"
197 "Surface tension: Michael Kleiber and Ralph Joh, \"VDI Heat Atlas 2010 Chapter D3.1 Liquids and Gases\" ");
199 name.assign(
"Ammonia");
203 aliases.push_back(std::string(
"AMMONIA"));
231 double lambda_0,lambda_tilde;
237 double e=-0.4828e-12;
238 double lambda_1= 0.16207e-3;
239 double lambda_2= 0.12038e-5;
240 double lambda_3=-0.23139e-8;
241 double lambda_4= 0.32749e-11;
246 double LAMBDA=1.2, nu=0.63, gamma =1.24, DELTA=0.50, rhoc_visc=235,t,zeta_0_plus=1.34e-10,a_zeta=1,GAMMA_0_plus=0.423e-8;
247 double pi=3.141592654,a_chi,k_B=1.3806504e-23,X_T,DELTA_lambda,dPdT,eta_B,DELTA_lambda_id,DELTA_lambda_i;
249 lambda_0=a+b*T+c*T*T+d*T*T*T+e*T*T*T*T;
250 lambda_tilde=lambda_1*rho+lambda_2*rho*rho+lambda_3*rho*rho*rho+lambda_4*rho*rho*rho*rho;
256 eta_B=(2.60*1.6*t)*1e-5;
257 dPdT=(2.18-0.12/exp(17.8*t))*1e5;
258 X_T=0.61*rhoc_visc+16.5*log(t);
260 DELTA_lambda_i=LAMBDA*(k_B*T*T)/(6*pi*eta_B*(zeta_0_plus*pow(t,-nu)*(1+a_zeta*pow(t,DELTA))))*dPdT*dPdT*GAMMA_0_plus*pow(t,-gamma)*(1+a_chi*pow(t,DELTA));
261 DELTA_lambda_id=DELTA_lambda_i*exp(-36*t*t);
264 DELTA_lambda=DELTA_lambda_id*(X_T*X_T)/(X_T*X_T+
powInt(0.6*rhoc_visc-0.96*rhoc_visc,2))*
powInt(rho,2)/
powInt(0.6*rhoc_visc,2);
268 DELTA_lambda=DELTA_lambda_id*(X_T*X_T)/(X_T*X_T+
powInt(rho-0.96*rhoc_visc,2));
276 return lambda_0+lambda_tilde+DELTA_lambda;
285 double sum=0, e_k=386.0,sigma=0.2957,M=17.03026,sum2=0.0;
287 double T_star,G_eta_star,eta0,B_eta_star,B_eta,b_1,deltaeta_h;
288 double a[]={4.99318220,-0.61122364,0.0,0.18535124,-0.11160946};
289 double c[]={-0.17999496e1,0.46692621e2,-0.53460794e3,0.33604074e4,-0.13019164e5,
290 0.33414230e5,-0.58711743e5,0.71426686e5,-0.59834012e5,0.33652741e5,
291 -0.12027350e5,0.24348205e4,-0.20807957e3};
293 double d[5][3]={{0,0.17366936e-2,0.0},
294 {0.0,-0.64250359e-2,0.0},
295 {2.19664285e-1,0.0,1.67668649e-4},
296 {0.0,0.0,-1.49710093e-4},
297 {-0.83651107e-1,0.0,0.77012274e-4}};
306 sum+=a[i]*
powInt(log(T_star),i);
312 eta0=0.021357*sqrt(T*M)*100/(sigma*sigma*G_eta_star);
317 sum+=c[i]*
powInt(sqrt(T_star),-i);
320 B_eta=B_eta_star*(0.6022137*sigma*sigma*sigma);
330 sum2+=d[j][i-2]/
powInt(T_star,j);
335 return (eta0+b_1*rho+deltaeta_h)/1e6;
340 const double t[]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 20, 26};
341 const double N[]={0, 0.04909506379170004, -8.5985591284104057, 22.98850790970738, -222.28840209935356, 1491.9401420842644, -6641.0811040366289, 19697.275454679908, -38321.157974702161, 45841.962482923009, -27382.278742352592, 6743.9692067905371, -2077.8944819332091, 1272.2022925639299, -597.49829753755705};
342 double summer=0,theta;
347 summer += N[i]*pow(theta,t[i]/2);
355 const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 2.1666666666666665};
356 const double N[] = {0, 3.2591904910225704, -41.687339030964814, 246.43755287753763, -837.61113396671999, 2080.7279064276067, -3935.4817672564195, 5171.1096164456239, -4027.6487405218049, 1387.0671995039477, -43.611646611054738};
357 double summer=0,theta;
360 for (i=1; i<=10; i++)
362 summer += N[i]*pow(theta,t[i]);
370 const double t[] = {0, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.8333333333333333};
371 const double N[] = {0, -62.065663192057258, 869.56245921894947, -5338.5660401310852, 18273.366873938554, -38074.430040623774, 48944.180419243385, -36862.534086957254, 13256.30649363281, -1014.8176862674514};
372 double summer=0,theta;
377 summer += N[i]*pow(theta,t[i]);
383 return 0.1028*pow(1-T/
reduce.
T,1.211)-0.09453*pow(1-T/
reduce.
T,5.585);
std::vector< phi_BC * > phirlist
struct FluidLimits limits
virtual double conductivity_Trho(double, double)
std::string name
A container to hold the cache for residual Helmholtz derivatives.
std::string TransportReference
A std::string that contains a reference for thermo properties for the fluid.
std::vector< std::string > aliases
The REFPROP-compliant name if REFPROP-"name" is not a compatible fluid name. If not included...
struct CriticalStruct reduce
A pointer to the point that is used to reduce the T and rho for EOS.
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
std::string REFPROPname
The name of the fluid.
double surface_tension_T(double T)
std::string SURFACE_TENSION
virtual double viscosity_Trho(double, double)
struct CriticalStruct crit
BibTeXKeysStruct BibTeXKeys
std::vector< phi_BC * > phi0list
A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution.