OutputCompositionalModule.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
27#ifndef OPM_OUTPUT_COMPOSITIONAL_MODULE_HPP
28#define OPM_OUTPUT_COMPOSITIONAL_MODULE_HPP
29
30#include <dune/grid/common/gridenums.hh>
31
33
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>
38
39#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
40
41#include <opm/material/common/Valgrind.hpp>
42
48
53
54#include <algorithm>
55#include <cstddef>
56#include <fstream>
57#include <memory>
58#include <sstream>
59#include <stdexcept>
60#include <string>
61#include <type_traits>
62#include <utility>
63#include <vector>
64
65
66namespace Opm {
67
68// forward declaration
69template <class TypeTag>
70class EcfvDiscretization;
71
78template <class TypeTag>
79class OutputCompositionalModule : public GenericOutputModule<GetPropType<TypeTag, Properties::FluidSystem>>
80{
89
90 enum { numPhases = FluidSystem::numPhases };
91 enum { numComponents = FluidSystem::numComponents };
92 enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
93 enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
94 enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
95
96public:
97 static void registerParameters()
98 {
101 }
102
103 template <class CollectDataToIORankType>
104 OutputCompositionalModule(const Simulator& simulator,
105 const SummaryConfig& smryCfg,
106 const CollectDataToIORankType& collectToIORank)
107 : BaseType(simulator.vanguard().eclState(),
108 simulator.vanguard().schedule(),
109 smryCfg,
110 simulator.vanguard().summaryState(),
112 [this](const int idx)
113 { return simulator_.problem().eclWriter().collectOnIORank().localIdxToGlobalIdx(idx); },
114 [&collectToIORank](const int idx)
115 { return collectToIORank.isCartIdxOnThisRank(idx); },
116 simulator.vanguard().grid().comm(),
117 getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::FullyImplicitThermal,
118 getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::ConstantTemperature,
119 getPropValue<TypeTag, Properties::EnableMech>(),
120 getPropValue<TypeTag, Properties::EnableSolvent>(),
121 getPropValue<TypeTag, Properties::EnablePolymer>(),
122 getPropValue<TypeTag, Properties::EnableFoam>(),
123 getPropValue<TypeTag, Properties::EnableBrine>(),
124 getPropValue<TypeTag, Properties::EnableSaltPrecipitation>(),
125 getPropValue<TypeTag, Properties::EnableExtbo>(),
126 getPropValue<TypeTag, Properties::EnableBioeffects>(),
127 getPropValue<TypeTag, Properties::EnableGeochemistry>())
128 , simulator_(simulator)
129 {
130 for (auto& region_pair : this->regions_) {
131 this->createLocalRegion_(region_pair.second);
132 }
133
134 auto isCartIdxOnThisRank = [&collectToIORank](const int idx) {
135 return collectToIORank.isCartIdxOnThisRank(idx);
136 };
137
138 this->setupBlockData(isCartIdxOnThisRank);
139
140 // Allocate LB* summary slots. The compositional block-data fill
141 // (processElementBlockData) is a stub, so no LB* values are produced
142 // here and the parallel gather has nothing to collect; the allocation
143 // is kept single-process and the ownership predicate is trivially true
144 // (there are no per-rank values to keep disjoint).
145 if (! collectToIORank.isParallel()) {
146 // Empty name->level map: the compositional block-data fill is a stub,
147 // so no LB* values are produced and nothing needs allocating.
148 this->setupLgrBlockData({}, [](const int, const int) { return true; });
149 }
150
151 if (! Parameters::Get<Parameters::OwnerCellsFirst>()) {
152 const std::string msg = "The output code does not support --owner-cells-first=false.";
153 if (collectToIORank.isIORank()) {
154 OpmLog::error(msg);
155 }
156 OPM_THROW_NOLOG(std::runtime_error, msg);
157 }
158
159 if (smryCfg.match("[FB]PP[OGW]") || smryCfg.match("RPP[OGW]*")) {
160 auto rset = this->eclState_.fieldProps().fip_regions();
161 rset.push_back("PVTNUM");
162
163 // Note: We explicitly use decltype(auto) here because the
164 // default scheme (-> auto) will deduce an undesirable type. We
165 // need the "reference to vector" semantics in this instance.
167 .emplace(this->simulator_.gridView().comm(),
168 FluidSystem::numPhases, rset,
169 [fp = std::cref(this->eclState_.fieldProps())]
170 (const std::string& rsetName) -> decltype(auto)
171 { return fp.get().get_int(rsetName); });
172 }
173 }
174
179 void
180 allocBuffers(const unsigned bufferSize,
181 const unsigned reportStepNum,
182 const bool substep,
183 const bool log,
184 const bool isRestart)
185 {
186 if (! std::is_same<Discretization, EcfvDiscretization<TypeTag>>::value) {
187 return;
188 }
189
190 auto rstKeywords = this->schedule_.rst_keywords(reportStepNum);
191 this->compC_.allocate(bufferSize, rstKeywords);
192
193 this->doAllocBuffers(bufferSize, reportStepNum, substep, log, isRestart,
194 /* hysteresisConfig = */ nullptr,
195 /* numOutputNnc =*/ 0,
196 std::move(rstKeywords));
197 }
198
199 void assignToSolution(data::Solution& sol) override
200 {
201 this->compC_.outputRestart(sol, this->saturation_[oilPhaseIdx]);
203
204 // Use the compositional restart names for phase densities and viscosities.
206 .oilDensity = "DENO",
207 .gasDensity = "DENG",
208 .waterDensity = "DENW",
209 .oilViscosity = "VOIL",
210 .gasViscosity = "VGAS",
211 .waterViscosity = "VWAT",
212 });
213
214 // Report compositional relative permeabilities under their restart names.
215 using M = UnitSystem::measure;
216 this->assignBuffer(sol, "KRO", M::identity,
217 relativePermeability_[oilPhaseIdx], oilPhaseIdx);
218 this->assignBuffer(sol, "KRG", M::identity,
219 relativePermeability_[gasPhaseIdx], gasPhaseIdx);
220 if constexpr (numPhases > 2) {
221 this->assignBuffer(sol, "KRW", M::identity,
222 relativePermeability_[waterPhaseIdx], waterPhaseIdx);
223 }
224 }
225
226 void outputFipAndResvLog(const Inplace& inplace,
227 const std::size_t reportStepNum,
228 double elapsed,
229 boost::posix_time::ptime currentDate,
230 const bool substep,
231 const Parallel::Communication& comm)
232 {
233 if (comm.rank() != 0) {
234 return;
235 }
236
237 std::unique_ptr<FIPConfig> fipSched;
238 if (reportStepNum > 0) {
239 const auto& rpt = this->schedule_[reportStepNum - 1].rpt_config.get();
240 fipSched = std::make_unique<FIPConfig>(rpt);
241 }
242
243 const FIPConfig& fipc = reportStepNum == 0
244 ? this->eclState_.getEclipseConfig().fip()
245 : *fipSched;
246
247 if (!substep && !this->forceDisableFipOutput_ && fipc.output(FIPConfig::OutputField::FIELD)) {
248 this->logOutput_.timeStamp("BALANCE", elapsed, reportStepNum, currentDate);
249
250 const auto& initial_inplace = *this->initialInplace();
251 this->logOutput_.fip(inplace, initial_inplace, "");
252
253 if (fipc.output(FIPConfig::OutputField::FIPNUM)) {
254 this->logOutput_.fip(inplace, initial_inplace, "FIPNUM");
255
256 if (fipc.output(FIPConfig::OutputField::RESV)) {
257 this->logOutput_.fipResv(inplace, "FIPNUM");
258 }
259 }
260
261 if (fipc.output(FIPConfig::OutputField::FIP)) {
262 for (const auto& reg : this->regions_) {
263 if (reg.first != "FIPNUM") {
264 std::ostringstream ss;
265 ss << "BAL" << reg.first.substr(3);
266 this->logOutput_.timeStamp(ss.str(), elapsed, reportStepNum, currentDate);
267 this->logOutput_.fip(inplace, initial_inplace, reg.first);
268
269 if (fipc.output(FIPConfig::OutputField::RESV)) {
270 this->logOutput_.fipResv(inplace, reg.first);
271 }
272 }
273 }
274 }
275 }
276 }
277
278 void outputFipAndResvLogToCSV(const std::size_t reportStepNum,
279 const bool substep,
280 const Parallel::Communication& comm)
281 {
282 if (comm.rank() != 0) {
283 return;
284 }
285
286 if ((reportStepNum == 0) && (!substep) &&
287 (this->schedule_.initialReportConfiguration().has_value()) &&
288 (this->schedule_.initialReportConfiguration()->contains("CSVFIP"))) {
289
290 std::ostringstream csv_stream;
291
292 this->logOutput_.csv_header(csv_stream);
293
294 const auto& initial_inplace = *this->initialInplace();
295
296 this->logOutput_.fip_csv(csv_stream, initial_inplace, "FIPNUM");
297
298 for (const auto& reg : this->regions_) {
299 if (reg.first != "FIPNUM") {
300 this->logOutput_.fip_csv(csv_stream, initial_inplace, reg.first);
301 }
302 }
303
304 const IOConfig& io = this->eclState_.getIOConfig();
305 auto csv_fname = io.getOutputDir() + "/" + io.getBaseName() + ".CSV";
306
307 std::ofstream outputFile(csv_fname);
308 outputFile << csv_stream.str();
309 }
310 }
311
313 void setupExtractors(const bool /*isSubStep*/,
314 const std::size_t /*reportStepNum*/)
315 {
316 using Entry = typename Extractor::Entry;
317 using ExtractContext = typename Extractor::Context;
318 using ScalarEntry = typename Extractor::ScalarEntry;
319 using PhaseEntry = typename Extractor::PhaseEntry;
320
321 auto extractors = std::array{
322 Entry{PhaseEntry{&this->saturation_,
323 [](const unsigned phase, const ExtractContext& ectx)
324 { return getValue(ectx.fs.saturation(phase)); }}
325 },
326 Entry{ScalarEntry{&this->fluidPressure_,
327 [](const ExtractContext& ectx)
328 {
329 if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
330 // Output oil pressure as default
331 return getValue(ectx.fs.pressure(oilPhaseIdx));
332 }
333 else if (FluidSystem::phaseIsActive(gasPhaseIdx)) {
334 // Output gas if oil is not present
335 return getValue(ectx.fs.pressure(gasPhaseIdx));
336 }
337 else {
338 // Output water if neither oil nor gas is present
339 return getValue(ectx.fs.pressure(waterPhaseIdx));
340 }
341 }}
342 },
343 Entry{ScalarEntry{&this->temperature_,
344 [](const ExtractContext& ectx)
345 { return getValue(ectx.fs.temperature(oilPhaseIdx)); }}
346 },
347 Entry{[&compC = this->compC_](const ExtractContext& ectx)
348 {
349 compC.assignMoleFractions(ectx.globalDofIdx,
350 [&fs = ectx.fs](const unsigned compIdx)
351 { return getValue(fs.moleFraction(compIdx)); });
352 }, this->compC_.moleFractionsAllocated()
353 },
354
355 // A phase with zero saturation has no defined composition; report zero instead
356 // of stale flash values. A positive, however small, saturation is meaningful.
357 Entry{[&compC = this->compC_](const ExtractContext& ectx)
358 {
359 const bool hasGas =
360 getValue(ectx.fs.saturation(gasPhaseIdx)) > Scalar{0};
361 compC.assignGasFractions(ectx.globalDofIdx,
362 [&fs = ectx.fs, hasGas](const unsigned compIdx)
363 {
364 return hasGas
365 ? getValue(fs.moleFraction(gasPhaseIdx, compIdx))
366 : Scalar{0};
367 });
368 }, FluidSystem::phaseIsActive(gasPhaseIdx) &&
369 this->compC_.gasFractionsAllocated()
370 },
371 Entry{[&compC = this->compC_](const ExtractContext& ectx)
372 {
373 const bool hasOil =
374 getValue(ectx.fs.saturation(oilPhaseIdx)) > Scalar{0};
375 compC.assignOilFractions(ectx.globalDofIdx,
376 [&fs = ectx.fs, hasOil](const unsigned compIdx)
377 {
378 return hasOil
379 ? getValue(fs.moleFraction(oilPhaseIdx, compIdx))
380 : Scalar{0};
381 });
382 }, FluidSystem::phaseIsActive(oilPhaseIdx) &&
383 this->compC_.oilFractionsAllocated()
384 },
385 Entry{[&compC = this->compC_](const ExtractContext& ectx)
386 {
387 compC.assignPhasePressures(ectx.globalDofIdx,
388 getValue(ectx.fs.pressure(oilPhaseIdx)),
389 getValue(ectx.fs.pressure(gasPhaseIdx)));
390 }, this->compC_.phasePressuresAllocated()
391 },
392 // Vapour mole fraction of the total mixture from the flash.
393 Entry{[&compC = this->compC_](const ExtractContext& ectx)
394 {
395 const Scalar liquidFraction = getValue(ectx.fs.L());
396 compC.assignVaporFraction(ectx.globalDofIdx,
397 std::clamp(Scalar{1} - liquidFraction,
398 Scalar{0}, Scalar{1}));
399 }, this->compC_.vaporFractionAllocated()
400 },
401 // The phase densities and viscosities, reported where the phase is present.
402 Entry{PhaseEntry{&this->relativePermeability_,
403 [](const unsigned phaseIdx, const ExtractContext& ectx)
404 { return getValue(ectx.intQuants.relativePermeability(phaseIdx)); }}
405 },
406 Entry{PhaseEntry{&this->density_,
407 [](const unsigned phaseIdx, const ExtractContext& ectx)
408 {
409 return getValue(ectx.fs.saturation(phaseIdx)) > 0.0
410 ? getValue(ectx.fs.density(phaseIdx))
411 : Scalar{0};
412 }}
413 },
414 Entry{PhaseEntry{&this->viscosity_,
415 [](const unsigned phaseIdx, const ExtractContext& ectx)
416 {
417 return getValue(ectx.fs.saturation(phaseIdx)) > 0.0
418 ? getValue(ectx.fs.viscosity(phaseIdx))
419 : Scalar{0};
420 }}
421 },
422 };
423
424 this->extractors_ = Extractor::removeInactive(extractors);
425 }
426
429 { this->extractors_.clear(); }
430
435 void processElement(const ElementContext& elemCtx)
436 {
437 OPM_TIMEBLOCK_LOCAL(processElement, Subsystem::Output);
438 if (!std::is_same<Discretization, EcfvDiscretization<TypeTag>>::value) {
439 return;
440 }
441
442 typename Extractor::HysteresisParams hysterParams{};
443 for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) {
444 const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0);
445 const auto& fs = intQuants.fluidState();
446
447 const typename Extractor::Context ectx{
448 elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0),
449 0, // elemCtx.primaryVars(dofIdx, /*timeIdx=*/0).pvtRegionIndex(),
450 elemCtx.simulator().episodeIndex(),
451 fs,
452 intQuants,
453 hysterParams
454 };
455
456 Extractor::process(ectx, extractors_);
457 }
458 }
459
460 void processElementFlows(const ElementContext& /* elemCtx */)
461 {
462 OPM_TIMEBLOCK_LOCAL(processElementBlockData, Subsystem::Output);
463 if (!std::is_same_v<Discretization, EcfvDiscretization<TypeTag>>)
464 return;
465 }
466
467 void processElementBlockData(const ElementContext& /* elemCtx */)
468 {
469 OPM_TIMEBLOCK_LOCAL(processElementBlockData, Subsystem::Output);
470 if (!std::is_same<Discretization, EcfvDiscretization<TypeTag>>::value)
471 return;
472 }
473
502 template <class ActiveIndex, class CartesianIndex>
503 void processFluxes(const ElementContext& /* elemCtx */,
504 ActiveIndex&& /* activeIndex*/,
505 CartesianIndex&& /* cartesianIndex */)
506 {
507 }
508
514 {
515 // Inter-region flow rates. Note: ".clear()" prepares to accumulate
516 // contributions per bulk connection between FIP regions.
517 this->interRegionFlows_.clear();
518 }
519
524 {
525 this->interRegionFlows_.compress();
526 }
527
532 {
533 return this->interRegionFlows_;
534 }
535
536 void updateFluidInPlace(const unsigned /* globalDofIdx */,
537 const IntensiveQuantities& /* intQuants */,
538 const double /* totVolume */)
539 {
540 // this->updateFluidInPlace_(globalDofIdx, intQuants, totVolume);
541 }
542
543protected:
545 void allocFormulationBuffers(std::map<std::string, int>& rstKeywords,
546 const unsigned bufferSize) override
547 {
548 // Name each phase explicitly: the compositional phase ordering is not
549 // the one the black-oil keyword names assume.
550 const auto named = std::array{
551 std::pair{static_cast<unsigned>(oilPhaseIdx), std::string_view{"KRO"}},
552 std::pair{static_cast<unsigned>(gasPhaseIdx), std::string_view{"KRG"}},
553 std::pair{static_cast<unsigned>(waterPhaseIdx), std::string_view{"KRW"}},
554 };
555 for (const auto& [phase, kw] : named) {
556 if (phase >= numPhases || !FluidSystem::phaseIsActive(phase)) {
557 continue;
558 }
559 BaseType::allocBufferIfRequested(rstKeywords, bufferSize,
560 relativePermeability_[phase], kw, true);
561 }
562 }
563
564private:
565 using ScalarBuffer = typename BaseType::ScalarBuffer;
566 std::array<ScalarBuffer, numPhases> relativePermeability_;
567
568 bool isDefunctParallelWell(const std::string& wname) const override
569 {
570 if (simulator_.gridView().comm().size() == 1)
571 return false;
572 const auto& parallelWells = simulator_.vanguard().parallelWells();
573 std::pair<std::string, bool> value {wname, true};
574 auto candidate = std::lower_bound(parallelWells.begin(), parallelWells.end(), value);
575 return candidate == parallelWells.end() || *candidate != value;
576 }
577
578 bool isOwnedByCurrentRank(const std::string& wname) const override
579 {
580 // Note: This statement is not correct for distributed wells and
581 // will need additional logic once those are supported for
582 // compositional flows.
583 return ! this->isDefunctParallelWell(wname);
584 }
585
586 bool isOnCurrentRank(const std::string& wname) const override
587 {
588 // Note: This statement is not correct for distributed wells and
589 // will need additional logic once those are supported for
590 // compositional flows.
591 return ! this->isDefunctParallelWell(wname);
592 }
593
594 void createLocalRegion_(std::vector<int>& region)
595 {
596 std::size_t elemIdx = 0;
597 for (const auto& elem : elements(simulator_.gridView())) {
598 if (elem.partitionType() != Dune::InteriorEntity) {
599 region[elemIdx] = 0;
600 }
601
602 ++elemIdx;
603 }
604 }
605
606 const Simulator& simulator_;
607 CompositionalContainer<FluidSystem> compC_;
608 std::vector<typename Extractor::Entry> extractors_;
609};
610
611} // namespace Opm
612
613#endif // OPM_OUTPUT_COMPOSITIONAL_MODULE_HPP
Restart-output buffers specific to compositional simulations.
Common output functionality shared by simulator formulations.
Declares the properties required by the black oil model.
The base class for the element-centered finite-volume discretization scheme.
Definition: ecfvdiscretization.hh:160
Definition: GenericOutputModule.hpp:83
const Schedule & schedule_
Definition: GenericOutputModule.hpp:446
bool forceDisableFipOutput_
Definition: GenericOutputModule.hpp:467
void doAllocBuffers(unsigned bufferSize, unsigned reportStepNum, const bool substep, const bool log, const bool isRestart, const EclHysteresisConfig *hysteresisConfig, unsigned numOutputNnc=0, std::map< std::string, int > rstKeywords={})
void setupBlockData(std::function< bool(int)> isCartIdxOnThisRank)
ScalarBuffer temperature_
Definition: GenericOutputModule.hpp:487
std::optional< RegionPhasePoreVolAverage > regionAvgDensity_
Definition: GenericOutputModule.hpp:556
std::array< ScalarBuffer, numPhases > viscosity_
Definition: GenericOutputModule.hpp:528
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)
std::unordered_map< std::string, std::vector< int > > regions_
Definition: GenericOutputModule.hpp:472
LogOutputHelper< Scalar > logOutput_
Definition: GenericOutputModule.hpp:452
void assignPhaseProperties(data::Solution &sol, const PhasePropertyNames &names)
Move the phase density and viscosity buffers to sol under names.
std::array< ScalarBuffer, numPhases > density_
Definition: GenericOutputModule.hpp:527
std::array< ScalarBuffer, numPhases > saturation_
Definition: GenericOutputModule.hpp:526
const EclipseState & eclState_
Definition: GenericOutputModule.hpp:445
virtual void assignToSolution(data::Solution &sol)
Move all buffers to data::Solution.
const Inplace * initialInplace() const
Definition: GenericOutputModule.hpp:266
static void registerParameters()
Register all run-time parameters for the Vtk output module.
ScalarBuffer fluidPressure_
Definition: GenericOutputModule.hpp:486
Inter-region flow accumulation maps for all region definition arrays.
Definition: InterRegFlows.hpp:179
Output module for compositional-model results written in ECL binary format.
Definition: OutputCompositionalModule.hpp:80
void processElementFlows(const ElementContext &)
Definition: OutputCompositionalModule.hpp:460
void clearExtractors()
Clear list of active element-level data extractors.
Definition: OutputCompositionalModule.hpp:428
static void registerParameters()
Definition: OutputCompositionalModule.hpp:97
void initializeFluxData()
Prepare for capturing connection fluxes, particularly to account for inter-region flows.
Definition: OutputCompositionalModule.hpp:513
void setupExtractors(const bool, const std::size_t)
Setup list of active element-level data extractors.
Definition: OutputCompositionalModule.hpp:313
void allocFormulationBuffers(std::map< std::string, int > &rstKeywords, const unsigned bufferSize) override
Allocate compositional relative-permeability buffers.
Definition: OutputCompositionalModule.hpp:545
void outputFipAndResvLogToCSV(const std::size_t reportStepNum, const bool substep, const Parallel::Communication &comm)
Definition: OutputCompositionalModule.hpp:278
void finalizeFluxData()
Finalize capturing connection fluxes.
Definition: OutputCompositionalModule.hpp:523
void processElement(const ElementContext &elemCtx)
Modify the internal buffers according to the intensive quanties relevant for an element.
Definition: OutputCompositionalModule.hpp:435
OutputCompositionalModule(const Simulator &simulator, const SummaryConfig &smryCfg, const CollectDataToIORankType &collectToIORank)
Definition: OutputCompositionalModule.hpp:104
void assignToSolution(data::Solution &sol) override
Move all buffers to data::Solution.
Definition: OutputCompositionalModule.hpp:199
void allocBuffers(const unsigned bufferSize, const unsigned reportStepNum, const bool substep, const bool log, const bool isRestart)
Allocate memory for the scalar fields we would like to write to ECL output files.
Definition: OutputCompositionalModule.hpp:180
void processElementBlockData(const ElementContext &)
Definition: OutputCompositionalModule.hpp:467
void processFluxes(const ElementContext &, ActiveIndex &&, CartesianIndex &&)
Capture connection fluxes, particularly to account for inter-region flows.
Definition: OutputCompositionalModule.hpp:503
const InterRegFlowMap & getInterRegFlows() const
Get read-only access to collection of inter-region flows.
Definition: OutputCompositionalModule.hpp:531
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:226
void updateFluidInPlace(const unsigned, const IntensiveQuantities &, const double)
Definition: OutputCompositionalModule.hpp:536
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:320
std::string_view oilDensity
Definition: GenericOutputModule.hpp:321
static void registerParameters()
Registers the parameters in parameter system.
Context passed to extractor functions.
Definition: OutputExtractor.hpp:75
int episodeIndex
Current report step.
Definition: OutputExtractor.hpp:78
Descriptor for extractors.
Definition: OutputExtractor.hpp:114
Struct holding hysteresis parameters.
Definition: OutputExtractor.hpp:64
A phase buffer extractor descriptor.
Definition: OutputExtractor.hpp:107
A scalar extractor descriptor.
Definition: OutputExtractor.hpp:100
Wrapping struct holding types used for element-level data extraction.
Definition: OutputExtractor.hpp:55