mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Implemented viscosity correlations (and tests) for Decane,Dodecane,Nonane,Octane,R125
Signed-off-by: Ian bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -265,12 +265,18 @@ protected:
|
||||
// Get a reference to the entry in the fluid instance
|
||||
CoolProp::ViscosityDiluteGasCollisionIntegralData &CI = fluid.transport.viscosity_dilute.collision_integral;
|
||||
|
||||
// Set the type flag
|
||||
fluid.transport.viscosity_dilute.type = CoolProp::ViscosityDiluteVariables::VISCOSITY_DILUTE_COLLISION_INTEGRAL;
|
||||
|
||||
// Load up the values
|
||||
CI.a = cpjson::get_long_double_array(dilute["a"]);
|
||||
CI.t = cpjson::get_long_double_array(dilute["t"]);
|
||||
CI.molar_mass = cpjson::get_double(dilute, "molar_mass");
|
||||
CI.C = cpjson::get_double(dilute, "C");
|
||||
}
|
||||
else if (!type.compare("kinetic_theory")){
|
||||
fluid.transport.viscosity_dilute.type = CoolProp::ViscosityDiluteVariables::VISCOSITY_DILUTE_KINETIC_THEORY;
|
||||
}
|
||||
else{
|
||||
throw ValueError(format("type [%s] is not understood for fluid %s",type.c_str(),fluid.name.c_str()));
|
||||
}
|
||||
|
||||
@@ -133,7 +133,16 @@ long double HelmholtzEOSMixtureBackend::calc_viscosity(void)
|
||||
if (is_pure_or_pseudopure)
|
||||
{
|
||||
// Dilute part
|
||||
long double eta_dilute = TransportRoutines::dilute_gas_viscosity(*this);
|
||||
long double eta_dilute;
|
||||
switch(components[0]->transport.viscosity_dilute.type)
|
||||
{
|
||||
case ViscosityDiluteVariables::VISCOSITY_DILUTE_KINETIC_THEORY:
|
||||
eta_dilute = TransportRoutines::general_dilute_gas_viscosity(*this); break;
|
||||
case ViscosityDiluteVariables::VISCOSITY_DILUTE_COLLISION_INTEGRAL:
|
||||
eta_dilute = TransportRoutines::dilute_gas_viscosity(*this); break;
|
||||
default:
|
||||
throw ValueError(format("dilute viscosity type [%d] is invalid", components[0]->transport.viscosity_dilute.type));
|
||||
}
|
||||
|
||||
// Residual part
|
||||
long double B_eta_initial = TransportRoutines::initial_density_dependence_viscosity_term(*this);
|
||||
|
||||
Reference in New Issue
Block a user