28#ifndef OPM_FLOW_GENERIC_PROBLEM_HPP
29#define OPM_FLOW_GENERIC_PROBLEM_HPP
31#include <opm/material/common/UniformXTabulated2DFunction.hpp>
32#include <opm/material/common/Tabulated1DFunction.hpp>
51template<
typename Gr
id,
typename Gr
idView>
class LookUpData;
59template<
class Gr
idView,
class Flu
idSystem>
60class FlowGenericProblem
63 using Scalar =
typename FluidSystem::Scalar;
64 using TabulatedTwoDFunction = UniformXTabulated2DFunction<Scalar>;
65 using TabulatedFunction = Tabulated1DFunction<Scalar>;
68 Scalar referencePressure;
69 Scalar compressibility;
72 FlowGenericProblem(
const EclipseState& eclState,
73 const Schedule& schedule,
74 const GridView& gridView);
77 static FlowGenericProblem serializationTestObject(
const EclipseState& eclState,
78 const Schedule& schedule,
79 const GridView& gridView);
98 { briefDescription_ = msg; }
138 {
return referencePorosity_[timeIdx][elementIdx]; }
150 return rockFraction_[timeIdx][elementIdx];
161 Scalar
lame(
unsigned elementIdx)
const;
172 void setPorosity(Scalar poro,
unsigned elementIdx,
unsigned timeIdx = 0)
173 { referencePorosity_[timeIdx][elementIdx] = poro; }
266 Scalar
porosity(
unsigned globalSpaceIdx,
unsigned timeIdx)
const;
268 bool vapparsActive(
int episodeIdx)
const;
270 int numPressurePointsEquil()
const
271 {
return numPressurePointsEquil_; }
275 template<
class Serializer>
276 void serializeOp(Serializer& serializer)
278 serializer(maxOilSaturation_);
279 serializer(polymer_);
280 serializer(maxWaterSaturation_);
281 serializer(minRefPressure_);
282 serializer(overburdenPressure_);
283 serializer(solventSaturation_);
284 serializer(solventRsw_);
285 serializer(bioeffects_);
289 void initFluidSystem_();
306 bool beginEpisode_(
bool enableExperiments,
308 void beginTimeStep_(
bool enableExperiments,
316 void readRockParameters_(
const std::vector<Scalar>& cellCenterDepths,
317 std::function<std::array<int,3>(
const unsigned)> ijkIndex);
318 void readRockCompactionParameters_();
320 void readBlackoilExtentionsInitialConditions_(std::size_t numDof,
323 bool enablePolymerMolarWeight,
324 bool enableBioeffects,
327 void updatePvtnum_();
328 void updateSatnum_();
329 void updateMiscnum_();
330 void updatePlmixnum_();
332 const EclipseState& eclState_;
333 const Schedule& schedule_;
334 const GridView& gridView_;
336 static inline std::string briefDescription_;
337 std::array<std::vector<Scalar>, 2> referencePorosity_;
338 std::array<std::vector<Scalar>, 2> rockFraction_;
340 std::vector<int> pvtnum_;
341 std::vector<unsigned short> satnum_;
342 std::vector<unsigned short> miscnum_;
343 std::vector<unsigned short> plmixnum_;
345 std::vector<RockParams> rockParams_;
346 std::vector<unsigned short> rockTableIdx_;
347 std::vector<TabulatedTwoDFunction> rockCompPoroMultWc_;
348 std::vector<TabulatedTwoDFunction> rockCompTransMultWc_;
349 std::vector<TabulatedFunction> rockCompPoroMult_;
350 std::vector<TabulatedFunction> rockCompTransMult_;
351 std::vector<Scalar> rockCompTransMultVal_;
354 std::vector<Scalar> maxOilSaturation_;
355 std::vector<Scalar> maxWaterSaturation_;
356 std::vector<Scalar> minRefPressure_;
357 std::vector<Scalar> overburdenPressure_;
358 std::vector<Scalar> solventSaturation_;
359 std::vector<Scalar> solventRsw_;
365 Scalar initialTimeStepSize_;
366 Scalar maxTimeStepAfterWellEvent_;
369 int numPressurePointsEquil_;
371 bool enableDriftCompensation_;
372 bool enableDriftCompensationTemp_{
false};
373 bool explicitRockCompaction_;
376 using Grid = std::remove_cv_t<
typename std::remove_reference<
decltype(gridView_.grid())>::type>;
378 const LookUpData lookUpData_;
384 std::function<unsigned(
unsigned)> lookupIdxOnLevelZeroAssigner_()
386 return [
this](
unsigned elemIdx) {
return lookUpData_.template getFieldPropIdx<Grid>(elemIdx);};
391 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...
Definition FlowGenericProblem.hpp:61
void setPorosity(Scalar poro, unsigned elementIdx, unsigned timeIdx=0)
Sets the porosity of an element.
Definition FlowGenericProblem.hpp:172
Scalar maxPolymerAdsorption(unsigned elemIdx) const
Returns the max polymer adsorption value.
Definition FlowGenericProblem_impl.hpp:797
unsigned pvtRegionIndex(unsigned elemIdx) const
Returns the index the relevant PVT region given a cell index.
Definition FlowGenericProblem_impl.hpp:756
Scalar oxygenConcentration(unsigned elemIdx) const
Returns the initial oxygen concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:709
Scalar microbialConcentration(unsigned elemIdx) const
Returns the initial microbial concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:697
static std::string briefDescription()
Returns a human readable description of the problem for the help message.
Definition FlowGenericProblem_impl.hpp:130
Scalar solventRsw(unsigned elemIdx) const
Returns the initial solvent dissolved in water for a given a cell index.
Definition FlowGenericProblem_impl.hpp:660
Scalar overburdenPressure(unsigned elementIdx) const
Get the pressure of the overburden.
Definition FlowGenericProblem_impl.hpp:638
Scalar porosity(unsigned globalSpaceIdx, unsigned timeIdx) const
Direct indexed access to the porosity.
Definition FlowGenericProblem_impl.hpp:338
Scalar rockCompressibility(unsigned globalSpaceIdx) const
Direct access to rock compressibility.
Definition FlowGenericProblem_impl.hpp:323
unsigned miscnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant MISC region given a cell index.
Definition FlowGenericProblem_impl.hpp:776
Scalar referencePorosity(unsigned elementIdx, unsigned timeIdx) const
Returns the porosity of an element.
Definition FlowGenericProblem.hpp:137
unsigned satnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant saturation function region given a cell index.
Definition FlowGenericProblem_impl.hpp:766
Scalar maxWaterSaturation(unsigned globalDofIdx) const
Returns an element's historic maximum water phase saturation that was observed during the simulation.
Definition FlowGenericProblem_impl.hpp:616
Scalar lame(unsigned elementIdx) const
Direct access to Lame's second parameter in an element.
Definition FlowGenericProblem_impl.hpp:357
Scalar rockFraction(unsigned elementIdx, unsigned timeIdx) const
Returns the rockFraction of an element.
Definition FlowGenericProblem.hpp:149
Scalar calciteVolumeFraction(unsigned elemIdx) const
Returns the initial calcite volume fraction for a given a cell index.
Definition FlowGenericProblem_impl.hpp:745
unsigned plmixnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant PLMIXNUM (for polymer module) region given a cell index.
Definition FlowGenericProblem_impl.hpp:786
Scalar solventSaturation(unsigned elemIdx) const
Returns the initial solvent saturation for a given a cell index.
Definition FlowGenericProblem_impl.hpp:649
Scalar polymerMolecularWeight(const unsigned elemIdx) const
Returns the polymer molecule weight for a given cell index.
Definition FlowGenericProblem_impl.hpp:685
Scalar rockBiotComp(unsigned elementIdx) const
Returns the rock compressibility of an element due to poroelasticity.
Definition FlowGenericProblem_impl.hpp:346
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:627
Scalar ureaConcentration(unsigned elemIdx) const
Returns the initial urea concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:721
bool shouldWriteOutput() const
Always returns true.
Definition FlowGenericProblem.hpp:294
static void setBriefDescription(const std::string &msg)
Specifies the string returned by briefDescription().
Definition FlowGenericProblem.hpp:97
Scalar biofilmVolumeFraction(unsigned elemIdx) const
Returns the initial biofilm volume fraction for a given a cell index.
Definition FlowGenericProblem_impl.hpp:733
static std::string helpPreamble(int, const char **argv)
Returns the string that is printed before the list of command line parameters in the help message.
Definition FlowGenericProblem_impl.hpp:115
bool shouldWriteRestartFile() const
Returns true if an eWoms restart file should be written to disk.
Definition FlowGenericProblem.hpp:303
Scalar biotCoeff(unsigned elementIdx) const
Direct access to Biot coefficient in an element.
Definition FlowGenericProblem_impl.hpp:388
Scalar polymerConcentration(unsigned elemIdx) const
Returns the initial polymer concentration for a given a cell index.
Definition FlowGenericProblem_impl.hpp:673
Definition FlowGenericProblem.hpp:51
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:45
Struct holding MICP extension data.
Definition SolutionContainers.hpp:57
Struct holding CO2 and H2 extension data.
Definition SolutionContainers.hpp:84
Definition FlowGenericProblem.hpp:67
Struct holding polymer extension data.
Definition SolutionContainers.hpp:37