Adds support for KRNUM

This commit is contained in:
Håkon Hægland
2022-07-01 08:19:51 +02:00
parent 67ec01a730
commit 8b1bcb36bc
5 changed files with 23 additions and 5 deletions

View File

@@ -36,9 +36,12 @@
#include <opm/models/utils/signum.hh> #include <opm/models/utils/signum.hh>
#include <opm/material/common/Valgrind.hpp> #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/fvector.hh>
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
#include <fmt/format.h>
namespace Opm { namespace Opm {
@@ -227,7 +230,7 @@ public:
unsigned I = stencil.globalSpaceIndex(interiorDofIdx); unsigned I = stencil.globalSpaceIndex(interiorDofIdx);
unsigned J = stencil.globalSpaceIndex(exteriorDofIdx); 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 trans = problem.transmissibility(elemCtx, interiorDofIdx, exteriorDofIdx);
Scalar faceArea = scvf.area(); Scalar faceArea = scvf.area();
Scalar thpres = problem.thresholdPressure(I, J); Scalar thpres = problem.thresholdPressure(I, J);
@@ -265,7 +268,7 @@ public:
intQuantsEx, intQuantsEx,
phaseIdx,//input phaseIdx,//input
interiorDofIdx,//input interiorDofIdx,//input
exteriorDofIdx,//intput exteriorDofIdx,//input
Vin, Vin,
Vex, Vex,
I, I,
@@ -285,10 +288,11 @@ public:
if (upwindIsInterior) if (upwindIsInterior)
volumeFlux[phaseIdx] = volumeFlux[phaseIdx] =
pressureDifferences[phaseIdx]*up.mobility(phaseIdx)*transMult*(-trans/faceArea); pressureDifferences[phaseIdx]*up.mobility(phaseIdx, facedir)*transMult*(-trans/faceArea);
else else
volumeFlux[phaseIdx] = 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));
} }
} }

View File

@@ -322,6 +322,15 @@ updatePlmixnum_()
updateNum("PLMIXNUM", plmixnum_); 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> template<class GridView, class FluidSystem, class Scalar>
bool EclGenericProblem<GridView,FluidSystem,Scalar>:: bool EclGenericProblem<GridView,FluidSystem,Scalar>::
vapparsActive(int episodeIdx) const vapparsActive(int episodeIdx) const

View File

@@ -306,6 +306,7 @@ protected:
void updateSatnum_(); void updateSatnum_();
void updateMiscnum_(); void updateMiscnum_();
void updatePlmixnum_(); void updatePlmixnum_();
void updateKrnum_();
const EclipseState& eclState_; const EclipseState& eclState_;
const Schedule& schedule_; const Schedule& schedule_;
@@ -318,6 +319,9 @@ protected:
std::vector<unsigned short> satnum_; std::vector<unsigned short> satnum_;
std::vector<unsigned short> miscnum_; std::vector<unsigned short> miscnum_;
std::vector<unsigned short> plmixnum_; 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<RockParams> rockParams_;
std::vector<unsigned short> rockTableIdx_; std::vector<unsigned short> rockTableIdx_;

View File

@@ -2223,6 +2223,8 @@ private:
// the PLMIX region numbers (polymer model) // the PLMIX region numbers (polymer model)
this->updatePlmixnum_(); this->updatePlmixnum_();
// directional relative permeabilities
this->updateKrnum_();
//////////////////////////////// ////////////////////////////////
// porosity // porosity
updateReferencePorosity_(); updateReferencePorosity_();

View File

@@ -196,7 +196,6 @@ partiallySupported()
{ {
"SATOPTS", "SATOPTS",
{ {
{1,{false, allow_values<std::string> {"HYSTER"}, "SATOPTS(DIRECT): directional relative permeability assignment option not supported - value ignored"}}, // options
{2,{false, allow_values<std::string> {"HYSTER"}, "SATOPTS(IRREVERS): reversible directional relative permeability option not supported value ignored"}}, // IRREVERS {2,{false, allow_values<std::string> {"HYSTER"}, "SATOPTS(IRREVERS): reversible directional relative permeability option not supported value ignored"}}, // IRREVERS
{3,{false, allow_values<std::string> {"HYSTER"}, "SATOPTS(HYSTER): hysteresis directional relative permeability option not supported - value ignored"}}, // HYSTER {3,{false, allow_values<std::string> {"HYSTER"}, "SATOPTS(HYSTER): hysteresis directional relative permeability option not supported - value ignored"}}, // HYSTER
{4,{false, allow_values<std::string> {"HYSTER"}, "SATOPTS(SURFTENS): capillary pressure surface tension pressure dependency option not supported value ignored"}}, // SURFTENS {4,{false, allow_values<std::string> {"HYSTER"}, "SATOPTS(SURFTENS): capillary pressure surface tension pressure dependency option not supported value ignored"}}, // SURFTENS