forked from lingzou/IAPWS-1995-IF97
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIF97_interface.h
152 lines (141 loc) · 6.35 KB
/
IF97_interface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#ifndef IF97_INTERFACE_H
#define IF97_INTERFACE_H
extern "C"
{
/***************************************************************
* Saturation line
***************************************************************/
double T_sat_from_p(double p);
double p_sat_from_T(double T);
// Saturation properties by T
double v_l_sat_from_T(double T);
double rho_l_sat_from_T(double T);
double e_l_sat_from_T(double T);
double h_l_sat_from_T(double T);
double s_l_sat_from_T(double T);
double cv_l_sat_from_T(double T);
double cp_l_sat_from_T(double T);
double c_l_sat_from_T(double T);
double k_l_sat_from_T(double T);
double mu_l_sat_from_T(double T);
void liquid_sat_properties_from_T(double T, double * p, double * v, double * rho, double * e, double * h,
double * s, double * cv, double * cp, double * c, double * k, double * mu);
double v_g_sat_from_T(double T);
double rho_g_sat_from_T(double T);
double e_g_sat_from_T(double T);
double h_g_sat_from_T(double T);
double s_g_sat_from_T(double T);
double cv_g_sat_from_T(double T);
double cp_g_sat_from_T(double T);
double c_g_sat_from_T(double T);
double k_g_sat_from_T(double T);
double mu_g_sat_from_T(double T);
void vapor_sat_properties_from_T(double T, double * p, double * v, double * rho, double * e, double * h,
double * s, double * cv, double * cp, double * c, double * k, double * mu);
// Saturation properties by p
double v_l_sat_from_p(double p);
double rho_l_sat_from_p(double p);
double e_l_sat_from_p(double p);
double h_l_sat_from_p(double p);
double s_l_sat_from_p(double p);
double cv_l_sat_from_p(double p);
double cp_l_sat_from_p(double p);
double c_l_sat_from_p(double p);
double k_l_sat_from_p(double p);
double mu_l_sat_from_p(double p);
void liquid_sat_properties_from_p(double p, double * T, double * v, double * rho, double * e, double * h,
double * s, double * cv, double * cp, double * c, double * k, double * mu);
double v_g_sat_from_p(double p);
double rho_g_sat_from_p(double p);
double e_g_sat_from_p(double p);
double h_g_sat_from_p(double p);
double s_g_sat_from_p(double p);
double cv_g_sat_from_p(double p);
double cp_g_sat_from_p(double p);
double c_g_sat_from_p(double p);
double k_g_sat_from_p(double p);
double mu_g_sat_from_p(double p);
void vapor_sat_properties_from_p(double p, double * T, double * v, double * rho, double * e, double * h,
double * s, double * cv, double * cp, double * c, double * k, double * mu);
/***************************************************************
* (p, T)-based properties
***************************************************************/
double v_from_pT(double p, double T);
double rho_from_pT(double p, double T);
double e_from_pT(double p, double T);
double h_from_pT(double p, double T);
double s_from_pT(double p, double T);
double cv_from_pT(double p, double T);
double cp_from_pT(double p, double T);
double c_from_pT(double p, double T);
double k_from_pT(double p, double T);
double mu_from_pT(double p, double T);
void properties_from_pT(double p, double T, double * v, double * rho, double * e, double * h,
double * s, double * cv, double * cp, double * c, double * k, double * mu);
/***************************************************************
* (p, h)-based properties
***************************************************************/
int locateRegion_from_ph(double p, double h);
double x_from_ph(double p, double h);
double v_from_ph(double p, double h);
double rho_from_ph(double p, double h);
double e_from_ph(double p, double h);
double T_from_ph(double p, double h);
double s_from_ph(double p, double h);
double cv_from_ph(double p, double h);
double cp_from_ph(double p, double h);
double c_from_ph(double p, double h);
double k_from_ph(double p, double h);
double mu_from_ph(double p, double h);
void properties_from_ph(double p, double h, double * x, double * v, double * rho, double * e, double * T,
double * s, double * cv, double * cp, double * c, double * k, double * mu);
/***************************************************************
* (p, s)-based properties
***************************************************************/
int locateRegion_from_ps(double p, double s);
double x_from_ps(double p, double h);
double v_from_ps(double p, double s);
double rho_from_ps(double p, double s);
double e_from_ps(double p, double s);
double T_from_ps(double p, double s);
double h_from_ps(double p, double s);
double cv_from_ps(double p, double s);
double cp_from_ps(double p, double s);
double c_from_ps(double p, double s);
double k_from_ps(double p, double s);
double mu_from_ps(double p, double s);
void properties_from_ps(double p, double s, double * x, double * v, double * rho, double * e, double * T,
double * h, double * cv, double * cp, double * c, double * k, double * mu);
/***************************************************************
* (h, v)-based properties
***************************************************************/
double p_from_hv(double h, double v);
double x_from_hv(double h, double v);
double e_from_hv(double h, double v);
double T_from_hv(double h, double v);
double s_from_hv(double h, double v);
double cv_from_hv(double h, double v);
double cp_from_hv(double h, double v);
double c_from_hv(double h, double v);
double k_from_hv(double h, double v);
double mu_from_hv(double h, double v);
void properties_from_hv(double h, double v, double * x, double * p, double * e, double * T,
double * s, double * cv, double * cp, double * c, double * k, double * mu);
/***************************************************************
* (h, s)-based properties
***************************************************************/
double p_from_hs(double h, double s);
double x_from_hs(double h, double s);
double v_from_hs(double h, double s);
double rho_from_hs(double h, double s);
double e_from_hs(double h, double s);
double T_from_hs(double h, double s);
double cv_from_hs(double h, double s);
double cp_from_hs(double h, double s);
double c_from_hs(double h, double s);
double k_from_hs(double h, double s);
double mu_from_hs(double h, double s);
void properties_from_hs(double h, double s, double * x, double * v, double * rho, double * p, double * e, double * T,
double * cv, double * cp, double * c, double * k, double * mu);
}
#endif /*IF97_INTERFACE_H*/