OGS
DimensionLessGibbsFreeEnergyRegion1.cpp
Go to the documentation of this file.
1
16
17#include <cmath>
18
19namespace MaterialLib
20{
21namespace Fluid
22{
23static const double ni[34] = {
24 1.4632971213167E-01, -8.4548187169114E-01, -3.7563603672040E+00,
25 3.3855169168385E+00, -9.5791963387872E-01, 1.5772038513228E-01,
26 -1.6616417199501E-02, 8.1214629983568E-04, 2.8319080123804E-04,
27 -6.0706301565874E-04, -1.8990068218419E-02, -3.2529748770505E-02,
28 -2.1841717175414E-02, -5.2838357969930E-05, -4.7184321073267E-04,
29 -3.0001780793026E-04, 4.7661393906987E-05, -4.4141845330846E-06,
30 -7.2694996297594E-16, -3.1679644845054E-05, -2.8270797985312E-06,
31 -8.5205128120103E-10, -2.2425281908000E-06, -6.5171222895601E-07,
32 -1.4341729937924E-13, -4.0516996860117E-07, -1.2734301741641E-09,
33 -1.7424871230634E-10, -6.8762131295531E-19, 1.4478307828521E-20,
34 2.6335781662795E-23, -1.1947622640071E-23, 1.8228094581404E-24,
35 -9.35370872924580E-26};
36
37static const double li[34] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
38 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4,
39 4, 5, 8, 8, 21, 23, 29, 30, 31, 32};
40
41static const double ji[34] = {
42 -2, -1, 0, 1, 2, 3, 4, 5, -9, -7, -1, 0, 1, 3, -3, 0, 1,
43 3, 17, -4, 0, 6, -5, -2, 10, -8, -11, -6, -29, -31, -38, -39, -40, -41};
44
46 const double pi)
47{
48 double val = 0.;
49 for (int i = 0; i < 34; i++)
50 {
51 val += ni[i] * std::pow(7.1 - pi, li[i]) * std::pow(tau - 1.222, ji[i]);
52 }
53
54 return val;
55}
56
58 const double pi)
59{
60 double val = 0.;
61 for (int i = 0; i < 34; i++)
62 {
63 val += ni[i] * ji[i] * std::pow(7.1 - pi, li[i]) *
64 std::pow(tau - 1.222, ji[i] - 1.0);
65 }
66
67 return val;
68}
69
71 const double tau, const double pi)
72{
73 double val = 0.;
74 for (int i = 0; i < 34; i++)
75 {
76 val += ni[i] * ji[i] * (ji[i] - 1.0) * std::pow(7.1 - pi, li[i]) *
77 std::pow(tau - 1.222, ji[i] - 2.0);
78 }
79
80 return val;
81}
82
84 const double pi)
85{
86 double val = 0.;
87 for (int i = 0; i < 34; i++)
88 {
89 val -= ni[i] * li[i] * std::pow(7.1 - pi, li[i] - 1.0) *
90 std::pow(tau - 1.222, ji[i]);
91 }
92
93 return val;
94}
95
97 const double pi)
98{
99 double val = 0.;
100 for (int i = 0; i < 34; i++)
101 {
102 val += ni[i] * li[i] * (li[i] - 1.0) * std::pow(7.1 - pi, li[i] - 2.0) *
103 std::pow(tau - 1.222, ji[i]);
104 }
105
106 return val;
107}
108
110 const double tau, const double pi)
111{
112 double val = 0.;
113 for (int i = 0; i < 34; i++)
114 {
115 val -= ni[i] * ji[i] * li[i] * std::pow(7.1 - pi, li[i] - 1.0) *
116 std::pow(tau - 1.222, ji[i] - 1.0);
117 }
118
119 return val;
120}
121
122} // namespace Fluid
123} // namespace MaterialLib
Declare a class for dimensionless Gibbs free energy, region1.
static double get_dgamma_dpi_dpi(const double tau, const double pi)
static double get_dgamma_dtau_dtau(const double tau, const double pi)