diff --git a/dumux/boxmodels/2p/2pmodel.hh b/dumux/boxmodels/2p/2pmodel.hh index 390272931f703effc40881459942be425f72d3b1..3035b1ca5e70cb0fdd7a4be6e32d77726c6d70e1 100644 --- a/dumux/boxmodels/2p/2pmodel.hh +++ b/dumux/boxmodels/2p/2pmodel.hh @@ -155,6 +155,7 @@ public: typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; typename FluidSystem::ParameterCache paramCache; + paramCache.updateAll(fluidState); fluidState.setViscosity(wPhaseIdx, FluidSystem::viscosity(fluidState, paramCache, wPhaseIdx)); fluidState.setViscosity(nPhaseIdx, diff --git a/dumux/boxmodels/2p/2pvolumevariables.hh b/dumux/boxmodels/2p/2pvolumevariables.hh index 95c84fce335d0b3c817a2d52aaf98b6b7388fdb1..97f9216239e1ca8bfb09d7b3d718ab0ff27e6fa4 100644 --- a/dumux/boxmodels/2p/2pvolumevariables.hh +++ b/dumux/boxmodels/2p/2pvolumevariables.hh @@ -1,6 +1,6 @@ /***************************************************************************** - * Copyright (C) 2008 by Bernd Flemisch * - * Copyright (C) 2008-2009 by Andreas Lauser * + * Copyright (C) 2008-2011 by Bernd Flemisch * + * Copyright (C) 2008-2011 by Andreas Lauser * * Institute of Hydraulic Engineering * * University of Stuttgart, Germany * * email: <givenname>.<name>@iws.uni-stuttgart.de * @@ -35,7 +35,6 @@ namespace Dumux { - /*! * \ingroup TwoPBoxModel * \ingroup BoxVolumeVariables @@ -115,17 +114,13 @@ public: Model::completeFluidState(priVars, materialParams, fluidState_); - capillaryPressure_ = fluidState_.pressure(nPhaseIdx) - fluidState_.pressure(wPhaseIdx); - mobility_[wPhaseIdx] = MaterialLaw::krw(materialParams, fluidState_.saturation(wPhaseIdx)) - / - fluidState_.viscosity(wPhaseIdx); + / fluidState_.viscosity(wPhaseIdx); mobility_[nPhaseIdx] = MaterialLaw::krn(materialParams, fluidState_.saturation(wPhaseIdx)) - / - fluidState_.viscosity(nPhaseIdx); + / fluidState_.viscosity(nPhaseIdx); // porosity porosity_ = problem.spatialParameters().porosity(element, @@ -166,6 +161,12 @@ public: Scalar pressure(int phaseIdx) const { return fluidState_.pressure(phaseIdx); } + /*! + * \brief Returns the capillary pressure within the control volume [Pa]. + */ + Scalar capillaryPressure() const + { return fluidState_.pressure(nPhaseIdx) - fluidState_.pressure(wPhaseIdx); } + /*! * \brief Returns temperature inside the sub-control volume. * @@ -185,12 +186,6 @@ public: Scalar mobility(int phaseIdx) const { return mobility_[phaseIdx]; } - /*! - * \brief Returns the effective capillary pressure within the control volume. - */ - Scalar capillaryPressure() const - { return capillaryPressure_; } - /*! * \brief Returns the average porosity within the control volume. */ @@ -209,8 +204,6 @@ protected: FluidState fluidState_; Scalar porosity_; - - Scalar capillaryPressure_; Scalar mobility_[numPhases]; private: diff --git a/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh b/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh index 851b562536060883028c626153ad417625b9b336..85b5ddfc0850f7eff8495471d4714e3d4cee9cc7 100644 --- a/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh +++ b/dumux/material/MpNcfluidsystems/2pimmisciblefluidsystem.hh @@ -282,8 +282,8 @@ public: Scalar temperature = fluidState.temperature(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == wPhaseIdx) - return WettingPhase::density(temperature, pressure); - return NonWettingPhase::density(temperature, pressure); + return WettingPhase::viscosity(temperature, pressure); + return NonWettingPhase::viscosity(temperature, pressure); } /*!