diff --git a/opm/polymer/PolymerProperties.cpp b/opm/polymer/PolymerProperties.cpp index 6d266b15a..e77a68242 100644 --- a/opm/polymer/PolymerProperties.cpp +++ b/opm/polymer/PolymerProperties.cpp @@ -192,35 +192,34 @@ namespace Opm } - void PolymerProperties::effectiveVisc(const double c, const double visc, double& mu_w_eff) const { - effectiveInvVisc(c, visc, mu_w_eff); + void PolymerProperties::effectiveVisc(const double c, const double mu_w, double& mu_w_eff) const { + effectiveInvVisc(c, mu_w, mu_w_eff); mu_w_eff = 1./mu_w_eff; } - void PolymerProperties::effectiveViscWithDer(const double c, const double visc, double& mu_w_eff, double dmu_w_eff_dc) const { - effectiveInvViscWithDer(c, visc, mu_w_eff, dmu_w_eff_dc); + void PolymerProperties::effectiveViscWithDer(const double c, const double mu_w, double& mu_w_eff, double dmu_w_eff_dc) const { + effectiveInvViscWithDer(c, mu_w, mu_w_eff, dmu_w_eff_dc); mu_w_eff = 1./mu_w_eff; dmu_w_eff_dc = -dmu_w_eff_dc*mu_w_eff*mu_w_eff; } - void PolymerProperties::effectiveInvVisc(const double c, const double visc, double& inv_mu_w_eff) const + void PolymerProperties::effectiveInvVisc(const double c, const double mu_w, double& inv_mu_w_eff) const { double dummy; - effectiveInvViscBoth(c, visc, inv_mu_w_eff, dummy, false); + effectiveInvViscBoth(c, mu_w, inv_mu_w_eff, dummy, false); } - void PolymerProperties::effectiveInvViscWithDer(const double c, const double visc, + void PolymerProperties::effectiveInvViscWithDer(const double c, const double mu_w, double& inv_mu_w_eff, double& dinv_mu_w_eff_dc) const { - effectiveInvViscBoth(c, visc, inv_mu_w_eff, dinv_mu_w_eff_dc, true); + effectiveInvViscBoth(c, mu_w, inv_mu_w_eff, dinv_mu_w_eff_dc, true); } - void PolymerProperties::effectiveInvViscBoth(const double c, const double visc, + void PolymerProperties::effectiveInvViscBoth(const double c, const double mu_w, double& inv_mu_w_eff, double& dinv_mu_w_eff_dc, bool if_with_der) const { const double cbar = c/c_max_; - const double mu_w = visc; double mu_m; const double omega = mix_param_; double dmu_m_dc; @@ -244,31 +243,30 @@ namespace Opm } void PolymerProperties::effectiveInvPolyVisc(const double c, - const double visc, + const double mu_w, double& inv_mu_p_eff) const { double dummy; - effectiveInvPolyViscBoth(c, visc, inv_mu_p_eff, dummy, false); + effectiveInvPolyViscBoth(c, mu_w, inv_mu_p_eff, dummy, false); } void PolymerProperties::effectiveInvPolyViscWithDer(const double c, - const double visc, + const double mu_w, double& inv_mu_p_eff, double& d_inv_mu_p_eff_dc) const { - effectiveInvPolyViscBoth(c, visc, inv_mu_p_eff, d_inv_mu_p_eff_dc, true); + effectiveInvPolyViscBoth(c, mu_w, inv_mu_p_eff, d_inv_mu_p_eff_dc, true); } void PolymerProperties::effectiveInvPolyViscBoth(const double c, - const double visc, + const double mu_w, double& inv_mu_p_eff, double& dinv_mu_p_eff_dc, const bool if_with_der) const { const double omega = mix_param_; - const double mu_w = visc; double mu_m = 0.0; double dmu_m_dc = 0.0; diff --git a/opm/polymer/PolymerProperties.hpp b/opm/polymer/PolymerProperties.hpp index 240e87e8d..41a0a3857 100644 --- a/opm/polymer/PolymerProperties.hpp +++ b/opm/polymer/PolymerProperties.hpp @@ -278,27 +278,27 @@ namespace Opm void adsorptionWithDer(double c, double cmax, double& c_ads, double& dc_ads_dc) const; - void effectiveVisc(const double c, const double visc, + void effectiveVisc(const double c, const double mu_w, double& mu_w_eff) const; void effectiveViscWithDer(const double c, const double visc , double& mu_w_eff , double dmu_w_eff_dc) const; - void effectiveInvVisc(const double c, const double visc, + void effectiveInvVisc(const double c, const double mu_w, double& inv_mu_w_eff) const; void effectiveInvViscWithDer(const double c, - const double visc, + const double mu_w, double& inv_mu_w_eff, double& dinv_mu_w_eff_dc) const; void effectiveInvPolyVisc(const double c, - const double visc, + const double mu_w, double& inv_mu_p_eff) const; void effectiveInvPolyViscWithDer(const double c, - const double visc, + const double mu_w, double& inv_mu_p_eff, double& d_inv_mu_p_eff_dc) const; @@ -409,12 +409,12 @@ namespace Opm double& c_ads, double& dc_ads_dc, bool if_with_der) const; - void effectiveInvViscBoth(const double c, const double visc, + void effectiveInvViscBoth(const double c, const double mu_w, double& inv_mu_w_eff, double& dinv_mu_w_eff_dc, bool if_with_der) const; void effectiveInvPolyViscBoth(const double c, - const double visc, + const double mu_w, double& inv_mu_p_eff, double& dinv_mu_p_eff_dc, const bool if_with_der) const; diff --git a/opm/polymer/fullyimplicit/PolymerPropsAd.cpp b/opm/polymer/fullyimplicit/PolymerPropsAd.cpp index c7fa8922d..eb79497c8 100644 --- a/opm/polymer/fullyimplicit/PolymerPropsAd.cpp +++ b/opm/polymer/fullyimplicit/PolymerPropsAd.cpp @@ -150,14 +150,14 @@ namespace Opm { V PolymerPropsAd::effectiveInvWaterVisc(const V& c, - const V& visc) const + const V& mu_w) const { - assert(c.size() == visc.size()); + assert(c.size() == mu_w.size()); const int nc = c.size(); V inv_mu_w_eff(nc); for (int i = 0; i < nc; ++i) { double im = 0; - polymer_props_.effectiveInvVisc(c(i), visc(i), im); + polymer_props_.effectiveInvVisc(c(i), mu_w(i), im); inv_mu_w_eff(i) = im; } @@ -169,15 +169,15 @@ namespace Opm { ADB PolymerPropsAd::effectiveInvWaterVisc(const ADB& c, - const V& visc) const + const V& mu_w) const { - assert(c.size() == visc.size()); + assert(c.size() == mu_w.size()); const int nc = c.size(); V inv_mu_w_eff(nc); V dinv_mu_w_eff(nc); for (int i = 0; i < nc; ++i) { double im = 0, dim = 0; - polymer_props_.effectiveInvViscWithDer(c.value()(i), visc(i), im, dim); + polymer_props_.effectiveInvViscWithDer(c.value()(i), mu_w(i), im, dim); inv_mu_w_eff(i) = im; dinv_mu_w_eff(i) = dim; } @@ -194,17 +194,16 @@ namespace Opm { - ADB PolymerPropsAd::effectiveInvPolymerVisc(const ADB& c, const V& visc) const + ADB PolymerPropsAd::effectiveInvPolymerVisc(const ADB& c, const V& mu_w) const { - assert(c.size() == visc.size()); + assert(c.size() == mu_w.size()); const int nc = c.size(); V inv_mu_p_eff(nc); V dinv_mu_p_eff(nc); for (int i = 0; i < nc; ++i) { double im = 0; double dim = 0; - // TODO: the usage of visc can be likely wrong, while more investigation will be requried. - polymer_props_.effectiveInvPolyViscWithDer(c.value()(i), visc(i), im, dim); + polymer_props_.effectiveInvPolyViscWithDer(c.value()(i), mu_w(i), im, dim); inv_mu_p_eff(i) = im; dinv_mu_p_eff(i) = dim; } diff --git a/opm/polymer/fullyimplicit/PolymerPropsAd.hpp b/opm/polymer/fullyimplicit/PolymerPropsAd.hpp index 3ded4e8b5..8b314d322 100644 --- a/opm/polymer/fullyimplicit/PolymerPropsAd.hpp +++ b/opm/polymer/fullyimplicit/PolymerPropsAd.hpp @@ -81,22 +81,22 @@ namespace Opm { ~PolymerPropsAd(); /// \param[in] c Array of n polymer concentraion values. - /// \param[in] visc Array of n water viscosity values. + /// \param[in] mu_w Array of n water viscosity values. /// \return Array of inverse effective water viscosity. V - effectiveInvWaterVisc(const V& c, const V& visc) const; + effectiveInvWaterVisc(const V& c, const V& mu_w) const; /// \param[in] c ADB of polymer concentraion. - /// \param[in] visc Array of water viscosity value. + /// \param[in] mu_w Array of water viscosity value. /// \return ADB of inverse effective water viscosity. ADB - effectiveInvWaterVisc(const ADB& c,const V& visc) const; + effectiveInvWaterVisc(const ADB& c,const V& mu_w) const; /// \param[in] c ADB of polymer concentraion values. - /// \param[in] visc Array of water viscosity values + /// \param[in] mu_w Array of water viscosity values /// \return ADB of inverse effective polymer viscosity. ADB - effectiveInvPolymerVisc(const ADB& c, const V& visc) const; + effectiveInvPolymerVisc(const ADB& c, const V& mu_w) const; /// \param[in] c Array of n polymer concentraion values. /// \return Array of n mc values, here mc means m(c) * c.