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>
46#include <opm/simulators/timestepping/EclTimeSteppingParams.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)
69 this->initFluidSystem_();
71 enableTuning_ = Parameters::Get<Parameters::EnableTuning>();
72 enableDriftCompensation_ = Parameters::Get<Parameters::EnableDriftCompensation>();
73 initialTimeStepSize_ = Parameters::Get<Parameters::InitialTimeStepSize<Scalar>>();
74 maxTimeStepAfterWellEvent_ = unit::convert::from
75 (Parameters::Get<Parameters::TimeStepAfterEventInDays<Scalar>>(), unit::day);
84 numPressurePointsEquil_ = Parameters::IsSet<Parameters::NumPressurePointsEquil>()
85 ? Parameters::Get<Parameters::NumPressurePointsEquil>()
86 : eclState.getTableManager().getEqldims().getNumDepthNodesP();
88 explicitRockCompaction_ = Parameters::Get<Parameters::ExplicitRockCompaction>();
91template<
class Gr
idView,
class Flu
idSystem>
92FlowGenericProblem<GridView,FluidSystem>
93FlowGenericProblem<GridView,FluidSystem>::
94serializationTestObject(
const EclipseState& eclState,
95 const Schedule& schedule,
96 const GridView& gridView)
98 FlowGenericProblem result(eclState, schedule, gridView);
99 result.maxOilSaturation_ = {1.0, 2.0};
100 result.maxWaterSaturation_ = {6.0};
101 result.minRefPressure_ = {7.0, 8.0, 9.0, 10.0};
102 result.overburdenPressure_ = {11.0};
103 result.solventSaturation_ = {15.0};
104 result.solventRsw_ = {18.0};
105 result.polymer_ = PolymerSolutionContainer<Scalar>::serializationTestObject();
106 result.bioeffects_ = BioeffectsSolutionContainer<Scalar>::serializationTestObject();
107 result.CO2H2_ = CO2H2SolutionContainer<Scalar>::serializationTestObject();
112template<
class Gr
idView,
class Flu
idSystem>
114FlowGenericProblem<GridView,FluidSystem>::
123 "Usage: "+std::string(argv[0]) +
" [OPTIONS] [ECL_DECK_FILENAME]\n"
127template<
class Gr
idView,
class Flu
idSystem>
129FlowGenericProblem<GridView,FluidSystem>::
132 return briefDescription_;
135template<
class Gr
idView,
class Flu
idSystem>
138 std::function<std::array<int,3>(
const unsigned)> ijkIndex)
140 const auto& rock_config = eclState_.getSimulationConfig().rock_config();
144 const auto& comp = rock_config.comp();
146 std::ranges::transform(comp, std::back_inserter(rockParams_),
150 static_cast<Scalar
>(c.pref),
151 static_cast<Scalar
>(c.compressibility)
157 if (rock_config.store()) {
158 OpmLog::warning(
"ROCKOPTS item 2 set to STORE, ROCK item 1 replaced with initial (equilibrated) pressures");
162 readRockCompactionParameters_();
164 unsigned numElem = gridView_.size(0);
165 if (eclState_.fieldProps().has_int(rock_config.rocknum_property())) {
167 std::function<void(
int,
int)> valueCheck = [&ijkIndex,&rock_config,
this](
int fieldPropValue,
int coarseElemIdx)
169 auto fmtError = [fieldPropValue, coarseElemIdx,&ijkIndex,&rock_config](
const char* type, std::size_t size)
171 return fmt::format(
"{} table index {} for elem {} read from {}"
172 " is out of bounds for number of tables {}",
173 type, fieldPropValue,
174 ijkIndex(coarseElemIdx),
175 rock_config.rocknum_property(), size);
177 if (!rockCompPoroMult_.empty() &&
178 fieldPropValue >
static_cast<int>(rockCompPoroMult_.size())) {
179 throw std::runtime_error(fmtError(
"Rock compaction",
180 rockCompPoroMult_.size()));
182 if (!rockCompPoroMultWc_.empty() &&
183 fieldPropValue >
static_cast<int>(rockCompPoroMultWc_.size())) {
184 throw std::runtime_error(fmtError(
"Rock water compaction",
185 rockCompPoroMultWc_.size()));
189 rockTableIdx_ = this->lookUpData_.template assignFieldPropsIntOnLeaf<short unsigned int>(eclState_.fieldProps(),
190 rock_config.rocknum_property(),
196 const auto& overburdTables = eclState_.getTableManager().getOverburdTables();
197 if (!overburdTables.empty() && !rock_config.store()) {
198 overburdenPressure_.resize(numElem,0.0);
199 std::size_t numRocktabTables = rock_config.num_rock_tables();
201 if (overburdTables.size() != numRocktabTables)
202 throw std::runtime_error(fmt::format(
"{} OVERBURD tables is expected, but {} is provided",
203 numRocktabTables, overburdTables.size()));
205 std::vector<Tabulated1DFunction<Scalar>> overburdenTables(numRocktabTables);
206 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
207 const OverburdTable& overburdTable = overburdTables.template getTable<OverburdTable>(regionIdx);
208 overburdenTables[regionIdx].setXYContainers(overburdTable.getDepthColumn(),overburdTable.getOverburdenPressureColumn());
211 for (std::size_t elemIdx = 0; elemIdx < numElem; ++ elemIdx) {
212 unsigned tableIdx = 0;
213 if (!rockTableIdx_.empty()) {
214 tableIdx = rockTableIdx_[elemIdx];
216 overburdenPressure_[elemIdx] =
217 overburdenTables[tableIdx].eval(cellCenterDepths[elemIdx],
true);
220 else if (!overburdTables.empty() && rock_config.store()) {
221 OpmLog::warning(
"ROCKOPTS item 2 set to STORE, OVERBURD ignored!");
225template<
class Gr
idView,
class Flu
idSystem>
226void FlowGenericProblem<GridView,FluidSystem>::
227readRockCompactionParameters_()
229 const auto& rock_config = eclState_.getSimulationConfig().rock_config();
231 if (!rock_config.active())
234 unsigned numElem = gridView_.size(0);
235 switch (rock_config.hysteresis_mode()) {
236 case RockConfig::Hysteresis::REVERS:
238 case RockConfig::Hysteresis::IRREVERS:
241 minRefPressure_.resize(numElem, 1e99);
244 throw std::runtime_error(
"Not support ROCKOMP hysteresis option ");
247 std::size_t numRocktabTables = rock_config.num_rock_tables();
248 bool waterCompaction = rock_config.water_compaction();
250 if (!waterCompaction) {
251 const auto& rocktabTables = eclState_.getTableManager().getRocktabTables();
252 if (rocktabTables.size() != numRocktabTables)
253 throw std::runtime_error(
"ROCKCOMP is activated." + std::to_string(numRocktabTables)
254 +
" ROCKTAB tables is expected, but " + std::to_string(rocktabTables.size()) +
" is provided");
256 rockCompPoroMult_.resize(numRocktabTables);
257 rockCompTransMult_.resize(numRocktabTables);
258 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
259 const auto& rocktabTable = rocktabTables.template getTable<RocktabTable>(regionIdx);
260 const auto& pressureColumn = rocktabTable.getPressureColumn();
261 const auto& poroColumn = rocktabTable.getPoreVolumeMultiplierColumn();
262 const auto& transColumn = rocktabTable.getTransmissibilityMultiplierColumn();
263 rockCompPoroMult_[regionIdx].setXYContainers(pressureColumn, poroColumn);
264 rockCompTransMult_[regionIdx].setXYContainers(pressureColumn, transColumn);
267 const auto& rock2dTables = eclState_.getTableManager().getRock2dTables();
268 const auto& rock2dtrTables = eclState_.getTableManager().getRock2dtrTables();
269 const auto& rockwnodTables = eclState_.getTableManager().getRockwnodTables();
270 maxWaterSaturation_.resize(numElem, 0.0);
272 if (rock2dTables.size() != numRocktabTables)
273 throw std::runtime_error(fmt::format(
"Water compation option is selected in ROCKCOMP."
274 " {} ROCK2D tables is expected, but {} is provided",
275 numRocktabTables, rock2dTables.size()));
277 if (rockwnodTables.size() != numRocktabTables)
278 throw std::runtime_error(fmt::format(
"Water compation option is selected in ROCKCOMP."
279 " {} ROCKWNOD tables is expected, but {} is provided",
280 numRocktabTables, rockwnodTables.size()));
282 rockCompPoroMultWc_.resize(numRocktabTables, TabulatedTwoDFunction(TabulatedTwoDFunction::InterpolationPolicy::Vertical));
283 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
284 const RockwnodTable& rockwnodTable = rockwnodTables.template getTable<RockwnodTable>(regionIdx);
285 const auto& rock2dTable = rock2dTables[regionIdx];
287 if (rockwnodTable.getSaturationColumn().size() != rock2dTable.sizeMultValues())
288 throw std::runtime_error(
"Number of entries in ROCKWNOD and ROCK2D needs to match.");
290 for (std::size_t xIdx = 0; xIdx < rock2dTable.size(); ++xIdx) {
291 rockCompPoroMultWc_[regionIdx].appendXPos(rock2dTable.getPressureValue(xIdx));
292 for (std::size_t yIdx = 0; yIdx < rockwnodTable.getSaturationColumn().size(); ++yIdx)
293 rockCompPoroMultWc_[regionIdx].appendSamplePoint(xIdx,
294 rockwnodTable.getSaturationColumn()[yIdx],
295 rock2dTable.getPvmultValue(xIdx, yIdx));
299 if (!rock2dtrTables.empty()) {
300 rockCompTransMultWc_.resize(numRocktabTables, TabulatedTwoDFunction(TabulatedTwoDFunction::InterpolationPolicy::Vertical));
301 for (std::size_t regionIdx = 0; regionIdx < numRocktabTables; ++regionIdx) {
302 const RockwnodTable& rockwnodTable = rockwnodTables.template getTable<RockwnodTable>(regionIdx);
303 const auto& rock2dtrTable = rock2dtrTables[regionIdx];
305 if (rockwnodTable.getSaturationColumn().size() != rock2dtrTable.sizeMultValues())
306 throw std::runtime_error(
"Number of entries in ROCKWNOD and ROCK2DTR needs to match.");
308 for (std::size_t xIdx = 0; xIdx < rock2dtrTable.size(); ++xIdx) {
309 rockCompTransMultWc_[regionIdx].appendXPos(rock2dtrTable.getPressureValue(xIdx));
310 for (std::size_t yIdx = 0; yIdx < rockwnodTable.getSaturationColumn().size(); ++yIdx)
311 rockCompTransMultWc_[regionIdx].appendSamplePoint(xIdx,
312 rockwnodTable.getSaturationColumn()[yIdx],
313 rock2dtrTable.getTransMultValue(xIdx, yIdx));
320template<
class Gr
idView,
class Flu
idSystem>
321typename FlowGenericProblem<GridView,FluidSystem>::Scalar
322FlowGenericProblem<GridView,FluidSystem>::
323rockCompressibility(
unsigned globalSpaceIdx)
const
325 if (this->rockParams_.empty())
328 unsigned tableIdx = 0;
329 if (!this->rockTableIdx_.empty()) {
330 tableIdx = this->rockTableIdx_[globalSpaceIdx];
332 return this->rockParams_[tableIdx].compressibility;
335template<
class Gr
idView,
class Flu
idSystem>
336typename FlowGenericProblem<GridView,FluidSystem>::Scalar
337FlowGenericProblem<GridView,FluidSystem>::
338porosity(
unsigned globalSpaceIdx,
unsigned timeIdx)
const
340 return this->referencePorosity_[timeIdx][globalSpaceIdx];
343template<
class Gr
idView,
class Flu
idSystem>
344typename FlowGenericProblem<GridView,FluidSystem>::Scalar
345FlowGenericProblem<GridView,FluidSystem>::
346rockBiotComp(
unsigned elementIdx)
const
350 auto lameParam =
lame(elementIdx);
351 return biot * biot / lameParam;
354template<
class Gr
idView,
class Flu
idSystem>
355typename FlowGenericProblem<GridView,FluidSystem>::Scalar
356FlowGenericProblem<GridView,FluidSystem>::
357lame(
unsigned elementIdx)
const
360 const auto& fp = eclState_.fieldProps();
361 if (fp.has_double(
"LAME")) {
362 lameParam = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"LAME", elementIdx);
364 else if (fp.has_double(
"YMODULE") && fp.has_double(
"SMODULUS")) {
365 const auto& yModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"YMODULE", elementIdx);
366 const auto& sModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"SMODULUS", elementIdx);
367 lameParam = sModulus * (yModulus - 2 * sModulus) / (3 * sModulus - yModulus);
369 else if (fp.has_double(
"YMODULE") && fp.has_double(
"PRATIO")) {
370 const auto& yModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"YMODULE", elementIdx);
371 const auto& pRatio = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"PRATIO", elementIdx);
372 lameParam = yModulus * pRatio / ((1 + pRatio) * (1 - 2 * pRatio));
374 else if (fp.has_double(
"SMODULUS") && fp.has_double(
"PRATIO")) {
375 const auto& sModulus = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"SMODULUS", elementIdx);
376 const auto& pRatio = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"PRATIO", elementIdx);
377 lameParam = 2 * sModulus * pRatio / (1 - 2 * pRatio);
385template<
class Gr
idView,
class Flu
idSystem>
386typename FlowGenericProblem<GridView,FluidSystem>::Scalar
387FlowGenericProblem<GridView,FluidSystem>::
388biotCoeff(
unsigned elementIdx)
const
391 const auto& fp = eclState_.fieldProps();
392 if (fp.has_double(
"BIOTCOEF")) {
393 biotC = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"BIOTCOEF", elementIdx);
395 else if (fp.has_double(
"POELCOEF") && fp.has_double(
"PRATIO")) {
396 const auto& poelC = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"POELCOEF", elementIdx);
397 const auto& pRatio = this->lookUpData_.fieldPropDouble(this->eclState_.fieldProps(),
"PRATIO", elementIdx);
398 biotC = poelC * (1 - pRatio) / (1 - 2 * pRatio);
407template<
class Gr
idView,
class Flu
idSystem>
410updateNum(
const std::string& name, std::vector<T>& numbers, std::size_t num_regions)
412 if (!eclState_.fieldProps().has_int(name))
415 std::function<void(T,
int)> valueCheck = [num_regions,name](T fieldPropValue, [[maybe_unused]]
int fieldPropIdx) {
416 if (fieldPropValue >
static_cast<int>(num_regions)) {
417 throw std::runtime_error(fmt::format(
"Values larger than maximum number of regions {} provided in {}",
420 if (fieldPropValue <= 0) {
421 throw std::runtime_error(
"zero or negative values provided for region array: " + name);
425 numbers = this->lookUpData_.template assignFieldPropsIntOnLeaf<T>(eclState_.fieldProps(), name,
429template<
class Gr
idView,
class Flu
idSystem>
430void FlowGenericProblem<GridView,FluidSystem>::
433 const auto num_regions = eclState_.getTableManager().getTabdims().getNumPVTTables();
434 updateNum(
"PVTNUM", pvtnum_, num_regions);
437template<
class Gr
idView,
class Flu
idSystem>
438void FlowGenericProblem<GridView,FluidSystem>::
441 const auto num_regions = eclState_.getTableManager().getTabdims().getNumSatTables();
442 updateNum(
"SATNUM", satnum_, num_regions);
445template<
class Gr
idView,
class Flu
idSystem>
446void FlowGenericProblem<GridView,FluidSystem>::
449 const auto num_regions = 1;
450 updateNum(
"MISCNUM", miscnum_, num_regions);
453template<
class Gr
idView,
class Flu
idSystem>
454void FlowGenericProblem<GridView,FluidSystem>::
457 const auto num_regions = 1;
458 updateNum(
"PLMIXNUM", plmixnum_, num_regions);
461template<
class Gr
idView,
class Flu
idSystem>
462bool FlowGenericProblem<GridView,FluidSystem>::
463vapparsActive(
int episodeIdx)
const
465 const auto& oilVaporizationControl = schedule_[episodeIdx].oilvap();
466 return (oilVaporizationControl.getType() == OilVaporizationProperties::OilVaporization::VAPPARS);
469template<
class Gr
idView,
class Flu
idSystem>
470bool FlowGenericProblem<GridView,FluidSystem>::
471beginEpisode_(
bool enableExperiments,
474 if (enableExperiments && gridView_.comm().rank() == 0 && episodeIdx >= 0) {
477 std::ostringstream ss;
478 boost::posix_time::time_facet* facet =
new boost::posix_time::time_facet(
"%d-%b-%Y");
479 boost::posix_time::ptime curDateTime =
480 boost::posix_time::from_time_t(schedule_.simTime(episodeIdx));
481 ss.imbue(std::locale(std::locale::classic(), facet));
482 ss <<
"Report step " << episodeIdx + 1
483 <<
"/" << schedule_.size() - 1
484 <<
" at day " << schedule_.seconds(episodeIdx)/(24*3600)
485 <<
"/" << schedule_.seconds(schedule_.size() - 1)/(24*3600)
486 <<
", date = " << curDateTime.date()
488 OpmLog::info(ss.str());
491 const auto& events = schedule_[episodeIdx].events();
494 if (episodeIdx > 0 && enableTuning_ && events.hasEvent(ScheduleEvents::TUNING_CHANGE))
496 const auto& sched_state = schedule_[episodeIdx];
497 const auto& tuning = sched_state.tuning();
498 initialTimeStepSize_ = sched_state.max_next_tstep(enableTuning_);
499 maxTimeStepAfterWellEvent_ = tuning.TMAXWC;
506template<
class Gr
idView,
class Flu
idSystem>
507void FlowGenericProblem<GridView,FluidSystem>::
508beginTimeStep_(
bool enableExperiments,
516 if (enableExperiments && gridView_.comm().rank() == 0 && episodeIdx >= 0) {
517 std::ostringstream ss;
518 boost::posix_time::time_facet* facet =
new boost::posix_time::time_facet(
"%d-%b-%Y");
519 boost::posix_time::ptime date = boost::posix_time::from_time_t(startTime) +
520 boost::posix_time::milliseconds(
static_cast<long long>(time / prefix::milli));
521 ss.imbue(std::locale(std::locale::classic(), facet));
522 ss <<
"\nTime step " << timeStepIndex <<
", stepsize "
523 << unit::convert::to(timeStepSize, unit::day) <<
" days,"
524 <<
" at day " << (double)unit::convert::to(time, unit::day)
525 <<
"/" << (double)unit::convert::to(endTime, unit::day)
526 <<
", date = " << date;
527 OpmLog::info(ss.str());
531template<
class Gr
idView,
class Flu
idSystem>
532void FlowGenericProblem<GridView,FluidSystem>::
535 FluidSystem::initFromState(eclState_, schedule_);
538template<
class Gr
idView,
class Flu
idSystem>
539void FlowGenericProblem<GridView,FluidSystem>::
540readBlackoilExtentionsInitialConditions_(std::size_t numDof,
543 bool enablePolymerMolarWeight,
544 bool enableBioeffects,
547 auto getArray = [](
const std::vector<double>& input)
549 if constexpr (std::is_same_v<Scalar,double>) {
552 return std::vector<Scalar>{input.begin(), input.end()};
557 if (eclState_.fieldProps().has_double(
"SSOL")) {
558 solventSaturation_ = getArray(eclState_.fieldProps().get_double(
"SSOL"));
560 solventSaturation_.resize(numDof, 0.0);
563 solventRsw_.resize(numDof, 0.0);
567 if (eclState_.fieldProps().has_double(
"SPOLY")) {
568 polymer_.concentration = getArray(eclState_.fieldProps().get_double(
"SPOLY"));
570 polymer_.concentration.resize(numDof, 0.0);
574 if (enablePolymerMolarWeight) {
575 if (eclState_.fieldProps().has_double(
"SPOLYMW")) {
576 polymer_.moleWeight = getArray(eclState_.fieldProps().get_double(
"SPOLYMW"));
578 polymer_.moleWeight.resize(numDof, 0.0);
582 if (enableBioeffects) {
583 if (eclState_.fieldProps().has_double(
"SMICR")) {
584 bioeffects_.microbialConcentration = getArray(eclState_.fieldProps().get_double(
"SMICR"));
586 bioeffects_.microbialConcentration.resize(numDof, 0.0);
588 if (eclState_.fieldProps().has_double(
"SBIOF")) {
589 bioeffects_.biofilmVolumeFraction = getArray(eclState_.fieldProps().get_double(
"SBIOF"));
591 bioeffects_.biofilmVolumeFraction.resize(numDof, 0.0);
594 if (eclState_.fieldProps().has_double(
"SOXYG")) {
595 bioeffects_.oxygenConcentration = getArray(eclState_.fieldProps().get_double(
"SOXYG"));
597 bioeffects_.oxygenConcentration.resize(numDof, 0.0);
599 if (eclState_.fieldProps().has_double(
"SUREA")) {
600 bioeffects_.ureaConcentration = getArray(eclState_.fieldProps().get_double(
"SUREA"));
602 bioeffects_.ureaConcentration.resize(numDof, 0.0);
604 if (eclState_.fieldProps().has_double(
"SCALC")) {
605 bioeffects_.calciteVolumeFraction = getArray(eclState_.fieldProps().get_double(
"SCALC"));
607 bioeffects_.calciteVolumeFraction.resize(numDof, 0.0);
613template<
class Gr
idView,
class Flu
idSystem>
614typename FlowGenericProblem<GridView,FluidSystem>::Scalar
615FlowGenericProblem<GridView,FluidSystem>::
616maxWaterSaturation(
unsigned globalDofIdx)
const
618 if (maxWaterSaturation_.empty())
621 return maxWaterSaturation_[globalDofIdx];
624template<
class Gr
idView,
class Flu
idSystem>
625typename FlowGenericProblem<GridView,FluidSystem>::Scalar
626FlowGenericProblem<GridView,FluidSystem>::
627minOilPressure(
unsigned globalDofIdx)
const
629 if (minRefPressure_.empty())
632 return minRefPressure_[globalDofIdx];
635template<
class Gr
idView,
class Flu
idSystem>
636typename FlowGenericProblem<GridView,FluidSystem>::Scalar
637FlowGenericProblem<GridView,FluidSystem>::
638overburdenPressure(
unsigned elementIdx)
const
640 if (overburdenPressure_.empty())
643 return overburdenPressure_[elementIdx];
646template<
class Gr
idView,
class Flu
idSystem>
647typename FlowGenericProblem<GridView,FluidSystem>::Scalar
648FlowGenericProblem<GridView,FluidSystem>::
649solventSaturation(
unsigned elemIdx)
const
651 if (solventSaturation_.empty())
654 return solventSaturation_[elemIdx];
657template<
class Gr
idView,
class Flu
idSystem>
658typename FlowGenericProblem<GridView,FluidSystem>::Scalar
659FlowGenericProblem<GridView,FluidSystem>::
660solventRsw(
unsigned elemIdx)
const
662 if (solventRsw_.empty())
665 return solventRsw_[elemIdx];
670template<
class Gr
idView,
class Flu
idSystem>
671typename FlowGenericProblem<GridView,FluidSystem>::Scalar
672FlowGenericProblem<GridView,FluidSystem>::
673polymerConcentration(
unsigned elemIdx)
const
675 if (polymer_.concentration.empty()) {
679 return polymer_.concentration[elemIdx];
682template<
class Gr
idView,
class Flu
idSystem>
683typename FlowGenericProblem<GridView,FluidSystem>::Scalar
684FlowGenericProblem<GridView,FluidSystem>::
685polymerMolecularWeight(
const unsigned elemIdx)
const
687 if (polymer_.moleWeight.empty()) {
691 return polymer_.moleWeight[elemIdx];
694template<
class Gr
idView,
class Flu
idSystem>
695typename FlowGenericProblem<GridView,FluidSystem>::Scalar
696FlowGenericProblem<GridView,FluidSystem>::
697microbialConcentration(
unsigned elemIdx)
const
699 if (bioeffects_.microbialConcentration.empty()) {
703 return bioeffects_.microbialConcentration[elemIdx];
706template<
class Gr
idView,
class Flu
idSystem>
707typename FlowGenericProblem<GridView,FluidSystem>::Scalar
708FlowGenericProblem<GridView,FluidSystem>::
709oxygenConcentration(
unsigned elemIdx)
const
711 if (bioeffects_.oxygenConcentration.empty()) {
715 return bioeffects_.oxygenConcentration[elemIdx];
718template<
class Gr
idView,
class Flu
idSystem>
719typename FlowGenericProblem<GridView,FluidSystem>::Scalar
720FlowGenericProblem<GridView,FluidSystem>::
721ureaConcentration(
unsigned elemIdx)
const
723 if (bioeffects_.ureaConcentration.empty()) {
727 return bioeffects_.ureaConcentration[elemIdx];
730template<
class Gr
idView,
class Flu
idSystem>
731typename FlowGenericProblem<GridView,FluidSystem>::Scalar
732FlowGenericProblem<GridView,FluidSystem>::
733biofilmVolumeFraction(
unsigned elemIdx)
const
735 if (bioeffects_.biofilmVolumeFraction.empty()) {
739 return bioeffects_.biofilmVolumeFraction[elemIdx];
742template<
class Gr
idView,
class Flu
idSystem>
743typename FlowGenericProblem<GridView,FluidSystem>::Scalar
744FlowGenericProblem<GridView,FluidSystem>::
745calciteVolumeFraction(
unsigned elemIdx)
const
747 if (bioeffects_.calciteVolumeFraction.empty()) {
751 return bioeffects_.calciteVolumeFraction[elemIdx];
754template<
class Gr
idView,
class Flu
idSystem>
755unsigned FlowGenericProblem<GridView,FluidSystem>::
756pvtRegionIndex(
unsigned elemIdx)
const
761 return pvtnum_[elemIdx];
764template<
class Gr
idView,
class Flu
idSystem>
765unsigned FlowGenericProblem<GridView,FluidSystem>::
766satnumRegionIndex(
unsigned elemIdx)
const
771 return satnum_[elemIdx];
774template<
class Gr
idView,
class Flu
idSystem>
775unsigned FlowGenericProblem<GridView,FluidSystem>::
776miscnumRegionIndex(
unsigned elemIdx)
const
778 if (miscnum_.empty())
781 return miscnum_[elemIdx];
784template<
class Gr
idView,
class Flu
idSystem>
785unsigned FlowGenericProblem<GridView,FluidSystem>::
786plmixnumRegionIndex(
unsigned elemIdx)
const
788 if (plmixnum_.empty())
791 return plmixnum_[elemIdx];
794template<
class Gr
idView,
class Flu
idSystem>
795typename FlowGenericProblem<GridView,FluidSystem>::Scalar
796FlowGenericProblem<GridView,FluidSystem>::
797maxPolymerAdsorption(
unsigned elemIdx)
const
799 if (polymer_.maxAdsorption.empty()) {
803 return polymer_.maxAdsorption[elemIdx];
806template<
class Gr
idView,
class Flu
idSystem>
810 return this->maxWaterSaturation_ == rhs.maxWaterSaturation_ &&
811 this->minRefPressure_ == rhs.minRefPressure_ &&
812 this->overburdenPressure_ == rhs.overburdenPressure_ &&
813 this->solventSaturation_ == rhs.solventSaturation_ &&
814 this->solventRsw_ == rhs.solventRsw_ &&
815 this->polymer_ == rhs.polymer_ &&
816 this->bioeffects_ == rhs.bioeffects_;
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...
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
static std::string briefDescription()
Returns a human readable description of the problem for the help message.
Definition FlowGenericProblem_impl.hpp:130
Scalar lame(unsigned elementIdx) const
Direct access to Lame's second parameter in an element.
Definition FlowGenericProblem_impl.hpp:357
Scalar biotCoeff(unsigned elementIdx) const
Direct access to Biot coefficient in an element.
Definition FlowGenericProblem_impl.hpp:388
Declare the properties used by the infrastructure code of the finite volume discretizations.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:45
This file provides the infrastructure to retrieve run-time parameters.