Merge pull request #4761 from hnil/fix_temp_boundary

Fix temp boundary
This commit is contained in:
Arne Morten Kvarving 2023-08-01 09:02:26 +02:00 committed by GitHub
commit 1e6b7f889a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,7 +217,7 @@ template<class TypeTag>
struct Model<TypeTag, TTag::EclBaseProblem> { struct Model<TypeTag, TTag::EclBaseProblem> {
using type = FIBlackOilModel<TypeTag>; using type = FIBlackOilModel<TypeTag>;
}; };
// Select the element centered finite volume method as spatial discretization // Select the element centered finite volume method as spatial discretization
template<class TypeTag> template<class TypeTag>
struct SpatialDiscretizationSplice<TypeTag, TTag::EclBaseProblem> { struct SpatialDiscretizationSplice<TypeTag, TTag::EclBaseProblem> {
@ -823,10 +823,10 @@ public:
this->maxTimeStepAfterWellEvent_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent); this->maxTimeStepAfterWellEvent_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent);
this->restartShrinkFactor_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclRestartShrinkFactor); this->restartShrinkFactor_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclRestartShrinkFactor);
this->maxFails_ = EWOMS_GET_PARAM(TypeTag, unsigned, MaxTimeStepDivisions); this->maxFails_ = EWOMS_GET_PARAM(TypeTag, unsigned, MaxTimeStepDivisions);
// The value N for this parameter is defined in the following order of presedence: // The value N for this parameter is defined in the following order of presedence:
// 1. Command line value (--num-pressure-points-equil=N) // 1. Command line value (--num-pressure-points-equil=N)
// 2. EQLDIMS item 2 // 2. EQLDIMS item 2
// Default value is defined in opm-common/src/opm/input/eclipse/share/keywords/000_Eclipse100/E/EQLDIMS // Default value is defined in opm-common/src/opm/input/eclipse/share/keywords/000_Eclipse100/E/EQLDIMS
if (EWOMS_PARAM_IS_SET(TypeTag, int, NumPressurePointsEquil)) if (EWOMS_PARAM_IS_SET(TypeTag, int, NumPressurePointsEquil))
{ {
@ -1598,7 +1598,7 @@ public:
/*! /*!
* \copydoc FvBaseProblem::boundary * \copydoc FvBaseProblem::boundary
* *
* ECLiPSE uses no-flow conditions for all boundaries. \todo really? * Reservoir simulation uses no-flow conditions as default for all boundaries.
*/ */
template <class Context> template <class Context>
void boundary(BoundaryRateVector& values, void boundary(BoundaryRateVector& values,
@ -1628,8 +1628,7 @@ public:
unsigned interiorDofIdx = context.interiorScvIndex(spaceIdx, timeIdx); unsigned interiorDofIdx = context.interiorScvIndex(spaceIdx, timeIdx);
unsigned globalDofIdx = context.globalSpaceIndex(interiorDofIdx, timeIdx); unsigned globalDofIdx = context.globalSpaceIndex(interiorDofIdx, timeIdx);
unsigned pvtRegionIdx = pvtRegionIndex(context, spaceIdx, timeIdx); unsigned pvtRegionIdx = pvtRegionIndex(context, spaceIdx, timeIdx);
FaceDir::DirEnum dir = FaceDir::FromIntersectionIndex(indexInInside); const auto [type, massrate] = boundaryCondition(globalDofIdx, indexInInside);
const auto [type, massrate] = boundaryCondition(globalDofIdx, dir);
if (type == BCType::THERMAL) if (type == BCType::THERMAL)
values.setThermalFlow(context, spaceIdx, timeIdx, boundaryFluidState(globalDofIdx, indexInInside)); values.setThermalFlow(context, spaceIdx, timeIdx, boundaryFluidState(globalDofIdx, indexInInside));
else if (type == BCType::FREE || type == BCType::DIRICHLET) else if (type == BCType::FREE || type == BCType::DIRICHLET)