34 static const doublereal
T_c = 647.096;
35 static const doublereal
Rho_c = 322.;
47 static const doublereal ni0[9] = {
49 -8.32044648201 - 0.000000001739715,
50 6.6832105268 + 0.000000000793232,
59 static const doublereal gammi0[9] = {
71 static const int ciR[56] = {
130 static const int diR[55] = {
188 static const int tiR[55] = {
246 static const doublereal ni[57] = {
248 +0.12533547935523E-1,
253 -0.78199751687981E-2,
254 +0.88089493102134E-2,
257 -0.66212605039687E-4,
261 -0.40092828925807E-1,
262 +0.39343422603254E-6,
263 -0.75941377088144E-5,
264 +0.56250979351888E-3,
265 -0.15608652257135E-4,
266 +0.11537996422951E-8,
267 +0.36582165144204E-6,
268 -0.13251180074668E-11,
269 -0.62639586912454E-9,
271 +0.17611491008752E-1,
275 +0.49969146990806E-2,
276 -0.31358700712549E-1,
279 +0.20527940895948E-1,
281 +0.14180634400617E-1,
282 +0.83326504880713E-2,
283 -0.29052336009585E-1,
284 +0.38615085574206E-1,
285 -0.20393486513704E-1,
286 -0.16554050063734E-2,
287 +0.19955571979541E-2,
288 +0.15870308324157E-3,
289 -0.16388568342530E-4,
290 +0.43613615723811E-1,
291 +0.34994005463765E-1,
292 -0.76788197844621E-1,
293 +0.22446277332006E-1,
294 -0.62689710414685E-4,
295 -0.55711118565645E-9,
306 static const doublereal alphai[3] = {
312 static const doublereal betai[3] = {
318 static const doublereal gammai[3] = {
324 static const doublereal epsi[3] = {
330 static const doublereal ai[2] = {
335 static const doublereal bi[2] = {
340 static const doublereal Bi[2] = {
345 static const doublereal Ci[2] = {
350 static const doublereal Di[2] = {
355 static const doublereal Ai[2] = {
360 static const doublereal Bbetai[2] = {
371 for (
int i = 0; i < 52; i++) {
374 for (
int i = 0; i < 16; i++) {
382 doublereal nau =
phi0();
383 doublereal res =
phiR();
384 doublereal res_d =
phiR_d();
385 doublereal nau_d =
phi0_d();
388 doublereal res_t =
phiR_t();
389 doublereal nau_t =
phi0_t();
395 std::printf(
"nau = %20.12e\t\tres = %20.12e\n", nau, res);
396 std::printf(
"nau_d = %20.12e\t\tres_d = %20.12e\n", nau_d, res_d);
397 printf(
"nau_dd = %20.12e\t\tres_dd = %20.12e\n", nau_dd, res_dd);
398 printf(
"nau_t = %20.12e\t\tres_t = %20.12e\n", nau_t, res_t);
399 printf(
"nau_tt = %20.12e\t\tres_tt = %20.12e\n", nau_tt, res_tt);
400 printf(
"nau_dt = %20.12e\t\tres_dt = %20.12e\n", nau_dt, res_dt);
406 doublereal rho = 838.025;
407 doublereal tau =
T_c/T;
408 doublereal delta = rho /
Rho_c;
409 printf(
" T = 500 K, rho = 838.025 kg m-3\n");
416 doublereal rho = 358.0;
417 doublereal tau =
T_c/T;
418 doublereal delta = rho /
Rho_c;
419 printf(
" T = 647 K, rho = 358.0 kg m-3\n");
429 for (
int i = 1; i < 51; i++) {
436 for (
int i = 1; i <= 15; i++) {
446 doublereal retn = log(delta) + ni0[1] + ni0[2]*tau + ni0[3]*log(tau);
448 retn += ni0[4] * log(1.0 - exp(-gammi0[4]*tau));
449 retn += ni0[5] * log(1.0 - exp(-gammi0[5]*tau));
450 retn += ni0[6] * log(1.0 - exp(-gammi0[6]*tau));
451 retn += ni0[7] * log(1.0 - exp(-gammi0[7]*tau));
452 retn += ni0[8] * log(1.0 - exp(-gammi0[8]*tau));
465 doublereal T375 = pow(tau, 0.375);
466 doublereal val = (ni[1] * delta /
TAUsqrt +
467 ni[2] * delta *
TAUsqrt * T375 +
468 ni[3] * delta * tau +
470 ni[5] *
DELTAp[2] * T375 * T375 +
471 ni[6] *
DELTAp[3] * T375 +
476 for (i = 8; i <= 51; i++) {
483 for (j = 0; j < 3; j++) {
485 doublereal dtmp = delta - epsi[j];
486 doublereal ttmp = tau - gammai[j];
487 val += (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
488 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
494 for (j = 0; j < 2; j++) {
496 doublereal deltam1 = delta - 1.0;
497 doublereal dtmp2 = deltam1 * deltam1;
498 doublereal atmp = 0.5 / Bbetai[j];
499 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
500 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
501 doublereal ttmp = tau - 1.0;
503 doublereal triagtmp = pow(triag, bi[j]);
505 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
506 val += (ni[i] * triagtmp * delta *
phi);
515 doublereal nau =
phi0();
516 doublereal res =
phiR();
529 doublereal T375 = pow(tau, 0.375);
530 doublereal val = (ni[1] /
TAUsqrt +
533 ni[4] * 2.0 * delta *
TAUsqrt +
534 ni[5] * 2.0 * delta * T375 * T375 +
535 ni[6] * 3.0 *
DELTAp[2] * T375 +
536 ni[7] * 4.0 *
DELTAp[3] * tau);
540 for (i = 8; i <= 51; i++) {
541 val += ((ni[i] * exp(-
DELTAp[ciR[i]]) *
DELTAp[diR[i] - 1] *
542 TAUp[tiR[i]]) * (diR[i] - ciR[i]*
DELTAp[ciR[i]]));
548 for (j = 0; j < 3; j++) {
550 doublereal dtmp = delta - epsi[j];
551 doublereal ttmp = tau - gammai[j];
552 doublereal tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
553 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
554 val += tmp * (diR[i]/delta - 2.0 * alphai[j] * dtmp);
560 for (j = 0; j < 2; j++) {
562 doublereal deltam1 = delta - 1.0;
563 doublereal dtmp2 = deltam1 * deltam1;
564 doublereal atmp = 0.5 / Bbetai[j];
565 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
566 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
567 doublereal ttmp = tau - 1.0;
569 doublereal triagtmp = pow(triag, bi[j]);
570 doublereal triagtmpm1 = pow(triag, bi[j]-1.0);
571 doublereal atmpM1 = atmp - 1.0;
572 doublereal ptmp = pow(dtmp2,atmpM1);
573 doublereal p2tmp = pow(dtmp2, ai[j]-1.0);
574 doublereal dtriagddelta =
575 deltam1 *(Ai[j] * theta * 2.0 / Bbetai[j] * ptmp +
576 2.0*Bi[j]*ai[j]*p2tmp);
578 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
579 doublereal dphiddelta = -2.0*Ci[j]*deltam1*
phi;
580 doublereal dtriagtmpddelta = bi[j] * triagtmpm1 * dtriagddelta;
582 doublereal tmp = ni[i] * (triagtmp * (phi + delta*dphiddelta) +
583 dtriagtmpddelta * delta * phi);
599 doublereal nau =
phi0_d();
600 doublereal res =
phiR_d();
607 doublereal res =
phiR_d();
608 return 1.0 + delta * res;
621 doublereal T375 = pow(tau, 0.375);
622 doublereal val = (ni[4] * 2.0 *
TAUsqrt +
623 ni[5] * 2.0 * T375 * T375 +
624 ni[6] * 6.0 * delta * T375 +
625 ni[7] * 12.0 *
DELTAp[2] * tau);
629 for (i = 8; i <= 51; i++) {
630 doublereal dtmp =
DELTAp[ciR[i]];
631 doublereal tmp = ni[i] * exp(-dtmp) *
TAUp[tiR[i]];
635 atmp =
DELTAp[diR[i] - 2];
637 tmp *= atmp *((diR[i] - ciR[i]*dtmp)*(diR[i]-1.0-ciR[i]*dtmp) -
645 for (j = 0; j < 3; j++) {
647 doublereal dtmp = delta - epsi[j];
648 doublereal ttmp = tau - gammai[j];
649 doublereal tmp = (ni[i] *
TAUp[tiR[i]] *
650 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
651 doublereal deltmp =
DELTAp[diR[i]];
652 doublereal deltmpM1 = deltmp/delta;
653 doublereal deltmpM2 = deltmpM1 / delta;
654 doublereal d2tmp = dtmp * dtmp;
656 val += tmp * (-2.0*alphai[j]*deltmp +
657 4.0 * alphai[j] * alphai[j] * deltmp * d2tmp -
658 4.0 * diR[i] * alphai[j] * deltmpM1 * dtmp +
659 diR[i] * (diR[i] - 1.0) * deltmpM2);
665 for (j = 0; j < 2; j++) {
667 doublereal deltam1 = delta - 1.0;
668 doublereal dtmp2 = deltam1 * deltam1;
669 atmp = 0.5 / Bbetai[j];
670 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
671 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
672 doublereal ttmp = tau - 1.0;
674 doublereal triagtmp = pow(triag, bi[j]);
675 doublereal triagtmpm1 = pow(triag, bi[j]-1.0);
676 doublereal atmpM1 = atmp - 1.0;
677 doublereal ptmp = pow(dtmp2,atmpM1);
678 doublereal p2tmp = pow(dtmp2, ai[j]-1.0);
679 doublereal dtriagddelta =
680 deltam1 *(Ai[j] * theta * 2.0 / Bbetai[j] * ptmp +
681 2.0*Bi[j]*ai[j]*p2tmp);
683 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
684 doublereal dphiddelta = -2.0*Ci[j]*deltam1*
phi;
685 doublereal dtriagtmpddelta = bi[j] * triagtmpm1 * dtriagddelta;
688 doublereal d2phiddelta2 = 2.0 * Ci[j] * phi * (2.0*Ci[j]*dtmp2 - 1.0);
690 doublereal pptmp = ptmp / dtmp2;
691 doublereal d2triagddelta2 = dtriagddelta / deltam1;
693 dtmp2 *(4.0*Bi[j]*ai[j]*(ai[j]-1.0)*pow(dtmp2,ai[j]-2.0) +
694 2.0*Ai[j]*Ai[j]/(Bbetai[j]*Bbetai[j])*ptmp*ptmp +
695 Ai[j]*theta*4.0/Bbetai[j]*(atmp-1.0)*pptmp);
697 doublereal d2triagtmpd2delta =
698 bi[j] * (triagtmpm1 * d2triagddelta2 +
699 (bi[j]-1.0)*triagtmpm1/triag*dtriagddelta*dtriagddelta);
701 doublereal ctmp = (triagtmp * (2.0*dphiddelta + delta*d2phiddelta2) +
702 2.0*dtriagtmpddelta*(phi + delta * dphiddelta) +
703 d2triagtmpd2delta * delta *
phi);
714 return -1.0/(delta*delta);
728 doublereal res1 =
phiR_d();
730 return 1.0 + delta * (2.0*res1 + delta*res2);
736 doublereal res1 =
phiR_d();
738 return (1.0 + delta * res1) - tau * delta * (res2);
744 doublereal retn = ni0[2] + ni0[3]/tau;
745 retn += (ni0[4] * gammi0[4] * (1.0/(1.0 - exp(-gammi0[4]*tau)) - 1.0));
746 retn += (ni0[5] * gammi0[5] * (1.0/(1.0 - exp(-gammi0[5]*tau)) - 1.0));
747 retn += (ni0[6] * gammi0[6] * (1.0/(1.0 - exp(-gammi0[6]*tau)) - 1.0));
748 retn += (ni0[7] * gammi0[7] * (1.0/(1.0 - exp(-gammi0[7]*tau)) - 1.0));
749 retn += (ni0[8] * gammi0[8] * (1.0/(1.0 - exp(-gammi0[8]*tau)) - 1.0));
758 doublereal atmp, tmp;
763 doublereal T375 = pow(tau, 0.375);
764 doublereal val = ((-0.5) *ni[1] * delta /
TAUsqrt / tau +
765 ni[2] * delta * 0.875 /
TAUsqrt * T375 +
768 ni[5] *
DELTAp[2] * 0.75 * T375 * T375 / tau +
769 ni[6] *
DELTAp[3] * 0.375 * T375 / tau +
774 for (i = 8; i <= 51; i++) {
782 for (j = 0; j < 3; j++) {
784 doublereal dtmp = delta - epsi[j];
785 doublereal ttmp = tau - gammai[j];
786 tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
787 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
788 val += tmp *(tiR[i]/tau - 2.0 * betai[j]*ttmp);
794 for (j = 0; j < 2; j++) {
796 doublereal deltam1 = delta - 1.0;
797 doublereal dtmp2 = deltam1 * deltam1;
798 atmp = 0.5 / Bbetai[j];
799 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
800 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
801 doublereal ttmp = tau - 1.0;
803 doublereal triagtmp = pow(triag, bi[j]);
805 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
808 doublereal dtriagtmpdtau = -2.0*theta * bi[j] * triagtmp / triag;
810 doublereal dphidtau = - 2.0 * Di[j] * ttmp *
phi;
812 val += ni[i] * delta * (dtriagtmpdtau * phi + triagtmp * dphidtau);
821 doublereal nau =
phi0_t();
822 doublereal res =
phiR_t();
829 doublereal tmp, itmp;
830 doublereal retn = - ni0[3]/(tau * tau);
831 for (
int i = 4; i <= 8; i++) {
832 tmp = exp(-gammi0[i]*tau);
834 retn -= (ni0[i] * gammi0[i] * gammi0[i] * tmp / (itmp * itmp));
844 doublereal atmp, tmp;
849 doublereal T375 = pow(tau, 0.375);
850 doublereal val = ((-0.5) * (-1.5) * ni[1] * delta / (
TAUsqrt * tau * tau) +
851 ni[2] * delta * 0.875 * (-0.125) * T375 / (
TAUsqrt * tau) +
853 ni[5] *
DELTAp[2] * 0.75 *(-0.25) * T375 * T375 / (tau * tau) +
854 ni[6] *
DELTAp[3] * 0.375 *(-0.625) * T375 / (tau * tau));
858 for (i = 8; i <= 51; i++) {
861 val += tiR[i] * (tiR[i] - 1.0) * tmp;
868 for (j = 0; j < 3; j++) {
870 doublereal dtmp = delta - epsi[j];
871 doublereal ttmp = tau - gammai[j];
872 tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
873 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
874 atmp = tiR[i]/tau - 2.0 * betai[j]*ttmp;
875 val += tmp *(atmp * atmp - tiR[i]/(tau*tau) - 2.0*betai[j]);
881 for (j = 0; j < 2; j++) {
883 doublereal deltam1 = delta - 1.0;
884 doublereal dtmp2 = deltam1 * deltam1;
885 atmp = 0.5 / Bbetai[j];
886 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
887 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
888 doublereal ttmp = tau - 1.0;
890 doublereal triagtmp = pow(triag, bi[j]);
891 doublereal triagtmpM1 = triagtmp / triag;
893 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
896 doublereal dtriagtmpdtau = -2.0*theta * bi[j] * triagtmp / triag;
898 doublereal dphidtau = - 2.0 * Di[j] * ttmp *
phi;
900 doublereal d2triagtmpdtau2 =
901 (2 * bi[j] * triagtmpM1 +
902 4 * theta * theta * bi[j] * (bi[j]-1.0) * triagtmpM1 / triag);
904 doublereal d2phidtau2 = 2.0*Di[j]*phi *(2.0*Di[j]*ttmp*ttmp - 1.0);
906 tmp = (d2triagtmpdtau2 * phi +
907 2 * dtriagtmpdtau * dphidtau +
908 triagtmp * d2phidtau2);
909 val += ni[i] * delta * tmp;
937 doublereal T375 = pow(tau, 0.375);
938 doublereal val = (ni[1] * (-0.5) / (
TAUsqrt * tau) +
939 ni[2] * (0.875) * T375 /
TAUsqrt +
941 ni[4] * 2.0 * delta * (0.5) /
TAUsqrt +
942 ni[5] * 2.0 * delta * (0.75) * T375 * T375 / tau +
943 ni[6] * 3.0 *
DELTAp[2] * 0.375 * T375 / tau +
948 for (i = 8; i <= 51; i++) {
949 tmp = (ni[i] * tiR[i] * exp(-
DELTAp[ciR[i]]) *
DELTAp[diR[i] - 1] *
951 val += tmp * (diR[i] - ciR[i] *
DELTAp[ciR[i]]);
957 for (j = 0; j < 3; j++) {
959 doublereal dtmp = delta - epsi[j];
960 doublereal ttmp = tau - gammai[j];
961 tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
962 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
963 val += tmp * ((diR[i]/delta - 2.0 * alphai[j] * dtmp) *
964 (tiR[i]/tau - 2.0 * betai[j] * ttmp));
970 for (j = 0; j < 2; j++) {
972 doublereal deltam1 = delta - 1.0;
973 doublereal dtmp2 = deltam1 * deltam1;
974 doublereal atmp = 0.5 / Bbetai[j];
975 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
976 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
977 doublereal ttmp = tau - 1.0;
979 doublereal triagtmp = pow(triag, bi[j]);
980 doublereal triagtmpm1 = pow(triag, bi[j]-1.0);
981 doublereal atmpM1 = atmp - 1.0;
982 doublereal ptmp = pow(dtmp2,atmpM1);
983 doublereal p2tmp = pow(dtmp2, ai[j]-1.0);
984 doublereal dtriagddelta =
985 deltam1 *(Ai[j] * theta * 2.0 / Bbetai[j] * ptmp +
986 2.0*Bi[j]*ai[j]*p2tmp);
988 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
989 doublereal dphiddelta = -2.0*Ci[j]*deltam1*
phi;
990 doublereal dtriagtmpddelta = bi[j] * triagtmpm1 * dtriagddelta;
993 doublereal dtriagtmpdtau = -2.0*theta * bi[j] * triagtmp / triag;
995 doublereal dphidtau = - 2.0 * Di[j] * ttmp *
phi;
997 doublereal d2phiddeltadtau = 4.0 * Ci[j] * Di[j] * deltam1 * ttmp *
phi;
999 doublereal d2triagtmpddeltadtau =
1000 (-Ai[j] * bi[j] * 2.0 / Bbetai[j] * triagtmpm1 * deltam1 * ptmp
1001 -2.0 * theta * bi[j] * (bi[j] - 1.0) * triagtmpm1 / triag * dtriagddelta);
1004 doublereal tmp = ni[i] * (triagtmp * (dphidtau + delta*d2phiddeltadtau) +
1005 delta * dtriagtmpddelta * dphidtau +
1006 dtriagtmpdtau * (phi + delta * dphiddelta) +
1007 d2triagtmpddeltadtau * delta *
phi);
1016 doublereal dd = deltaGuess;
1018 doublereal deldd = dd;
1019 doublereal pcheck = 1.0E-30 + 1.0E-8 * p_red;
1020 for (
int n = 0; n < 200; n++) {
1026 doublereal q1 =
phiR_d();
1033 doublereal pred0 = dd + dd * dd * q1;
1038 doublereal dpddelta = 1.0 + 2.0 * dd * q1 + dd * dd * q2;
1044 if (dpddelta <= 0.0) {
1045 if (deltaGuess > 1.0) {
1048 if (deltaGuess < 1.0) {
1056 if (fabs(pred0-p_red) < pcheck) {
1064 doublereal dpdx = dpddelta;
1066 dpdx = dpddelta * 1.1;
1068 dpdx = std::max(dpdx, 0.001);
1075 deldd = - (pred0 - p_red) / dpdx;
1076 if (fabs(deldd) > 0.05) {
1077 deldd = deldd * 0.05 / fabs(deldd);
1083 if (fabs(deldd/dd) < 1.0E-14) {
1106 doublereal rd =
phiR_d();
1107 return 1.0 +
phi0() +
phiR() + delta * rd;
1114 doublereal rd =
phiR_d();
1115 doublereal nt =
phi0_t();
1116 doublereal rt =
phiR_t();
1117 return 1.0 + tau * (nt + rt) + delta * rd;
1123 doublereal nt =
phi0_t();
1124 doublereal rt =
phiR_t();
1125 doublereal p0 =
phi0();
1126 doublereal pR =
phiR();
1127 return tau * (nt + rt) - p0 - pR;
1133 doublereal nt =
phi0_t();
1134 doublereal rt =
phiR_t();
1135 return tau * (nt + rt);
1143 return - tau * tau * (ntt + rtt);
1150 doublereal cvR =
cv_R();
1151 doublereal rd =
phiR_d();
1154 doublereal num = (1.0 + delta * rd - delta * tau * rdt);
1155 doublereal cpR = cvR + (num * num /
1156 (1.0 + 2.0 * delta * rd + delta * delta * rdd));
doublereal phi0_dd() const
Calculate d2_phi0_dd(delta), the second derivative of phi0 wrt delta.
doublereal phiR_dt() const
Calculate the mixed derivative d2_phiR/(dtau ddelta)
doublereal phi0_d() const
Calculate d_phi0_d(delta), the first derivative of phi0 wrt delta.
Header for Lowest level of the classes which support a real water model (see class WaterPropsIAPWS an...
doublereal phi_dd(doublereal tau, doublereal delta)
2nd derivative of phi wrt delta
doublereal gibbs_RT() const
Calculate the dimensionless Gibbs free energy.
doublereal phi0_dt() const
Calculate the mixed derivative d2_phi0/(dtau ddelta)
doublereal entropy_R() const
Calculate the dimensionless entropy, s/R.
void check1()
Internal check # 1.
void intCheck(doublereal tau, doublereal delta)
Calculates all of the functions at a one point and prints out the result.
const doublereal Rho_c
Value of the Density at the critical point (kg m-3)
doublereal dfind(doublereal p_red, doublereal tau, doublereal deltaGuess)
This function computes the reduced density, given the reduced pressure and the reduced temperature...
doublereal TAUsave
Last tau that was used to calculate polynomials.
doublereal DELTAp[16]
Value of internally calculated polynomials of powers of delta.
doublereal phiR_dd() const
Calculate d2_phiR_dd(delta), the second derivative of phiR wrt delta.
doublereal DELTAsave
Last delta that was used to calculate polynomials.
doublereal pressureM_rhoRT(doublereal tau, doublereal delta)
Calculate the dimensionless pressure at tau and delta;.
doublereal phiR_tt() const
Calculate Equation 6.6 for dphiRdtau, the second derivative residual part of the dimensionless Helmho...
doublereal phi0_t() const
Calculate d_phi0/d(tau)
const doublereal T_c
Critical Temperature value (kelvin)
doublereal dimdpdrho(doublereal tau, doublereal delta)
Dimensionless derivative of p wrt rho at constant T.
doublereal phiR_t() const
Calculate Equation 6.6 for dphiRdtau, the derivative residual part of the dimensionless Helmholtz fre...
doublereal phi_tt(doublereal tau, doublereal delta)
Second derivative of phi wrt tau.
doublereal phiR_d() const
Calculate d_phiR_d(delta), the first derivative of phiR wrt delta.
doublereal dimdpdT(doublereal tau, doublereal delta)
Dimensionless derivative of p wrt T at constant rho.
void check2()
Internal check # 2.
WaterPropsIAPWSphi()
Base constructor.
void tdpolycalc(doublereal tau, doublereal delta)
Calculates internal polynomials in tau and delta.
doublereal phi0() const
Calculate Equation 6.5 for phi0, the ideal gas part of the dimensionless Helmholtz free energy...
doublereal phi_t(doublereal tau, doublereal delta)
First derivative of phi wrt tau.
doublereal enthalpy_RT() const
Calculate the dimensionless enthalpy, h/RT.
doublereal TAUsqrt
sqrt of TAU
doublereal cp_R() const
Calculate the dimensionless constant pressure heat capacity, Cv/R.
doublereal cv_R() const
Calculate the dimensionless constant volume heat capacity, Cv/R.
doublereal phi_d(doublereal tau, doublereal delta)
Calculate derivative of phi wrt delta.
doublereal phi0_tt() const
Calculate d2_phi0/dtau2.
doublereal intEnergy_RT() const
Calculate the dimensionless internal energy, u/RT.
doublereal phi(doublereal tau, doublereal delta)
Calculate the Phi function, which is the base function.
doublereal TAUp[52]
Value of internally calculated polynomials of powers of TAU.