Salome HOME
update CoreFlows
[tools/solverlab.git] / CoreFlows / examples / C / testEOS.cxx
1 #include "Fluide.h"
2 #include <cstdlib>
3
4 #include <iostream>
5
6 using namespace std;
7
8 int main(int argc, char** argv) {
9         double _Tsat = 656; //saturation temperature used in Dellacherie EOS
10         StiffenedGasDellacherie fluid1 = StiffenedGasDellacherie(1.43, 0,
11                         2.030255e6, 1040.14); //stiffened gas law for Gas from S. Dellacherie
12         StiffenedGasDellacherie fluid2 = StiffenedGasDellacherie(2.35, 1e9,
13                         -1.167056e6, 1816.2); //stiffened gas law for water from S. Dellacherie
14
15         double P = 155e6;
16         double T = 500;
17         double h = 0;
18
19         double rho1 = fluid1.getDensity(P, T);
20         double Tvalid1 = fluid1.getTemperatureFromPressure(P, rho1);
21         double h1 = fluid1.getEnthalpy(T, rho1);
22
23         cout << endl;
24         cout << "density fluide 1 = " << rho1 << endl;
25         cout << "Tvalid1 fluide 1 = " << Tvalid1 << endl;
26         cout << "h1 fluide 1 = " << h1 << endl;
27
28         return  EXIT_SUCCESS;
29 }