Make MULTREGT Processor Aware of Numerical Aquifers

This commit adds a new data member

    MULTREGTScanner::aquifer_cells

which holds a sorted sequence of Cartesian/global cell indices
corresponding to the cells which comprise the model's numerical
aquifers.  These are needed to properly identify whether or not a
connection--i.e., a cell pair--would constitute a "numerical aquifer
connection" and be subject to 'NOAQUNNC' treatment.

We assign the numerical aquifer cells as part of member function

    EclipseState::conveyNumericalAquiferEffects

which runs at EclipseState construction time.  We know all numerical
aquifers at that point.
This commit is contained in:
Bård Skaflestad
2023-08-28 18:21:20 +02:00
parent 139701b017
commit f99ae4b7cc
5 changed files with 26 additions and 0 deletions

View File

@@ -98,6 +98,8 @@ namespace Opm {
bool operator==(const MULTREGTScanner& data) const;
MULTREGTScanner& operator=(const MULTREGTScanner& data);
void applyNumericalAquifer(const std::vector<std::size_t>& aquifer_cells);
double getRegionMultiplier(std::size_t globalCellIdx1,
std::size_t globalCellIdx2,
FaceDir::DirEnum faceDir) const;
@@ -112,6 +114,7 @@ namespace Opm {
serializer(m_searchMap);
serializer(regions);
serializer(aquifer_cells);
}
private:
@@ -126,6 +129,7 @@ namespace Opm {
std::vector<MULTREGTRecord> m_records{};
std::map<std::string, MULTREGTSearchMap> m_searchMap{};
std::map<std::string, std::vector<int>> regions{};
std::vector<std::size_t> aquifer_cells{};
void addKeyword(const DeckKeyword& deckKeyword);
void assertKeywordSupported(const DeckKeyword& deckKeyword);

View File

@@ -59,6 +59,7 @@ namespace Opm {
void applyMULT(const std::vector<double>& srcMultProp, FaceDir::DirEnum faceDir);
void applyMULTFLT(const FaultCollection& faults);
void applyMULTFLT(const Fault& fault);
void applyNumericalAquifer(const std::vector<std::size_t>& aquifer_cells);
bool operator==(const TransMult& data) const;

View File

@@ -352,6 +352,8 @@ namespace Opm {
// Add NNCs between aquifer cells and first aquifer cell and aquifer
// connections.
this->appendInputNNC(numerical_aquifer.aquiferCellNNCs());
this->m_transMult.applyNumericalAquifer(numerical_aquifer.allAquiferCellIds());
}
void EclipseState::applyMULTXYZ() {

View File

@@ -205,6 +205,7 @@ namespace Opm {
std::forward_as_tuple(std::make_pair(1, 2)),
std::forward_as_tuple(0));
result.regions = {{"test3", {11}}};
result.aquifer_cells = { std::size_t{17}, std::size_t{29} };
return result;
}
@@ -215,6 +216,7 @@ namespace Opm {
&& (this->m_records == data.m_records)
&& (this->m_searchMap == data.m_searchMap)
&& (this->regions == data.regions)
&& (this->aquifer_cells == data.aquifer_cells)
;
}
@@ -226,10 +228,23 @@ namespace Opm {
this->m_records = data.m_records;
this->m_searchMap = data.m_searchMap;
this->regions = data.regions;
this->aquifer_cells = data.aquifer_cells;
return *this;
}
void MULTREGTScanner::applyNumericalAquifer(const std::vector<std::size_t>& aquifer_cells_arg)
{
this->aquifer_cells.insert(this->aquifer_cells.end(),
aquifer_cells_arg.begin(),
aquifer_cells_arg.end());
std::sort(this->aquifer_cells.begin(), this->aquifer_cells.end());
this->aquifer_cells.erase(std::unique(this->aquifer_cells.begin(),
this->aquifer_cells.end()),
this->aquifer_cells.end());
}
// This function will check the region values in globalIndex1 and
// globalIndex and see if they match the regionvalues specified in the
// deck. The function checks both directions:

View File

@@ -156,6 +156,10 @@ namespace Opm {
}
}
void TransMult::applyNumericalAquifer(const std::vector<std::size_t>& aquifer_cells) {
m_multregtScanner.applyNumericalAquifer(aquifer_cells);
}
bool TransMult::operator==(const TransMult& data) const {
return this->m_nx == data.m_nx &&
this->m_ny == data.m_ny &&