mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
providing the aquifer data for summary output
This commit is contained in:
parent
49eb111225
commit
ed89f25d1b
@ -149,6 +149,11 @@ public:
|
|||||||
void deserialize(Restarter& res OPM_UNUSED)
|
void deserialize(Restarter& res OPM_UNUSED)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
Opm::data::Aquifers aquiferData() const
|
||||||
|
{ return Opm::data::Aquifers{}; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Simulator& simulator_;
|
Simulator& simulator_;
|
||||||
};
|
};
|
||||||
|
@ -273,6 +273,9 @@ public:
|
|||||||
const auto localGroupAndNetworkData = simulator_.problem().wellModel()
|
const auto localGroupAndNetworkData = simulator_.problem().wellModel()
|
||||||
.groupAndNetworkData(reportStepNum, simulator_.vanguard().schedule());
|
.groupAndNetworkData(reportStepNum, simulator_.vanguard().schedule());
|
||||||
|
|
||||||
|
|
||||||
|
const auto localAquiferData = simulator_.problem().mutableAquiferModel().aquiferData();
|
||||||
|
|
||||||
this->prepareLocalCellData(isSubStep, reportStepNum);
|
this->prepareLocalCellData(isSubStep, reportStepNum);
|
||||||
|
|
||||||
if (collectToIORank_.isParallel())
|
if (collectToIORank_.isParallel())
|
||||||
@ -308,6 +311,9 @@ public:
|
|||||||
? this->collectToIORank_.globalGroupAndNetworkData()
|
? this->collectToIORank_.globalGroupAndNetworkData()
|
||||||
: localGroupAndNetworkData;
|
: localGroupAndNetworkData;
|
||||||
|
|
||||||
|
// Aquifer can not be parallel running yet
|
||||||
|
const auto& aquiferData = localAquiferData;
|
||||||
|
|
||||||
const auto& blockData
|
const auto& blockData
|
||||||
= this->collectToIORank_.isParallel()
|
= this->collectToIORank_.isParallel()
|
||||||
? this->collectToIORank_.globalBlockData()
|
? this->collectToIORank_.globalBlockData()
|
||||||
@ -322,7 +328,8 @@ public:
|
|||||||
groupAndNetworkData,
|
groupAndNetworkData,
|
||||||
miscSummaryData,
|
miscSummaryData,
|
||||||
regionData,
|
regionData,
|
||||||
blockData);
|
blockData,
|
||||||
|
aquiferData);
|
||||||
|
|
||||||
const auto& udq_config = schedule().getUDQConfig(reportStepNum);
|
const auto& udq_config = schedule().getUDQConfig(reportStepNum);
|
||||||
udq_config.eval( reportStepNum, summaryState(), udqState() );
|
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:
|
protected:
|
||||||
// Variables constants
|
// Variables constants
|
||||||
const AquiferCT::AQUCT_data aquct_data_;
|
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:
|
protected:
|
||||||
// Aquifer Fetkovich Specific Variables
|
// Aquifer Fetkovich Specific Variables
|
||||||
// TODO: using const reference here will cause segmentation fault, which is very strange
|
// TODO: using const reference here will cause segmentation fault, which is very strange
|
||||||
|
@ -65,6 +65,8 @@ public:
|
|||||||
void endTimeStep();
|
void endTimeStep();
|
||||||
void endEpisode();
|
void endEpisode();
|
||||||
|
|
||||||
|
Opm::data::Aquifers aquiferData() const;
|
||||||
|
|
||||||
template <class Restarter>
|
template <class Restarter>
|
||||||
void serialize(Restarter& res);
|
void serialize(Restarter& res);
|
||||||
|
|
||||||
@ -82,6 +84,8 @@ protected:
|
|||||||
Simulator& simulator_;
|
Simulator& simulator_;
|
||||||
|
|
||||||
std::unordered_map<int, int> cartesian_to_compressed_;
|
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<AquiferCarterTracy_object> aquifers_CarterTracy;
|
||||||
mutable std::vector<AquiferFetkovich_object> aquifers_Fetkovich;
|
mutable std::vector<AquiferFetkovich_object> aquifers_Fetkovich;
|
||||||
|
|
||||||
|
@ -205,4 +205,23 @@ BlackoilAquiferModel<TypeTag>::aquiferFetkovichActive() const
|
|||||||
{
|
{
|
||||||
return !aquifers_Fetkovich.empty();
|
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
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user