Commit 9e8836a0 authored by Martin Schneider's avatar Martin Schneider
Browse files

[IMPES] Correct saturation and pressure models

parent d92cd40d
......@@ -111,7 +111,7 @@ public:
{
// the physical quantities for which we perform upwinding
auto upwindTerm = [phaseIdx](const auto& volVars)
{ return volVars.density(phaseIdx)*volVars.mobility(phaseIdx); };
{ return volVars.mobility(phaseIdx); };
flux[pressureEqIdx] += fluxVars.advectiveFlux(phaseIdx, upwindTerm);
}
......
......@@ -113,7 +113,7 @@ public:
// the physical quantities for which we perform upwinding
auto upwindTerm = [&](const auto& volVars)
{ return volVars.density(phaseIdx); };
{ return volVars.density(phaseIdx)*volVars.mobility(phaseIdx); };
flux[transportEqIdx] = fluxVars.advectiveFlux(phaseIdx, upwindTerm);
......
......@@ -82,6 +82,20 @@ public:
completeFluidState(elemSol, problem, element, scv, fluidState_, solidState_);
using MaterialLaw = typename Problem::SpatialParams::MaterialLaw;
const auto& materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
const int wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
const int nPhaseIdx = 1 - wPhaseIdx;
mobility_[wPhaseIdx] =
MaterialLaw::krw(materialParams, fluidState_.saturation(wPhaseIdx))
/ fluidState_.viscosity(wPhaseIdx);
mobility_[nPhaseIdx] =
MaterialLaw::krn(materialParams, fluidState_.saturation(wPhaseIdx))
/ fluidState_.viscosity(nPhaseIdx);
// porosity calculation over inert volumefraction
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
}
......@@ -194,6 +208,14 @@ public:
Scalar molarDensity(const int phaseIdx) const
{ return fluidState_.molarDensity(phaseIdx); }
/*!
* \brief Returns the effective mobility of a given phase within
* the control volume in \f$[s*m/kg]\f$.
*
* \param phaseIdx The phase index
*/
Scalar mobility(int phaseIdx) const
{ return mobility_[phaseIdx]; }
/*!
* \brief Returns the average porosity within the control volume in \f$[-]\f$.
......@@ -208,6 +230,7 @@ protected:
private:
Scalar pc_;
Scalar porosity_;
Scalar mobility_[ModelTraits::numPhases()];
};
} // end namespace Dumux
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment