mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ebos: make it possible to easily disable SWATINIT
in flow_ebos, this code collides with the flow part.
This commit is contained in:
@@ -48,6 +48,7 @@ NEW_PROP_TAG(FluidSystem);
|
||||
NEW_PROP_TAG(GridView);
|
||||
NEW_PROP_TAG(Scalar);
|
||||
NEW_PROP_TAG(MaterialLaw);
|
||||
NEW_PROP_TAG(EnableSwatinit);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -243,21 +244,23 @@ public:
|
||||
cartesianToCompressedElemIdx[cartElemIdx] = elemIdx;
|
||||
}
|
||||
|
||||
for (unsigned equilElemIdx = 0; equilElemIdx < numEquilElems; ++equilElemIdx) {
|
||||
int cartElemIdx = gridManager.equilCartesianIndex(equilElemIdx);
|
||||
assert(cartElemIdx >= 0);
|
||||
int elemIdx = cartesianToCompressedElemIdx[cartElemIdx];
|
||||
if (elemIdx < 0)
|
||||
// the element is present in the grid for used for equilibration but
|
||||
// it isn't present in the one used for the simulation. the most
|
||||
// probable reason for this is that the simulation grid was load
|
||||
// balanced.
|
||||
continue;
|
||||
if (GET_PROP_VALUE(TypeTag, EnableSwatinit)) {
|
||||
for (unsigned equilElemIdx = 0; equilElemIdx < numEquilElems; ++equilElemIdx) {
|
||||
int cartElemIdx = gridManager.equilCartesianIndex(equilElemIdx);
|
||||
assert(cartElemIdx >= 0);
|
||||
int elemIdx = cartesianToCompressedElemIdx[cartElemIdx];
|
||||
if (elemIdx < 0)
|
||||
// the element is present in the grid for used for equilibration but
|
||||
// it isn't present in the one used for the simulation. the most
|
||||
// probable reason for this is that the simulation grid was load
|
||||
// balanced.
|
||||
continue;
|
||||
|
||||
auto& scalingPoints = materialLawManager->oilWaterScaledEpsPointsDrainage(equilElemIdx);
|
||||
const auto& equilScalingPoints = equilMaterialLawManager->oilWaterScaledEpsPointsDrainage(equilElemIdx);
|
||||
auto& scalingPoints = materialLawManager->oilWaterScaledEpsPointsDrainage(equilElemIdx);
|
||||
const auto& equilScalingPoints = equilMaterialLawManager->oilWaterScaledEpsPointsDrainage(equilElemIdx);
|
||||
|
||||
scalingPoints.setMaxPcnw(equilScalingPoints.maxPcnw());
|
||||
scalingPoints.setMaxPcnw(equilScalingPoints.maxPcnw());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,9 @@ NEW_PROP_TAG(DisableWells);
|
||||
// print statements in debug mode.
|
||||
NEW_PROP_TAG(EnableDebuggingChecks);
|
||||
|
||||
// If this property is set to false, the SWATINIT keyword will not be handled by ebos.
|
||||
NEW_PROP_TAG(EnableSwatinit);
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(EclBaseProblem, Problem, Ewoms::EclProblem<TypeTag>);
|
||||
|
||||
@@ -211,10 +214,13 @@ SET_INT_PROP(EclBaseProblem, RestartWritingInterval, 0xffffff); // disable
|
||||
|
||||
// By default, ebos should handle the wells internally, so we don't disable the well
|
||||
// treatment
|
||||
SET_INT_PROP(EclBaseProblem, DisableWells, false);
|
||||
SET_BOOL_PROP(EclBaseProblem, DisableWells, false);
|
||||
|
||||
// By default, we enable the debugging checks if we're compiled in debug mode
|
||||
SET_INT_PROP(EclBaseProblem, EnableDebuggingChecks, true);
|
||||
SET_BOOL_PROP(EclBaseProblem, EnableDebuggingChecks, true);
|
||||
|
||||
// ebos handles the SWATINIT keyword by default
|
||||
SET_BOOL_PROP(EclBaseProblem, EnableSwatinit, true);
|
||||
} // namespace Properties
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user