-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.cpp
46 lines (35 loc) · 1.71 KB
/
main.cpp
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
#include "AbstractState.h"
#include "crossplatform_shared_ptr.h"
#include "src/InternalFlow.h"
#include "src/Microchannel.h"
#include <iostream>
#include "time.h"
int main()
{
clock_t t1,t2;
shared_ptr<CoolProp::AbstractState> AS(CoolProp::AbstractState::factory("HEOS","Propane"));
AS->update(CoolProp::PQ_INPUTS,1500000,0.5);
double Kim = ThermalCorr::Microchannel::Kim_Mudawar_2012_DPDZ_f(*AS, 100, 0.001, 1.0, 0.5);
//double p = IProps(iP,iT,40+273.15,iQ,0,get_Fluid_index("R134a"))*1000;
//double Kim4 = Kim_Mudawar_2012_AdiabaticCondensing_Microchannel_DPDZ_f("R134a", 100, 0.0014, p, 1.0, 0.75);
//double Cavallini = Cavallini_2009_AnnularMist_DPDZ_f("R134a", 100, 0.0014, p, 0.05);
//double LM = Lockhart_Martinelli_1949_DPDZ_f("R134a", 100, 0.0014, p, 0.75);
//double Friedl = Friedl_1979_DPDZ_f("R134a", 100, 0.0014, p, 0.75);
//double pp = IProps(iP,iT,40+273.15,iQ,0,get_Fluid_index("R410A"))*1000;
//double Kim5 = Kim_Mudawar_2012_AdiabaticCondensing_Microchannel_DPDZ_f("R410A", 50, 0.001, pp, -1, 0.8);
//double LM2 = Lockhart_Martinelli_1949_DPDZ_f("Propane", 100, 0.0015, 9.5e5, 0.8);
//double Kim6 = Kim_Mudawar_2012_AdiabaticCondensing_Microchannel_DPDZ_f("Propane", 100, 0.0015, 9.5e5, -1, 0.8);
//double Zivi = Zivi_DPDZ_a("R134a",100,1500000,0.9999,0.0001);
t1 = clock();
long N = 1000*10;
double rr = 4;
AS->update(CoolProp::PQ_INPUTS,1500000,0);
for (double Q = 0; Q <= 1.0; Q+=1/((double)N-1))
{
//IProps(iT,iP,1500,iQ,Q+1e-20*Q,get_Fluid_index("Propane"));
rr = ThermalCorr::Microchannel::Kim_Mudawar_2012_DPDZ_f(*AS, 100, 0.01, 1, Q);
}
t2 = clock();
printf("elapsed time %g us/call\n",double(t2-t1)/CLOCKS_PER_SEC/N*1e6);
return 0;
}