mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2829 from GitPaean/wip_aquifer_keywords
aquifer summary keywords
This commit is contained in:
commit
14e34378b0
@ -149,6 +149,11 @@ public:
|
||||
void deserialize(Restarter& res OPM_UNUSED)
|
||||
{ }
|
||||
|
||||
|
||||
Opm::data::Aquifers aquiferData() const
|
||||
{ return Opm::data::Aquifers{}; }
|
||||
|
||||
|
||||
protected:
|
||||
Simulator& simulator_;
|
||||
};
|
||||
|
@ -273,6 +273,9 @@ public:
|
||||
const auto localGroupAndNetworkData = simulator_.problem().wellModel()
|
||||
.groupAndNetworkData(reportStepNum, simulator_.vanguard().schedule());
|
||||
|
||||
|
||||
const auto localAquiferData = simulator_.problem().mutableAquiferModel().aquiferData();
|
||||
|
||||
this->prepareLocalCellData(isSubStep, reportStepNum);
|
||||
|
||||
if (collectToIORank_.isParallel())
|
||||
@ -308,6 +311,9 @@ public:
|
||||
? this->collectToIORank_.globalGroupAndNetworkData()
|
||||
: localGroupAndNetworkData;
|
||||
|
||||
// Aquifer can not be parallel running yet
|
||||
const auto& aquiferData = localAquiferData;
|
||||
|
||||
const auto& blockData
|
||||
= this->collectToIORank_.isParallel()
|
||||
? this->collectToIORank_.globalBlockData()
|
||||
@ -322,7 +328,8 @@ public:
|
||||
groupAndNetworkData,
|
||||
miscSummaryData,
|
||||
regionData,
|
||||
blockData);
|
||||
blockData,
|
||||
aquiferData);
|
||||
|
||||
const auto& udq_config = schedule().getUDQConfig(reportStepNum);
|
||||
udq_config.eval( reportStepNum, summaryState(), udqState() );
|
||||
|
@ -65,6 +65,22 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Opm::data::AquiferData aquiferData() const
|
||||
{
|
||||
data::AquiferData data;
|
||||
data.aquiferID = this->aquiferID;
|
||||
// TODO: not sure how to get this pressure value yet
|
||||
data.pressure = this->pa0_;
|
||||
data.fluxRate = 0.;
|
||||
for (const auto& q : this->Qai_) {
|
||||
data.fluxRate += q.value();
|
||||
}
|
||||
data.volume = this->W_flux_.value();
|
||||
data.initPressure = this->pa0_;
|
||||
data.type = Opm::data::AquiferType::CarterTracey;
|
||||
return data;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Variables constants
|
||||
const AquiferCT::AQUCT_data aquct_data_;
|
||||
|
@ -68,6 +68,24 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Opm::data::AquiferData aquiferData() const
|
||||
{
|
||||
// TODO: how to unify the two functions?
|
||||
data::AquiferData data;
|
||||
data.aquiferID = this->aquiferID;
|
||||
data.pressure = this->aquifer_pressure_;
|
||||
data.fluxRate = 0.;
|
||||
for (const auto& q : this->Qai_) {
|
||||
data.fluxRate += q.value();
|
||||
}
|
||||
data.volume = this->W_flux_.value();
|
||||
data.initPressure = this->pa0_;
|
||||
data.type = Opm::data::AquiferType::Fetkovich;
|
||||
// Not handling std::shared_ptr<FetkovichData> aquFet for now,
|
||||
// because we do not need it yet
|
||||
return data;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Aquifer Fetkovich Specific Variables
|
||||
// TODO: using const reference here will cause segmentation fault, which is very strange
|
||||
|
@ -65,6 +65,8 @@ public:
|
||||
void endTimeStep();
|
||||
void endEpisode();
|
||||
|
||||
Opm::data::Aquifers aquiferData() const;
|
||||
|
||||
template <class Restarter>
|
||||
void serialize(Restarter& res);
|
||||
|
||||
@ -82,6 +84,8 @@ protected:
|
||||
Simulator& simulator_;
|
||||
|
||||
std::unordered_map<int, int> cartesian_to_compressed_;
|
||||
// TODO: probably we can use one variable to store both types of aquifers, because
|
||||
// they share the base class
|
||||
mutable std::vector<AquiferCarterTracy_object> aquifers_CarterTracy;
|
||||
mutable std::vector<AquiferFetkovich_object> aquifers_Fetkovich;
|
||||
|
||||
|
@ -205,4 +205,23 @@ BlackoilAquiferModel<TypeTag>::aquiferFetkovichActive() const
|
||||
{
|
||||
return !aquifers_Fetkovich.empty();
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
Opm::data::Aquifers BlackoilAquiferModel<TypeTag>::aquiferData() const {
|
||||
Opm::data::Aquifers data;
|
||||
if (this->aquiferCarterTracyActive()) {
|
||||
for (const auto& aqu : aquifers_CarterTracy) {
|
||||
Opm::data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data[aqu_data.aquiferID] = aqu_data;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->aquiferFetkovichActive()) {
|
||||
for (const auto& aqu : aquifers_Fetkovich) {
|
||||
Opm::data::AquiferData aqu_data = aqu.aquiferData();
|
||||
data[aqu_data.aquiferID] = aqu_data;
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
} // namespace Opm
|
||||
|
@ -227,7 +227,8 @@ void readDeck(int rank, std::string& deckFilename, std::unique_ptr<Opm::Deck>& d
|
||||
setupMessageLimiter(schedule->getMessageLimits(), "STDOUT_LOGGER");
|
||||
}
|
||||
if (!summaryConfig)
|
||||
summaryConfig = std::make_unique<Opm::SummaryConfig>(*deck, *schedule, eclipseState->getTableManager(), *parseContext, *errorGuard);
|
||||
summaryConfig = std::make_unique<Opm::SummaryConfig>(*deck, *schedule,eclipseState->getTableManager(),
|
||||
eclipseState->aquifer(), *parseContext, *errorGuard);
|
||||
|
||||
Opm::checkConsistentArrayDimensions(*eclipseState, *schedule, *parseContext, *errorGuard);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user