Пример #1
0
R125Class::R125Class()
{
	double n[] = {0.0, 5.280760, -8.676580, 0.7501127, 0.7590023, 0.01451899, 4.777189, -3.330988, 3.775673, -2.290919, 0.8888268, -0.6234864, -0.04127263, -0.08455389, -0.1308752, 0.008344962, -1.532005, -0.05883649, 0.02296658};
	double t[] = {0, 0.669, 1.05, 2.75, 0.956, 1.00, 2.00, 2.75, 2.38, 3.37, 3.47, 2.63, 3.45, 0.72, 4.23, 0.20, 4.5, 29.0, 24.0};
	double d[] = {0, 1, 1, 1, 2, 4, 1, 1, 2, 2, 3, 4, 5, 1, 5, 1, 2, 3, 5};
	double l[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 3, 3};
	double m[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.7, 7.0, 6.0};

	//Critical parameters
	crit.rho = 4.779*120.0214; //[kg/m^3]
	crit.p = PressureUnit(3617.7, UNIT_KPA); //[kPa]
	crit.T = 339.173; //[K]
	crit.v = 1/crit.rho; 

	// Other fluid parameters
	params.molemass = 120.0214;
	params.Ttriple = 172.52;
	params.accentricfactor = 0.3052;
	params.R_u = 8.314472;
	params.ptriple = 2.914;

	// Limits of EOS
	limits.Tmin = params.Ttriple;
	limits.Tmax = 500.0;
	limits.pmax = 100000.0;
	limits.rhomax = 1000000.0*params.molemass;

	phirlist.push_back(new phir_Lemmon2005( n,d,t,l,m,1,18,19));

	const double a1 = 37.2674, a2 = 8.88404, a3 = -49.8651;
	phi0list.push_back(new phi0_lead(a1,a2));
	phi0list.push_back(new phi0_logtau(-1));
	phi0list.push_back(new phi0_power(a3,-0.1));

	double a[] = {0,0,0,0, 2.303, 5.086, 7.3};
	double b[] = {0,0,0,0, 0.92578, 2.22895, 5.03283};

	std::vector<double> a_v(a,a+sizeof(a)/sizeof(double));
	std::vector<double> b_v(b,b+sizeof(b)/sizeof(double));

	phi0list.push_back(new phi0_Planck_Einstein(a_v,b_v,4,6));

	EOSReference.assign("Lemmon-JPCRD-2005");
	TransportReference.assign("Viscosity: Huber IECR 2006\n\n Conductivity: Perkins JCED 2006");
	name.assign("R125");
	REFPROPname.assign("R125");

	BibTeXKeys.EOS = "Lemmon-JPCRD-2005";
	BibTeXKeys.VISCOSITY = "Huber-IECR-2006";
	BibTeXKeys.CONDUCTIVITY = "Perkins-JCED-2006";
	BibTeXKeys.ECS_LENNARD_JONES = "Huber-IECR-2006";
	BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
}
Пример #2
0
TYPED_TEST_P(atomic_test, store_and_load)
{
	using limits = std::numeric_limits<TypeParam>;
	const TypeParam first = limits::max() / 2 - 1;
	const TypeParam second = first / 2;

	atomic::atomic<TypeParam> a_v(first);
	EXPECT_EQ(first, static_cast<TypeParam>(a_v));

	a_v.store(second);
	EXPECT_EQ(second, a_v.load());
}
Пример #3
0
TYPED_TEST_P(atomic_test, increment)
{
	using limits = std::numeric_limits<TypeParam>;
	const TypeParam first = limits::max() / 2 - 1;

	atomic::atomic<TypeParam> a_v(first);
	EXPECT_EQ(first, static_cast<TypeParam>(a_v));
	atomic::atomic<TypeParam> b_v(static_cast<TypeParam>(++a_v));
	EXPECT_EQ(first + 1, static_cast<TypeParam>(a_v));
	EXPECT_EQ(first + 1, static_cast<TypeParam>(b_v));
	atomic::atomic<TypeParam> c_v(static_cast<TypeParam>(a_v++));
	EXPECT_EQ(first + 1, static_cast<TypeParam>(c_v));
	EXPECT_EQ(first + 2, static_cast<TypeParam>(a_v));
}
Пример #4
0
TYPED_TEST_P(atomic_test, inc_dec_bounds)
{
	using limits = std::numeric_limits<TypeParam>;

	atomic::atomic<TypeParam> a_v(limits::max());
	// it looks like UB for signed type for both C/C++, but we are working
	// with registers.
	++a_v;
	EXPECT_EQ(limits::min(), a_v.load());
	--a_v;
	EXPECT_EQ(limits::max(), a_v.load());
	a_v++;
	EXPECT_EQ(limits::min(), a_v.load());
	a_v--;
	EXPECT_EQ(limits::max(), a_v.load());
}
Пример #5
0
R744Class::R744Class()
{

	static double alpha[40],beta[43],GAMMA[40],epsilon[40],a[43],b[43],A[43],B[43],C[43],D[43],a0[9],theta0[9];
	static double n[]={0,    
	 0.388568232032E+00,
	 0.293854759427E+01,
	-0.558671885350E+01,
	-0.767531995925E+00,
	 0.317290055804E+00,
	 0.548033158978E+00,
	 0.122794112203E+00,
	 
	 0.216589615432E+01,
	 0.158417351097E+01,
	-0.231327054055E+00,
	 0.581169164314E-01,
	-0.553691372054E-00,
	 0.489466159094E-00,
	-0.242757398435E-01,
	 0.624947905017E-01,
	-0.121758602252E+00,
	-0.370556852701E+00,
	-0.167758797004E-01,
	-0.119607366380E+00,
	-0.456193625088E-01,
	 0.356127892703E-01, 
	-0.744277271321E-02,
	-0.173957049024E-02,
	-0.218101212895E-01,
	 0.243321665592E-01,
	-0.374401334235E-01,
	 0.143387157569E-00,
	-0.134919690833E-00,
	-0.231512250535E-01,
	 0.123631254929E-01,
	 0.210583219729E-02,
	-0.339585190264E-03,
	 0.559936517716E-02,
	-0.303351180556E-03,

	-0.213654886883E+03,
	 0.266415691493E+05,
	-0.240272122046E+05,
	-0.283416034240E+03,
	 0.212472844002E+03,
	 
	-0.666422765408E+00,
	 0.726086323499E+00,
	 0.550686686128E-01};

	static double d[]={0,
	1,
	1,
	1,
	1,
	2,
	2,
	3,
	1,
	2,
	4,
	5,
	5,
	5,
	6,
	6,
	6,
	1,
	1,
	4,
	4,
	4,
	7,
	8,
	2,
	3,
	3,
	5,
	5,
	6,
	7,
	8,
	10,
	4,
	8,
	2,
	2,
	2,
	3,
	3};

	static double t[]={0.00,
	0.00,
	0.75,
	1.00,
	2.00,
	0.75,
	2.00,
	0.75,
	1.50,
	1.50,
	2.50,
	0.00,
	1.50,
	2.00,
	0.00,
	1.00,
	2.00,
	3.00,
	6.00,
	3.00,
	6.00,
	8.00,
	6.00,
	0.00,
	7.00,
	12.00,
	16.00,
	22.00,
	24.00,
	16.00,
	24.00,
	8.00,
	2.00,
	28.00,
	14.00,
	1.00,
	0.00,
	1.00,
	3.00,
	3.00};

	static double c[]={0,0,0,0,0,0,0,0,
	1,
	1,
	1,
	1,
	1,
	1,
	1,
	1,
	1,
	2,
	2,
	2,
	2,
	2,
	2,
	2,
	3,
	3,
	3,
	4,
	4,
	4,
	4,
	4,
	4,
	5,
	6};

	alpha[35]=25.0;
	alpha[36]=25.0;
	alpha[37]=25.0;
	alpha[38]=15.0;
	alpha[39]=20.0;

	beta[35]=325.0;
	beta[36]=300.0;
	beta[37]=300.0;
	beta[38]=275.0;
	beta[39]=275.0;

	GAMMA[35]=1.16;
	GAMMA[36]=1.19;
	GAMMA[37]=1.19;
	GAMMA[38]=1.25;
	GAMMA[39]=1.22;

	epsilon[35]=1.00;
	epsilon[36]=1.00;
	epsilon[37]=1.00;
	epsilon[38]=1.00;
	epsilon[39]=1.00;

	a[40]=3.5;
	a[41]=3.5;
	a[42]=3.0;

	b[40]=0.875;
	b[41]=0.925;
	b[42]=0.875;

	beta[40]=0.300;
	beta[41]=0.300;
	beta[42]=0.300;

	A[40]=0.700;
	A[41]=0.700;
	A[42]=0.700;

	B[40]=0.3;
	B[41]=0.3;
	B[42]=1.0;

	C[40]=10.0;
	C[41]=10.0;
	C[42]=12.5;

	D[40]=275.0;
	D[41]=275.0;
	D[42]=275.0;

	//Constants for ideal gas expression
	a0[1]=8.37304456;
	a0[2]=-3.70454304;
	a0[3]=2.500000;
	a0[4]=1.99427042;
	a0[5]=0.62105248;
	a0[6]=0.41195293;
	a0[7]=1.04028922;
	a0[8]=0.08327678;

	theta0[4]=3.15163;
	theta0[5]=6.11190;
	theta0[6]=6.77708;
	theta0[7]=11.32384;
	theta0[8]=27.08792;

	std::vector<double> a_v(a,a+sizeof(a)/sizeof(double));
	std::vector<double> b_v(b,b+sizeof(b)/sizeof(double));
	std::vector<double> A_v(A,A+sizeof(A)/sizeof(double));
	std::vector<double> B_v(B,B+sizeof(B)/sizeof(double));
	std::vector<double> C_v(C,C+sizeof(C)/sizeof(double));
	std::vector<double> D_v(D,D+sizeof(D)/sizeof(double));

	phirlist.push_back(new phir_power(n,d,t,c,1,34,35));
	phirlist.push_back(new phir_gaussian(n,d,t,alpha,epsilon,beta,GAMMA,35,39,40));
	phirlist.push_back(new phir_critical(n,d,t,a,b,beta,A,B,C,D,40,42,43));

	std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
	std::vector<double> theta0_v(theta0,theta0+sizeof(theta0)/sizeof(double));
	
	phi0list.push_back(new phi0_lead(a0[1],a0[2]));
	phi0list.push_back(new phi0_logtau(a0[3]));
	phi0list.push_back(new phi0_Planck_Einstein(a0,theta0,4,8,9));

	// Critical parameters
	crit.rho = 44.0098*10.6249063;
	crit.p = PressureUnit(7377.3, UNIT_KPA);
	crit.T = 304.1282;
	crit.v = 1.0/crit.rho;

	// Other fluid parameters
	params.molemass = 44.0098;
	params.Ttriple = 216.592;
	params.ptriple = 517.996380545;
	params.R_u = 8.31451;
	params.accentricfactor = 0.22394;

	// Limit parameters
	limits.Tmin = 216.592;
	limits.Tmax = 2000.0;
	limits.pmax = 800000.0;
	limits.rhomax = 37.24 * params.molemass;
	
	EOSReference.assign("\"A New Equation of State for Carbon Dioxide Covering the Fluid Region from the "
						"Triple Point Temperature to 1100 K at Pressures up to 800 MPa\", "
						"R. Span and W. Wagner, J. Phys. Chem. Ref. Data, v. 25, 1996");
		
	TransportReference.assign("\"The Transport Properties of Carbon Dioxide\","
							  " V. Vesovic and W.A. Wakeham and G.A. Olchowy and "
							  "J.V. Sengers and J.T.R. Watson and J. Millat"
							  "J. Phys. Chem. Ref. Data, v. 19, 1990");

	name.assign("CarbonDioxide");
	aliases.push_back("R744");
	aliases.push_back("co2");
	aliases.push_back("CO2");
	aliases.push_back("carbondioxide");
	REFPROPname.assign("CO2");

	// Adjust to the IIR reference state (h=200 kJ/kg, s = 1 kJ/kg for sat. liq at 0C)
    params.HSReferenceState = "IIR";

	BibTeXKeys.EOS = "Span-JPCRD-1996";
	BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
	BibTeXKeys.VISCOSITY = "Vesovic-JPCRD-1990";
	BibTeXKeys.CONDUCTIVITY = "Vesovic-JPCRD-1990";
}