mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add support for IMBNUMX, IMBNUMY, IMBNUMZ
This commit is contained in:
parent
bb53e3428e
commit
536ec73950
@ -367,6 +367,15 @@ updateKrnum_()
|
|||||||
updateNum("KRNUMZ", krnumz_);
|
updateNum("KRNUMZ", krnumz_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class GridView, class FluidSystem, class Scalar>
|
||||||
|
void EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||||
|
updateImbnum_()
|
||||||
|
{
|
||||||
|
updateNum("IMBNUMX", imbnumx_);
|
||||||
|
updateNum("IMBNUMY", imbnumy_);
|
||||||
|
updateNum("IMBNUMZ", imbnumz_);
|
||||||
|
}
|
||||||
|
|
||||||
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
|
||||||
|
@ -305,6 +305,7 @@ protected:
|
|||||||
void updateMiscnum_();
|
void updateMiscnum_();
|
||||||
void updatePlmixnum_();
|
void updatePlmixnum_();
|
||||||
void updateKrnum_();
|
void updateKrnum_();
|
||||||
|
void updateImbnum_();
|
||||||
|
|
||||||
const EclipseState& eclState_;
|
const EclipseState& eclState_;
|
||||||
const Schedule& schedule_;
|
const Schedule& schedule_;
|
||||||
@ -320,6 +321,9 @@ protected:
|
|||||||
std::vector<unsigned short> krnumx_;
|
std::vector<unsigned short> krnumx_;
|
||||||
std::vector<unsigned short> krnumy_;
|
std::vector<unsigned short> krnumy_;
|
||||||
std::vector<unsigned short> krnumz_;
|
std::vector<unsigned short> krnumz_;
|
||||||
|
std::vector<unsigned short> imbnumx_;
|
||||||
|
std::vector<unsigned short> imbnumy_;
|
||||||
|
std::vector<unsigned short> imbnumz_;
|
||||||
|
|
||||||
std::vector<RockParams> rockParams_;
|
std::vector<RockParams> rockParams_;
|
||||||
std::vector<unsigned short> rockTableIdx_;
|
std::vector<unsigned short> rockTableIdx_;
|
||||||
|
@ -1415,6 +1415,11 @@ public:
|
|||||||
return materialLawManager_->materialLawParams(globalDofIdx);
|
return materialLawManager_->materialLawParams(globalDofIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const MaterialLawParams& materialLawParams(unsigned globalDofIdx, FaceDir::DirEnum facedir) const
|
||||||
|
{
|
||||||
|
return materialLawManager_->materialLawParams(globalDofIdx, facedir);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return the parameters for the energy storage law of the rock
|
* \brief Return the parameters for the energy storage law of the rock
|
||||||
*/
|
*/
|
||||||
@ -1455,34 +1460,24 @@ public:
|
|||||||
FluidState &fluidState,
|
FluidState &fluidState,
|
||||||
unsigned globalSpaceIdx) const
|
unsigned globalSpaceIdx) const
|
||||||
{
|
{
|
||||||
// calculate relative permeabilities. note that we store the result into the
|
{
|
||||||
// mobility_ class attribute. the division by the phase viscosity happens later.
|
// calculate relative permeabilities. note that we store the result into the
|
||||||
const auto& materialParams = materialLawParams(globalSpaceIdx);
|
// mobility_ class attribute. the division by the phase viscosity happens later.
|
||||||
MaterialLaw::relativePermeabilities(mobility, materialParams, fluidState);
|
const auto& materialParams = materialLawParams(globalSpaceIdx);
|
||||||
Valgrind::CheckDefined(mobility);
|
MaterialLaw::relativePermeabilities(mobility, materialParams, fluidState);
|
||||||
if (materialLawManager_->hasDirectionalRelperms()) {
|
Valgrind::CheckDefined(mobility);
|
||||||
auto satnumIdx = materialLawManager_->satnumRegionIdx(globalSpaceIdx);
|
}
|
||||||
|
if (materialLawManager_->hasDirectionalRelperms()
|
||||||
|
|| materialLawManager_->hasDirectionalImbnum())
|
||||||
|
{
|
||||||
using Dir = FaceDir::DirEnum;
|
using Dir = FaceDir::DirEnum;
|
||||||
constexpr int ndim = 3;
|
constexpr int ndim = 3;
|
||||||
dirMob = std::make_unique<DirectionalMobility<TypeTag, Evaluation>>();
|
dirMob = std::make_unique<DirectionalMobility<TypeTag, Evaluation>>();
|
||||||
Dir facedirs[ndim] = {Dir::XPlus, Dir::YPlus, Dir::ZPlus};
|
Dir facedirs[ndim] = {Dir::XPlus, Dir::YPlus, Dir::ZPlus};
|
||||||
for (int i = 0; i<ndim; i++) {
|
for (int i = 0; i<ndim; i++) {
|
||||||
auto krnumSatIdx = materialLawManager_->getKrnumSatIdx(globalSpaceIdx, facedirs[i]);
|
const auto& materialParams = materialLawParams(globalSpaceIdx, facedirs[i]);
|
||||||
auto& mob_array = dirMob->getArray(i);
|
auto& mob_array = dirMob->getArray(i);
|
||||||
if (krnumSatIdx != satnumIdx) {
|
MaterialLaw::relativePermeabilities(mob_array, materialParams, fluidState);
|
||||||
// This hack is also used by StandardWell_impl.hpp:getMobilityEval() to temporarily use a different
|
|
||||||
// satnum index for a cell
|
|
||||||
const auto& paramsCell = materialLawManager_->connectionMaterialLawParams(krnumSatIdx, globalSpaceIdx);
|
|
||||||
MaterialLaw::relativePermeabilities(mob_array, paramsCell, fluidState);
|
|
||||||
// reset the cell's satnum index back to the original
|
|
||||||
materialLawManager_->connectionMaterialLawParams(satnumIdx, globalSpaceIdx);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Copy the default (non-directional dependent) mobility
|
|
||||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
|
||||||
mob_array[phaseIdx] = mobility[phaseIdx];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user