28#ifndef OPM_FLOW_GENERIC_PROBLEM_HPP
29#define OPM_FLOW_GENERIC_PROBLEM_HPP
32#include <opm/material/common/UniformXTabulated2DFunction.hpp>
33#include <opm/material/common/Tabulated1DFunction.hpp>
54template<
typename Gr
id,
typename Gr
idView>
class LookUpData;
56int eclPositionalParameter(Dune::ParameterTree& tree,
57 std::set<std::string>& seenParams,
58 std::string& errorMsg,
68template<
class Gr
idView,
class Flu
idSystem>
72 using Scalar =
typename FluidSystem::Scalar;
73 using TabulatedTwoDFunction = UniformXTabulated2DFunction<Scalar>;
74 using TabulatedFunction = Tabulated1DFunction<Scalar>;
77 Scalar referencePressure;
78 Scalar compressibility;
82 const Schedule& schedule,
83 const GridView& gridView);
87 const Schedule& schedule,
88 const GridView& gridView);
107 { briefDescription_ = msg; }
147 {
return referencePorosity_[timeIdx][elementIdx]; }
158 Scalar
rockFraction(
unsigned elementIdx,
unsigned timeIdx)
const;
164 void setPorosity(Scalar poro,
unsigned elementIdx,
unsigned timeIdx = 0)
165 { referencePorosity_[timeIdx][elementIdx] = poro; }
180 Scalar
drsdtcon(
unsigned elemIdx,
int episodeIdx)
const;
272 Scalar
porosity(
unsigned globalSpaceIdx,
unsigned timeIdx)
const;
274 bool vapparsActive(
int episodeIdx)
const;
276 int numPressurePointsEquil()
const
277 {
return numPressurePointsEquil_; }
279 bool operator==(
const FlowGenericProblem& rhs)
const;
281 template<
class Serializer>
282 void serializeOp(Serializer& serializer)
284 serializer(maxOilSaturation_);
285 serializer(polymer_);
286 serializer(maxWaterSaturation_);
287 serializer(minRefPressure_);
288 serializer(overburdenPressure_);
289 serializer(solventSaturation_);
290 serializer(solventRsw_);
292 serializer(mixControls_);
296 void initFluidSystem_();
313 bool beginEpisode_(
bool enableExperiments,
315 void beginTimeStep_(
bool enableExperiments,
323 void readRockParameters_(
const std::vector<Scalar>& cellCenterDepths,
324 std::function<std::array<int,3>(
const unsigned)> ijkIndex);
325 void readRockCompactionParameters_();
327 void readBlackoilExtentionsInitialConditions_(std::size_t numDof,
330 bool enablePolymerMolarWeight,
333 void updatePvtnum_();
334 void updateSatnum_();
335 void updateMiscnum_();
336 void updatePlmixnum_();
338 void updateImbnum_();
340 const EclipseState& eclState_;
341 const Schedule& schedule_;
342 const GridView& gridView_;
344 static inline std::string briefDescription_;
345 std::array<std::vector<Scalar>, 2> referencePorosity_;
347 std::vector<int> pvtnum_;
348 std::vector<unsigned short> satnum_;
349 std::vector<unsigned short> miscnum_;
350 std::vector<unsigned short> plmixnum_;
351 std::vector<unsigned short> krnumx_;
352 std::vector<unsigned short> krnumy_;
353 std::vector<unsigned short> krnumz_;
354 std::vector<unsigned short> imbnumx_;
355 std::vector<unsigned short> imbnumy_;
356 std::vector<unsigned short> imbnumz_;
358 std::vector<RockParams> rockParams_;
359 std::vector<unsigned short> rockTableIdx_;
360 std::vector<TabulatedTwoDFunction> rockCompPoroMultWc_;
361 std::vector<TabulatedTwoDFunction> rockCompTransMultWc_;
362 std::vector<TabulatedFunction> rockCompPoroMult_;
363 std::vector<TabulatedFunction> rockCompTransMult_;
364 std::vector<Scalar> rockCompTransMultVal_;
367 std::vector<Scalar> maxOilSaturation_;
368 std::vector<Scalar> maxWaterSaturation_;
369 std::vector<Scalar> minRefPressure_;
370 std::vector<Scalar> overburdenPressure_;
371 std::vector<Scalar> solventSaturation_;
372 std::vector<Scalar> solventRsw_;
379 Scalar initialTimeStepSize_;
380 Scalar maxTimeStepAfterWellEvent_;
383 int numPressurePointsEquil_;
386 using Grid = std::remove_cv_t<
typename std::remove_reference<
decltype(gridView_.grid())>::type>;
394 std::function<unsigned(
unsigned)> lookupIdxOnLevelZeroAssigner_()
396 return [
this](
unsigned elemIdx) {
return lookUpData_.template getFieldPropIdx<Grid>(elemIdx);};
401 void updateNum(
const std::string& name, std::vector<T>& numbers, std::size_t num_regions);
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
Definition FlowGenericProblem.hpp:70
void setPorosity(Scalar poro, unsigned elementIdx, unsigned timeIdx=0)
Sets the porosity of an element.
Definition FlowGenericProblem.hpp:164
Scalar maxPolymerAdsorption(unsigned elemIdx) const
Returns the max polymer adsorption value.
Definition FlowGenericProblem_impl.hpp:766
unsigned pvtRegionIndex(unsigned elemIdx) const
Returns the index the relevant PVT region given a cell index.
Definition FlowGenericProblem_impl.hpp:725
Scalar oxygenConcentration(unsigned elemIdx) const
Returns the initial oxygen concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:678
Scalar microbialConcentration(unsigned elemIdx) const
Returns the initial microbial concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:666
Scalar rockReferencePressure(unsigned globalSpaceIdx) const
Direct access to rock reference pressure.
Definition FlowGenericProblem_impl.hpp:324
static std::string briefDescription()
Definition FlowGenericProblem_impl.hpp:133
Scalar solventRsw(unsigned elemIdx) const
Returns the initial solvent dissolved in water for a given a cell index.
Definition FlowGenericProblem_impl.hpp:622
Scalar overburdenPressure(unsigned elementIdx) const
Get the pressure of the overburden.
Definition FlowGenericProblem_impl.hpp:600
Scalar porosity(unsigned globalSpaceIdx, unsigned timeIdx) const
Direct indexed access to the porosity.
Definition FlowGenericProblem_impl.hpp:339
Scalar rockCompressibility(unsigned globalSpaceIdx) const
Direct access to rock compressibility.
Definition FlowGenericProblem_impl.hpp:309
unsigned miscnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant MISC region given a cell index.
Definition FlowGenericProblem_impl.hpp:745
Scalar referencePorosity(unsigned elementIdx, unsigned timeIdx) const
Returns the porosity of an element.
Definition FlowGenericProblem.hpp:146
unsigned satnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant saturation function region given a cell index.
Definition FlowGenericProblem_impl.hpp:735
Scalar rockFraction(unsigned elementIdx, unsigned timeIdx) const
Returns the rockFraction of an element.
Definition FlowGenericProblem_impl.hpp:347
Scalar maxWaterSaturation(unsigned globalDofIdx) const
Returns an element's historic maximum water phase saturation that was observed during the simulation.
Definition FlowGenericProblem_impl.hpp:578
unsigned plmixnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant PLMIXNUM (for polymer module) region given a cell index.
Definition FlowGenericProblem_impl.hpp:755
Scalar solventSaturation(unsigned elemIdx) const
Returns the initial solvent saturation for a given a cell index.
Definition FlowGenericProblem_impl.hpp:611
Scalar polymerMolecularWeight(const unsigned elemIdx) const
Returns the polymer molecule weight for a given cell index.
Definition FlowGenericProblem_impl.hpp:654
Scalar biofilmConcentration(unsigned elemIdx) const
Returns the initial biofilm concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:702
Scalar minOilPressure(unsigned globalDofIdx) const
Returns an element's historic minimum pressure of the oil phase that was observed during the simulati...
Definition FlowGenericProblem_impl.hpp:589
Scalar calciteConcentration(unsigned elemIdx) const
Returns the initial calcite concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:714
Scalar ureaConcentration(unsigned elemIdx) const
Returns the initial urea concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:690
bool shouldWriteOutput() const
Always returns true.
Definition FlowGenericProblem.hpp:301
static void setBriefDescription(const std::string &msg)
Specifies the string returned by briefDescription()
Definition FlowGenericProblem.hpp:106
static std::string helpPreamble(int, const char **argv)
Definition FlowGenericProblem_impl.hpp:118
bool shouldWriteRestartFile() const
Returns true if an eWoms restart file should be written to disk.
Definition FlowGenericProblem.hpp:310
Scalar drsdtcon(unsigned elemIdx, int episodeIdx) const
Returns the dynamic drsdt convective mixing value.
Definition FlowGenericProblem_impl.hpp:633
Scalar polymerConcentration(unsigned elemIdx) const
Returns the initial polymer concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:642
Definition FlowGenericProblem.hpp:54
Class handling mixing rate controls for a FlowProblem.
Definition MixingRateControls.hpp:46
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
Definition FlowGenericProblem.hpp:76
Struct holding MICP extension data.
Definition SolutionContainers.hpp:57
Struct holding polymer extension data.
Definition SolutionContainers.hpp:37