27#ifndef OPM_OUTPUT_COMPOSITIONAL_MODULE_HPP
28#define OPM_OUTPUT_COMPOSITIONAL_MODULE_HPP
30#include <dune/grid/common/gridenums.hh>
34#include <opm/common/Exceptions.hpp>
35#include <opm/common/ErrorMacros.hpp>
36#include <opm/common/TimingMacros.hpp>
37#include <opm/common/OpmLog/OpmLog.hpp>
39#include <opm/input/eclipse/EclipseState/Compositional/CompositionalConfig.hpp>
40#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
42#include <opm/material/common/Valgrind.hpp>
67#include <fmt/format.h>
72template <
class TypeTag>
73class EcfvDiscretization;
81template <
class TypeTag>
95 enum { numPhases = FluidSystem::numPhases };
96 enum { numComponents = FluidSystem::numComponents };
97 enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
98 enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
99 enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
108 template <
class CollectDataToIORankType>
110 const SummaryConfig& smryCfg,
111 const CollectDataToIORankType& collectToIORank)
112 :
BaseType(simulator.vanguard().eclState(),
113 simulator.vanguard().schedule(),
115 simulator.vanguard().summaryState(),
117 [this](const int idx)
118 {
return simulator_.problem().eclWriter().collectOnIORank().localIdxToGlobalIdx(idx); },
119 [&collectToIORank](
const int idx)
120 {
return collectToIORank.isCartIdxOnThisRank(idx); },
121 simulator.vanguard().grid().comm(),
122 getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::FullyImplicitThermal,
123 getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::ConstantTemperature,
124 getPropValue<TypeTag, Properties::EnableMech>(),
125 getPropValue<TypeTag, Properties::EnableSolvent>(),
126 getPropValue<TypeTag, Properties::EnablePolymer>(),
127 getPropValue<TypeTag, Properties::EnableFoam>(),
128 getPropValue<TypeTag, Properties::EnableBrine>(),
129 getPropValue<TypeTag, Properties::EnableSaltPrecipitation>(),
130 getPropValue<TypeTag, Properties::EnableExtbo>(),
131 getPropValue<TypeTag, Properties::EnableBioeffects>(),
132 getPropValue<TypeTag, Properties::EnableGeochemistry>())
133 , simulator_(simulator)
134 , eosType_(simulator.vanguard().eclState().compositionalConfig().eosType(0))
136 for (
auto& region_pair : this->
regions_) {
137 this->createLocalRegion_(region_pair.second);
140 auto isCartIdxOnThisRank = [&collectToIORank](
const int idx) {
141 return collectToIORank.isCartIdxOnThisRank(idx);
148 if (! collectToIORank.isParallel()) {
152 if (! Parameters::Get<Parameters::OwnerCellsFirst>()) {
153 const std::string msg =
"The output code does not support --owner-cells-first=false.";
154 if (collectToIORank.isIORank()) {
157 OPM_THROW_NOLOG(std::runtime_error, msg);
160 if (smryCfg.match(
"[FB]PP[OGW]") || smryCfg.match(
"RPP[OGW]*")) {
161 auto rset = this->
eclState_.fieldProps().fip_regions();
162 rset.push_back(
"PVTNUM");
168 .emplace(this->simulator_.gridView().comm(),
169 FluidSystem::numPhases, rset,
170 [fp = std::cref(this->eclState_.fieldProps())]
171 (
const std::string& rsetName) ->
decltype(
auto)
172 { return fp.get().get_int(rsetName); });
182 const unsigned reportStepNum,
185 const bool forceRestartFieldAllocation)
191 auto rstKeywords = this->
schedule_.rst_keywords(reportStepNum);
192 const bool isRestartOutput = forceRestartFieldAllocation ||
193 (!substep && this->
schedule_.write_rst_file(reportStepNum));
194 const auto restartOutput = isRestartOutput
195 ? RestartOutput::Enabled
196 : RestartOutput::Disabled;
197 this->compC_.allocate(bufferSize, rstKeywords, restartOutput);
198 this->numUnresolvedSaturationPressures_ = 0;
201 forceRestartFieldAllocation,
204 std::move(rstKeywords));
209 this->compC_.outputRestart(sol, this->
saturation_[oilPhaseIdx]);
215 .gasDensity =
"DENG",
216 .waterDensity =
"DENW",
217 .oilViscosity =
"VOIL",
218 .gasViscosity =
"VGAS",
219 .waterViscosity =
"VWAT",
223 using M = UnitSystem::measure;
225 relativePermeability_[oilPhaseIdx], oilPhaseIdx);
227 relativePermeability_[gasPhaseIdx], gasPhaseIdx);
228 if constexpr (numPhases > 2) {
230 relativePermeability_[waterPhaseIdx], waterPhaseIdx);
235 const std::size_t reportStepNum,
237 boost::posix_time::ptime currentDate,
241 if (comm.rank() != 0) {
245 std::unique_ptr<FIPConfig> fipSched;
246 if (reportStepNum > 0) {
247 const auto& rpt = this->
schedule_[reportStepNum - 1].rpt_config.get();
248 fipSched = std::make_unique<FIPConfig>(rpt);
251 const FIPConfig& fipc = reportStepNum == 0
252 ? this->
eclState_.getEclipseConfig().fip()
256 this->
logOutput_.timeStamp(
"BALANCE", elapsed, reportStepNum, currentDate);
259 this->
logOutput_.fip(inplace, initial_inplace,
"");
261 if (fipc.output(FIPConfig::OutputField::FIPNUM)) {
262 this->
logOutput_.fip(inplace, initial_inplace,
"FIPNUM");
264 if (fipc.output(FIPConfig::OutputField::RESV)) {
269 if (fipc.output(FIPConfig::OutputField::FIP)) {
270 for (
const auto& reg : this->regions_) {
271 if (reg.first !=
"FIPNUM") {
272 std::ostringstream ss;
273 ss <<
"BAL" << reg.first.substr(3);
274 this->
logOutput_.timeStamp(ss.str(), elapsed, reportStepNum, currentDate);
275 this->
logOutput_.fip(inplace, initial_inplace, reg.first);
277 if (fipc.output(FIPConfig::OutputField::RESV)) {
290 if (comm.rank() != 0) {
294 if ((reportStepNum == 0) && (!substep) &&
295 (this->
schedule_.initialReportConfiguration().has_value()) &&
296 (this->schedule_.initialReportConfiguration()->contains(
"CSVFIP"))) {
298 std::ostringstream csv_stream;
304 this->
logOutput_.fip_csv(csv_stream, initial_inplace,
"FIPNUM");
306 for (
const auto& reg : this->regions_) {
307 if (reg.first !=
"FIPNUM") {
308 this->
logOutput_.fip_csv(csv_stream, initial_inplace, reg.first);
312 const IOConfig& io = this->
eclState_.getIOConfig();
313 auto csv_fname = io.getOutputDir() +
"/" + io.getBaseName() +
".CSV";
315 std::ofstream outputFile(csv_fname);
316 outputFile << csv_stream.str();
329 auto extractors = std::array{
331 [](
const unsigned phase,
const ExtractContext& ectx)
332 {
return ectx.intQuants.saturationForOutput(phase); }}
335 [](
const ExtractContext& ectx)
337 if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
339 return getValue(ectx.fs.pressure(oilPhaseIdx));
341 else if (FluidSystem::phaseIsActive(gasPhaseIdx)) {
343 return getValue(ectx.fs.pressure(gasPhaseIdx));
347 return getValue(ectx.fs.pressure(waterPhaseIdx));
352 [](
const ExtractContext& ectx)
353 {
return getValue(ectx.fs.temperature(oilPhaseIdx)); }}
355 Entry{[&compC = this->compC_](
const ExtractContext& ectx)
357 compC.assignMoleFractions(ectx.globalDofIdx,
358 [&ectx](
const unsigned compIdx)
360 return ectx.intQuants.hasHydrocarbon()
361 ? getValue(ectx.fs.moleFraction(compIdx))
364 }, this->compC_.moleFractionsAllocated()
369 Entry{[&compC = this->compC_](
const ExtractContext& ectx)
372 ectx.intQuants.phaseIsPresent(gasPhaseIdx);
373 compC.assignGasFractions(ectx.globalDofIdx,
374 [&fs = ectx.fs, hasGas](
const unsigned compIdx)
377 ? getValue(fs.moleFraction(gasPhaseIdx, compIdx))
380 }, FluidSystem::phaseIsActive(gasPhaseIdx) &&
381 this->compC_.gasFractionsAllocated()
383 Entry{[&compC = this->compC_](
const ExtractContext& ectx)
386 ectx.intQuants.phaseIsPresent(oilPhaseIdx);
387 compC.assignOilFractions(ectx.globalDofIdx,
388 [&fs = ectx.fs, hasOil](
const unsigned compIdx)
391 ? getValue(fs.moleFraction(oilPhaseIdx, compIdx))
394 }, FluidSystem::phaseIsActive(oilPhaseIdx) &&
395 this->compC_.oilFractionsAllocated()
397 Entry{[&compC = this->compC_](
const ExtractContext& ectx)
399 compC.assignPhasePressures(ectx.globalDofIdx,
400 getValue(ectx.fs.pressure(oilPhaseIdx)),
401 getValue(ectx.fs.pressure(gasPhaseIdx)));
402 }, this->compC_.phasePressuresAllocated()
406 Entry{[&compC = this->compC_](
const ExtractContext& ectx)
408 const Scalar liquidFraction = getValue(ectx.fs.L());
409 compC.assignVaporFraction(ectx.globalDofIdx,
410 ectx.intQuants.hasHydrocarbon()
411 ? std::clamp(Scalar{1} - liquidFraction,
412 Scalar{0}, Scalar{1})
414 }, this->compC_.vaporFractionAllocated()
417 Entry{PhaseEntry{&this->relativePermeability_,
418 [](
const unsigned phaseIdx,
const ExtractContext& ectx)
420 return ectx.intQuants.phaseIsPresent(phaseIdx)
421 ? getValue(ectx.intQuants.relativePermeability(phaseIdx))
426 [](
const unsigned phaseIdx,
const ExtractContext& ectx)
428 return ectx.intQuants.phaseIsPresent(phaseIdx)
429 ? getValue(ectx.fs.density(phaseIdx))
434 [](
const unsigned phaseIdx,
const ExtractContext& ectx)
436 return ectx.intQuants.phaseIsPresent(phaseIdx)
437 ? getValue(ectx.fs.viscosity(phaseIdx))
462 using namespace std::string_view_literals;
464 const auto densityIfPresent = [](
const unsigned phaseIdx) {
465 return [phaseIdx](
const Context& ectx) -> Scalar {
466 if (!ectx.intQuants.phaseIsPresent(phaseIdx)) {
470 return getValue(ectx.fs.density(phaseIdx));
474 const auto viscosityIfPresent = [](
const unsigned phaseIdx) {
475 return [phaseIdx](
const Context& ectx) -> Scalar {
476 if (!ectx.intQuants.phaseIsPresent(phaseIdx)) {
480 return getValue(ectx.fs.viscosity(phaseIdx));
484 const auto reservoirPoreVolume = [&model = this->simulator_.model()]
485 (
const Context& ectx) -> Scalar
487 return getValue(ectx.intQuants.porosity()) *
488 model.dofTotalVolume(ectx.globalDofIdx);
491 const auto phasePoreVolume = [reservoirPoreVolume](
const unsigned phaseIdx) {
492 return [phaseIdx, reservoirPoreVolume](
const Context& ectx) -> Scalar {
493 return ectx.intQuants.saturationForOutput(phaseIdx) * reservoirPoreVolume(ectx);
497 const auto handlers = std::array{
498 Entry{ScalarEntry{std::vector{
"BPR"sv,
"BPRESSUR"sv},
499 [](
const Context& ectx)
501 return FluidSystem::phaseIsActive(oilPhaseIdx)
502 ? getValue(ectx.fs.pressure(oilPhaseIdx))
503 : getValue(ectx.fs.pressure(gasPhaseIdx));
507 Entry{ScalarEntry{
"BGPR"sv,
508 [](
const Context& ectx)
509 {
return getValue(ectx.fs.pressure(gasPhaseIdx)); }
512 Entry{ScalarEntry{
"BWPR"sv,
513 [](
const Context& ectx)
515 return FluidSystem::phaseIsActive(waterPhaseIdx)
516 ? getValue(ectx.fs.pressure(waterPhaseIdx))
521 Entry{ScalarEntry{
"BRPV"sv, reservoirPoreVolume}},
522 Entry{ScalarEntry{
"BWPV"sv, phasePoreVolume(waterPhaseIdx)}},
523 Entry{ScalarEntry{
"BOPV"sv, phasePoreVolume(oilPhaseIdx)}},
524 Entry{ScalarEntry{
"BGPV"sv, phasePoreVolume(gasPhaseIdx)}},
525 Entry{ScalarEntry{std::vector{
"BSOIL"sv,
"BOSAT"sv},
526 [](
const Context& ectx)
527 {
return ectx.intQuants.saturationForOutput(oilPhaseIdx); }
530 Entry{ScalarEntry{std::vector{
"BSGAS"sv,
"BGSAT"sv},
531 [](
const Context& ectx)
532 {
return ectx.intQuants.saturationForOutput(gasPhaseIdx); }
535 Entry{ScalarEntry{std::vector{
"BSWAT"sv,
"BWSAT"sv},
536 [](
const Context& ectx)
538 return ectx.intQuants.saturationForOutput(waterPhaseIdx);
542 Entry{ScalarEntry{std::vector{
"BDENO"sv,
"BODEN"sv},
543 densityIfPresent(oilPhaseIdx)
546 Entry{ScalarEntry{std::vector{
"BDENG"sv,
"BGDEN"sv},
547 densityIfPresent(gasPhaseIdx)
550 Entry{ScalarEntry{std::vector{
"BDENW"sv,
"BWDEN"sv},
551 densityIfPresent(waterPhaseIdx)
554 Entry{ScalarEntry{std::vector{
"BVOIL"sv,
"BOVIS"sv},
555 viscosityIfPresent(oilPhaseIdx)
558 Entry{ScalarEntry{std::vector{
"BVGAS"sv,
"BGVIS"sv},
559 viscosityIfPresent(gasPhaseIdx)
562 Entry{ScalarEntry{std::vector{
"BVWAT"sv,
"BWVIS"sv},
563 viscosityIfPresent(waterPhaseIdx)
566 Entry{ScalarEntry{std::vector{
"BTEMP"sv,
"BTCNFHEA"sv},
567 [](
const Context& ectx)
569 return FluidSystem::phaseIsActive(oilPhaseIdx)
570 ? getValue(ectx.fs.temperature(oilPhaseIdx))
571 : getValue(ectx.fs.temperature(gasPhaseIdx));
583 this->extractors_.clear();
584 this->blockExtractors_.clear();
599 for (
unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(0); ++dofIdx) {
600 const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, 0);
601 const auto& fs = intQuants.fluidState();
604 elemCtx.globalSpaceIndex(dofIdx, 0),
629 if (this->blockExtractors_.empty() || elemCtx.element().level() != 0) {
633 for (
unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(0); ++dofIdx) {
634 const auto globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, 0);
635 const auto cartesianIdx = elemCtx.simulator().vanguard().cartesianIndex(globalDofIdx);
637 const auto be_it = this->blockExtractors_.find(cartesianIdx);
638 if (be_it == this->blockExtractors_.end()) {
642 const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, 0);
647 intQuants.fluidState(),
684 template <
class ActiveIndex,
class CartesianIndex>
719 const IntensiveQuantities& intQuants,
720 const double totVolume)
724 const auto referencePorosity =
725 this->simulator_.problem().referencePorosity(globalDofIdx, 0);
733 this->assignSaturationPressure_(globalDofIdx, intQuants);
740 if (this->compC_.saturationPressureRequested()) {
741 const auto& comm = this->simulator_.gridView().comm();
742 const auto totalUnresolved = comm.sum(this->numUnresolvedSaturationPressures_);
743 if (totalUnresolved > 0 && comm.rank() == 0) {
744 const std::string_view cell = totalUnresolved == 1 ?
"cell" :
"cells";
748 OpmLog::info(fmt::format(
"No saturation pressure was resolved in {} {}; "
749 "PSAT is written as zero there. This includes "
750 "mixtures that have none.",
755 this->numUnresolvedSaturationPressures_ = 0;
762 const unsigned bufferSize)
override
766 const auto named = std::array{
767 std::pair{
static_cast<unsigned>(oilPhaseIdx), std::string_view{
"KRO"}},
768 std::pair{
static_cast<unsigned>(gasPhaseIdx), std::string_view{
"KRG"}},
769 std::pair{
static_cast<unsigned>(waterPhaseIdx), std::string_view{
"KRW"}},
771 for (
const auto& [phase, kw] : named) {
772 if (phase >= numPhases || !FluidSystem::phaseIsActive(phase)) {
776 relativePermeability_[phase], kw,
true);
782 std::array<ScalarBuffer, numPhases> relativePermeability_;
784 bool isDefunctParallelWell(
const std::string& wname)
const override
786 if (simulator_.gridView().comm().size() == 1)
788 const auto& parallelWells = simulator_.vanguard().parallelWells();
789 std::pair<std::string, bool> value {wname,
true};
790 auto candidate = std::lower_bound(parallelWells.begin(), parallelWells.end(), value);
791 return candidate == parallelWells.end() || *candidate != value;
794 bool isOwnedByCurrentRank(
const std::string& wname)
const override
799 return ! this->isDefunctParallelWell(wname);
802 bool isOnCurrentRank(
const std::string& wname)
const override
807 return ! this->isDefunctParallelWell(wname);
810 void createLocalRegion_(std::vector<int>& region)
812 std::size_t elemIdx = 0;
813 for (
const auto& elem : elements(simulator_.gridView())) {
814 if (elem.partitionType() != Dune::InteriorEntity) {
825 void assignSaturationPressure_(
const unsigned globalDofIdx,
826 const IntensiveQuantities& intQuants)
828 if (!this->compC_.saturationPressureAllocated()) {
832 const auto& fluidState = intQuants.fluidState();
833 if (!intQuants.hasHydrocarbon()) {
834 this->compC_.assignSaturationPressure(globalDofIdx,
835 getValue(fluidState.pressure(oilPhaseIdx)));
839 std::array<Scalar, numComponents> moleFractions{};
840 for (
int c = 0; c < numComponents; ++c) {
841 moleFractions[c] = getValue(fluidState.moleFraction(c));
844 getValue(fluidState.L()),
845 getValue(fluidState.pressure(oilPhaseIdx)),
847 getValue(fluidState.temperature(oilPhaseIdx)),
856 ++this->numUnresolvedSaturationPressures_;
859 this->compC_.assignSaturationPressure(globalDofIdx, psat.value_or(Scalar{0}));
862 const Simulator& simulator_;
863 CompositionalContainer<FluidSystem> compC_;
864 CompositionalConfig::EOSType eosType_;
865 std::size_t numUnresolvedSaturationPressures_{};
866 std::vector<typename Extractor::Entry> extractors_;
Restart-output buffers specific to compositional simulations.
Common output functionality shared by simulator formulations.
Declares the properties required by the black oil model.
RestartOutput
Definition: CompositionalContainer.hpp:56
static std::optional< Scalar > cellSaturationPressure(const Scalar liquidFraction, const Scalar oilPressure, const std::array< Scalar, numComponents > &moleFractions, const Scalar temperature, const CompositionalConfig::EOSType eosType)
The base class for the element-centered finite-volume discretization scheme.
Definition: ecfvdiscretization.hh:160
Definition: GenericOutputModule.hpp:91
const Schedule & schedule_
Definition: GenericOutputModule.hpp:536
bool forceDisableFipOutput_
Definition: GenericOutputModule.hpp:557
virtual void validateLocalData()
Definition: GenericOutputModule.hpp:291
void doAllocBuffers(unsigned bufferSize, unsigned reportStepNum, const bool substep, const bool log, const bool forceRestartFieldAllocation, const EclHysteresisConfig *hysteresisConfig, unsigned numOutputNnc=0, std::map< std::string, int > rstKeywords={})
void setupBlockData(std::function< bool(int)> isCartIdxOnThisRank)
ScalarBuffer temperature_
Definition: GenericOutputModule.hpp:591
std::optional< RegionPhasePoreVolAverage > regionAvgDensity_
Definition: GenericOutputModule.hpp:660
std::array< ScalarBuffer, numPhases > viscosity_
Definition: GenericOutputModule.hpp:632
void setupLgrBlockData(const std::map< std::string, int > &lgrNameToLevel, const std::function< bool(int, int)> &isLgrCellOnThisRank)
void assignBuffer(data::Solution &sol, std::string_view name, UnitSystem::measure measure, std::vector< Scalar > &buffer)
static bool allocBufferIfRequested(std::map< std::string, int > &rstKeywords, unsigned bufferSize, std::vector< Scalar > &buffer, std::string_view kw, bool supported, bool required=false)
std::unordered_map< std::string, std::vector< int > > regions_
Definition: GenericOutputModule.hpp:571
std::map< std::pair< std::string, int >, double > blockData_
Definition: GenericOutputModule.hpp:645
LogOutputHelper< Scalar > logOutput_
Definition: GenericOutputModule.hpp:542
void assignPhaseProperties(data::Solution &sol, const PhasePropertyNames &names)
Move the phase density and viscosity buffers to sol under names.
std::vector< Scalar > ScalarBuffer
Definition: GenericOutputModule.hpp:325
void updateTotalVolumesAndPressures_(const unsigned globalDofIdx, const IntensiveQuantities &intQuants, const double totVolume, const Scalar referencePorosity)
Definition: GenericOutputModule.hpp:362
InterRegFlowMap interRegionFlows_
Definition: GenericOutputModule.hpp:541
std::array< ScalarBuffer, numPhases > density_
Definition: GenericOutputModule.hpp:631
std::array< ScalarBuffer, numPhases > saturation_
Definition: GenericOutputModule.hpp:630
const EclipseState & eclState_
Definition: GenericOutputModule.hpp:535
virtual void assignToSolution(data::Solution &sol)
Move all buffers to data::Solution.
const Inplace * initialInplace() const
Definition: GenericOutputModule.hpp:274
static void registerParameters()
Register all run-time parameters for the Vtk output module.
ScalarBuffer fluidPressure_
Definition: GenericOutputModule.hpp:590
Inter-region flow accumulation maps for all region definition arrays.
Definition: InterRegFlows.hpp:179
void clear()
Clear all internal buffers, but preserve allocated capacity.
Output module for compositional-model results written in ECL binary format.
Definition: OutputCompositionalModule.hpp:83
void processElementFlows(const ElementContext &)
Definition: OutputCompositionalModule.hpp:616
void clearExtractors()
Clear the active element and block extractors.
Definition: OutputCompositionalModule.hpp:581
static void registerParameters()
Definition: OutputCompositionalModule.hpp:102
void initializeFluxData()
Prepare for capturing connection fluxes, particularly to account for inter-region flows.
Definition: OutputCompositionalModule.hpp:695
void setupBlockExtractors_()
Setup the block (B*) summary extractors.
Definition: OutputCompositionalModule.hpp:456
void setupExtractors(const bool, const std::size_t)
Setup list of active element-level data extractors.
Definition: OutputCompositionalModule.hpp:321
void updateFluidInPlace(const unsigned globalDofIdx, const IntensiveQuantities &intQuants, const double totVolume)
Definition: OutputCompositionalModule.hpp:718
void allocFormulationBuffers(std::map< std::string, int > &rstKeywords, const unsigned bufferSize) override
Allocate compositional relative-permeability buffers.
Definition: OutputCompositionalModule.hpp:761
void outputFipAndResvLogToCSV(const std::size_t reportStepNum, const bool substep, const Parallel::Communication &comm)
Definition: OutputCompositionalModule.hpp:286
void allocBuffers(const unsigned bufferSize, const unsigned reportStepNum, const bool substep, const bool log, const bool forceRestartFieldAllocation)
Allocate memory for the scalar fields we would like to write to ECL output files.
Definition: OutputCompositionalModule.hpp:181
void finalizeFluxData()
Finalize capturing connection fluxes.
Definition: OutputCompositionalModule.hpp:705
void processElement(const ElementContext &elemCtx)
Modify the internal buffers according to the intensive quanties relevant for an element.
Definition: OutputCompositionalModule.hpp:591
OutputCompositionalModule(const Simulator &simulator, const SummaryConfig &smryCfg, const CollectDataToIORankType &collectToIORank)
Definition: OutputCompositionalModule.hpp:109
void processElementBlockData(const ElementContext &elemCtx)
Definition: OutputCompositionalModule.hpp:623
void validateLocalData() override
Definition: OutputCompositionalModule.hpp:738
void assignToSolution(data::Solution &sol) override
Move all buffers to data::Solution.
Definition: OutputCompositionalModule.hpp:207
void processFluxes(const ElementContext &, ActiveIndex &&, CartesianIndex &&)
Capture connection fluxes, particularly to account for inter-region flows.
Definition: OutputCompositionalModule.hpp:685
const InterRegFlowMap & getInterRegFlows() const
Get read-only access to collection of inter-region flows.
Definition: OutputCompositionalModule.hpp:713
void outputFipAndResvLog(const Inplace &inplace, const std::size_t reportStepNum, double elapsed, boost::posix_time::ptime currentDate, const bool substep, const Parallel::Communication &comm)
Definition: OutputCompositionalModule.hpp:234
Defines the common properties required by the porous medium multi-phase models.
Dune::Communication< MPIComm > Communication
Definition: ParallelCommunication.hpp:30
Definition: blackoilbioeffectsmodules.hh:45
std::string moduleVersionName()
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:233
This file provides the infrastructure to retrieve run-time parameters.
The Opm property system, traits with inheritance.
Definition: GenericOutputModule.hpp:410
std::string_view oilDensity
Definition: GenericOutputModule.hpp:411
static void registerParameters()
Registers the parameters in parameter system.