From 73ee65509d56ad0db83c5ec74d64a70a2e4434b5 Mon Sep 17 00:00:00 2001
From: Markus Wolff <markus.wolff@twt-gmbh.de>
Date: Wed, 26 Jan 2011 12:21:33 +0000
Subject: [PATCH] case of zero entry pressure added in regularization of
 dSw/dpc function

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@5114 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 .../fluidmatrixinteractions/2p/regularizedbrookscorey.hh    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh b/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh
index f10982966c..4d1516a76a 100644
--- a/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh
+++ b/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh
@@ -203,6 +203,12 @@ public:
     {
         const Scalar Sthres = params.thresholdSw();
 
+        //instead of return value = inf, return a very large number
+        if (params.pe() == 0.0)
+        {
+            return 1e100;
+        }
+
         // calculate the saturation which corresponds to the
         // saturation in the non-regularized version of the
         // Brooks-Corey law
-- 
GitLab