combine co2store and numerical aquifers

This commit is contained in:
Tor Harald Sandve 2021-09-17 16:05:26 +02:00
parent 7b833b7706
commit 10480b4f8f

View File

@ -1716,7 +1716,7 @@ public:
calcPressSatRsRv(eqlmap, rec, materialLawManager, comm, grav);
// modify the pressure and saturation for numerical aquifer cells
applyNumericalAquifers_(gridView, num_aquifers);
applyNumericalAquifers_(gridView, num_aquifers, eclipseState.runspec().co2Storage());
// Modify oil pressure in no-oil regions so that the pressures of present phases can
// be recovered from the oil pressure and capillary relations.
@ -1815,7 +1815,8 @@ private:
}
void applyNumericalAquifers_(const GridView& gridView,
const NumericalAquifers& aquifer)
const NumericalAquifers& aquifer,
const bool co2store)
{
const auto num_aqu_cells = aquifer.allAquiferCells();
if (num_aqu_cells.empty()) return;
@ -1830,7 +1831,8 @@ private:
const auto search = num_aqu_cells.find(cartIx);
if (search != num_aqu_cells.end()) {
// numerical aquifer cells are filled with water initially
const auto watPos = FluidSystem::waterPhaseIdx;
// for co2store the oilphase is used for brine
const auto watPos = co2store? FluidSystem::oilPhaseIdx : FluidSystem::waterPhaseIdx;
if (FluidSystem::phaseIsActive(watPos)) {
this->sat_[watPos][elemIdx] = 1.;
} else {
@ -1838,7 +1840,7 @@ private:
}
const auto oilPos = FluidSystem::oilPhaseIdx;
if (FluidSystem::phaseIsActive(oilPos)) {
if (!co2store && FluidSystem::phaseIsActive(oilPos)) {
this->sat_[oilPos][elemIdx] = 0.;
}