From 41dacf83c654d216e43ca0e1ac548ea8d9904b78 Mon Sep 17 00:00:00 2001 From: Ian bell Date: Mon, 19 May 2014 22:39:04 +0200 Subject: [PATCH] HEOS can call transport properties Signed-off-by: Ian bell --- .../Helmholtz/HelmholtzEOSMixtureBackend.cpp | 24 +++++++++++++++++++ .../Helmholtz/HelmholtzEOSMixtureBackend.h | 1 + 2 files changed, 25 insertions(+) diff --git a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp index a87dc12d..5b5af850 100644 --- a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp +++ b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp @@ -23,6 +23,7 @@ #include "MatrixMath.h" #include "VLERoutines.h" #include "FlashRoutines.h" +#include "TransportRoutines.h" namespace CoolProp { @@ -127,6 +128,29 @@ long double HelmholtzEOSMixtureBackend::calc_surface_tension(void) throw NotImplementedError(format("surface tension not implemented for mixtures")); } } +long double HelmholtzEOSMixtureBackend::calc_viscosity(void) +{ + if (is_pure_or_pseudopure) + { + // Dilute part + long double eta_dilute = TransportRoutines::dilute_gas_viscosity(*this); + + // Residual part + long double B_eta_initial = TransportRoutines::initial_density_dependence_viscosity_term(*this); + long double rho = rhomolar(); + long double initial_part = eta_dilute*B_eta_initial*rhomolar(); + long double delta_eta_h = TransportRoutines::modified_Batschinski_Hildebrand_viscosity_term(*this); + long double eta_residual = initial_part + delta_eta_h; + + // Critical part + long double eta_critical = 0; + return eta_dilute + eta_residual + eta_critical; + } + else + { + throw NotImplementedError(format("viscosity not implemented for mixtures")); + } +} long double HelmholtzEOSMixtureBackend::calc_Ttriple(void) { double summer = 0; diff --git a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h index c03fbffe..4c9ec4f2 100644 --- a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h +++ b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h @@ -117,6 +117,7 @@ public: long double calc_d2alpha0_dTau2(void); long double calc_surface_tension(void); + long double calc_viscosity(void); long double calc_Tmax(void); long double calc_pmax(void);