Pass gas mass rate to summary

This commit is contained in:
Tor Harald Sandve committed 2024-08-14 09:01:10 +02:00
1 parent eb3d4e9203
commit 25b56c39aa
3 files changed
+22 -1

No files matched your search

+6 -1
View File
@@ -283,7 +283,12 @@ template<class Scalar> class WellContributions;
this->assignWellTargets(wsrpt);
this->assignShutConnections(wsrpt, this->reportStepIndex());
// only used to compute gas injection mass rates for CO2STORE runs
// The gas reference density is thus the same for all pvt regions
// We therefore for simplicity use 0 here
if (eclState().runspec().co2Storage()) {
this->assignMassGasRate(wsrpt, FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, 0));
}
return wsrpt;
}
@@ -1678,6 +1678,20 @@ getWellsForTesting(const int timeStepIdx,
return {};
}
template<class Scalar>
void BlackoilWellModelGeneric<Scalar>::
assignMassGasRate(data::Wells& wsrpt,
const Scalar& gasDensity) const
{
using rt = data::Rates::opt;
for (auto& wrpt : wsrpt) {
auto& well_rates = wrpt.second.rates;
const auto w_mass_rate = well_rates.get(rt::gas) * gasDensity;
well_rates.set(rt::mass_gas, w_mass_rate);
}
}
template<class Scalar>
void BlackoilWellModelGeneric<Scalar>::
assignWellTracerRates(data::Wells& wsrpt,
@@ -440,6 +440,8 @@ protected:
using MswTracerRates = std::map<std::tuple<std::string, std::string, std::size_t>, Scalar>;
void assignMswTracerRates(data::Wells& wsrpt,
const MswTracerRates& mswTracerRates) const;
void assignMassGasRate(data::Wells& wsrpt,
const Scalar& gasDensity) const;
Schedule& schedule_;
const SummaryState& summaryState_;