Merge pull request #478 from andlaus/ebos_remove_mass_conservative_init

ebos: remove the code to calculate a mass conservative initial condtion if the specified condition is inconsistent
This commit is contained in:
Tor Harald Sandve 2019-02-18 11:18:12 +01:00 committed by GitHub
commit a86ee61bf6

View File

@ -1331,12 +1331,6 @@ public:
unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
values.setPvtRegionIndex(pvtRegionIndex(context, spaceIdx, timeIdx));
if (useMassConservativeInitialCondition_) {
const auto& matParams = materialLawParams(context, spaceIdx, timeIdx);
values.assignMassConservative(initialFluidStates_[globalDofIdx], matParams);
}
else
values.assignNaive(initialFluidStates_[globalDofIdx]);
if (enableSolvent)
@ -1833,11 +1827,6 @@ private:
typedef Ewoms::EclEquilInitializer<TypeTag> EquilInitializer;
EquilInitializer equilInitializer(this->simulator(), *materialLawManager_);
// since the EquilInitializer provides fluid states that are consistent with the
// black-oil model, we can use naive instead of mass conservative determination
// of the primary variables.
useMassConservativeInitialCondition_ = false;
size_t numElems = this->model().numGridDof();
initialFluidStates_.resize(numElems);
for (size_t elemIdx = 0; elemIdx < numElems; ++elemIdx) {
@ -1848,11 +1837,6 @@ private:
void readEclRestartSolution_()
{
// since the EquilInitializer provides fluid states that are consistent with the
// black-oil model, we can use naive instead of mass conservative determination
// of the primary variables.
useMassConservativeInitialCondition_ = false;
eclWriter_->restartBegin();
size_t numElems = this->model().numGridDof();
@ -1936,10 +1920,6 @@ private:
const auto& eclState = vanguard.eclState();
const auto& eclProps = eclState.get3DProperties();
// the values specified in the deck do not need to be consistent,
// we still don't try to make the consistent.
useMassConservativeInitialCondition_ = false;
// make sure all required quantities are enables
if (FluidSystem::phaseIsActive(waterPhaseIdx) && !eclProps.hasDeckDoubleGridProperty("SWAT"))
throw std::runtime_error("The ECL input file requires the presence of the SWAT keyword if "
@ -2322,7 +2302,6 @@ private:
std::vector<Scalar> maxPolymerAdsorption_;
bool useMassConservativeInitialCondition_;
std::vector<InitialFluidState> initialFluidStates_;
std::vector<Scalar> initialTemperature_;