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 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/material/fluidstates/CompositionalFluidState.hpp>
39
40#include <opm/material/thermal/EclThermalLawManager.hpp>
41
42#include <opm/input/eclipse/EclipseState/Compositional/CompositionalConfig.hpp>
43
44#include <algorithm>
45#include <functional>
46#include <vector>
47
48namespace Opm {
49
56template <class TypeTag>
57class FlowProblemComp : public FlowProblem<TypeTag>
58{
59 // TODO: the naming of the Types will be adjusted
61
62 using typename FlowProblemType::Scalar;
63 using typename FlowProblemType::Simulator;
64 using typename FlowProblemType::GridView;
65 using typename FlowProblemType::FluidSystem;
66 using typename FlowProblemType::Vanguard;
67
68 // might not be needed
71
74
78
79 using typename FlowProblemType::Indices;
82 using typename FlowProblemType::Evaluation;
83 using typename FlowProblemType::MaterialLaw;
84 using typename FlowProblemType::RateVector;
85
86 using InitialFluidState = CompositionalFluidState<Scalar, FluidSystem>;
88
89public:
92
96 static void registerParameters()
97 {
99
101
102 // tighter tolerance is needed for compositional modeling here
103 Parameters::SetDefault<Parameters::NewtonTolerance<Scalar>>(1e-7);
104 }
105
106 Opm::CompositionalConfig::EOSType getEosType() const
107 {
108 auto& simulator = this->simulator();
109 const auto& eclState = simulator.vanguard().eclState();
110 return eclState.compositionalConfig().eosType(0);
111 }
112
116 explicit FlowProblemComp(Simulator& simulator)
117 : FlowProblemType(simulator)
118 , thresholdPressures_(simulator)
119 {
120 eclWriter_ = std::make_unique<EclWriterType>(simulator);
121 enableEclOutput_ = Parameters::Get<Parameters::EnableEclOutput>();
122 }
123
128 {
129 // TODO: there should be room to remove duplication for this function,
130 // but there is relatively complicated logic in the function calls in this function
131 // some refactoring is needed for this function
132 FlowProblemType::finishInit();
133
134 auto& simulator = this->simulator();
135
136 auto finishTransmissibilities = [updated = false, this]() mutable {
137 if (updated) {
138 return;
139 }
140 this->transmissibilities_.finishInit(
141 [&vg = this->simulator().vanguard()](const unsigned int it) { return vg.gridIdxToEquilGridIdx(it); });
142 updated = true;
143 };
144 // TODO: we might need to do the same with FlowProblemBlackoil for parallel
145
146 finishTransmissibilities();
147
148 if (enableEclOutput_) {
149 eclWriter_->setTransmissibilities(&simulator.problem().eclTransmissibilities());
150 std::function<unsigned int(unsigned int)> equilGridToGrid = [&simulator](unsigned int i) {
151 return simulator.vanguard().gridEquilIdxToGridIdx(i);
152 };
153 eclWriter_->extractOutputTransAndNNC(equilGridToGrid);
154 }
155
156 const auto& eclState = simulator.vanguard().eclState();
157 const auto& schedule = simulator.vanguard().schedule();
158
159 // Set the start time of the simulation
160 simulator.setStartTime(schedule.getStartTime());
161 simulator.setEndTime(schedule.simTime(schedule.size() - 1));
162
163 // We want the episode index to be the same as the report step index to make
164 // things simpler, so we have to set the episode index to -1 because it is
165 // incremented by endEpisode(). The size of the initial time step and
166 // length of the initial episode is set to zero for the same reason.
167 simulator.setEpisodeIndex(-1);
168 simulator.setEpisodeLength(0.0);
169
170 this->initGravity_(eclState);
171
172 if (this->enableTuning_) {
173 // if support for the TUNING keyword is enabled, we get the initial time
174 // steping parameters from it instead of from command line parameters
175 const auto& tuning = schedule[0].tuning();
176 this->initialTimeStepSize_ = tuning.TSINIT.has_value() ? tuning.TSINIT.value() : -1.0;
177 this->maxTimeStepAfterWellEvent_ = tuning.TMAXWC;
178 }
179
180 this->initFluidSystem_();
181
182 if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)
183 && FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
184 this->maxOilSaturation_.resize(this->model().numGridDof(), 0.0);
185 }
186
187 this->readRockParameters_(simulator.vanguard().cellCenterDepths(), [&simulator](const unsigned idx) {
188 std::array<int, dim> coords;
189 simulator.vanguard().cartesianCoordinate(idx, coords);
190 std::ranges::transform(coords, coords.begin(),
191 [](const auto c) { return c + 1; });
192 return coords;
193 });
196
197 // write the static output files (EGRID, INIT)
198 if (enableEclOutput_) {
199 eclWriter_->writeInit();
200 }
201
202 const auto& initconfig = eclState.getInitConfig();
203 if (initconfig.restartRequested())
205 else
206 this->readInitialCondition_();
207
209
210 if constexpr (getPropValue<TypeTag, Properties::EnablePolymer>()) {
211 const auto& vanguard = this->simulator().vanguard();
212 const auto& gridView = vanguard.gridView();
213 int numElements = gridView.size(/*codim=*/0);
214 this->polymer_.maxAdsorption.resize(numElements, 0.0);
215 }
216
217 /* readBoundaryConditions_();
218
219 // compute and set eq weights based on initial b values
220 computeAndSetEqWeights_();
221
222 if (enableDriftCompensation_) {
223 drift_.resize(this->model().numGridDof());
224 drift_ = 0.0;
225 } */
226
227 // TODO: check wether the following can work with compostional
228 if (this->enableVtkOutput_() && eclState.getIOConfig().initOnly()) {
229 simulator.setTimeStepSize(0.0);
231 }
232
233 // after finishing the initialization and writing the initial solution, we move
234 // to the first "real" episode/report step
235 // for restart the episode index and start is already set
236 if (!initconfig.restartRequested()) {
237 simulator.startNextEpisode(schedule.seconds(1));
238 simulator.setEpisodeIndex(0);
239 simulator.setTimeStepIndex(0);
240 }
241 }
242
246 void endTimeStep() override
247 {
248 FlowProblemType::endTimeStep();
249
250 // after the solution is updated, the values in output module also needs to be updated
251 this->eclWriter_->mutableOutputModule().invalidateLocalData();
252
253 // For CpGrid with LGRs, ecl/vtk output is not supported yet.
254 const auto& grid = this->simulator().vanguard().gridView().grid();
255
256 using GridType = std::remove_cv_t<std::remove_reference_t<decltype(grid)>>;
257 constexpr bool isCpGrid = std::is_same_v<GridType, Dune::CpGrid>;
258 if (!isCpGrid || (grid.maxLevel() == 0)) {
259 this->eclWriter_->evalSummaryState(! this->episodeWillBeOver());
260 }
261 }
262
263 void writeReports(const SimulatorTimer& timer) {
264 if (enableEclOutput_){
265 eclWriter_->writeReports(timer);
266 }
267 }
268
273 void writeOutput(bool verbose) override
274 {
275 FlowProblemType::writeOutput(verbose);
276
277 if (! this->enableEclOutput_) {
278 return;
279 }
280
281 const auto isSubStep = !this->episodeWillBeOver();
282
283 if (!isSubStep || Parameters::Get<Parameters::EnableWriteAllSolutions>()) {
284 auto localCellData = data::Solution {};
285
286 this->eclWriter_->writeOutput(std::move(localCellData), isSubStep,
287 this->simulator().vanguard().schedule()
288 .exitStatus().has_value());
289 }
290 }
291
297 template <class Context>
298 void boundary(BoundaryRateVector& values,
299 const Context& context,
300 unsigned spaceIdx,
301 unsigned /* timeIdx */) const
302 {
303 OPM_TIMEBLOCK_LOCAL(eclProblemBoundary, Subsystem::Assembly);
304 if (!context.intersection(spaceIdx).boundary())
305 return;
306
307 values.setNoFlow();
308
309 if (this->nonTrivialBoundaryConditions()) {
310 throw std::logic_error("boundary condition is not supported by compostional modeling yet");
311 }
312 }
313
320 template <class Context>
321 void initial(PrimaryVariables& values, const Context& context, unsigned spaceIdx, unsigned timeIdx) const
322 {
323 const unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
324 const auto& initial_fs = initialFluidStates_[globalDofIdx];
325 Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
326 for (unsigned p = 0; p < numPhases; ++p) { // TODO: assuming the phaseidx continuous
327 // pressure
328 fs.setPressure(p, initial_fs.pressure(p));
329
330 // saturation
331 fs.setSaturation(p, initial_fs.saturation(p));
332
333 // temperature
334 fs.setTemperature(initial_fs.temperature(p));
335 }
336
337
338 if (!zmf_initialization_) {
339 for (unsigned p = 0; p < numPhases; ++p) {
340 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
341 fs.setMoleFraction(p, compIdx, initial_fs.moleFraction(p, compIdx));
342 }
343 }
344
345 {
346 const auto& eos_type = getEosType();
347 typename FluidSystem::template ParameterCache<Scalar> paramCache(eos_type);
348 paramCache.updatePhase(fs, FluidSystem::oilPhaseIdx);
349 paramCache.updatePhase(fs, FluidSystem::gasPhaseIdx);
350 fs.setDensity(FluidSystem::oilPhaseIdx, FluidSystem::density(fs, paramCache, FluidSystem::oilPhaseIdx));
351 fs.setDensity(FluidSystem::gasPhaseIdx, FluidSystem::density(fs, paramCache, FluidSystem::gasPhaseIdx));
352 }
353 // determine the component fractions
354 Dune::FieldVector<Scalar, numComponents> z(0.0);
355 Scalar sumMoles = 0.0;
356 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
357 if (Indices::waterEnabled && phaseIdx == static_cast<unsigned int>(waterPhaseIdx)){
358 continue;
359 }
360 const auto saturation = fs.saturation(phaseIdx);
361 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
362 Scalar tmp = fs.molarity(phaseIdx, compIdx) * saturation;
363 tmp = max(tmp, 1e-8);
364 z[compIdx] += tmp;
365 sumMoles += tmp;
366 }
367 }
368 z /= sumMoles;
369 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
370 fs.setMoleFraction(compIdx, z[compIdx]);
371 }
372 } else {
373 // TODO: should we normalize the input?
374 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
375 fs.setMoleFraction(compIdx, initial_fs.moleFraction(compIdx));
376 }
377 }
378
379 // Set initial K and L
380 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
381 const auto& Ktmp = fs.wilsonK_(compIdx);
382 fs.setKvalue(compIdx, Ktmp);
383 }
384
385 const Scalar& Ltmp = -1.0;
386 fs.setLvalue(Ltmp);
387
388 values.assignNaive(fs);
389 }
390
391 void addToSourceDense(RateVector&, unsigned, unsigned) const override
392 {
393 // we do nothing for now
394 }
395
396 const InitialFluidState& initialFluidState(unsigned globalDofIdx) const
397 { return initialFluidStates_[globalDofIdx]; }
398
399 std::vector<InitialFluidState>& initialFluidStates()
400 { return initialFluidStates_; }
401
402 const std::vector<InitialFluidState>& initialFluidStates() const
403 { return initialFluidStates_; }
404
406 {
407 assert( !thresholdPressures_.enableThresholdPressure() &&
408 " Threshold Pressures are not supported by compostional simulation ");
409 return thresholdPressures_;
410 }
411
413 { return *eclWriter_; }
414
416 { return *eclWriter_; }
417
419 { return eclWriter_->setSubStepReport(report); }
420
422 { return eclWriter_->setSimulationReport(report); }
423
425 {
426 OPM_TIMEBLOCK(finalizeOutput);
427 eclWriter_.reset();
428 }
429
430 // TODO: do we need this one?
431 template<class Serializer>
432 void serializeOp(Serializer& serializer)
433 {
434 serializer(static_cast<FlowProblemType&>(*this));
435 serializer(*eclWriter_);
436 }
437protected:
438
439 void updateExplicitQuantities_(int /* episodeIdx*/, int /* timeStepSize */, bool /* first_step_after_restart */) override
440 {
441 // we do nothing here for now
442 }
443
445 {
446 throw std::logic_error("Equilibration is not supported by compositional modeling yet");
447 }
448
450 {
451 throw std::logic_error("Restarting is not supported by compositional modeling yet");
452 }
453
455 {
456 readExplicitInitialConditionCompositional_();
457 }
458
460 {
461 const auto& simulator = this->simulator();
462 const auto& vanguard = simulator.vanguard();
463 const auto& eclState = vanguard.eclState();
464 const auto& fp = eclState.fieldProps();
465 const bool has_pressure = fp.has_double("PRESSURE");
466 if (!has_pressure)
467 throw std::runtime_error("The ECL input file requires the presence of the PRESSURE "
468 "keyword if the model is initialized explicitly");
469
470 const bool has_xmf = fp.has_double("XMF");
471 const bool has_ymf = fp.has_double("YMF");
472 const bool has_zmf = fp.has_double("ZMF");
473 if ( !has_zmf && !(has_xmf && has_ymf) ) {
474 throw std::runtime_error("The ECL input file requires the presence of ZMF or XMF and YMF "
475 "keyword if the model is initialized explicitly");
476 }
477
478 if (has_zmf && (has_xmf || has_ymf)) {
479 throw std::runtime_error("The ECL input file can not handle explicit initialization "
480 "with both ZMF and XMF or YMF");
481 }
482
483 if (has_xmf != has_ymf) {
484 throw std::runtime_error("The ECL input file needs XMF and YMF combined to do the explicit "
485 "initializtion when using XMF or YMF");
486 }
487
488 const bool has_temp = fp.has_double("TEMPI");
489
490 // const bool has_gas = fp.has_double("SGAS");
491 assert(fp.has_double("SGAS"));
492
493 std::size_t numDof = this->model().numGridDof();
494
495 initialFluidStates_.resize(numDof);
496
497 std::vector<double> waterSaturationData;
498 std::vector<double> gasSaturationData;
499 std::vector<double> soilData;
500 std::vector<double> pressureData;
501 std::vector<double> tempiData;
502
503 const bool water_active = FluidSystem::phaseIsActive(waterPhaseIdx);
504 const bool gas_active = FluidSystem::phaseIsActive(gasPhaseIdx);
505 const bool oil_active = FluidSystem::phaseIsActive(oilPhaseIdx);
506
507 if (water_active && Indices::numPhases > 2)
508 waterSaturationData = fp.get_double("SWAT");
509 else
510 waterSaturationData.resize(numDof);
511
512 pressureData = fp.get_double("PRESSURE");
513
514 if (has_temp) {
515 tempiData = fp.get_double("TEMPI");
516 } else {
517 ; // TODO: throw?
518 }
519
520 if (gas_active) // && FluidSystem::phaseIsActive(oilPhaseIdx))
521 gasSaturationData = fp.get_double("SGAS");
522 else
523 gasSaturationData.resize(numDof);
524
525 for (std::size_t dofIdx = 0; dofIdx < numDof; ++dofIdx) {
526 auto& dofFluidState = initialFluidStates_[dofIdx];
527 // dofFluidState.setPvtRegionIndex(pvtRegionIndex(dofIdx));
528
529 Scalar temperatureLoc = tempiData[dofIdx];
530 assert(std::isfinite(temperatureLoc) && temperatureLoc > 0);
531 dofFluidState.setTemperature(temperatureLoc);
532
533 if (gas_active) {
534 dofFluidState.setSaturation(FluidSystem::gasPhaseIdx,
535 gasSaturationData[dofIdx]);
536 }
537 if (oil_active) {
538 dofFluidState.setSaturation(FluidSystem::oilPhaseIdx,
539 1.0
540 - waterSaturationData[dofIdx]
541 - gasSaturationData[dofIdx]);
542 }
543 if (water_active) {
544 dofFluidState.setSaturation(FluidSystem::waterPhaseIdx,
545 waterSaturationData[dofIdx]);
546 }
547
549 // set phase pressures
551 const Scalar pressure = pressureData[dofIdx]; // oil pressure (or gas pressure for water-gas system or water pressure for single phase)
552
553 // TODO: zero capillary pressure for now
554 const std::array<Scalar, numPhases> pc = {0};
555 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
556 if (!FluidSystem::phaseIsActive(phaseIdx))
557 continue;
558
559 if (Indices::oilEnabled)
560 dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[oilPhaseIdx]));
561 else if (Indices::gasEnabled)
562 dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[gasPhaseIdx]));
563 else if (Indices::waterEnabled)
564 // single (water) phase
565 dofFluidState.setPressure(phaseIdx, pressure);
566 }
567
568 if (has_xmf && has_ymf) {
569 const auto& xmfData = fp.get_double("XMF");
570 const auto& ymfData = fp.get_double("YMF");
571 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
572 const std::size_t data_idx = compIdx * numDof + dofIdx;
573 const Scalar xmf = xmfData[data_idx];
574 const Scalar ymf = ymfData[data_idx];
575
576 dofFluidState.setMoleFraction(FluidSystem::oilPhaseIdx, compIdx, xmf);
577 dofFluidState.setMoleFraction(FluidSystem::gasPhaseIdx, compIdx, ymf);
578 }
579 }
580
581 if (has_zmf) {
582 zmf_initialization_ = true;
583 const auto& zmfData = fp.get_double("ZMF");
584 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
585 const std::size_t data_idx = compIdx * numDof + dofIdx;
586 const Scalar zmf = zmfData[data_idx];
587 dofFluidState.setMoleFraction(compIdx, zmf);
588
589 if (gas_active) {
590 const auto ymf = (dofFluidState.saturation(FluidSystem::gasPhaseIdx) > 0.) ? zmf : Scalar{0};
591 dofFluidState.setMoleFraction(FluidSystem::gasPhaseIdx, compIdx, ymf);
592 }
593 if (oil_active) {
594 const auto xmf = (dofFluidState.saturation(FluidSystem::oilPhaseIdx) > 0.) ? zmf : Scalar{0};
595 dofFluidState.setMoleFraction(FluidSystem::oilPhaseIdx, compIdx, xmf);
596 }
597 }
598 }
599 }
600 }
601
602private:
603
604 void handleSolventBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
605 {
606 throw std::logic_error("solvent is disabled for compositional modeling and you're trying to add solvent to BC");
607 }
608
609 void handlePolymerBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
610 {
611 throw std::logic_error("polymer is disabled for compositional modeling and you're trying to add polymer to BC");
612 }
613
614 void handleMicrBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
615 {
616 throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add microbes to BC");
617 }
618
619 void handleOxygBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
620 {
621 throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add oxygen to BC");
622 }
623
624 void handleUreaBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override
625 {
626 throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add urea to BC");
627 }
628
629 FlowThresholdPressure<TypeTag> thresholdPressures_;
630
631 std::vector<InitialFluidState> initialFluidStates_;
632
633 bool zmf_initialization_ {false};
634
635 bool enableEclOutput_{false};
636 std::unique_ptr<EclWriterType> eclWriter_;
637};
638
639} // namespace Opm
640
641#endif // OPM_FLOW_PROBLEM_COMP_HPP
Collects necessary output values and pass it to opm-common's ECL output.
Definition: EclWriter.hpp:122
static void registerParameters()
Definition: EclWriter.hpp:147
void readRockParameters_(const std::vector< Scalar > &cellCenterDepths, std::function< std::array< int, 3 >(const unsigned)> ijkIndex)
Definition: FlowGenericProblem_impl.hpp:153
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
Definition: FlowProblemComp.hpp:58
void writeOutput(bool verbose) override
Write the requested quantities of the current solution into the output files.
Definition: FlowProblemComp.hpp:273
const std::vector< InitialFluidState > & initialFluidStates() const
Definition: FlowProblemComp.hpp:402
void finishInit()
Called by the Opm::Simulator in order to initialize the problem.
Definition: FlowProblemComp.hpp:127
Opm::CompositionalConfig::EOSType getEosType() const
Definition: FlowProblemComp.hpp:106
FlowProblemComp(Simulator &simulator)
Definition: FlowProblemComp.hpp:116
void writeReports(const SimulatorTimer &timer)
Definition: FlowProblemComp.hpp:263
void readExplicitInitialCondition_() override
Definition: FlowProblemComp.hpp:454
void readExplicitInitialConditionCompositional_()
Definition: FlowProblemComp.hpp:459
void endTimeStep() override
Called by the simulator after each time integration.
Definition: FlowProblemComp.hpp:246
const EclWriterType & eclWriter() const
Definition: FlowProblemComp.hpp:412
std::vector< InitialFluidState > & initialFluidStates()
Definition: FlowProblemComp.hpp:399
const FlowThresholdPressure< TypeTag > & thresholdPressure() const
Definition: FlowProblemComp.hpp:405
void readEclRestartSolution_()
Definition: FlowProblemComp.hpp:449
void finalizeOutput()
Definition: FlowProblemComp.hpp:424
const InitialFluidState & initialFluidState(unsigned globalDofIdx) const
Definition: FlowProblemComp.hpp:396
void boundary(BoundaryRateVector &values, const Context &context, unsigned spaceIdx, unsigned) const
Evaluate the boundary conditions for a boundary segment.
Definition: FlowProblemComp.hpp:298
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Evaluate the initial value for a control volume.
Definition: FlowProblemComp.hpp:321
void readEquilInitialCondition_() override
Definition: FlowProblemComp.hpp:444
void serializeOp(Serializer &serializer)
Definition: FlowProblemComp.hpp:432
void updateExplicitQuantities_(int, int, bool) override
Definition: FlowProblemComp.hpp:439
void addToSourceDense(RateVector &, unsigned, unsigned) const override
Definition: FlowProblemComp.hpp:391
void setSubStepReport(const SimulatorReportSingle &report)
Definition: FlowProblemComp.hpp:418
static void registerParameters()
Registers all available parameters for the problem and the model.
Definition: FlowProblemComp.hpp:96
EclWriterType & eclWriter()
Definition: FlowProblemComp.hpp:415
void setSimulationReport(const SimulatorReport &report)
Definition: FlowProblemComp.hpp:421
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
Definition: FlowProblem.hpp:95
GetPropType< TypeTag, Properties::Evaluation > Evaluation
Definition: FlowProblem.hpp:160
virtual void writeOutput(bool verbose)
Write the requested quantities of the current solution into the output files.
Definition: FlowProblem.hpp:523
unsigned pvtRegionIndex(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Returns the index of the relevant region for thermodynmic properties.
Definition: FlowProblem.hpp:906
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Definition: FlowProblem.hpp:706
GetPropType< TypeTag, Properties::Vanguard > Vanguard
Definition: FlowProblem.hpp:108
@ numComponents
Definition: FlowProblem.hpp:118
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: FlowProblem.hpp:102
void initGravity_(const EclipseState &eclState)
Set the gravity vector from the run's configuration.
Definition: FlowProblem.hpp:1627
GetPropType< TypeTag, Properties::RateVector > RateVector
Definition: FlowProblem.hpp:149
@ waterPhaseIdx
Definition: FlowProblem.hpp:140
GetPropType< TypeTag, Properties::Indices > Indices
Definition: FlowProblem.hpp:109
GetPropType< TypeTag, Properties::Simulator > Simulator
Definition: FlowProblem.hpp:150
@ dimWorld
Definition: FlowProblem.hpp:113
@ gasPhaseIdx
Definition: FlowProblem.hpp:138
@ numPhases
Definition: FlowProblem.hpp:117
void readThermalParameters_()
Definition: FlowProblem.hpp:1481
@ dim
Definition: FlowProblem.hpp:112
GetPropType< TypeTag, Properties::GridView > GridView
Definition: FlowProblem.hpp:103
static void registerParameters()
Registers all available parameters for the problem and the model.
Definition: FlowProblem.hpp:191
void updatePffDofData_()
Definition: FlowProblem.hpp:1649
@ oilPhaseIdx
Definition: FlowProblem.hpp:139
GetPropType< TypeTag, Properties::PrimaryVariables > PrimaryVariables
Definition: FlowProblem.hpp:148
Vanguard::TransmissibilityType transmissibilities_
Definition: FlowProblem.hpp:1851
virtual void readInitialCondition_()
Definition: FlowProblem.hpp:1557
GetPropType< TypeTag, Properties::FluidSystem > FluidSystem
Definition: FlowProblem.hpp:105
GetPropType< TypeTag, Properties::MaterialLaw > MaterialLaw
Definition: FlowProblem.hpp:158
void readMaterialParameters_()
Definition: FlowProblem.hpp:1441
This class calculates the threshold pressure for grid faces according to the Eclipse Reference Manual...
Definition: FlowThresholdPressure.hpp:59
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:125
A struct for returning timing data from a simulator to its caller.
Definition: SimulatorReport.hpp:34