From 28c7b1dccdad75e53a7b073aee046071cd0d8e63 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Wed, 10 Dec 2014 17:00:58 -0500 Subject: [PATCH] ECS ESRR need to be updated after conformal state solver - closes #337 Signed-off-by: Ian Bell --- src/Backends/Helmholtz/TransportRoutines.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Backends/Helmholtz/TransportRoutines.cpp b/src/Backends/Helmholtz/TransportRoutines.cpp index da8a43ab..7f2d0992 100644 --- a/src/Backends/Helmholtz/TransportRoutines.cpp +++ b/src/Backends/Helmholtz/TransportRoutines.cpp @@ -1035,8 +1035,12 @@ long double TransportRoutines::viscosity_ECS(HelmholtzEOSMixtureBackend &HEOS, H conformal_state_solver(HEOS, HEOS_Reference, T0, rhomolar0); - // Update the reference fluid with the conformal state + // Update the reference fluid with the updated conformal state HEOS_Reference.update(DmolarT_INPUTS, rhomolar0*psi, T0); + + // Recalculate ESRR + f = HEOS.T()/T0; + h = rhomolar0/HEOS.rhomolar(); // Must be the ratio of MOLAR densities!! // ********************** // Remaining calculations @@ -1046,7 +1050,7 @@ long double TransportRoutines::viscosity_ECS(HelmholtzEOSMixtureBackend &HEOS, H long double eta_resid = HEOS_Reference.calc_viscosity_background(); // The F factor - long double F_eta = sqrt(f)*pow(h, static_cast(-2.0/3.0))*sqrt(M/M0); + long double F_eta = sqrt(f)*pow(h, -2.0L/3.0L)*sqrt(M/M0); // The total viscosity considering the contributions of the fluid of interest and the reference fluid [Pa-s] long double eta = eta_dilute + eta_resid*F_eta; @@ -1118,6 +1122,10 @@ long double TransportRoutines::conductivity_ECS(HelmholtzEOSMixtureBackend &HEOS // Update the reference fluid with the conformal state HEOS_Reference.update(DmolarT_INPUTS, rhomolar0*psi, T0); + + // Recalculate ESRR + f = HEOS.T()/T0; + h = rhomolar0/HEOS.rhomolar(); // Must be the ratio of MOLAR densities!! // The reference fluid's contribution to the conductivity [W/m/K] long double lambda_resid = HEOS_Reference.calc_conductivity_background();