mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Adds support for KRNUM
This commit is contained in:
@@ -36,9 +36,12 @@
|
||||
#include <opm/models/utils/signum.hh>
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -227,7 +230,7 @@ public:
|
||||
|
||||
unsigned I = stencil.globalSpaceIndex(interiorDofIdx);
|
||||
unsigned J = stencil.globalSpaceIndex(exteriorDofIdx);
|
||||
|
||||
auto facedir = scvf.dirId(); // direction (X, Y, or Z) of the face
|
||||
Scalar trans = problem.transmissibility(elemCtx, interiorDofIdx, exteriorDofIdx);
|
||||
Scalar faceArea = scvf.area();
|
||||
Scalar thpres = problem.thresholdPressure(I, J);
|
||||
@@ -265,7 +268,7 @@ public:
|
||||
intQuantsEx,
|
||||
phaseIdx,//input
|
||||
interiorDofIdx,//input
|
||||
exteriorDofIdx,//intput
|
||||
exteriorDofIdx,//input
|
||||
Vin,
|
||||
Vex,
|
||||
I,
|
||||
@@ -285,10 +288,11 @@ public:
|
||||
|
||||
if (upwindIsInterior)
|
||||
volumeFlux[phaseIdx] =
|
||||
pressureDifferences[phaseIdx]*up.mobility(phaseIdx)*transMult*(-trans/faceArea);
|
||||
pressureDifferences[phaseIdx]*up.mobility(phaseIdx, facedir)*transMult*(-trans/faceArea);
|
||||
else
|
||||
volumeFlux[phaseIdx] =
|
||||
pressureDifferences[phaseIdx]*(Toolbox::value(up.mobility(phaseIdx))*Toolbox::value(transMult)*(-trans/faceArea));
|
||||
pressureDifferences[phaseIdx]*
|
||||
(Toolbox::value(up.mobility(phaseIdx, facedir))*Toolbox::value(transMult)*(-trans/faceArea));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,6 +322,15 @@ updatePlmixnum_()
|
||||
updateNum("PLMIXNUM", plmixnum_);
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
void EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
updateKrnum_()
|
||||
{
|
||||
updateNum("KRNUMX", krnumx_);
|
||||
updateNum("KRNUMY", krnumy_);
|
||||
updateNum("KRNUMZ", krnumz_);
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
bool EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
vapparsActive(int episodeIdx) const
|
||||
|
||||
@@ -306,6 +306,7 @@ protected:
|
||||
void updateSatnum_();
|
||||
void updateMiscnum_();
|
||||
void updatePlmixnum_();
|
||||
void updateKrnum_();
|
||||
|
||||
const EclipseState& eclState_;
|
||||
const Schedule& schedule_;
|
||||
@@ -318,6 +319,9 @@ protected:
|
||||
std::vector<unsigned short> satnum_;
|
||||
std::vector<unsigned short> miscnum_;
|
||||
std::vector<unsigned short> plmixnum_;
|
||||
std::vector<unsigned short> krnumx_;
|
||||
std::vector<unsigned short> krnumy_;
|
||||
std::vector<unsigned short> krnumz_;
|
||||
|
||||
std::vector<RockParams> rockParams_;
|
||||
std::vector<unsigned short> rockTableIdx_;
|
||||
|
||||
@@ -2223,6 +2223,8 @@ private:
|
||||
// the PLMIX region numbers (polymer model)
|
||||
this->updatePlmixnum_();
|
||||
|
||||
// directional relative permeabilities
|
||||
this->updateKrnum_();
|
||||
////////////////////////////////
|
||||
// porosity
|
||||
updateReferencePorosity_();
|
||||
|
||||
Reference in New Issue
Block a user