diff --git a/dev/fluids/Ethane.json b/dev/fluids/Ethane.json index 554b2a96..5b67d96e 100644 --- a/dev/fluids/Ethane.json +++ b/dev/fluids/Ethane.json @@ -416,6 +416,54 @@ ], "NAME": "Ethane", "TRANSPORT": { + "conductivity": { + "BibTeX": "Friend-JPCRD-1991", + "critical": { + "GAMMA": 0.0563, + "R0": 1.03, + "gamma": 1.242, + "qD": 1834862385.3, + "type": "simplified_Olchowy_Sengers", + "zeta0": 1.9e-10 + }, + "dilute": { + "hardcoded": "Ethane" + }, + "residual": { + "B": [ + 0.0042448708279092, + 0.012149218819710001, + -0.00011755611350154, + -0.00034524130817994, + 0.0009666869231454, + 0.010536403039518, + -0.0033184300792206 + ], + "T_reducing": 305.33, + "T_reducing_units": "K", + "d": [ + 1, + 2, + 3, + 4, + 5, + 1, + 3 + ], + "rhomass_reducing": 206.5809, + "rhomass_reducing_units": "kg/m^3", + "t": [ + 0, + 0, + 0, + 0, + 0, + 1.5, + 1 + ], + "type": "polynomial" + } + }, "viscosity": { "BibTeX": "Friend-JPCRD-1991", "dilute": { diff --git a/include/CoolPropFluid.h b/include/CoolPropFluid.h index ef1b3319..d0551287 100644 --- a/include/CoolPropFluid.h +++ b/include/CoolPropFluid.h @@ -52,6 +52,7 @@ struct ConductivityDiluteVariables { enum ConductivityDiluteEnum {CONDUCTIVITY_DILUTE_RATIO_POLYNOMIALS, CONDUCTIVITY_DILUTE_CO2, + CONDUCTIVITY_DILUTE_ETHANE, CONDUCTIVITY_DILUTE_NOT_SET }; int type; diff --git a/src/Backends/Helmholtz/Fluids/FluidLibrary.h b/src/Backends/Helmholtz/Fluids/FluidLibrary.h index 5f290b87..675996db 100644 --- a/src/Backends/Helmholtz/Fluids/FluidLibrary.h +++ b/src/Backends/Helmholtz/Fluids/FluidLibrary.h @@ -489,6 +489,9 @@ protected: if (!target.compare("CO2")){ fluid.transport.conductivity_dilute.type = CoolProp::ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_CO2; return; } + else if (!target.compare("Ethane")){ + fluid.transport.conductivity_dilute.type = CoolProp::ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_ETHANE; return; + } else{ throw ValueError(format("hardcoded dilute conductivity term [%s] is not understood for fluid %s",target.c_str(), fluid.name.c_str())); } diff --git a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp index c703c267..d7ce16d7 100644 --- a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp +++ b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp @@ -128,6 +128,34 @@ long double HelmholtzEOSMixtureBackend::calc_surface_tension(void) throw NotImplementedError(format("surface tension not implemented for mixtures")); } } +long double HelmholtzEOSMixtureBackend::calc_viscosity_dilute(void) +{ + if (is_pure_or_pseudopure) + { + long double eta_dilute; + switch(components[0]->transport.viscosity_dilute.type) + { + case ViscosityDiluteVariables::VISCOSITY_DILUTE_KINETIC_THEORY: + eta_dilute = TransportRoutines::viscosity_dilute_kinetic_theory(*this); break; + case ViscosityDiluteVariables::VISCOSITY_DILUTE_COLLISION_INTEGRAL: + eta_dilute = TransportRoutines::viscosity_dilute_collision_integral(*this); break; + case ViscosityDiluteVariables::VISCOSITY_DILUTE_POWERS_OF_T: + eta_dilute = TransportRoutines::viscosity_dilute_powers_of_T(*this); break; + case ViscosityDiluteVariables::VISCOSITY_DILUTE_COLLISION_INTEGRAL_POWERS_OF_TSTAR: + eta_dilute = TransportRoutines::viscosity_dilute_collision_integral_powers_of_T(*this); break; + case ViscosityDiluteVariables::VISCOSITY_DILUTE_ETHANE: + eta_dilute = TransportRoutines::viscosity_dilute_ethane(*this); break; + default: + throw ValueError(format("dilute viscosity type [%d] is invalid for fluid %s", components[0]->transport.viscosity_dilute.type, name().c_str())); + } + return eta_dilute; + } + else + { + throw NotImplementedError(format("dilute viscosity not implemented for mixtures")); + } + +} long double HelmholtzEOSMixtureBackend::calc_viscosity(void) { if (is_pure_or_pseudopure) @@ -147,22 +175,7 @@ long double HelmholtzEOSMixtureBackend::calc_viscosity(void) } } // Dilute part - long double eta_dilute; - switch(components[0]->transport.viscosity_dilute.type) - { - case ViscosityDiluteVariables::VISCOSITY_DILUTE_KINETIC_THEORY: - eta_dilute = TransportRoutines::viscosity_dilute_kinetic_theory(*this); break; - case ViscosityDiluteVariables::VISCOSITY_DILUTE_COLLISION_INTEGRAL: - eta_dilute = TransportRoutines::viscosity_dilute_collision_integral(*this); break; - case ViscosityDiluteVariables::VISCOSITY_DILUTE_POWERS_OF_T: - eta_dilute = TransportRoutines::viscosity_dilute_powers_of_T(*this); break; - case ViscosityDiluteVariables::VISCOSITY_DILUTE_COLLISION_INTEGRAL_POWERS_OF_TSTAR: - eta_dilute = TransportRoutines::viscosity_dilute_collision_integral_powers_of_T(*this); break; - case ViscosityDiluteVariables::VISCOSITY_DILUTE_ETHANE: - eta_dilute = TransportRoutines::viscosity_dilute_ethane(*this); break; - default: - throw ValueError(format("dilute viscosity type [%d] is invalid for fluid %s", components[0]->transport.viscosity_dilute.type, name().c_str())); - } + long double eta_dilute = calc_viscosity_dilute(); // Residual part long double B_eta_initial = TransportRoutines::viscosity_initial_density_dependence_Rainwater_Friend(*this); @@ -221,6 +234,8 @@ long double HelmholtzEOSMixtureBackend::calc_conductivity(void) lambda_dilute = TransportRoutines::conductivity_dilute_ratio_polynomials(*this); break; case ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_CO2: lambda_dilute = TransportRoutines::conductivity_dilute_hardcoded_CO2(*this); break; + case ConductivityDiluteVariables::CONDUCTIVITY_DILUTE_ETHANE: + lambda_dilute = TransportRoutines::conductivity_dilute_hardcoded_ethane(*this); break; default: throw ValueError(format("dilute conductivity type [%d] is invalid for fluid %s", components[0]->transport.conductivity_dilute.type, name().c_str())); } diff --git a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h index 95c03135..b321000c 100644 --- a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h +++ b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h @@ -118,6 +118,7 @@ public: long double calc_surface_tension(void); long double calc_viscosity(void); + long double calc_viscosity_dilute(void); long double calc_conductivity(void); long double calc_Tmax(void); diff --git a/src/Backends/Helmholtz/TransportRoutines.cpp b/src/Backends/Helmholtz/TransportRoutines.cpp index 361f0c90..5ccdfe67 100644 --- a/src/Backends/Helmholtz/TransportRoutines.cpp +++ b/src/Backends/Helmholtz/TransportRoutines.cpp @@ -572,4 +572,14 @@ long double TransportRoutines::conductivity_dilute_hardcoded_CO2(HelmholtzEOSMix return lambda_0; } +long double TransportRoutines::conductivity_dilute_hardcoded_ethane(HelmholtzEOSMixtureBackend &HEOS){ + + double e_k = 245.0; + double tau = 305.33/HEOS.T(), Tstar = HEOS.T()/e_k; + double fint = 1.7104147-0.6936482/Tstar; + double lambda_0 = 0.276505e-3*(HEOS.calc_viscosity_dilute()*1e6)*(3.75-fint*(tau*tau*HEOS.d2alpha0_dTau2()+1.5)); //[W/m/K] + + return lambda_0; +} + }; /* namespace CoolProp */ \ No newline at end of file diff --git a/src/Backends/Helmholtz/TransportRoutines.h b/src/Backends/Helmholtz/TransportRoutines.h index 5535a5ef..7164b937 100644 --- a/src/Backends/Helmholtz/TransportRoutines.h +++ b/src/Backends/Helmholtz/TransportRoutines.h @@ -161,6 +161,7 @@ public: 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); }; /* class TransportRoutines */ diff --git a/src/Tests/CoolProp-Tests.cpp b/src/Tests/CoolProp-Tests.cpp index 5f899ede..d4724588 100644 --- a/src/Tests/CoolProp-Tests.cpp +++ b/src/Tests/CoolProp-Tests.cpp @@ -347,14 +347,19 @@ 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), +vel("CO2", "T", 220, "Dmass", 2.440, "L", 10.90e-3, 1e-2), +vel("CO2", "T", 300, "Dmass", 1.773, "L", 16.77e-3, 1e-2), +vel("CO2", "T", 800, "Dmass", 0.662, "L", 56.65e-3, 1e-2), +vel("CO2", "T", 304, "Dmass", 254.3205, "L", 42.52e-3, 1e-2), +vel("CO2", "T", 220, "Dmass", 1194.86, "L", 187.50e-3, 1e-2), +vel("CO2", "T", 300, "Dmass", 1029.27, "L", 137.61e-3, 1e-2), +vel("CO2", "T", 800, "Dmass", 407.828, "L", 78.47e-3, 1e-2), +// From Friend, JPCRD, 1991 +vel("Ethane", "T", 100, "Dmass", 1e-13, "L", 3.46e-3, 1e-2), +vel("Ethane", "T", 230, "Dmolar", 16020, "L", 126.2e-3, 1e-2), +vel("Ethane", "T", 440, "Dmolar", 1520, "L", 45.9e-3, 1e-2), +vel("Ethane", "T", 310, "Dmolar", 4130, "L", 45.4e-3, 1e-2), }; TEST_CASE_METHOD(TransportValidationFixture, "Compare thermal conductivities against published data", "[conductivity]")