mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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
This commit is contained in:
parent
ef9e81ff9b
commit
61300523c4
@ -423,10 +423,11 @@ namespace Opm
|
|||||||
double & swat)
|
double & swat)
|
||||||
{
|
{
|
||||||
if (phase_usage_.phase_used[BlackoilPhases::Aqua]) {
|
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
|
// TODO: Mixed wettability systems - see ecl kw OPTIONS switch 74
|
||||||
if (swat <= eps_transf_[cell].wat.smin) {
|
if (swat <= eps_transf_[cell].wat.smin) {
|
||||||
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;
|
swat = eps_transf_[cell].wat.smax;
|
||||||
} else {
|
} else {
|
||||||
const int wpos = phase_usage_.phase_pos[BlackoilPhases::Aqua];
|
const int wpos = phase_usage_.phase_pos[BlackoilPhases::Aqua];
|
||||||
@ -435,7 +436,7 @@ namespace Opm
|
|||||||
s[wpos] = swat;
|
s[wpos] = swat;
|
||||||
double pc[max_np] = { 0.0 };
|
double pc[max_np] = { 0.0 };
|
||||||
funcForCell(cell).evalPc(s, pc, &(eps_transf_[cell]));
|
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];
|
eps_transf_[cell].wat.pcFactor *= pcow/pc[wpos];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user