mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Merge pull request #5528 from totto82/gasmassinj
Pass gas mass rate to summary
This commit is contained in:
@@ -283,7 +283,12 @@ template<class Scalar> class WellContributions;
|
|||||||
|
|
||||||
this->assignWellTargets(wsrpt);
|
this->assignWellTargets(wsrpt);
|
||||||
this->assignShutConnections(wsrpt, this->reportStepIndex());
|
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;
|
return wsrpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1678,6 +1678,20 @@ getWellsForTesting(const int timeStepIdx,
|
|||||||
return {};
|
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>
|
template<class Scalar>
|
||||||
void BlackoilWellModelGeneric<Scalar>::
|
void BlackoilWellModelGeneric<Scalar>::
|
||||||
assignWellTracerRates(data::Wells& wsrpt,
|
assignWellTracerRates(data::Wells& wsrpt,
|
||||||
|
|||||||
@@ -440,6 +440,8 @@ protected:
|
|||||||
using MswTracerRates = std::map<std::tuple<std::string, std::string, std::size_t>, Scalar>;
|
using MswTracerRates = std::map<std::tuple<std::string, std::string, std::size_t>, Scalar>;
|
||||||
void assignMswTracerRates(data::Wells& wsrpt,
|
void assignMswTracerRates(data::Wells& wsrpt,
|
||||||
const MswTracerRates& mswTracerRates) const;
|
const MswTracerRates& mswTracerRates) const;
|
||||||
|
void assignMassGasRate(data::Wells& wsrpt,
|
||||||
|
const Scalar& gasDensity) const;
|
||||||
|
|
||||||
Schedule& schedule_;
|
Schedule& schedule_;
|
||||||
const SummaryState& summaryState_;
|
const SummaryState& summaryState_;
|
||||||
|
|||||||
Reference in New Issue
Block a user