FlowProblemComp.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 Copyright 2024, 2026 SINTEF Digital
5
6 This file is part of the Open Porous Media project (OPM).
7
8 OPM is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 OPM is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with OPM. If not, see <http://www.gnu.org/licenses/>.
20
21 Consult the COPYING file in the top-level source directory of this
22 module for the precise wording of the license and the list of
23 copyright holders.
24*/
30#ifndef OPM_FLOW_PROBLEM_COMP_HPP
31#define OPM_FLOW_PROBLEM_COMP_HPP
32
33
37
38#include <opm/grid/LookUpData.hh>
39
40#include <opm/material/fluidstates/CompositionalFluidState.hpp>
41
42#include <opm/material/thermal/EclThermalLawManager.hpp>
43
44#include <opm/input/eclipse/EclipseState/Compositional/CompositionalConfig.hpp>
45
46#include <algorithm>
47#include <functional>
48#include <vector>
49
50namespace Opm {
51
58template <class TypeTag>
59class FlowProblemComp : public FlowProblem<TypeTag>
60{
61 // TODO: the naming of the Types will be adjusted
63
64 using typename FlowProblemType::Scalar;
65 using typename FlowProblemType::Simulator;
66 using typename FlowProblemType::GridView;
67 using typename FlowProblemType::FluidSystem;
68 using typename FlowProblemType::Vanguard;
69
70 // might not be needed
73
76
80
81 using typename FlowProblemType::Indices;
84 using typename FlowProblemType::Evaluation;
85 using typename FlowProblemType::MaterialLaw;
86 using typename FlowProblemType::RateVector;
87
88 using InitialFluidState = CompositionalFluidState<Scalar, FluidSystem>;
90
91public:
94
98 static void registerParameters()
99 {
101 Parameters::SetDefault<Parameters::InputSkipMode>("300");
102
104
105 // tighter tolerance is needed for compositional modeling here
106 Parameters::SetDefault<Parameters::NewtonTolerance<Scalar>>(1e-7);
107 }
108
109 Opm::CompositionalConfig::EOSType getEosType() const
110 {
111 auto& simulator = this->simulator();
112 const auto& eclState = simulator.vanguard().eclState();
113 return eclState.compositionalConfig().eosType(0);
114 }
115
119 explicit FlowProblemComp(Simulator& simulator)
120 : FlowProblemType(simulator)
121 {
122 eclWriter_ = std::make_unique<EclWriterType>(simulator);
123 enableEclOutput_ = Parameters::Get<Parameters::EnableEclOutput>();
124 }
125
130 {
131 FlowProblemType::finishInit();
132
133 auto& simulator = this->simulator();
134 const bool transmissibilitiesFinished =
135 this->prepareTransmissibilityOutput_(*eclWriter_, enableEclOutput_);
136 if (!transmissibilitiesFinished) {
138 }
139
140 const auto& eclState = simulator.vanguard().eclState();
141 const auto& schedule = simulator.vanguard().schedule();
143
144 this->initFluidSystem_();
145 if (eclState.getSimulationConfig().rock_config().active()) {
146 throw std::runtime_error("Rock compaction (ROCKCOMP) is not supported "
147 "by compositional modeling yet");
148 }
150
151 // write the static output files (EGRID, INIT)
152 if (enableEclOutput_) {
153 eclWriter_->writeInit();
154 }
155
156 const auto& initconfig = eclState.getInitConfig();
157 if (initconfig.restartRequested())
159 else
160 this->readInitialCondition_();
161
163
164 if constexpr (getPropValue<TypeTag, Properties::EnablePolymer>()) {
165 const auto& vanguard = this->simulator().vanguard();
166 const auto& gridView = vanguard.gridView();
167 int numElements = gridView.size(/*codim=*/0);
168 this->polymer_.maxAdsorption.resize(numElements, 0.0);
169 }
170
171 /* readBoundaryConditions_();
172
173 // compute and set eq weights based on initial b values
174 computeAndSetEqWeights_();
175
176 if (enableDriftCompensation_) {
177 drift_.resize(this->model().numGridDof());
178 drift_ = 0.0;
179 } */
180
181 // TODO: check wether the following can work with compostional
182 if (this->enableVtkOutput_() && eclState.getIOConfig().initOnly()) {
183 simulator.setTimeStepSize(0.0);
185 }
186
187 // after finishing the initialization and writing the initial solution, we move
188 // to the first "real" episode/report step
189 // for restart the episode index and start is already set
190 if (!initconfig.restartRequested()) {
191 simulator.startNextEpisode(schedule.seconds(1));
192 simulator.setEpisodeIndex(0);
193 simulator.setTimeStepIndex(0);
194 }
195 }
196
201 {
203
204 // Defaulted threshold pressures are taken from the initial solution.
205 this->thresholdPressures_.finishInit();
206 }
207
211 void endTimeStep() override
212 {
214
215 // after the solution is updated, the values in output module also needs to be updated
216 this->eclWriter_->mutableOutputModule().invalidateLocalData();
217
218 // For CpGrid with LGRs, ecl/vtk output is not supported yet.
219 const auto& grid = this->simulator().vanguard().gridView().grid();
220
221 using GridType = std::remove_cv_t<std::remove_reference_t<decltype(grid)>>;
222 constexpr bool isCpGrid = std::is_same_v<GridType, Dune::CpGrid>;
223 if (!isCpGrid || (grid.maxLevel() == 0)) {
224 this->eclWriter_->evalSummaryState(! this->episodeWillBeOver());
225 }
226 }
227
228 void writeReports(const SimulatorTimer& timer) {
229 if (enableEclOutput_){
230 eclWriter_->writeReports(timer);
231 }
232 }
233
238 void writeOutput(bool verbose) override
239 {
241
242 if (! this->enableEclOutput_) {
243 return;
244 }
245
246 const auto isSubStep = !this->episodeWillBeOver();
247
248 if (!isSubStep || Parameters::Get<Parameters::EnableWriteAllSolutions>()) {
249 auto localCellData = data::Solution {};
250
251 this->eclWriter_->writeOutput(std::move(localCellData), isSubStep,
252 this->simulator().vanguard().schedule()
253 .exitStatus().has_value());
254 }
255 }
256
262 template <class Context>
263 void boundary(BoundaryRateVector& values,
264 const Context& context,
265 unsigned spaceIdx,
266 unsigned /* timeIdx */) const
267 {
268 OPM_TIMEBLOCK_LOCAL(eclProblemBoundary, Subsystem::Assembly);
269 if (!context.intersection(spaceIdx).boundary())
270 return;
271
272 values.setNoFlow();
273
274 if (this->nonTrivialBoundaryConditions()) {
275 throw std::logic_error("boundary condition is not supported by compostional modeling yet");
276 }
277 }
278
285 template <class Context>
286 void initial(PrimaryVariables& values, const Context& context, unsigned spaceIdx, unsigned timeIdx) const
287 {
288 const unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
289 const auto& initial_fs = initialFluidStates_[globalDofIdx];
290 Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
291 for (unsigned p = 0; p < numPhases; ++p) { // TODO: assuming the phaseidx continuous
292 // pressure
293 fs.setPressure(p, initial_fs.pressure(p));
294
295 // saturation
296 fs.setSaturation(p, initial_fs.saturation(p));
297
298 // temperature
299 fs.setTemperature(initial_fs.temperature(p));
300 }
301
302
303 if (!zmf_initialization_) {
304 for (unsigned p = 0; p < numPhases; ++p) {
305 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
306 fs.setMoleFraction(p, compIdx, initial_fs.moleFraction(p, compIdx));
307 }
308 }
309
310 {
311 const auto& eos_type = getEosType();
312 typename FluidSystem::template ParameterCache<Scalar> paramCache(eos_type);
313 paramCache.updatePhase(fs, FluidSystem::oilPhaseIdx);
314 paramCache.updatePhase(fs, FluidSystem::gasPhaseIdx);
315 fs.setDensity(FluidSystem::oilPhaseIdx, FluidSystem::density(fs, paramCache, FluidSystem::oilPhaseIdx));
316 fs.setDensity(FluidSystem::gasPhaseIdx, FluidSystem::density(fs, paramCache, FluidSystem::gasPhaseIdx));
317 }
318 // determine the component fractions
319 Dune::FieldVector<Scalar, numComponents> z(0.0);
320 Scalar sumMoles = 0.0;
321 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
322 if (Indices::waterEnabled && phaseIdx == static_cast<unsigned int>(waterPhaseIdx)){
323 continue;
324 }
325 const auto saturation = fs.saturation(phaseIdx);
326 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
327 Scalar tmp = fs.molarity(phaseIdx, compIdx) * saturation;
328 tmp = max(tmp, 1e-8);
329 z[compIdx] += tmp;
330 sumMoles += tmp;
331 }
332 }
333 z /= sumMoles;
334 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
335 fs.setMoleFraction(compIdx, z[compIdx]);
336 }
337 } else {
338 // TODO: should we normalize the input?
339 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
340 fs.setMoleFraction(compIdx, initial_fs.moleFraction(compIdx));
341 }
342 }
343
344 // Set initial K and L
345 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
346 const auto& Ktmp = fs.wilsonK_(compIdx);
347 fs.setKvalue(compIdx, Ktmp);
348 }
349
350 const Scalar& Ltmp = -1.0;
351 fs.setLvalue(Ltmp);
352
353 values.assignNaive(fs);
354 }
355
356 void addToSourceDense(RateVector&, unsigned, unsigned) const override
357 {
358 // we do nothing for now
359 }
360
361 const InitialFluidState& initialFluidState(unsigned globalDofIdx) const
362 { return initialFluidStates_[globalDofIdx]; }
363
364 std::vector<InitialFluidState>& initialFluidStates()
365 { return initialFluidStates_; }
366
367 const std::vector<InitialFluidState>& initialFluidStates() const
368 { return initialFluidStates_; }
369
371 { return *eclWriter_; }
372
374 { return *eclWriter_; }
375
377 { return eclWriter_->setSubStepReport(report); }
378
380 { return eclWriter_->setSimulationReport(report); }
381
383 {
384 OPM_TIMEBLOCK(finalizeOutput);
385 eclWriter_.reset();
386 }
387
388 // TODO: do we need this one?
389 template<class Serializer>
390 void serializeOp(Serializer& serializer)
391 {
392 serializer(static_cast<FlowProblemType&>(*this));
393 serializer(*eclWriter_);
394 }
395protected:
396
397 void updateExplicitQuantities_(int /* episodeIdx*/, int /* timeStepSize */, bool /* first_step_after_restart */) override
398 {
399 // we do nothing here for now
400 }
401
403 {
404 const auto& simulator = this->simulator();
405 const auto& vanguard = simulator.vanguard();
406 const auto& eclState = vanguard.eclState();
407
408 // Zero-based equilibration region of every cell (EQLNUM, or region 0).
409 // EQLNUM is given on the unrefined input grid while the equilibration
410 // works on the leaf grid, so a refined cell takes its parent's region;
411 // without local refinement the mapping is the identity.
412 std::vector<int> eqlnum(this->model().numGridDof(), 0);
413 if (eclState.fieldProps().has_int("EQLNUM")) {
415 lookUpData(vanguard.gridView());
416 eqlnum = lookUpData.template assignFieldPropsIntOnLeaf<int>(
417 eclState.fieldProps(), "EQLNUM", /*needsTranslation=*/true);
418 }
419
420 // The water saturation endpoints are selected by SATNUM and scaled per
421 // cell, so they are read here rather than from the equilibration region.
422 std::vector<Scalar> connateWater, maxWater;
423 if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
424 const auto numDof = this->model().numGridDof();
425 connateWater.resize(numDof);
426 maxWater.resize(numDof);
427 for (std::size_t dofIdx = 0; dofIdx < numDof; ++dofIdx) {
428 const auto& eps = this->materialLawManager()
429 ->oilWaterScaledEpsInfoDrainage(static_cast<int>(dofIdx));
430 connateWater[dofIdx] = eps.Swl;
431 maxWater[dofIdx] = eps.Swu;
432 }
433 }
434
436 eclState,
437 getEosType(),
438 vanguard.cellCenterDepths(),
439 eqlnum,
440 vanguard.gridView().comm(),
441 this->gravity()[dimWorld - 1],
442 this->numPressurePointsEquil(),
443 connateWater,
444 maxWater);
445
446 initialFluidStates_ = std::move(initialState.fluidStates());
447 // The current flash has one pressure for all phases. Adapt the
448 // independent equilibrium columns here, using the water column below
449 // the contact. Once phase-pressure differences are supported by the
450 // flash, the equilibrated phase pressures can be used directly.
451 for (std::size_t cell = 0; cell < initialFluidStates_.size(); ++cell) {
452 for (unsigned phaseIdx = 0; phaseIdx < FluidSystem::numPhases; ++phaseIdx) {
453 initialFluidStates_[cell].setPressure(phaseIdx,
454 initialState.referencePressures()[cell]);
455 }
456 }
457 // The primary variables are formed from the total composition; see initial().
458 zmf_initialization_ = true;
459 }
460
462 {
463 throw std::logic_error("Restarting is not supported by compositional modeling yet");
464 }
465
467 {
469 }
470
472 {
473 const auto& simulator = this->simulator();
474 const auto& vanguard = simulator.vanguard();
475 const auto& eclState = vanguard.eclState();
476 const auto& fp = eclState.fieldProps();
477 const bool has_pressure = fp.has_double("PRESSURE");
478 if (!has_pressure)
479 throw std::runtime_error("The ECL input file requires the presence of the PRESSURE "
480 "keyword if the model is initialized explicitly");
481
482 const bool has_xmf = fp.has_double("XMF");
483 const bool has_ymf = fp.has_double("YMF");
484 const bool has_zmf = fp.has_double("ZMF");
485 if ( !has_zmf && !(has_xmf && has_ymf) ) {
486 throw std::runtime_error("The ECL input file requires the presence of ZMF or XMF and YMF "
487 "keyword if the model is initialized explicitly");
488 }
489
490 if (has_zmf && (has_xmf || has_ymf)) {
491 throw std::runtime_error("The ECL input file can not handle explicit initialization "
492 "with both ZMF and XMF or YMF");
493 }
494
495 if (has_xmf != has_ymf) {
496 throw std::runtime_error("The ECL input file needs XMF and YMF combined to do the explicit "
497 "initializtion when using XMF or YMF");
498 }
499
500 const bool has_temp = fp.has_double("TEMPI");
501
502 // const bool has_gas = fp.has_double("SGAS");
503 assert(fp.has_double("SGAS"));
504
505 std::size_t numDof = this->model().numGridDof();
506
507 initialFluidStates_.resize(numDof);
508
509 std::vector<double> waterSaturationData;
510 std::vector<double> gasSaturationData;
511 std::vector<double> soilData;
512 std::vector<double> pressureData;
513 std::vector<double> tempiData;
514
515 const bool water_active = FluidSystem::phaseIsActive(waterPhaseIdx);
516 const bool gas_active = FluidSystem::phaseIsActive(gasPhaseIdx);
517 const bool oil_active = FluidSystem::phaseIsActive(oilPhaseIdx);
518
519 if (water_active && Indices::numPhases > 2)
520 waterSaturationData = fp.get_double("SWAT");
521 else
522 waterSaturationData.resize(numDof);
523
524 pressureData = fp.get_double("PRESSURE");
525
526 if (has_temp) {
527 tempiData = fp.get_double("TEMPI");
528 } else {
529 ; // TODO: throw?
530 }
531
532 if (gas_active) // && FluidSystem::phaseIsActive(oilPhaseIdx))
533 gasSaturationData = fp.get_double("SGAS");
534 else
535 gasSaturationData.resize(numDof);
536
537 for (std::size_t dofIdx = 0; dofIdx < numDof; ++dofIdx) {
538 auto& dofFluidState = initialFluidStates_[dofIdx];
539 // dofFluidState.setPvtRegionIndex(pvtRegionIndex(dofIdx));
540
541 Scalar temperatureLoc = tempiData[dofIdx];
542 assert(std::isfinite(temperatureLoc) && temperatureLoc > 0);
543 dofFluidState.setTemperature(temperatureLoc);
544
545 if (gas_active) {
546 dofFluidState.setSaturation(FluidSystem::gasPhaseIdx,
547 gasSaturationData[dofIdx]);
548 }
549 if (oil_active) {
550 dofFluidState.setSaturation(FluidSystem::oilPhaseIdx,
551 1.0
552 - waterSaturationData[dofIdx]
553 - gasSaturationData[dofIdx]);
554 }
555 if (water_active) {
556 dofFluidState.setSaturation(FluidSystem::waterPhaseIdx,
557 waterSaturationData[dofIdx]);
558 }
559
561 // set phase pressures
563 const Scalar pressure = pressureData[dofIdx]; // oil pressure (or gas pressure for water-gas system or water pressure for single phase)
564
565 // TODO: zero capillary pressure for now
566 const std::array<Scalar, numPhases> pc = {0};
567 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
568 if (!FluidSystem::phaseIsActive(phaseIdx))
569 continue;
570
571 if (Indices::oilEnabled)
572 dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[oilPhaseIdx]));
573 else if (Indices::gasEnabled)
574 dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[gasPhaseIdx]));
575 else if (Indices::waterEnabled)
576 // single (water) phase
577 dofFluidState.setPressure(phaseIdx, pressure);
578 }
579
580 if (has_xmf && has_ymf) {
581 const auto& xmfData = fp.get_double("XMF");
582 const auto& ymfData = fp.get_double("YMF");
583 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
584 const std::size_t data_idx = compIdx * numDof + dofIdx;
585 const Scalar xmf = xmfData[data_idx];
586 const Scalar ymf = ymfData[data_idx];
587
588 dofFluidState.setMoleFraction(FluidSystem::oilPhaseIdx, compIdx, xmf);
589 dofFluidState.setMoleFraction(FluidSystem::gasPhaseIdx, compIdx, ymf);
590 }
591 }
592
593 if (has_zmf) {
594 zmf_initialization_ = true;
595 const auto& zmfData = fp.get_double("ZMF");
596 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
597 const std::size_t data_idx = compIdx * numDof + dofIdx;
598 const Scalar zmf = zmfData[data_idx];
599 dofFluidState.setMoleFraction(compIdx, zmf);
600
601 if (gas_active) {
602 const auto ymf = (dofFluidState.saturation(FluidSystem::gasPhaseIdx) > 0.) ? zmf : Scalar{0};
603 dofFluidState.setMoleFraction(FluidSystem::gasPhaseIdx, compIdx, ymf);
604 }
605 if (oil_active) {
606 const auto xmf = (dofFluidState.saturation(FluidSystem::oilPhaseIdx) > 0.) ? zmf : Scalar{0};
607 dofFluidState.setMoleFraction(FluidSystem::oilPhaseIdx, compIdx, xmf);
608 }
609 }
610 }
611 }
612 }
613
614private:
615
616 void handleSolventBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
617 {
618 throw std::logic_error("solvent is disabled for compositional modeling and you're trying to add solvent to BC");
619 }
620
621 void handlePolymerBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
622 {
623 throw std::logic_error("polymer is disabled for compositional modeling and you're trying to add polymer to BC");
624 }
625
626 void handleMicrBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
627 {
628 throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add microbes to BC");
629 }
630
631 void handleOxygBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
632 {
633 throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add oxygen to BC");
634 }
635
636 void handleUreaBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override
637 {
638 throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add urea to BC");
639 }
640
641 std::vector<InitialFluidState> initialFluidStates_;
642
643 bool zmf_initialization_ {false};
644
645 bool enableEclOutput_{false};
646 std::unique_ptr<EclWriterType> eclWriter_;
647};
648
649} // namespace Opm
650
651#endif // OPM_FLOW_PROBLEM_COMP_HPP
Hydrostatic equilibration for the compositional simulator (EQUIL + ZMFVD/COMPVD).
Computes the initial state of a compositional model from hydrostatic equilibrium (the EQUIL and ZMFVD...
Definition: InitStateEquilComp.hpp:214
const std::vector< Scalar > & referencePressures() const
Definition: InitStateEquilComp.hpp:305
std::vector< FluidState > & fluidStates()
Definition: InitStateEquilComp.hpp:296
Collects necessary output values and pass it to opm-common's ECL output.
Definition: EclWriter.hpp:124
static void registerParameters()
Definition: EclWriter.hpp:152
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
Definition: FlowProblemComp.hpp:60
void writeOutput(bool verbose) override
Write the requested quantities of the current solution into the output files.
Definition: FlowProblemComp.hpp:238
const std::vector< InitialFluidState > & initialFluidStates() const
Definition: FlowProblemComp.hpp:367
void finishInit()
Called by the Opm::Simulator in order to initialize the problem.
Definition: FlowProblemComp.hpp:129
Opm::CompositionalConfig::EOSType getEosType() const
Definition: FlowProblemComp.hpp:109
FlowProblemComp(Simulator &simulator)
Definition: FlowProblemComp.hpp:119
void writeReports(const SimulatorTimer &timer)
Definition: FlowProblemComp.hpp:228
void readExplicitInitialCondition_() override
Definition: FlowProblemComp.hpp:466
void readExplicitInitialConditionCompositional_()
Definition: FlowProblemComp.hpp:471
void endTimeStep() override
Called by the simulator after each time integration.
Definition: FlowProblemComp.hpp:211
const EclWriterType & eclWriter() const
Definition: FlowProblemComp.hpp:370
std::vector< InitialFluidState > & initialFluidStates()
Definition: FlowProblemComp.hpp:364
void readEclRestartSolution_()
Definition: FlowProblemComp.hpp:461
void finalizeOutput()
Definition: FlowProblemComp.hpp:382
const InitialFluidState & initialFluidState(unsigned globalDofIdx) const
Definition: FlowProblemComp.hpp:361
void boundary(BoundaryRateVector &values, const Context &context, unsigned spaceIdx, unsigned) const
Evaluate the boundary conditions for a boundary segment.
Definition: FlowProblemComp.hpp:263
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Evaluate the initial value for a control volume.
Definition: FlowProblemComp.hpp:286
void readEquilInitialCondition_() override
Definition: FlowProblemComp.hpp:402
void serializeOp(Serializer &serializer)
Definition: FlowProblemComp.hpp:390
void updateExplicitQuantities_(int, int, bool) override
Definition: FlowProblemComp.hpp:397
void addToSourceDense(RateVector &, unsigned, unsigned) const override
Definition: FlowProblemComp.hpp:356
void setSubStepReport(const SimulatorReportSingle &report)
Definition: FlowProblemComp.hpp:376
void initialSolutionApplied() override
Callback used by the model to indicate that the initial solution has been determined for all degrees ...
Definition: FlowProblemComp.hpp:200
static void registerParameters()
Registers all available parameters for the problem and the model.
Definition: FlowProblemComp.hpp:98
EclWriterType & eclWriter()
Definition: FlowProblemComp.hpp:373
void setSimulationReport(const SimulatorReport &report)
Definition: FlowProblemComp.hpp:379
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
Definition: FlowProblem.hpp:101
virtual bool episodeWillBeOver() const
Definition: FlowProblem.hpp:2191
GetPropType< TypeTag, Properties::Evaluation > Evaluation
Definition: FlowProblem.hpp:166
bool nonTrivialBoundaryConditions() const
Definition: FlowProblem.hpp:1170
virtual void writeOutput(bool verbose)
Write the requested quantities of the current solution into the output files.
Definition: FlowProblem.hpp:544
unsigned pvtRegionIndex(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Returns the index of the relevant region for thermodynmic properties.
Definition: FlowProblem.hpp:966
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Definition: FlowProblem.hpp:742
GetPropType< TypeTag, Properties::Vanguard > Vanguard
Definition: FlowProblem.hpp:114
@ numComponents
Definition: FlowProblem.hpp:124
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: FlowProblem.hpp:108
GetPropType< TypeTag, Properties::RateVector > RateVector
Definition: FlowProblem.hpp:155
FlowThresholdPressure< TypeTag > thresholdPressures_
Definition: FlowProblem.hpp:2124
@ waterPhaseIdx
Definition: FlowProblem.hpp:146
GetPropType< TypeTag, Properties::Indices > Indices
Definition: FlowProblem.hpp:115
GetPropType< TypeTag, Properties::Simulator > Simulator
Definition: FlowProblem.hpp:156
@ dimWorld
Definition: FlowProblem.hpp:119
@ gasPhaseIdx
Definition: FlowProblem.hpp:144
std::shared_ptr< const EclMaterialLawManager > materialLawManager() const
Returns the ECL material law manager.
Definition: FlowProblem.hpp:914
@ numPhases
Definition: FlowProblem.hpp:123
void finishTransmissibilities_()
Definition: FlowProblem.hpp:1423
@ dim
Definition: FlowProblem.hpp:118
GetPropType< TypeTag, Properties::GridView > GridView
Definition: FlowProblem.hpp:109
bool prepareTransmissibilityOutput_(EclWriterType &eclWriter, const bool enableEclOutput)
Definition: FlowProblem.hpp:1432
void initializeSimulatorTime_()
Definition: FlowProblem.hpp:1491
static void registerParameters()
Registers all available parameters for the problem and the model.
Definition: FlowProblem.hpp:200
void updatePffDofData_()
Definition: FlowProblem.hpp:1885
@ oilPhaseIdx
Definition: FlowProblem.hpp:145
GetPropType< TypeTag, Properties::PrimaryVariables > PrimaryVariables
Definition: FlowProblem.hpp:154
virtual void endTimeStep()
Called by the simulator after each time integration.
Definition: FlowProblem.hpp:462
virtual void readInitialCondition_()
Definition: FlowProblem.hpp:1793
virtual void initialSolutionApplied()
Callback used by the model to indicate that the initial solution has been determined for all degrees ...
Definition: FlowProblem.hpp:1084
GetPropType< TypeTag, Properties::FluidSystem > FluidSystem
Definition: FlowProblem.hpp:111
GetPropType< TypeTag, Properties::MaterialLaw > MaterialLaw
Definition: FlowProblem.hpp:164
void initializeModelProperties_()
Definition: FlowProblem.hpp:1515
Definition: FlowGenericProblem.hpp:51
Definition: SimulatorTimer.hpp:38
Definition: blackoilbioeffectsmodules.hh:45
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
Definition: SimulatorReport.hpp:202
A struct for returning timing data from a simulator to its caller.
Definition: SimulatorReport.hpp:34