From f8492aeb643ece9d352c628b9d7e4b9d88097749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Mon, 4 Aug 2014 19:13:42 +0200 Subject: [PATCH] swatInitScaling(): Name magic constant The constant 1.0e-8 was used as a threshold to distinguish "low" from "high" capillary pressure values. Introduce acutual constant "pc_low_threshold" to clarify that role. Suggested by: [at] atgeirr --- opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp index f9fb1052..d64e48f3 100644 --- a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp +++ b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp @@ -423,10 +423,11 @@ namespace Opm double & swat) { if (phase_usage_.phase_used[BlackoilPhases::Aqua]) { + const double pc_low_threshold = 1.0e-8; // TODO: Mixed wettability systems - see ecl kw OPTIONS switch 74 if (swat <= eps_transf_[cell].wat.smin) { swat = eps_transf_[cell].wat.smin; - } else if (pcow < 1.0e-8) { + } else if (pcow < pc_low_threshold) { swat = eps_transf_[cell].wat.smax; } else { const int wpos = phase_usage_.phase_pos[BlackoilPhases::Aqua]; @@ -435,7 +436,7 @@ namespace Opm s[wpos] = swat; double pc[max_np] = { 0.0 }; funcForCell(cell).evalPc(s, pc, &(eps_transf_[cell])); - if (pc[wpos] > 1.0e-8) { + if (pc[wpos] > pc_low_threshold) { eps_transf_[cell].wat.pcFactor *= pcow/pc[wpos]; } }