mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
commit
a86ee61bf6
@ -1331,13 +1331,7 @@ public:
|
|||||||
unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||||
|
|
||||||
values.setPvtRegionIndex(pvtRegionIndex(context, spaceIdx, timeIdx));
|
values.setPvtRegionIndex(pvtRegionIndex(context, spaceIdx, timeIdx));
|
||||||
|
values.assignNaive(initialFluidStates_[globalDofIdx]);
|
||||||
if (useMassConservativeInitialCondition_) {
|
|
||||||
const auto& matParams = materialLawParams(context, spaceIdx, timeIdx);
|
|
||||||
values.assignMassConservative(initialFluidStates_[globalDofIdx], matParams);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
values.assignNaive(initialFluidStates_[globalDofIdx]);
|
|
||||||
|
|
||||||
if (enableSolvent)
|
if (enableSolvent)
|
||||||
values[Indices::solventSaturationIdx] = solventSaturation_[globalDofIdx];
|
values[Indices::solventSaturationIdx] = solventSaturation_[globalDofIdx];
|
||||||
@ -1833,11 +1827,6 @@ private:
|
|||||||
typedef Ewoms::EclEquilInitializer<TypeTag> EquilInitializer;
|
typedef Ewoms::EclEquilInitializer<TypeTag> EquilInitializer;
|
||||||
EquilInitializer equilInitializer(this->simulator(), *materialLawManager_);
|
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();
|
size_t numElems = this->model().numGridDof();
|
||||||
initialFluidStates_.resize(numElems);
|
initialFluidStates_.resize(numElems);
|
||||||
for (size_t elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
for (size_t elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||||
@ -1848,11 +1837,6 @@ private:
|
|||||||
|
|
||||||
void readEclRestartSolution_()
|
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();
|
eclWriter_->restartBegin();
|
||||||
|
|
||||||
size_t numElems = this->model().numGridDof();
|
size_t numElems = this->model().numGridDof();
|
||||||
@ -1936,10 +1920,6 @@ private:
|
|||||||
const auto& eclState = vanguard.eclState();
|
const auto& eclState = vanguard.eclState();
|
||||||
const auto& eclProps = eclState.get3DProperties();
|
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
|
// make sure all required quantities are enables
|
||||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) && !eclProps.hasDeckDoubleGridProperty("SWAT"))
|
if (FluidSystem::phaseIsActive(waterPhaseIdx) && !eclProps.hasDeckDoubleGridProperty("SWAT"))
|
||||||
throw std::runtime_error("The ECL input file requires the presence of the SWAT keyword if "
|
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_;
|
std::vector<Scalar> maxPolymerAdsorption_;
|
||||||
|
|
||||||
bool useMassConservativeInitialCondition_;
|
|
||||||
std::vector<InitialFluidState> initialFluidStates_;
|
std::vector<InitialFluidState> initialFluidStates_;
|
||||||
std::vector<Scalar> initialTemperature_;
|
std::vector<Scalar> initialTemperature_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user