Added R152A, R123, CO2 conductivity

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-05-26 10:52:44 +02:00
parent fee23cab03
commit 1281f52d8a
13 changed files with 280 additions and 76 deletions

View File

@@ -447,6 +447,45 @@
],
"NAME": "CarbonDioxide",
"TRANSPORT": {
"conductivity": {
"BibTeX": "Marsh-JCED-2002",
"critical": {
"GAMMA": 0.052,
"R0": 1.01,
"gamma": 1.2415,
"qD": 2500000000.0,
"type": "simplified_Olchowy_Sengers",
"zeta0": 1.5e-10
},
"dilute": {
"hardcoded": "CO2"
},
"residual": {
"B": [
2.447164e-05,
8.705605e-08,
-6.54795e-11,
6.594919e-14
],
"T_reducing": 304.107,
"T_reducing_units": "K",
"d": [
1,
2,
3,
4
],
"rhomass_reducing": 1,
"rhomass_reducing_units": "kg/m^3",
"t": [
0,
0,
0,
0
],
"type": "polynomial"
}
},
"viscosity": {
"BibTeX": "Fenghour-JPCRD-1998",
"_note": "sigma set to 1 nm in since sigma wrapped into constant in equation in Fenghour",

View File

@@ -257,6 +257,80 @@
],
"NAME": "R123",
"TRANSPORT": {
"conductivity": {
"BibTeX": "Laesecke-IJR-1996",
"critical": {
"hardcoded": "R123"
},
"dilute": {
"A": [
-0.00778,
5.695e-05
],
"B": [
1.0
],
"T_reducing": 1,
"T_reducing_units": "K",
"m": [
0
],
"n": [
0,
1
],
"type": "ratio_of_polynomials"
},
"residual": {
"B": [
0.0642894,
-0.0530474,
4.53522e-05,
-0.139928,
0.16654,
-0.0162656,
0.136819,
-0.183291,
0.0357146,
-0.023121,
0.0341945,
-0.00757341
],
"T_reducing": 456.831,
"T_reducing_units": "K",
"d": [
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4
],
"rhomass_reducing": 550.0,
"rhomass_reducing_units": "kg/m^3",
"t": [
1.5,
2,
6,
0,
0.5,
1.5,
0,
0.5,
1.5,
0,
0.5,
1.5
],
"type": "polynomial"
}
},
"viscosity": {
"BibTeX": "Tanaka-IJT-1996",
"dilute": {

View File

@@ -298,7 +298,9 @@
},
"dilute": {
"A": [
-0.0103589, 0.0308929, 0.000230348
-0.0103589,
0.0308929,
0.000230348
],
"B": [
1.0
@@ -317,7 +319,16 @@
},
"residual": {
"B": [
-0.0428296, 0.0927099, -0.0702107, 0.0249708, -0.00301838, 0.0434288, -0.0605844, 0.0440187, -0.0155082, 0.00210190
-0.0428296,
0.0927099,
-0.0702107,
0.0249708,
-0.00301838,
0.0434288,
-0.0605844,
0.0440187,
-0.0155082,
0.0021019
],
"T_reducing": 382.52,
"T_reducing_units": "K",

View File

@@ -251,6 +251,61 @@
],
"NAME": "R152A",
"TRANSPORT": {
"conductivity": {
"BibTeX": "Krauss-IJT-1996",
"critical": {
"GAMMA": 0.0487,
"R0": 1.03,
"gamma": 1.239,
"qD": 2288329519.45,
"type": "simplified_Olchowy_Sengers",
"zeta0": 1.894e-10
},
"dilute": {
"A": [
-0.014942,
9.73283e-05
],
"B": [
1.0
],
"T_reducing": 1,
"T_reducing_units": "K",
"m": [
0
],
"n": [
0,
1
],
"type": "ratio_of_polynomials"
},
"residual": {
"B": [
0.0106039395,
0.0136956435,
-0.0062916315,
0.0019794274499999997
],
"T_reducing": 386.411,
"T_reducing_units": "K",
"d": [
1,
2,
3,
4
],
"rhomass_reducing": 368.0,
"rhomass_reducing_units": "kg/m^3",
"t": [
0,
0,
0,
0
],
"type": "polynomial"
}
},
"viscosity": {
"BibTeX": "Krauss-IJT-1996",
"dilute": {

View File

@@ -60,19 +60,16 @@ Water & & Huber JPCRD 2012\\
\hline\hline STANDARD BELOW THIS LINE \\ \hline\hline
R152A & & Krauss IJT 1996 \\
R404A, R407C, R401A, R507A & & Geller IJT 2001 \\
Propane & & Marsh JCED 2002\\
R125 & & Perkins JCED 2006 \\
Isobutane & & Perkins JCED 2002\\
Butane & & Perkins JCED 2002 \\
Octane, Nonane, Decane & & Huber FPE 2005\\
Dodecane & & Huber EF 2004 \\
Normal-/Parahydrogen & & Assael JPCRD 2011\\
R1234ze(E) & & Perkins JCED 2011 \\
\hline\hline DONE BELOW THIS LINE\\ \hline\hline
R1234ze(E) & & Perkins JCED 2011 \\
Propane & & Marsh JCED 2002\\
Dodecane & & Huber EF 2004 \\
Octane, Nonane, Decane & & Huber FPE 2005\\
Isobutane & & Perkins JCED 2002\\
Butane & & Perkins JCED 2002 \\
R125 & & Perkins JCED 2006 \\
Normal-/Parahydrogen & & Assael JPCRD 2011\\
SF6 & & Assael JPCRD 2012\\
Toluene & & Assael JPCRD 2012\\
Heptane & & Assael JPCRD 2013\\

View File

@@ -94,22 +94,18 @@ You might want to start by looking at CoolProp.h
/// @returns key the BibTeX key
std::string get_BibTeXKey(std::string FluidName, std::string item);
/*
/// Set the reference state for a pointer to a fluid (not exposed)
/// @param pFluid A pointer to a Fluid instance
/// @param reference_state The reference state to use, one of "IIR" (h=200 kJ/kg, s=1 kJ/kg/K at 0C sat. liq.) "ASHRAE" (h=0,s=0 @ -40C sat liq), "NBP" (h=0,s=0 @ 1.0 bar sat liq.)
//int set_reference_stateP(Fluid *pFluid, std::string reference_state);
/// Set the reference state based on a string representation (consistent naming with RFPROP)
/// Set the reference state based on a string representation of the desired reference state (consistent naming with REFPROP)
/// @param FluidName The name of the fluid
/// @param reference_state The reference state to use, one of "IIR" (h=200 kJ/kg, s=1 kJ/kg/K at 0C sat. liq.) "ASHRAE" (h=0,s=0 @ -40C sat liq), "NBP" (h=0,s=0 @ 1.0 bar sat liq.)
//int set_reference_stateS(std::string FluidName, std::string reference_state);*/
/// Set the reference state based on a state point
int set_reference_stateS(std::string FluidName, std::string reference_state);
/// Set the reference state based on a thermodynamic state point
/// @param FluidName The name of the fluid
/// @param T Temperature at reference state [K]
/// @param rho Density at reference state [kg/m^3]
/// @param h0 Enthalpy at reference state [kJ/kg]
/// @param s0 Entropy at references state [kJ/kg/K]
//int set_reference_stateD(std::string FluidName, double T, double rho, double h0, double s0);
/// @param rho Density at reference state [mol/m^3]
/// @param h0 Enthalpy at reference state [J/kg]
/// @param s0 Entropy at references state [J/kg/K]
int set_reference_stateD(std::string FluidName, double T, double rho, double h0, double s0);
/*
/// Return the phase of the given state point with temperature, pressure as inputs
@@ -142,27 +138,6 @@ You might want to start by looking at CoolProp.h
/// @param rho Density [kg/m^3]
/// @param pFluid Pointer to Fluid instance
double DerivTerms(long iTerm, double T, double rho, Fluid * pFluid);*/
/*/// Return a fluid value that does not depend on the thermodynamic state
/// @param FluidName The name of the fluid
/// @param Output The name of the output parameter, some options are "Ttriple", "Tcrit", "pcrit", "Tmin", "molemass", "rhocrit", "accentric" (not all parameters are valid for all fluids)
/// @returns val The value, or _HUGE if not valid
double Props1(std::string FluidName,std::string Output);
/// Return a value that depends on the thermodynamic state
/// @param Output The output parameter, one of "T","D","H",etc.
/// @param Name1 The first state variable name, one of "T","D","H",etc.
/// @param Prop1 The first state variable value
/// @param Name2 The second state variable name, one of "T","D","H",etc.
/// @param Prop2 The second state variable value
/// @param FluidName The fluid name
double Props(std::string Output,std::string Name1, double Prop1, std::string Name2, double Prop2, std::string FluidName);
/// Return a value that depends on the thermodynamic state
/// @param Output The output parameter, one of "T","D","H",etc.
/// @param Name1 The first state variable name, one of "T","D","H",etc.
/// @param Prop1 The first state variable value
/// @param Name2 The second state variable name, one of "T","D","H",etc.
/// @param Prop2 The second state variable value
/// @param FluidName The fluid name
double Props(std::string Output,char Name1, double Prop1, char Name2, double Prop2, std::string FluidName);*/
} /* namespace CoolProp */
#endif

View File

@@ -51,6 +51,7 @@ struct ConductivityDiluteRatioPolynomialsData{
struct ConductivityDiluteVariables
{
enum ConductivityDiluteEnum {CONDUCTIVITY_DILUTE_RATIO_POLYNOMIALS,
CONDUCTIVITY_DILUTE_CO2,
CONDUCTIVITY_DILUTE_NOT_SET
};
int type;
@@ -65,7 +66,9 @@ struct ConductivityResidualPolynomialData{
};
struct ConductivityResidualVariables
{
enum ConductivityResidualEnum {CONDUCTIVITY_RESIDUAL_POLYNOMIAL,
enum ConductivityResidualEnum {CONDUCTIVITY_RESIDUAL_POLYNOMIAL,
CONDUCTIVITY_RESIDUAL_R123,
CONDUCTIVITY_RESIDUAL_CO2,
CONDUCTIVITY_RESIDUAL_NOT_SET
};
int type;
@@ -91,6 +94,7 @@ struct ConductivityCriticalSimplifiedOlchowySengersData{
struct ConductivityCriticalVariables
{
enum ConductivityResidualEnum {CONDUCTIVITY_CRITICAL_SIMPLIFIED_OLCHOWY_SENGERS,
CONDUCTIVITY_CRITICAL_R123,
CONDUCTIVITY_CRITICAL_NOT_SET
};
int type;

View File

@@ -454,7 +454,7 @@ protected:
fluid.transport.hardcoded_viscosity = CoolProp::TransportPropertyData::VISCOSITY_HARDCODED_R23; return;
}
else{
throw ValueError();
throw ValueError(format("hardcoded viscosity [%s] is not understood for fluid %s",target.c_str(), fluid.name.c_str()));
}
}
@@ -484,12 +484,15 @@ protected:
/// Parse the transport properties
void parse_dilute_conductivity(rapidjson::Value &dilute, CoolPropFluid & fluid)
{
/*if (dilute.HasMember("hardcoded")){
if (dilute.HasMember("hardcoded")){
std::string target = cpjson::get_string(dilute, "hardcoded");
if (!target.compare("Ethane")){
fluid.transport.viscosity_dilute.type = CoolProp::ViscosityDiluteVariables::VISCOSITY_DILUTE_ETHANE; return;
if (!target.compare("CO2")){
fluid.transport.conductivity_dilute.type = CoolProp::ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_CO2; return;
}
}*/
else{
throw ValueError(format("hardcoded dilute conductivity term [%s] is not understood for fluid %s",target.c_str(), fluid.name.c_str()));
}
}
std::string type = cpjson::get_string(dilute, "type");
if (!type.compare("ratio_of_polynomials")){
// Get a reference to the entry in the fluid instance
@@ -513,12 +516,15 @@ protected:
/// Parse the transport properties
void parse_residual_conductivity(rapidjson::Value &dilute, CoolPropFluid & fluid)
{
/*if (dilute.HasMember("hardcoded")){
if (dilute.HasMember("hardcoded")){
std::string target = cpjson::get_string(dilute, "hardcoded");
if (!target.compare("Ethane")){
fluid.transport.viscosity_dilute.type = CoolProp::ViscosityDiluteVariables::VISCOSITY_DILUTE_ETHANE; return;
if (!target.compare("CO2")){
fluid.transport.conductivity_residual.type = CoolProp::ConductivityResidualVariables::CONDUCTIVITY_RESIDUAL_CO2; return;
}
}*/
else{
throw ValueError(format("hardcoded residual conductivity term [%s] is not understood for fluid %s",target.c_str(), fluid.name.c_str()));
}
}
std::string type = cpjson::get_string(dilute, "type");
if (!type.compare("polynomial")){
// Get a reference to the entry in the fluid instance
@@ -541,12 +547,15 @@ protected:
void parse_critical_conductivity(rapidjson::Value &critical, CoolPropFluid & fluid)
{
/*if (dilute.HasMember("hardcoded")){
std::string target = cpjson::get_string(dilute, "hardcoded");
if (!target.compare("Ethane")){
fluid.transport.viscosity_dilute.type = CoolProp::ViscosityDiluteVariables::VISCOSITY_DILUTE_ETHANE; return;
if (critical.HasMember("hardcoded")){
std::string target = cpjson::get_string(critical, "hardcoded");
if (!target.compare("R123")){
fluid.transport.conductivity_critical.type = CoolProp::ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_R123; return;
}
}*/
else{
throw ValueError(format("critical conductivity term [%s] is not understood for fluid %s",target.c_str(), fluid.name.c_str()));
}
}
std::string type = cpjson::get_string(critical, "type");
if (!type.compare("simplified_Olchowy_Sengers")){
//// Get a reference to the entry in the fluid instance

View File

@@ -219,6 +219,8 @@ long double HelmholtzEOSMixtureBackend::calc_conductivity(void)
{
case ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_RATIO_POLYNOMIALS:
lambda_dilute = TransportRoutines::conductivity_dilute_ratio_polynomials(*this); break;
case ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_CO2:
lambda_dilute = TransportRoutines::conductivity_dilute_hardcoded_CO2(*this); break;
default:
throw ValueError(format("dilute conductivity type [%d] is invalid for fluid %s", components[0]->transport.conductivity_dilute.type, name().c_str()));
}
@@ -239,6 +241,8 @@ long double HelmholtzEOSMixtureBackend::calc_conductivity(void)
{
case ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_SIMPLIFIED_OLCHOWY_SENGERS:
lambda_critical = TransportRoutines::conductivity_critical_simplified_Olchowy_Sengers(*this); break;
case ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_R123:
lambda_critical = TransportRoutines::conductivity_critical_hardcoded_R123(*this); break;
default:
throw ValueError(format("critical conductivity type [%d] is invalid for fluid %s", components[0]->transport.viscosity_dilute.type, name().c_str()));
}

View File

@@ -539,6 +539,37 @@ long double TransportRoutines::conductivity_critical_simplified_Olchowy_Sengers(
}
};
long double TransportRoutines::conductivity_critical_hardcoded_R123(HelmholtzEOSMixtureBackend &HEOS){
double a13 = 0.486742e-2, a14 = -100, a15 = -7.08535;
return a13*exp(a14*pow(HEOS.tau()-1,4)+a15*pow(HEOS.delta()-1,2));
};
long double TransportRoutines::conductivity_dilute_hardcoded_CO2(HelmholtzEOSMixtureBackend &HEOS){
double e_k=251.196,Tstar;
double b[]={0.4226159,0.6280115,-0.5387661,0.6735941,0,0,-0.4362677,0.2255388};
double c[]={0,2.387869e-2,4.350794,-10.33404,7.981590,-1.940558};
//Vesovic Eq. 31 [no units]
double summer = 0;
for (int i=1; i<=5; i++)
summer += c[i]*pow(HEOS.T()/100.0, 2-i);
double cint_k = 1.0 + exp(-183.5/HEOS.T())*summer;
//Vesovic Eq. 12 [no units]
double r = sqrt(2.0/5.0*cint_k);
Tstar = HEOS.T()/e_k;
//Vesovic Eq. 30 [no units]
summer = 0;
for (int i=0; i<=7; i++)
summer += b[i]/pow(Tstar, i);
double Gstar_lambda = summer;
//Vesovic Eq. 29 [W/m/K]
double lambda_0 = 0.475598e-3*sqrt(HEOS.T())*(1+r*r)/Gstar_lambda;
return lambda_0;
}
}; /* namespace CoolProp */

View File

@@ -159,6 +159,9 @@ public:
*/
static long double conductivity_critical_simplified_Olchowy_Sengers(HelmholtzEOSMixtureBackend &HEOS);
static long double conductivity_critical_hardcoded_R123(HelmholtzEOSMixtureBackend &HEOS);
static long double conductivity_dilute_hardcoded_CO2(HelmholtzEOSMixtureBackend &HEOS);
}; /* class TransportRoutines */
}; /* namespace CoolProp */

View File

@@ -643,18 +643,6 @@ double Props1SI(std::string FluidName,std::string Output)
//
//int set_reference_stateS(std::string Ref, std::string reference_state)
//{
// Fluid *pFluid=Fluids.get_fluid(Ref);
// if (pFluid!=NULL)
// {
// return set_reference_stateP(pFluid, reference_state);
// }
// else{
// return -1;
// }
//}
//
//int set_reference_stateP(Fluid *pFluid, std::string reference_state)
//{
// CoolPropStateClassSI CPS(pFluid);
// if (!reference_state.compare("IIR"))
// {
@@ -702,7 +690,6 @@ double Props1SI(std::string FluidName,std::string Output)
// {
// return -1;
// }
//
//}
//int set_reference_stateD(std::string Ref, double T, double rho, double h0, double s0)
//{
@@ -716,8 +703,8 @@ double Props1SI(std::string FluidName,std::string Output)
// double s1 = CPS.s();
// double deltah = h1-h0; // offset from given enthalpy in SI units
// double deltas = s1-s0; // offset from given enthalpy in SI units
// double delta_a1 = deltas/((8314.472/pFluid->params.molemass));
// double delta_a2 = -deltah/((8314.472/pFluid->params.molemass)*pFluid->reduce.T);
// double delta_a1 = deltas/((8314.472));
// double delta_a2 = -deltah/((8314.472)*pFluid->reduce.T);
// pFluid->phi0list.push_back(new phi0_enthalpy_entropy_offset(delta_a1, delta_a2));
// return 0;
// }

View File

@@ -340,6 +340,21 @@ vel("n-Propane", "T", 368, "Dmolar", 1e-10, "L", 0.0266135388745317,1e-4),
//vel("R1234ze(E)", "T", 250, "Dmass", 1349.37, "L", 0.10066, 1e-4),
//vel("R1234ze(E)", "T", 300, "Dmass", 1233.82, "L", 0.085389, 1e-4),
// From Laesecke, IJR 1995
vel("R123", "T", 180, "Dmass", 1739, "L", 110.9e-3, 1e-3),
vel("R123", "T", 180, "Dmass", 0.2873e-2, "L", 2.473e-3, 1e-3),
vel("R123", "T", 430, "Dmass", 996.35, "L", 45.62e-3, 1e-3),
vel("R123", "T", 430, "Dmass", 166.9, "L", 21.03e-3, 1e-3),
// From Vesovic, JPCRD, 1990
vel("CO2", "T", 220, "Dmass", 2.440, "L", 10.90e-3, 1e-3),
vel("CO2", "T", 300, "Dmass", 1.773, "L", 16.77e-3, 1e-3),
vel("CO2", "T", 800, "Dmass", 0.662, "L", 56.65e-3, 1e-3),
vel("CO2", "T", 304, "Dmass", 254.3205, "L", 42.52e-3, 1e-3),
vel("CO2", "T", 220, "Dmass", 1194.86, "L", 187.50e-3, 1e-3),
vel("CO2", "T", 300, "Dmass", 1029.27, "L", 137.61e-3, 1e-3),
vel("CO2", "T", 800, "Dmass", 407.828, "L", 78.47e-3, 1e-3),
};
TEST_CASE_METHOD(TransportValidationFixture, "Compare thermal conductivities against published data", "[conductivity]")