Skip to content
Snippets Groups Projects
Commit 1228b496 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

regularized Brooks-Corey: regularize krw for Sw > 1 instead of > 0

Grr something like this happens too often, we need unit tests!

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4319 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent e4156319
No related branches found
No related tags found
No related merge requests found
......@@ -178,12 +178,12 @@ public:
{
if (Sw <= 0)
return 0;
else if (Sw > 0)
else if (Sw >= 1)
return 1.0;
else if (Sw >= 1 - 0.01) {
Scalar m1 = BrooksCorey::dkrw_dSw(params, 1.0 - 0.01);
Scalar y1 = BrooksCorey::krw(params, 1.0 - 0.01);
Dumux::Spline<Scalar> sp(1 - 0.01, 1.0,
else if (Sw >= 1 - 0.05) {
Scalar m1 = BrooksCorey::dkrw_dSw(params, 1.0 - 0.05);
Scalar y1 = BrooksCorey::krw(params, 1.0 - 0.05);
Dumux::Spline<Scalar> sp(1 - 0.05, 1.0,
y1, 1.0,
m1, 0);
return sp.eval(Sw);
......@@ -206,10 +206,10 @@ public:
// check if we need to regularize the relative permeability
else if (Sw <= 0)
return 1.0;
else if (Sw < 0.01) {
Scalar m1 = BrooksCorey::dkrn_dSw(params, 0.01);
Scalar y1 = BrooksCorey::krn(params, 0.01);
Dumux::Spline<Scalar> sp(0.0, 0.01,
else if (Sw < 0.05) {
Scalar m1 = BrooksCorey::dkrn_dSw(params, 0.05);
Scalar y1 = BrooksCorey::krn(params, 0.05);
Dumux::Spline<Scalar> sp(0.0, 0.05,
1.0, y1,
0, m1);
return sp.eval(Sw);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment