23#ifndef OPM_FLOW_GENERIC_PROBLEM_IMPL_HPP
24#define OPM_FLOW_GENERIC_PROBLEM_IMPL_HPP
26#ifndef OPM_FLOW_GENERIC_PROBLEM_HPP
31#include <dune/common/parametertree.hh>
33#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
34#include <opm/input/eclipse/EclipseState/Tables/OverburdTable.hpp>
35#include <opm/input/eclipse/EclipseState/Tables/RockwnodTable.hpp>
36#include <opm/input/eclipse/Schedule/Schedule.hpp>
37#include <opm/input/eclipse/Units/Units.hpp>
48#include <boost/date_time.hpp>
50#include <fmt/format.h>
51#include <fmt/ranges.h>
58template<
class Gr
idView,
class Flu
idSystem>
61 const Schedule& schedule,
62 const GridView& gridView)
66 , lookUpData_(gridView)
84 if (Parameters::IsSet<Parameters::NumPressurePointsEquil>()) {
87 throw std::invalid_argument {
88 fmt::format(
"--num-pressure-points-equil must be at least 1, "
96 throw std::invalid_argument {
97 fmt::format(
"EQLDIMS item 2, the number of depth nodes in the "
98 "equilibration pressure tables, must be at least 1, "
107template<
class Gr
idView,
class Flu
idSystem>
108FlowGenericProblem<GridView,FluidSystem>
111 const Schedule& schedule,
112 const GridView& gridView)
128template<
class Gr
idView,
class Flu
idSystem>
139 "Usage: "+std::string(argv[0]) +
" [OPTIONS] [ECL_DECK_FILENAME]\n"
143template<
class Gr
idView,
class Flu
idSystem>
148 return briefDescription_;
151template<
class Gr
idView,
class Flu
idSystem>
154 std::function<std::array<int,3>(
const unsigned)> ijkIndex)
156 const auto& rock_config = eclState_.getSimulationConfig().rock_config();
160 const auto& comp = rock_config.comp();
162 std::ranges::transform(comp, std::back_inserter(rockParams_),
167 static_cast<Scalar>(c.compressibility)
173 if (rock_config.store()) {
174 OpmLog::warning(
"ROCKOPTS item 2 set to STORE, ROCK item 1 replaced with initial (equilibrated) pressures");
178 readRockCompactionParameters_();
180 unsigned numElem = gridView_.size(0);
181 if (eclState_.fieldProps().has_int(rock_config.rocknum_property())) {
183 std::function<void(
int,
int)> valueCheck = [&ijkIndex,&rock_config,
this](
int fieldPropValue,
int coarseElemIdx)
185 auto fmtError = [fieldPropValue, coarseElemIdx,&ijkIndex,&rock_config](
const char* type, std::size_t size)
187 return fmt::format(
"{} table index {} for elem {} read from {}"
188 " is out of bounds for number of tables {}",
189 type, fieldPropValue,
190 ijkIndex(coarseElemIdx),
191 rock_config.rocknum_property(), size);
193 if (!rockCompPoroMult_.empty() &&
194 fieldPropValue >
static_cast<int>(rockCompPoroMult_.size())) {
195 throw std::runtime_error(fmtError(
"Rock compaction",
196 rockCompPoroMult_.size()));
198 if (!rockCompPoroMultWc_.empty() &&
199 fieldPropValue >
static_cast<int>(rockCompPoroMultWc_.size())) {
200 throw std::runtime_error(fmtError(
"Rock water compaction",
201 rockCompPoroMultWc_.size()));
205 rockTableIdx_ = this->lookUpData_.template assignFieldPropsIntOnLeaf<short unsigned int>(eclState_.fieldProps(),
206 rock_config.rocknum_property(),
212 const auto& overburdTables = eclState_.getTableManager().getOverburdTables();
213 if (!overburdTables.empty() && !rock_config.store()) {
214 overburdenPressure_.resize(numElem,0.0);
215 std::size_t numRocktabTables = rock_config.num_rock_tables();
217 if (overburdTables.size() != numRocktabTables)
218 throw std::runtime_error(fmt::format(
"{} OVERBURD tables is expected, but {} is provided",
219 numRocktabTables, overburdTables.size()));
221 std::vector<Tabulated1DFunction<Scalar>> overburdenTables(numRocktabTables);
222 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
223 const OverburdTable& overburdTable = overburdTables.template getTable<OverburdTable>(regionIdx);
224 overburdenTables[regionIdx].setXYContainers(overburdTable.getDepthColumn(),overburdTable.getOverburdenPressureColumn());
227 for (std::size_t elemIdx = 0; elemIdx < numElem; ++ elemIdx) {
228 unsigned tableIdx = 0;
229 if (!rockTableIdx_.empty()) {
230 tableIdx = rockTableIdx_[elemIdx];
232 overburdenPressure_[elemIdx] =
233 overburdenTables[tableIdx].eval(cellCenterDepths[elemIdx],
true);
236 else if (!overburdTables.empty() && rock_config.store()) {
237 OpmLog::warning(
"ROCKOPTS item 2 set to STORE, OVERBURD ignored!");
241template<
class Gr
idView,
class Flu
idSystem>
245 const auto& rock_config = eclState_.getSimulationConfig().rock_config();
247 if (!rock_config.active())
250 unsigned numElem = gridView_.size(0);
251 switch (rock_config.hysteresis_mode()) {
252 case RockConfig::Hysteresis::REVERS:
254 case RockConfig::Hysteresis::IRREVERS:
257 minRefPressure_.resize(numElem, 1e99);
260 throw std::runtime_error(
"Not support ROCKOMP hysteresis option ");
263 std::size_t numRocktabTables = rock_config.num_rock_tables();
264 bool waterCompaction = rock_config.water_compaction();
266 if (!waterCompaction) {
267 const auto& rocktabTables = eclState_.getTableManager().getRocktabTables();
268 if (rocktabTables.size() != numRocktabTables)
269 throw std::runtime_error(
"ROCKCOMP is activated." +
std::to_string(numRocktabTables)
270 +
" ROCKTAB tables is expected, but " +
std::to_string(rocktabTables.size()) +
" is provided");
272 rockCompPoroMult_.resize(numRocktabTables);
273 rockCompTransMult_.resize(numRocktabTables);
274 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
275 const auto& rocktabTable = rocktabTables.template getTable<RocktabTable>(regionIdx);
276 const auto& pressureColumn = rocktabTable.getPressureColumn();
277 const auto& poroColumn = rocktabTable.getPoreVolumeMultiplierColumn();
278 const auto& transColumn = rocktabTable.getTransmissibilityMultiplierColumn();
279 rockCompPoroMult_[regionIdx].setXYContainers(pressureColumn, poroColumn);
280 rockCompTransMult_[regionIdx].setXYContainers(pressureColumn, transColumn);
283 const auto& rock2dTables = eclState_.getTableManager().getRock2dTables();
284 const auto& rock2dtrTables = eclState_.getTableManager().getRock2dtrTables();
285 const auto& rockwnodTables = eclState_.getTableManager().getRockwnodTables();
286 maxWaterSaturation_.resize(numElem, 0.0);
288 if (rock2dTables.size() != numRocktabTables)
289 throw std::runtime_error(fmt::format(
"Water compation option is selected in ROCKCOMP."
290 " {} ROCK2D tables is expected, but {} is provided",
291 numRocktabTables, rock2dTables.size()));
293 if (rockwnodTables.size() != numRocktabTables)
294 throw std::runtime_error(fmt::format(
"Water compation option is selected in ROCKCOMP."
295 " {} ROCKWNOD tables is expected, but {} is provided",
296 numRocktabTables, rockwnodTables.size()));
298 rockCompPoroMultWc_.resize(numRocktabTables,
TabulatedTwoDFunction(TabulatedTwoDFunction::InterpolationPolicy::Vertical));
299 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
300 const RockwnodTable& rockwnodTable = rockwnodTables.template getTable<RockwnodTable>(regionIdx);
301 const auto& rock2dTable = rock2dTables[regionIdx];
303 if (rockwnodTable.getSaturationColumn().size() != rock2dTable.sizeMultValues())
304 throw std::runtime_error(
"Number of entries in ROCKWNOD and ROCK2D needs to match.");
306 for (std::size_t xIdx = 0; xIdx < rock2dTable.size(); ++xIdx) {
307 rockCompPoroMultWc_[regionIdx].appendXPos(rock2dTable.getPressureValue(xIdx));
308 for (std::size_t yIdx = 0; yIdx < rockwnodTable.getSaturationColumn().size(); ++yIdx)
309 rockCompPoroMultWc_[regionIdx].appendSamplePoint(xIdx,
310 rockwnodTable.getSaturationColumn()[yIdx],
311 rock2dTable.getPvmultValue(xIdx, yIdx));
315 if (!rock2dtrTables.empty()) {
316 rockCompTransMultWc_.resize(numRocktabTables,
TabulatedTwoDFunction(TabulatedTwoDFunction::InterpolationPolicy::Vertical));
317 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
318 const RockwnodTable& rockwnodTable = rockwnodTables.template getTable<RockwnodTable>(regionIdx);
319 const auto& rock2dtrTable = rock2dtrTables[regionIdx];
321 if (rockwnodTable.getSaturationColumn().size() != rock2dtrTable.sizeMultValues())
322 throw std::runtime_error(
"Number of entries in ROCKWNOD and ROCK2DTR needs to match.");
324 for (std::size_t xIdx = 0; xIdx < rock2dtrTable.size(); ++xIdx) {
325 rockCompTransMultWc_[regionIdx].appendXPos(rock2dtrTable.getPressureValue(xIdx));
326 for (std::size_t yIdx = 0; yIdx < rockwnodTable.getSaturationColumn().size(); ++yIdx)
327 rockCompTransMultWc_[regionIdx].appendSamplePoint(xIdx,
328 rockwnodTable.getSaturationColumn()[yIdx],
329 rock2dtrTable.getTransMultValue(xIdx, yIdx));
336template<
class Gr
idView,
class Flu
idSystem>
341 if (this->rockParams_.empty())
344 unsigned tableIdx = 0;
345 if (!this->rockTableIdx_.empty()) {
346 tableIdx = this->rockTableIdx_[globalSpaceIdx];
348 return this->rockParams_[tableIdx].compressibility;
351template<
class Gr
idView,
class Flu
idSystem>
354porosity(
unsigned globalSpaceIdx,
unsigned timeIdx)
const
356 return this->referencePorosity_[timeIdx][globalSpaceIdx];
359template<
class Gr
idView,
class Flu
idSystem>
365 auto biot = biotCoeff(elementIdx);
366 auto lameParam = lame(elementIdx);
367 return biot * biot / lameParam;
370template<
class Gr
idView,
class Flu
idSystem>
373lame(
unsigned elementIdx)
const
376 const auto& fp = eclState_.fieldProps();
377 if (fp.has_double(
"LAME")) {
378 lameParam = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"LAME", elementIdx);
380 else if (fp.has_double(
"YMODULE") && fp.has_double(
"SMODULUS")) {
381 const auto& yModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"YMODULE", elementIdx);
382 const auto& sModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"SMODULUS", elementIdx);
383 lameParam = sModulus * (yModulus - 2 * sModulus) / (3 * sModulus - yModulus);
385 else if (fp.has_double(
"YMODULE") && fp.has_double(
"PRATIO")) {
386 const auto& yModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"YMODULE", elementIdx);
387 const auto& pRatio = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"PRATIO", elementIdx);
388 lameParam = yModulus * pRatio / ((1 + pRatio) * (1 - 2 * pRatio));
390 else if (fp.has_double(
"SMODULUS") && fp.has_double(
"PRATIO")) {
391 const auto& sModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"SMODULUS", elementIdx);
392 const auto& pRatio = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"PRATIO", elementIdx);
393 lameParam = 2 * sModulus * pRatio / (1 - 2 * pRatio);
401template<
class Gr
idView,
class Flu
idSystem>
407 const auto& fp = eclState_.fieldProps();
408 if (fp.has_double(
"BIOTCOEF")) {
409 biotC = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"BIOTCOEF", elementIdx);
411 else if (fp.has_double(
"POELCOEF") && fp.has_double(
"PRATIO")) {
412 const auto& poelC = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"POELCOEF", elementIdx);
413 const auto& pRatio = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"PRATIO", elementIdx);
414 biotC = poelC * (1 - pRatio) / (1 - 2 * pRatio);
423template<
class Gr
idView,
class Flu
idSystem>
426updateNum(
const std::string& name, std::vector<T>& numbers, std::size_t num_regions)
428 if (!eclState_.fieldProps().has_int(name))
431 std::function<void(T,
int)> valueCheck = [num_regions,name](T fieldPropValue, [[maybe_unused]]
int fieldPropIdx) {
432 if (fieldPropValue >
static_cast<int>(num_regions)) {
433 throw std::runtime_error(fmt::format(
"Values larger than maximum number of regions {} provided in {}",
436 if (fieldPropValue <= 0) {
437 throw std::runtime_error(
"zero or negative values provided for region array: " + name);
441 numbers = this->lookUpData_.template assignFieldPropsIntOnLeaf<T>(eclState_.fieldProps(), name,
445template<
class Gr
idView,
class Flu
idSystem>
449 const auto num_regions = eclState_.getTableManager().getTabdims().getNumPVTTables();
450 updateNum(
"PVTNUM", pvtnum_, num_regions);
453template<
class Gr
idView,
class Flu
idSystem>
457 const auto num_regions = eclState_.getTableManager().getTabdims().getNumSatTables();
458 updateNum(
"SATNUM", satnum_, num_regions);
461template<
class Gr
idView,
class Flu
idSystem>
465 const auto num_regions = 1;
466 updateNum(
"MISCNUM", miscnum_, num_regions);
469template<
class Gr
idView,
class Flu
idSystem>
473 const auto num_regions = 1;
474 updateNum(
"PLMIXNUM", plmixnum_, num_regions);
477template<
class Gr
idView,
class Flu
idSystem>
481 const auto& oilVaporizationControl = schedule_[episodeIdx].oilvap();
482 return (oilVaporizationControl.getType() == OilVaporizationProperties::OilVaporization::VAPPARS);
485template<
class Gr
idView,
class Flu
idSystem>
490 if (enableExperiments && gridView_.comm().rank() == 0 && episodeIdx >= 0) {
493 std::ostringstream ss;
494 boost::posix_time::time_facet* facet =
new boost::posix_time::time_facet(
"%d-%b-%Y");
495 boost::posix_time::ptime curDateTime =
496 boost::posix_time::from_time_t(schedule_.simTime(episodeIdx));
497 ss.imbue(std::locale(std::locale::classic(), facet));
498 ss <<
"Report step " << episodeIdx + 1
499 <<
"/" << schedule_.size() - 1
500 <<
" at day " << schedule_.seconds(episodeIdx)/(24*3600)
501 <<
"/" << schedule_.seconds(schedule_.size() - 1)/(24*3600)
502 <<
", date = " << curDateTime.date()
504 OpmLog::info(ss.str());
507 const auto& events = schedule_[episodeIdx].events();
510 if (episodeIdx > 0 && enableTuning_ && events.hasEvent(ScheduleEvents::TUNING_CHANGE))
512 const auto& sched_state = schedule_[episodeIdx];
513 const auto& tuning = sched_state.tuning();
514 initialTimeStepSize_ = sched_state.max_next_tstep(enableTuning_);
515 maxTimeStepAfterWellEvent_ = tuning.TMAXWC;
522template<
class Gr
idView,
class Flu
idSystem>
532 if (enableExperiments && gridView_.comm().rank() == 0 && episodeIdx >= 0) {
533 std::ostringstream ss;
534 boost::posix_time::time_facet* facet =
new boost::posix_time::time_facet(
"%d-%b-%Y");
535 boost::posix_time::ptime date = boost::posix_time::from_time_t(startTime) +
536 boost::posix_time::milliseconds(
static_cast<long long>(time / prefix::milli));
537 ss.imbue(std::locale(std::locale::classic(), facet));
538 ss <<
"\nTime step " << timeStepIndex <<
", stepsize "
539 << unit::convert::to(timeStepSize, unit::day) <<
" days,"
540 <<
" at day " << (double)unit::convert::to(time, unit::day)
541 <<
"/" << (double)unit::convert::to(endTime, unit::day)
542 <<
", date = " << date;
543 OpmLog::info(ss.str());
547template<
class Gr
idView,
class Flu
idSystem>
551 FluidSystem::initFromState(eclState_, schedule_);
554template<
class Gr
idView,
class Flu
idSystem>
559 bool enablePolymerMolarWeight,
560 bool enableBioeffects,
569 if ((enableSolvent || enablePolymer || enablePolymerMolarWeight ||
570 enableBioeffects || enableMICP) &&
571 (eclState_.getLgrs().size() > 0))
573 throw std::runtime_error(
574 "Local grid refinement (LGR/CARFIN) is only supported for black-oil "
575 "runs. It is not supported together with the solvent, polymer, "
576 "biofilm or MICP extensions.");
579 auto getArray = [](
const std::vector<double>& input)
581 if constexpr (std::is_same_v<Scalar,double>) {
584 return std::vector<Scalar>{input.begin(), input.end()};
589 if (eclState_.fieldProps().has_double(
"SSOL")) {
590 solventSaturation_ = getArray(eclState_.fieldProps().get_double(
"SSOL"));
592 solventSaturation_.resize(numDof, 0.0);
595 solventRsw_.resize(numDof, 0.0);
599 if (eclState_.fieldProps().has_double(
"SPOLY")) {
600 polymer_.concentration = getArray(eclState_.fieldProps().get_double(
"SPOLY"));
602 polymer_.concentration.resize(numDof, 0.0);
606 if (enablePolymerMolarWeight) {
607 if (eclState_.fieldProps().has_double(
"SPOLYMW")) {
608 polymer_.moleWeight = getArray(eclState_.fieldProps().get_double(
"SPOLYMW"));
610 polymer_.moleWeight.resize(numDof, 0.0);
614 if (enableBioeffects) {
615 if (eclState_.fieldProps().has_double(
"SMICR")) {
616 bioeffects_.microbialConcentration = getArray(eclState_.fieldProps().get_double(
"SMICR"));
618 bioeffects_.microbialConcentration.resize(numDof, 0.0);
620 if (eclState_.fieldProps().has_double(
"SBIOF")) {
621 bioeffects_.biofilmVolumeFraction = getArray(eclState_.fieldProps().get_double(
"SBIOF"));
623 bioeffects_.biofilmVolumeFraction.resize(numDof, 0.0);
626 if (eclState_.fieldProps().has_double(
"SOXYG")) {
627 bioeffects_.oxygenConcentration = getArray(eclState_.fieldProps().get_double(
"SOXYG"));
629 bioeffects_.oxygenConcentration.resize(numDof, 0.0);
631 if (eclState_.fieldProps().has_double(
"SUREA")) {
632 bioeffects_.ureaConcentration = getArray(eclState_.fieldProps().get_double(
"SUREA"));
634 bioeffects_.ureaConcentration.resize(numDof, 0.0);
636 if (eclState_.fieldProps().has_double(
"SCALC")) {
637 bioeffects_.calciteVolumeFraction = getArray(eclState_.fieldProps().get_double(
"SCALC"));
639 bioeffects_.calciteVolumeFraction.resize(numDof, 0.0);
645template<
class Gr
idView,
class Flu
idSystem>
650 if (maxWaterSaturation_.empty())
653 return maxWaterSaturation_[globalDofIdx];
656template<
class Gr
idView,
class Flu
idSystem>
661 if (minRefPressure_.empty())
664 return minRefPressure_[globalDofIdx];
667template<
class Gr
idView,
class Flu
idSystem>
672 if (overburdenPressure_.empty())
675 return overburdenPressure_[elementIdx];
678template<
class Gr
idView,
class Flu
idSystem>
683 if (solventSaturation_.empty())
686 return solventSaturation_[elemIdx];
689template<
class Gr
idView,
class Flu
idSystem>
694 if (solventRsw_.empty())
697 return solventRsw_[elemIdx];
702template<
class Gr
idView,
class Flu
idSystem>
707 if (polymer_.concentration.empty()) {
711 return polymer_.concentration[elemIdx];
714template<
class Gr
idView,
class Flu
idSystem>
719 if (polymer_.moleWeight.empty()) {
723 return polymer_.moleWeight[elemIdx];
726template<
class Gr
idView,
class Flu
idSystem>
731 if (bioeffects_.microbialConcentration.empty()) {
735 return bioeffects_.microbialConcentration[elemIdx];
738template<
class Gr
idView,
class Flu
idSystem>
743 if (bioeffects_.oxygenConcentration.empty()) {
747 return bioeffects_.oxygenConcentration[elemIdx];
750template<
class Gr
idView,
class Flu
idSystem>
755 if (bioeffects_.ureaConcentration.empty()) {
759 return bioeffects_.ureaConcentration[elemIdx];
762template<
class Gr
idView,
class Flu
idSystem>
767 if (bioeffects_.biofilmVolumeFraction.empty()) {
771 return bioeffects_.biofilmVolumeFraction[elemIdx];
774template<
class Gr
idView,
class Flu
idSystem>
779 if (bioeffects_.calciteVolumeFraction.empty()) {
783 return bioeffects_.calciteVolumeFraction[elemIdx];
786template<
class Gr
idView,
class Flu
idSystem>
793 return pvtnum_[elemIdx];
796template<
class Gr
idView,
class Flu
idSystem>
803 return satnum_[elemIdx];
806template<
class Gr
idView,
class Flu
idSystem>
810 if (miscnum_.empty())
813 return miscnum_[elemIdx];
816template<
class Gr
idView,
class Flu
idSystem>
820 if (plmixnum_.empty())
823 return plmixnum_[elemIdx];
826template<
class Gr
idView,
class Flu
idSystem>
831 if (polymer_.maxAdsorption.empty()) {
835 return polymer_.maxAdsorption[elemIdx];
838template<
class Gr
idView,
class Flu
idSystem>
Defines some fundamental parameters for all models.
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
Definition: FlowGenericProblem.hpp:61
UniformXTabulated2DFunction< Scalar > TabulatedTwoDFunction
Definition: FlowGenericProblem.hpp:64
Scalar maxPolymerAdsorption(unsigned elemIdx) const
Returns the max polymer adsorption value.
Definition: FlowGenericProblem_impl.hpp:829
unsigned pvtRegionIndex(unsigned elemIdx) const
Returns the index the relevant PVT region given a cell index.
Definition: FlowGenericProblem_impl.hpp:788
Scalar oxygenConcentration(unsigned elemIdx) const
Returns the initial oxygen concentration for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:741
Scalar microbialConcentration(unsigned elemIdx) const
Returns the initial microbial concentration for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:729
PolymerSolutionContainer< Scalar > polymer_
Definition: FlowGenericProblem.hpp:353
static std::string briefDescription()
Returns a human readable description of the problem for the help message.
Definition: FlowGenericProblem_impl.hpp:146
Scalar solventRsw(unsigned elemIdx) const
Returns the initial solvent dissolved in water for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:692
Scalar overburdenPressure(unsigned elementIdx) const
Get the pressure of the overburden.
Definition: FlowGenericProblem_impl.hpp:670
void updateMiscnum_()
Definition: FlowGenericProblem_impl.hpp:463
Scalar porosity(unsigned globalSpaceIdx, unsigned timeIdx) const
Direct indexed access to the porosity.
Definition: FlowGenericProblem_impl.hpp:354
Scalar rockCompressibility(unsigned globalSpaceIdx) const
Definition: FlowGenericProblem_impl.hpp:339
Scalar initialTimeStepSize_
Definition: FlowGenericProblem.hpp:365
unsigned miscnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant MISC region given a cell index.
Definition: FlowGenericProblem_impl.hpp:808
bool vapparsActive(int episodeIdx) const
Definition: FlowGenericProblem_impl.hpp:479
unsigned satnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant saturation function region given a cell index.
Definition: FlowGenericProblem_impl.hpp:798
Scalar maxWaterSaturation(unsigned globalDofIdx) const
Returns an element's historic maximum water phase saturation that was observed during the simulation.
Definition: FlowGenericProblem_impl.hpp:648
std::vector< Scalar > solventSaturation_
Definition: FlowGenericProblem.hpp:358
void readRockCompactionParameters_()
Definition: FlowGenericProblem_impl.hpp:243
void updateSatnum_()
Definition: FlowGenericProblem_impl.hpp:455
void updatePvtnum_()
Definition: FlowGenericProblem_impl.hpp:447
bool enableDriftCompensation_
Definition: FlowGenericProblem.hpp:371
Scalar lame(unsigned elementIdx) const
Direct access to Lame's second parameter in an element.
Definition: FlowGenericProblem_impl.hpp:373
static FlowGenericProblem serializationTestObject(const EclipseState &eclState, const Schedule &schedule, const GridView &gridView)
Definition: FlowGenericProblem_impl.hpp:110
void beginTimeStep_(bool enableExperiments, int episodeIdx, int timeStepIndex, Scalar startTime, Scalar time, Scalar timeStepSize, Scalar endTime)
Definition: FlowGenericProblem_impl.hpp:524
Scalar calciteVolumeFraction(unsigned elemIdx) const
Returns the initial calcite volume fraction for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:777
CO2H2SolutionContainer< Scalar > CO2H2_
Definition: FlowGenericProblem.hpp:361
unsigned plmixnumRegionIndex(unsigned elemIdx) const
Returns the index the relevant PLMIXNUM (for polymer module) region given a cell index.
Definition: FlowGenericProblem_impl.hpp:818
FlowGenericProblem(const EclipseState &eclState, const Schedule &schedule, const GridView &gridView)
Definition: FlowGenericProblem_impl.hpp:60
BioeffectsSolutionContainer< Scalar > bioeffects_
Definition: FlowGenericProblem.hpp:360
bool enableTuning_
Definition: FlowGenericProblem.hpp:364
Scalar solventSaturation(unsigned elemIdx) const
Returns the initial solvent saturation for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:681
Scalar polymerMolecularWeight(const unsigned elemIdx) const
Returns the polymer molecule weight for a given cell index.
Definition: FlowGenericProblem_impl.hpp:717
void readRockParameters_(const std::vector< Scalar > &cellCenterDepths, std::function< std::array< int, 3 >(const unsigned)> ijkIndex)
Definition: FlowGenericProblem_impl.hpp:153
std::vector< Scalar > maxOilSaturation_
Definition: FlowGenericProblem.hpp:354
Scalar rockBiotComp(unsigned elementIdx) const
Returns the rock compressibility of an element due to poroelasticity.
Definition: FlowGenericProblem_impl.hpp:362
int numPressurePointsEquil_
Definition: FlowGenericProblem.hpp:369
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:659
std::vector< Scalar > maxWaterSaturation_
Definition: FlowGenericProblem.hpp:355
void initFluidSystem_()
Definition: FlowGenericProblem_impl.hpp:549
bool operator==(const FlowGenericProblem &rhs) const
Definition: FlowGenericProblem_impl.hpp:840
Scalar maxTimeStepAfterWellEvent_
Definition: FlowGenericProblem.hpp:366
Scalar ureaConcentration(unsigned elemIdx) const
Returns the initial urea concentration for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:753
std::vector< Scalar > minRefPressure_
Definition: FlowGenericProblem.hpp:356
bool beginEpisode_(bool enableExperiments, int episodeIdx)
Definition: FlowGenericProblem_impl.hpp:487
Scalar biofilmVolumeFraction(unsigned elemIdx) const
Returns the initial biofilm volume fraction for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:765
std::vector< Scalar > solventRsw_
Definition: FlowGenericProblem.hpp:359
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:131
std::vector< Scalar > overburdenPressure_
Definition: FlowGenericProblem.hpp:357
void readBlackoilExtentionsInitialConditions_(std::size_t numDof, bool enableSolvent, bool enablePolymer, bool enablePolymerMolarWeight, bool enableBioeffects, bool enableMICP)
Definition: FlowGenericProblem_impl.hpp:556
Scalar biotCoeff(unsigned elementIdx) const
Direct access to Biot coefficient in an element.
Definition: FlowGenericProblem_impl.hpp:404
void updatePlmixnum_()
Definition: FlowGenericProblem_impl.hpp:471
bool explicitRockCompaction_
Definition: FlowGenericProblem.hpp:373
typename FluidSystem::Scalar Scalar
Definition: FlowGenericProblem.hpp:63
Scalar polymerConcentration(unsigned elemIdx) const
Returns the initial polymer concentration for a given a cell index.
Definition: FlowGenericProblem_impl.hpp:705
Declare the properties used by the infrastructure code of the finite volume discretizations.
auto Get(bool errorIfNotRegistered=true)
Retrieve a runtime parameter.
Definition: parametersystem.hpp:191
Definition: blackoilbioeffectsmodules.hh:45
std::string to_string(const ConvergenceReport::ReservoirFailure::Type t)
This file provides the infrastructure to retrieve run-time parameters.
static BioeffectsSolutionContainer serializationTestObject()
static CO2H2SolutionContainer serializationTestObject()
Definition: EclTimeSteppingParams.hpp:48
static PolymerSolutionContainer serializationTestObject()