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