mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-02-08 21:05:14 -05:00
Implemented conductivity for CO2 from Scalabrin. All CO2 tests pass now.
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -270,6 +270,12 @@ protected:
|
||||
if (!target.compare("Ethane")){
|
||||
fluid.transport.viscosity_dilute.type = CoolProp::ViscosityDiluteVariables::VISCOSITY_DILUTE_ETHANE; return;
|
||||
}
|
||||
else if (!target.compare("Ethane")){
|
||||
fluid.transport.viscosity_dilute.type = CoolProp::ViscosityDiluteVariables::VISCOSITY_DILUTE_ETHANE; return;
|
||||
}
|
||||
else{
|
||||
throw ValueError(format("hardcoded dilute viscosity [%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("collision_integral")){
|
||||
@@ -528,6 +534,9 @@ protected:
|
||||
else if (!target.compare("Ethane")){
|
||||
fluid.transport.conductivity_dilute.type = CoolProp::ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_ETHANE; return;
|
||||
}
|
||||
else if (!target.compare("none")){
|
||||
fluid.transport.conductivity_dilute.type = CoolProp::ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_NONE; return;
|
||||
}
|
||||
else{
|
||||
throw ValueError(format("hardcoded dilute conductivity term [%s] is not understood for fluid %s",target.c_str(), fluid.name.c_str()));
|
||||
}
|
||||
@@ -619,6 +628,9 @@ protected:
|
||||
else if (!target.compare("Ammonia")){
|
||||
fluid.transport.conductivity_critical.type = CoolProp::ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_AMMONIA; return;
|
||||
}
|
||||
else if (!target.compare("CarbonDioxideScalabrinJPCRD2006")){
|
||||
fluid.transport.conductivity_critical.type = CoolProp::ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_CARBONDIOXIDE_SCALABRIN_JPCRD_2006; return;
|
||||
}
|
||||
else if (!target.compare("None")){
|
||||
fluid.transport.conductivity_critical.type = CoolProp::ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_NONE; return;
|
||||
}
|
||||
|
||||
@@ -299,6 +299,8 @@ long double HelmholtzEOSMixtureBackend::calc_conductivity(void)
|
||||
lambda_dilute = TransportRoutines::conductivity_dilute_hardcoded_CO2(*this); break;
|
||||
case ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_ETHANE:
|
||||
lambda_dilute = TransportRoutines::conductivity_dilute_hardcoded_ethane(*this); break;
|
||||
case ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_NONE:
|
||||
lambda_dilute = 0.0; break;
|
||||
default:
|
||||
throw ValueError(format("dilute conductivity type [%d] is invalid for fluid %s", components[0]->transport.conductivity_dilute.type, name().c_str()));
|
||||
}
|
||||
@@ -317,6 +319,8 @@ long double HelmholtzEOSMixtureBackend::calc_conductivity(void)
|
||||
lambda_critical = TransportRoutines::conductivity_critical_hardcoded_ammonia(*this); break;
|
||||
case ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_NONE:
|
||||
lambda_critical = 0.0; break;
|
||||
case ConductivityCriticalVariables::CONDUCTIVITY_CRITICAL_CARBONDIOXIDE_SCALABRIN_JPCRD_2006:
|
||||
lambda_critical = TransportRoutines::conductivity_critical_hardcoded_CO2_ScalabrinJPCRD2006(*this); break;
|
||||
default:
|
||||
throw ValueError(format("critical conductivity type [%d] is invalid for fluid %s", components[0]->transport.viscosity_dilute.type, name().c_str()));
|
||||
}
|
||||
|
||||
@@ -569,6 +569,20 @@ long double TransportRoutines::conductivity_critical_hardcoded_R123(HelmholtzEOS
|
||||
return a13*exp(a14*pow(HEOS.tau()-1,4)+a15*pow(HEOS.delta()-1,2));
|
||||
};
|
||||
|
||||
long double TransportRoutines::conductivity_critical_hardcoded_CO2_ScalabrinJPCRD2006(HelmholtzEOSMixtureBackend &HEOS){
|
||||
long double nc = 0.775547504e-3*4.81384, Tr = HEOS.T()/304.1282, alpha, rhor = HEOS.keyed_output(iDmass)/467.6;
|
||||
static long double a[] = {0.0, 3.0, 6.70697, 0.94604, 0.30, 0.30, 0.39751, 0.33791, 0.77963, 0.79857, 0.90, 0.02, 0.20};
|
||||
|
||||
// Equation 6 from Scalabrin
|
||||
alpha = 1-a[10]*acosh(1+a[11]*pow(pow(1-Tr,2),a[12]));
|
||||
|
||||
// Equation 5 from Scalabrin
|
||||
long double numer = rhor*exp(-pow(rhor,a[1])/a[1]-pow(a[2]*(Tr-1),2)-pow(a[3]*(rhor-1),2));
|
||||
long double braced = (1-1/Tr)+a[4]*pow(pow(rhor-1,2),0.5/a[5]);
|
||||
long double denom = pow(pow(pow(braced, 2), a[6]) + pow(pow(a[7]*(rhor-alpha), 2), a[8]),a[9]);
|
||||
return nc*numer/denom;
|
||||
}
|
||||
|
||||
long double TransportRoutines::conductivity_dilute_hardcoded_CO2(HelmholtzEOSMixtureBackend &HEOS){
|
||||
|
||||
double e_k = 251.196, Tstar;
|
||||
@@ -938,4 +952,6 @@ long double TransportRoutines::conductivity_ECS(HelmholtzEOSMixtureBackend &HEOS
|
||||
|
||||
return lambda;
|
||||
}
|
||||
|
||||
|
||||
}; /* namespace CoolProp */
|
||||
@@ -161,6 +161,7 @@ public:
|
||||
*/
|
||||
static long double conductivity_critical_simplified_Olchowy_Sengers(HelmholtzEOSMixtureBackend &HEOS);
|
||||
|
||||
static long double conductivity_critical_hardcoded_CO2_ScalabrinJPCRD2006(HelmholtzEOSMixtureBackend &HEOS);
|
||||
static long double conductivity_critical_hardcoded_R123(HelmholtzEOSMixtureBackend &HEOS);
|
||||
static long double conductivity_dilute_hardcoded_CO2(HelmholtzEOSMixtureBackend &HEOS);
|
||||
static long double conductivity_dilute_hardcoded_ethane(HelmholtzEOSMixtureBackend &HEOS);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
namespace CoolProp {
|
||||
|
||||
|
||||
class REFPROPMixtureBackend : public AbstractState {
|
||||
protected:
|
||||
int Ncomp;
|
||||
|
||||
@@ -351,14 +351,14 @@ 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-4),
|
||||
vel("CO2", "T", 300, "Dmass", 1.773, "L", 16.77e-3, 1e-4),
|
||||
vel("CO2", "T", 800, "Dmass", 0.662, "L", 56.65e-3, 1e-4),
|
||||
vel("CO2", "T", 304, "Dmass", 254.3205, "L", 42.52e-3, 1e-4),
|
||||
vel("CO2", "T", 220, "Dmass", 1194.86, "L", 187.50e-3, 1e-4),
|
||||
vel("CO2", "T", 300, "Dmass", 1029.27, "L", 137.61e-3, 1e-4),
|
||||
vel("CO2", "T", 800, "Dmass", 407.828, "L", 78.47e-3, 1e-4),
|
||||
// From Scalabrin, JPCRD, 2006
|
||||
vel("CO2", "T", 218, "Q", 0, "L", 181.09e-3, 1e-4),
|
||||
vel("CO2", "T", 218, "Q", 1, "L", 10.837e-3, 1e-4),
|
||||
vel("CO2", "T", 304, "Q", 0, "L", 140.3e-3, 1e-4),
|
||||
vel("CO2", "T", 304, "Q", 1, "L", 217.95e-3, 1e-4),
|
||||
vel("CO2", "T", 225, "Dmass", 0.23555, "L", 11.037e-3, 1e-4),
|
||||
vel("CO2", "T", 275, "Dmass", 1281.64, "L", 238.44e-3, 1e-4),
|
||||
|
||||
|
||||
// From Friend, JPCRD, 1991
|
||||
vel("Ethane", "T", 100, "Dmass", 1e-13, "L", 3.46e-3, 1e-2),
|
||||
|
||||
Reference in New Issue
Block a user