diff --git a/ebos/equil/initstateequil.hh b/ebos/equil/initstateequil.hh index cc2afa0ee..bfa60a124 100644 --- a/ebos/equil/initstateequil.hh +++ b/ebos/equil/initstateequil.hh @@ -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.; }