33 static const doublereal
T_c = 647.096;
34 static const doublereal
P_c = 22.064E6;
35 static const doublereal
Rho_c = 322.;
36 static const doublereal
M_water = 18.015268;
48 static const doublereal ni0[9] = {
50 -8.32044648201 - 0.000000001739715,
51 6.6832105268 + 0.000000000793232,
60 static const doublereal gammi0[9] = {
72 static const int ciR[56] = {
131 static const int diR[55] = {
189 static const int tiR[55] = {
247 static const doublereal ni[57] = {
249 +0.12533547935523E-1,
254 -0.78199751687981E-2,
255 +0.88089493102134E-2,
258 -0.66212605039687E-4,
262 -0.40092828925807E-1,
263 +0.39343422603254E-6,
264 -0.75941377088144E-5,
265 +0.56250979351888E-3,
266 -0.15608652257135E-4,
267 +0.11537996422951E-8,
268 +0.36582165144204E-6,
269 -0.13251180074668E-11,
270 -0.62639586912454E-9,
272 +0.17611491008752E-1,
276 +0.49969146990806E-2,
277 -0.31358700712549E-1,
280 +0.20527940895948E-1,
282 +0.14180634400617E-1,
283 +0.83326504880713E-2,
284 -0.29052336009585E-1,
285 +0.38615085574206E-1,
286 -0.20393486513704E-1,
287 -0.16554050063734E-2,
288 +0.19955571979541E-2,
289 +0.15870308324157E-3,
290 -0.16388568342530E-4,
291 +0.43613615723811E-1,
292 +0.34994005463765E-1,
293 -0.76788197844621E-1,
294 +0.22446277332006E-1,
295 -0.62689710414685E-4,
296 -0.55711118565645E-9,
307 static const doublereal alphai[3] = {
313 static const doublereal betai[3] = {
319 static const doublereal gammai[3] = {
325 static const doublereal epsi[3] = {
331 static const doublereal ai[2] = {
336 static const doublereal bi[2] = {
341 static const doublereal Bi[2] = {
346 static const doublereal Ci[2] = {
351 static const doublereal Di[2] = {
356 static const doublereal Ai[2] = {
361 static const doublereal Bbetai[2] = {
372 for (
int i = 0; i < 52; i++) {
375 for (
int i = 0; i < 16; i++) {
383 doublereal nau =
phi0();
384 doublereal res =
phiR();
385 doublereal res_d =
phiR_d();
386 doublereal nau_d =
phi0_d();
389 doublereal res_t =
phiR_t();
390 doublereal nau_t =
phi0_t();
396 std::printf(
"nau = %20.12e\t\tres = %20.12e\n", nau, res);
397 std::printf(
"nau_d = %20.12e\t\tres_d = %20.12e\n", nau_d, res_d);
398 printf(
"nau_dd = %20.12e\t\tres_dd = %20.12e\n", nau_dd, res_dd);
399 printf(
"nau_t = %20.12e\t\tres_t = %20.12e\n", nau_t, res_t);
400 printf(
"nau_tt = %20.12e\t\tres_tt = %20.12e\n", nau_tt, res_tt);
401 printf(
"nau_dt = %20.12e\t\tres_dt = %20.12e\n", nau_dt, res_dt);
407 doublereal rho = 838.025;
408 doublereal tau =
T_c/T;
409 doublereal delta = rho /
Rho_c;
410 printf(
" T = 500 K, rho = 838.025 kg m-3\n");
417 doublereal rho = 358.0;
418 doublereal tau =
T_c/T;
419 doublereal delta = rho /
Rho_c;
420 printf(
" T = 647 K, rho = 358.0 kg m-3\n");
430 for (
int i = 1; i < 51; i++) {
437 for (
int i = 1; i <= 15; i++) {
447 doublereal retn = log(delta) + ni0[1] + ni0[2]*tau + ni0[3]*log(tau);
449 retn += ni0[4] * log(1.0 - exp(-gammi0[4]*tau));
450 retn += ni0[5] * log(1.0 - exp(-gammi0[5]*tau));
451 retn += ni0[6] * log(1.0 - exp(-gammi0[6]*tau));
452 retn += ni0[7] * log(1.0 - exp(-gammi0[7]*tau));
453 retn += ni0[8] * log(1.0 - exp(-gammi0[8]*tau));
466 doublereal T375 = pow(tau, 0.375);
467 doublereal val = (ni[1] * delta /
TAUsqrt +
468 ni[2] * delta *
TAUsqrt * T375 +
469 ni[3] * delta * tau +
471 ni[5] *
DELTAp[2] * T375 * T375 +
472 ni[6] *
DELTAp[3] * T375 +
477 for (i = 8; i <= 51; i++) {
484 for (j = 0; j < 3; j++) {
486 doublereal dtmp = delta - epsi[j];
487 doublereal ttmp = tau - gammai[j];
488 val += (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
489 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
495 for (j = 0; j < 2; j++) {
497 doublereal deltam1 = delta - 1.0;
498 doublereal dtmp2 = deltam1 * deltam1;
499 doublereal atmp = 0.5 / Bbetai[j];
500 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
501 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
502 doublereal ttmp = tau - 1.0;
504 doublereal triagtmp = pow(triag, bi[j]);
506 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
507 val += (ni[i] * triagtmp * delta *
phi);
516 doublereal nau =
phi0();
517 doublereal res =
phiR();
530 doublereal T375 = pow(tau, 0.375);
531 doublereal val = (ni[1] /
TAUsqrt +
534 ni[4] * 2.0 * delta *
TAUsqrt +
535 ni[5] * 2.0 * delta * T375 * T375 +
536 ni[6] * 3.0 *
DELTAp[2] * T375 +
537 ni[7] * 4.0 *
DELTAp[3] * tau);
541 for (i = 8; i <= 51; i++) {
542 val += ((ni[i] * exp(-
DELTAp[ciR[i]]) *
DELTAp[diR[i] - 1] *
543 TAUp[tiR[i]]) * (diR[i] - ciR[i]*
DELTAp[ciR[i]]));
549 for (j = 0; j < 3; j++) {
551 doublereal dtmp = delta - epsi[j];
552 doublereal ttmp = tau - gammai[j];
553 doublereal tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
554 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
555 val += tmp * (diR[i]/delta - 2.0 * alphai[j] * dtmp);
561 for (j = 0; j < 2; j++) {
563 doublereal deltam1 = delta - 1.0;
564 doublereal dtmp2 = deltam1 * deltam1;
565 doublereal atmp = 0.5 / Bbetai[j];
566 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
567 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
568 doublereal ttmp = tau - 1.0;
570 doublereal triagtmp = pow(triag, bi[j]);
571 doublereal triagtmpm1 = pow(triag, bi[j]-1.0);
572 doublereal atmpM1 = atmp - 1.0;
573 doublereal ptmp = pow(dtmp2,atmpM1);
574 doublereal p2tmp = pow(dtmp2, ai[j]-1.0);
575 doublereal dtriagddelta =
576 deltam1 *(Ai[j] * theta * 2.0 / Bbetai[j] * ptmp +
577 2.0*Bi[j]*ai[j]*p2tmp);
579 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
580 doublereal dphiddelta = -2.0*Ci[j]*deltam1*
phi;
581 doublereal dtriagtmpddelta = bi[j] * triagtmpm1 * dtriagddelta;
583 doublereal tmp = ni[i] * (triagtmp * (phi + delta*dphiddelta) +
584 dtriagtmpddelta * delta * phi);
600 doublereal nau =
phi0_d();
601 doublereal res =
phiR_d();
608 doublereal res =
phiR_d();
609 return 1.0 + delta * res;
622 doublereal T375 = pow(tau, 0.375);
623 doublereal val = (ni[4] * 2.0 *
TAUsqrt +
624 ni[5] * 2.0 * T375 * T375 +
625 ni[6] * 6.0 * delta * T375 +
626 ni[7] * 12.0 *
DELTAp[2] * tau);
630 for (i = 8; i <= 51; i++) {
631 doublereal dtmp =
DELTAp[ciR[i]];
632 doublereal tmp = ni[i] * exp(-dtmp) *
TAUp[tiR[i]];
636 atmp =
DELTAp[diR[i] - 2];
638 tmp *= atmp *((diR[i] - ciR[i]*dtmp)*(diR[i]-1.0-ciR[i]*dtmp) -
646 for (j = 0; j < 3; j++) {
648 doublereal dtmp = delta - epsi[j];
649 doublereal ttmp = tau - gammai[j];
650 doublereal tmp = (ni[i] *
TAUp[tiR[i]] *
651 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
652 doublereal deltmp =
DELTAp[diR[i]];
653 doublereal deltmpM1 = deltmp/delta;
654 doublereal deltmpM2 = deltmpM1 / delta;
655 doublereal d2tmp = dtmp * dtmp;
657 val += tmp * (-2.0*alphai[j]*deltmp +
658 4.0 * alphai[j] * alphai[j] * deltmp * d2tmp -
659 4.0 * diR[i] * alphai[j] * deltmpM1 * dtmp +
660 diR[i] * (diR[i] - 1.0) * deltmpM2);
666 for (j = 0; j < 2; j++) {
668 doublereal deltam1 = delta - 1.0;
669 doublereal dtmp2 = deltam1 * deltam1;
670 atmp = 0.5 / Bbetai[j];
671 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
672 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
673 doublereal ttmp = tau - 1.0;
675 doublereal triagtmp = pow(triag, bi[j]);
676 doublereal triagtmpm1 = pow(triag, bi[j]-1.0);
677 doublereal atmpM1 = atmp - 1.0;
678 doublereal ptmp = pow(dtmp2,atmpM1);
679 doublereal p2tmp = pow(dtmp2, ai[j]-1.0);
680 doublereal dtriagddelta =
681 deltam1 *(Ai[j] * theta * 2.0 / Bbetai[j] * ptmp +
682 2.0*Bi[j]*ai[j]*p2tmp);
684 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
685 doublereal dphiddelta = -2.0*Ci[j]*deltam1*
phi;
686 doublereal dtriagtmpddelta = bi[j] * triagtmpm1 * dtriagddelta;
689 doublereal d2phiddelta2 = 2.0 * Ci[j] * phi * (2.0*Ci[j]*dtmp2 - 1.0);
691 doublereal pptmp = ptmp / dtmp2;
692 doublereal d2triagddelta2 = dtriagddelta / deltam1;
694 dtmp2 *(4.0*Bi[j]*ai[j]*(ai[j]-1.0)*pow(dtmp2,ai[j]-2.0) +
695 2.0*Ai[j]*Ai[j]/(Bbetai[j]*Bbetai[j])*ptmp*ptmp +
696 Ai[j]*theta*4.0/Bbetai[j]*(atmp-1.0)*pptmp);
698 doublereal d2triagtmpd2delta =
699 bi[j] * (triagtmpm1 * d2triagddelta2 +
700 (bi[j]-1.0)*triagtmpm1/triag*dtriagddelta*dtriagddelta);
702 doublereal ctmp = (triagtmp * (2.0*dphiddelta + delta*d2phiddelta2) +
703 2.0*dtriagtmpddelta*(phi + delta * dphiddelta) +
704 d2triagtmpd2delta * delta *
phi);
715 return -1.0/(delta*delta);
729 doublereal res1 =
phiR_d();
731 return 1.0 + delta * (2.0*res1 + delta*res2);
737 doublereal res1 =
phiR_d();
739 return (1.0 + delta * res1) - tau * delta * (res2);
745 doublereal retn = ni0[2] + ni0[3]/tau;
746 retn += (ni0[4] * gammi0[4] * (1.0/(1.0 - exp(-gammi0[4]*tau)) - 1.0));
747 retn += (ni0[5] * gammi0[5] * (1.0/(1.0 - exp(-gammi0[5]*tau)) - 1.0));
748 retn += (ni0[6] * gammi0[6] * (1.0/(1.0 - exp(-gammi0[6]*tau)) - 1.0));
749 retn += (ni0[7] * gammi0[7] * (1.0/(1.0 - exp(-gammi0[7]*tau)) - 1.0));
750 retn += (ni0[8] * gammi0[8] * (1.0/(1.0 - exp(-gammi0[8]*tau)) - 1.0));
759 doublereal atmp, tmp;
764 doublereal T375 = pow(tau, 0.375);
765 doublereal val = ((-0.5) *ni[1] * delta /
TAUsqrt / tau +
766 ni[2] * delta * 0.875 /
TAUsqrt * T375 +
769 ni[5] *
DELTAp[2] * 0.75 * T375 * T375 / tau +
770 ni[6] *
DELTAp[3] * 0.375 * T375 / tau +
775 for (i = 8; i <= 51; i++) {
783 for (j = 0; j < 3; j++) {
785 doublereal dtmp = delta - epsi[j];
786 doublereal ttmp = tau - gammai[j];
787 tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
788 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
789 val += tmp *(tiR[i]/tau - 2.0 * betai[j]*ttmp);
795 for (j = 0; j < 2; j++) {
797 doublereal deltam1 = delta - 1.0;
798 doublereal dtmp2 = deltam1 * deltam1;
799 atmp = 0.5 / Bbetai[j];
800 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
801 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
802 doublereal ttmp = tau - 1.0;
804 doublereal triagtmp = pow(triag, bi[j]);
806 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
809 doublereal dtriagtmpdtau = -2.0*theta * bi[j] * triagtmp / triag;
811 doublereal dphidtau = - 2.0 * Di[j] * ttmp *
phi;
813 val += ni[i] * delta * (dtriagtmpdtau * phi + triagtmp * dphidtau);
822 doublereal nau =
phi0_t();
823 doublereal res =
phiR_t();
830 doublereal tmp, itmp;
831 doublereal retn = - ni0[3]/(tau * tau);
832 for (
int i = 4; i <= 8; i++) {
833 tmp = exp(-gammi0[i]*tau);
835 retn -= (ni0[i] * gammi0[i] * gammi0[i] * tmp / (itmp * itmp));
845 doublereal atmp, tmp;
850 doublereal T375 = pow(tau, 0.375);
851 doublereal val = ((-0.5) * (-1.5) * ni[1] * delta / (
TAUsqrt * tau * tau) +
852 ni[2] * delta * 0.875 * (-0.125) * T375 / (
TAUsqrt * tau) +
854 ni[5] *
DELTAp[2] * 0.75 *(-0.25) * T375 * T375 / (tau * tau) +
855 ni[6] *
DELTAp[3] * 0.375 *(-0.625) * T375 / (tau * tau));
859 for (i = 8; i <= 51; i++) {
862 val += tiR[i] * (tiR[i] - 1.0) * tmp;
869 for (j = 0; j < 3; j++) {
871 doublereal dtmp = delta - epsi[j];
872 doublereal ttmp = tau - gammai[j];
873 tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
874 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
875 atmp = tiR[i]/tau - 2.0 * betai[j]*ttmp;
876 val += tmp *(atmp * atmp - tiR[i]/(tau*tau) - 2.0*betai[j]);
882 for (j = 0; j < 2; j++) {
884 doublereal deltam1 = delta - 1.0;
885 doublereal dtmp2 = deltam1 * deltam1;
886 atmp = 0.5 / Bbetai[j];
887 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
888 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
889 doublereal ttmp = tau - 1.0;
891 doublereal triagtmp = pow(triag, bi[j]);
892 doublereal triagtmpM1 = triagtmp / triag;
894 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
897 doublereal dtriagtmpdtau = -2.0*theta * bi[j] * triagtmp / triag;
899 doublereal dphidtau = - 2.0 * Di[j] * ttmp *
phi;
901 doublereal d2triagtmpdtau2 =
902 (2 * bi[j] * triagtmpM1 +
903 4 * theta * theta * bi[j] * (bi[j]-1.0) * triagtmpM1 / triag);
905 doublereal d2phidtau2 = 2.0*Di[j]*phi *(2.0*Di[j]*ttmp*ttmp - 1.0);
907 tmp = (d2triagtmpdtau2 * phi +
908 2 * dtriagtmpdtau * dphidtau +
909 triagtmp * d2phidtau2);
910 val += ni[i] * delta * tmp;
938 doublereal T375 = pow(tau, 0.375);
939 doublereal val = (ni[1] * (-0.5) / (
TAUsqrt * tau) +
940 ni[2] * (0.875) * T375 /
TAUsqrt +
942 ni[4] * 2.0 * delta * (0.5) /
TAUsqrt +
943 ni[5] * 2.0 * delta * (0.75) * T375 * T375 / tau +
944 ni[6] * 3.0 *
DELTAp[2] * 0.375 * T375 / tau +
949 for (i = 8; i <= 51; i++) {
950 tmp = (ni[i] * tiR[i] * exp(-
DELTAp[ciR[i]]) *
DELTAp[diR[i] - 1] *
952 val += tmp * (diR[i] - ciR[i] *
DELTAp[ciR[i]]);
958 for (j = 0; j < 3; j++) {
960 doublereal dtmp = delta - epsi[j];
961 doublereal ttmp = tau - gammai[j];
962 tmp = (ni[i] *
DELTAp[diR[i]] *
TAUp[tiR[i]] *
963 exp(-alphai[j]*dtmp*dtmp - betai[j]*ttmp*ttmp));
964 val += tmp * ((diR[i]/delta - 2.0 * alphai[j] * dtmp) *
965 (tiR[i]/tau - 2.0 * betai[j] * ttmp));
971 for (j = 0; j < 2; j++) {
973 doublereal deltam1 = delta - 1.0;
974 doublereal dtmp2 = deltam1 * deltam1;
975 doublereal atmp = 0.5 / Bbetai[j];
976 doublereal theta = (1.0 - tau) + Ai[j] * pow(dtmp2, atmp);
977 doublereal triag = theta * theta + Bi[j] * pow(dtmp2, ai[j]);
978 doublereal ttmp = tau - 1.0;
980 doublereal triagtmp = pow(triag, bi[j]);
981 doublereal triagtmpm1 = pow(triag, bi[j]-1.0);
982 doublereal atmpM1 = atmp - 1.0;
983 doublereal ptmp = pow(dtmp2,atmpM1);
984 doublereal p2tmp = pow(dtmp2, ai[j]-1.0);
985 doublereal dtriagddelta =
986 deltam1 *(Ai[j] * theta * 2.0 / Bbetai[j] * ptmp +
987 2.0*Bi[j]*ai[j]*p2tmp);
989 doublereal
phi = exp(-Ci[j]*dtmp2 - Di[j]*ttmp*ttmp);
990 doublereal dphiddelta = -2.0*Ci[j]*deltam1*
phi;
991 doublereal dtriagtmpddelta = bi[j] * triagtmpm1 * dtriagddelta;
994 doublereal dtriagtmpdtau = -2.0*theta * bi[j] * triagtmp / triag;
996 doublereal dphidtau = - 2.0 * Di[j] * ttmp *
phi;
998 doublereal d2phiddeltadtau = 4.0 * Ci[j] * Di[j] * deltam1 * ttmp *
phi;
1000 doublereal d2triagtmpddeltadtau =
1001 (-Ai[j] * bi[j] * 2.0 / Bbetai[j] * triagtmpm1 * deltam1 * ptmp
1002 -2.0 * theta * bi[j] * (bi[j] - 1.0) * triagtmpm1 / triag * dtriagddelta);
1005 doublereal tmp = ni[i] * (triagtmp * (dphidtau + delta*d2phiddeltadtau) +
1006 delta * dtriagtmpddelta * dphidtau +
1007 dtriagtmpdtau * (phi + delta * dphiddelta) +
1008 d2triagtmpddeltadtau * delta *
phi);
1017 doublereal dd = deltaGuess;
1019 doublereal deldd = dd;
1020 doublereal pcheck = 1.0E-30 + 1.0E-8 * p_red;
1021 for (
int n = 0; n < 200; n++) {
1027 doublereal q1 =
phiR_d();
1034 doublereal pred0 = dd + dd * dd * q1;
1039 doublereal dpddelta = 1.0 + 2.0 * dd * q1 + dd * dd * q2;
1045 if (dpddelta <= 0.0) {
1046 if (deltaGuess > 1.0) {
1049 if (deltaGuess < 1.0) {
1057 if (fabs(pred0-p_red) < pcheck) {
1065 doublereal dpdx = dpddelta;
1067 dpdx = dpddelta * 1.1;
1078 deldd = - (pred0 - p_red) / dpdx;
1079 if (fabs(deldd) > 0.05) {
1080 deldd = deldd * 0.05 / fabs(deldd);
1086 if (fabs(deldd/dd) < 1.0E-14) {
1109 doublereal rd =
phiR_d();
1110 return 1.0 +
phi0() +
phiR() + delta * rd;
1117 doublereal rd =
phiR_d();
1118 doublereal nt =
phi0_t();
1119 doublereal rt =
phiR_t();
1120 return 1.0 + tau * (nt + rt) + delta * rd;
1126 doublereal nt =
phi0_t();
1127 doublereal rt =
phiR_t();
1128 doublereal p0 =
phi0();
1129 doublereal pR =
phiR();
1130 return tau * (nt + rt) - p0 - pR;
1136 doublereal nt =
phi0_t();
1137 doublereal rt =
phiR_t();
1138 return tau * (nt + rt);
1146 return - tau * tau * (ntt + rtt);
1153 doublereal cvR =
cv_R();
1155 doublereal rd =
phiR_d();
1158 doublereal num = (1.0 + delta * rd - delta * tau * rdt);
1159 doublereal cpR = cvR + (num * num /
1160 (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)
static const doublereal P_c
Critical Pressure (Pascals)
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.
static const doublereal M_water
Molecular Weight of water that is consistent with the paper (kg kmol-1)
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.