From 0638ede979f607e993937223ff63e106aeef0d0c Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Tue, 4 Jan 2011 15:49:25 +0000 Subject: [PATCH] 2p2c box model: fix sign of capillary pressure, minor changes of PV switch git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4950 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/2p2c/2p2cmodel.hh | 7 ++++--- dumux/boxmodels/2p2c/2p2cvolumevariables.hh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dumux/boxmodels/2p2c/2p2cmodel.hh b/dumux/boxmodels/2p2c/2p2cmodel.hh index 3ed9b171fa..c9a0267e77 100644 --- a/dumux/boxmodels/2p2c/2p2cmodel.hh +++ b/dumux/boxmodels/2p2c/2p2cmodel.hh @@ -623,7 +623,8 @@ protected: // perform variable switch at a vertex; Returns true if a // variable switch was performed. bool primaryVarSwitch_(SolutionVector &globalSol, - const VolumeVariables &volVars, int globalIdx, + const VolumeVariables &volVars, + int globalIdx, const GlobalPosition &globalPos) { // evaluate primary variable switch @@ -654,9 +655,9 @@ protected: << xll + xlg << std::endl; newPhasePresence = bothPhases; if (formulation == pgSl) - globalSol[globalIdx][switchIdx] = 0.0; + globalSol[globalIdx][switchIdx] = 0.001; else if (formulation == plSg) - globalSol[globalIdx][switchIdx] = 1.0; + globalSol[globalIdx][switchIdx] = 0.999; }; } else if (phasePresence == lPhaseOnly) diff --git a/dumux/boxmodels/2p2c/2p2cvolumevariables.hh b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh index 64287cd154..7a52dec36c 100644 --- a/dumux/boxmodels/2p2c/2p2cvolumevariables.hh +++ b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh @@ -409,7 +409,7 @@ public: * \brief Returns the effective capillary pressure within the control volume. */ Scalar capillaryPressure() const - { return fluidState_.pressure(lPhaseIdx) - fluidState_.pressure(gPhaseIdx); } + { return fluidState_.pressure(gPhaseIdx) - fluidState_.pressure(lPhaseIdx); } /*! * \brief Returns the average porosity within the control volume. -- GitLab