19 #ifndef OPM_RUNSPEC_HPP 20 #define OPM_RUNSPEC_HPP 22 #include <opm/common/OpmLog/KeywordLocation.hpp> 24 #include <opm/input/eclipse/EclipseState/EndpointScaling.hpp> 25 #include <opm/input/eclipse/EclipseState/Phase.hpp> 26 #include <opm/input/eclipse/EclipseState/Tables/Regdims.hpp> 27 #include <opm/input/eclipse/EclipseState/Tables/Tabdims.hpp> 29 #include <opm/input/eclipse/Schedule/Action/Actdims.hpp> 30 #include <opm/input/eclipse/Schedule/UDQ/UDQParams.hpp> 48 Phases() noexcept =
default;
49 Phases(
bool oil,
bool gas,
bool wat,
56 bool zfraction =
false) noexcept;
58 static Phases serializationTestObject();
60 bool active( Phase )
const noexcept;
61 size_t size()
const noexcept;
63 bool operator==(
const Phases& data)
const;
65 template<
class Serializer>
72 std::bitset<NUM_PHASES_IN_ENUM> bits;
80 static Welldims serializationTestObject();
82 int maxConnPerWell()
const 87 int maxWellsPerGroup()
const 92 int maxGroupsInField()
const 97 int maxWellsInField()
const 102 int maxWellListsPrWell()
const 104 return this->nWlistPrWellMax;
107 int maxDynamicWellLists()
const 109 return this->nDynWlistMax;
112 const std::optional<KeywordLocation>& location()
const 114 return this->m_location;
118 return full_dims.maxConnPerWell() == rst_dims.maxConnPerWell() &&
119 full_dims.maxWellsPerGroup() == rst_dims.maxWellsPerGroup() &&
120 full_dims.maxGroupsInField() == rst_dims.maxGroupsInField() &&
121 full_dims.maxWellsInField() == rst_dims.maxWellsInField() &&
122 full_dims.maxWellListsPrWell() == rst_dims.maxWellListsPrWell() &&
123 full_dims.maxDynamicWellLists() == rst_dims.maxDynamicWellLists();
126 bool operator==(
const Welldims& data)
const {
127 return this->location() == data.location() &&
128 rst_cmp(*
this, data);
131 template<
class Serializer>
138 serializer(nWlistPrWellMax);
139 serializer(nDynWlistMax);
140 serializer(m_location);
148 int nWlistPrWellMax { 1 };
149 int nDynWlistMax { 1 };
150 std::optional<KeywordLocation> m_location;
160 int maxSegmentedWells()
const 162 return this->nSegWellMax;
165 int maxSegmentsPerWell()
const 167 return this->nSegmentMax;
170 int maxLateralBranchesPerWell()
const 172 return this->nLatBranchMax;
175 const std::optional<KeywordLocation>& location()
const 177 return this->location_;
182 template<
class Serializer>
185 serializer(nSegWellMax);
186 serializer(nSegmentMax);
187 serializer(nLatBranchMax);
188 serializer(location_);
195 std::optional<KeywordLocation> location_;
205 int maxNONodes()
const 207 return this->nMaxNoNodes;
210 int maxNoBranches()
const 212 return this->nMaxNoBranches;
215 int maxNoBranchesConToNode()
const 217 return this->nMaxNoBranchesConToNode;
220 bool extendedNetwork()
const 222 return this->type_ == Type::Extended;
225 bool standardNetwork()
const 227 return this->type_ == Type::Standard;
232 return this->extendedNetwork()
233 || this->standardNetwork();
238 template<
class Serializer>
241 serializer(nMaxNoNodes);
242 serializer(nMaxNoBranches);
243 serializer(nMaxNoBranchesConToNode);
247 enum class Type { None, Extended, Standard, };
251 int nMaxNoBranchesConToNode;
252 Type type_{ Type::None };
262 int maxAnalyticAquifers()
const 264 return this->maxNumAnalyticAquifers;
267 int maxAnalyticAquiferConnections()
const 269 return this->maxNumAnalyticAquiferConn;
272 template <
class Serializer>
275 serializer(this->maxNumAnalyticAquifers);
276 serializer(this->maxNumAnalyticAquiferConn);
280 int maxNumAnalyticAquifers;
281 int maxNumAnalyticAquiferConn;
351 template<
class Serializer>
354 serializer(activeHyst);
355 serializer(pcHystMod);
356 serializer(krHystMod);
357 serializer(modParamTrappedValue);
358 serializer(curvatureCapPrsValue);
359 serializer(activeWagHyst);
360 serializer(enablePcScaling);
361 serializer(enableKilloughWettingFix);
366 bool activeHyst {
false };
369 int pcHystMod { -1 };
370 int krHystMod { -1 };
372 double modParamTrappedValue { 0.1 };
374 double curvatureCapPrsValue { 0.1 };
377 bool activeWagHyst {
false };
380 bool enablePcScaling {
false };
383 bool enableKilloughWettingFix {
false };
388 enum class ThreePhaseOilKrModel {
394 enum class KeywordFamily {
405 const ThreePhaseOilKrModel model,
406 const KeywordFamily family);
410 double minimumRelpermMobilityThreshold()
const 412 return this->tolcrit;
415 ThreePhaseOilKrModel krModel()
const 417 return this->krmodel;
420 KeywordFamily family()
const 422 return this->satfunc_family;
427 template<
class Serializer>
432 serializer(satfunc_family);
437 ThreePhaseOilKrModel krmodel = ThreePhaseOilKrModel::Default;
438 KeywordFamily satfunc_family = KeywordFamily::Undefined;
445 explicit Nupcol(
int min_value);
446 void update(
int value);
449 static Nupcol serializationTestObject();
450 bool operator==(
const Nupcol& data)
const;
452 template<
class Serializer>
454 serializer(this->nupcol_value);
455 serializer(this->min_nupcol);
472 enum class CouplingScheme
482 bool operator==(
const MechSolver& data)
const;
486 template<
class Serializer>
489 serializer(this->m_solver);
490 serializer(this->m_coupling);
491 serializer(this->m_fixed_stress_min_iter);
492 serializer(this->m_fixed_stress_max_iter);
495 bool laggedScheme()
const 497 return this->m_coupling == CouplingScheme::Lagged;
500 bool fixedStressScheme()
const 502 return this->m_coupling == CouplingScheme::FixedStress;
505 int fixedStressMinIter()
const 507 return this->m_fixed_stress_min_iter;
510 int fixedStressMaxIter()
const 512 return this->m_fixed_stress_max_iter;
517 return this->m_solver == Solver::TPSA;
522 CouplingScheme m_coupling = CouplingScheme::Lagged;
523 int m_fixed_stress_min_iter{};
524 int m_fixed_stress_max_iter{};
533 int water_tracers()
const;
534 int gas_tracers()
const;
535 int oil_tracers()
const;
537 template<
class Serializer>
539 serializer(this->m_oil_tracers);
540 serializer(this->m_water_tracers);
541 serializer(this->m_gas_tracers);
542 serializer(this->m_env_tracers);
543 serializer(this->diffusion_control);
544 serializer(this->max_iter);
545 serializer(this->min_iter);
548 static Tracers serializationTestObject();
549 bool operator==(
const Tracers& data)
const;
553 int m_water_tracers{};
556 bool diffusion_control{
false};
567 Geochem(std::string file_name,
double mbal_tol,
double ph_tol,
bool charge_balance,
568 bool activated,
int splay_tree)
569 : m_file_name(file_name)
570 , m_mbal_tol(mbal_tol)
572 , m_charge_balance(charge_balance)
573 , m_activated(activated)
574 , m_splay_tree(splay_tree)
578 const std::string& geochem_file_name()
const;
579 double mbal_tol()
const;
580 double ph_tol()
const;
581 int splay_tree_resolution()
const;
582 bool charge_balance()
const;
583 bool enabled()
const;
585 template<
class Serializer>
587 serializer(this->m_file_name);
588 serializer(this->m_mbal_tol);
589 serializer(this->m_ph_tol);
590 serializer(this->m_charge_balance);
591 serializer(this->m_activated);
592 serializer(this->m_splay_tree);
594 static Geochem serializationTestObject();
596 bool operator==(
const Geochem& data)
const;
599 std::string m_file_name;
602 bool m_charge_balance{
false};
603 bool m_activated{
false};
613 static Runspec serializationTestObject();
615 std::time_t start_time()
const noexcept;
616 const UDQParams& udqParams()
const noexcept;
617 const Phases& phases()
const noexcept;
618 const Tabdims& tabdims()
const noexcept;
619 const Regdims& regdims()
const noexcept;
621 const Welldims& wellDimensions()
const noexcept;
623 const NetworkDims& networkDimensions()
const noexcept;
625 int eclPhaseMask( )
const noexcept;
627 const Actdims& actdims()
const noexcept;
629 const Nupcol& nupcol()
const noexcept;
633 const Tracers& tracers()
const;
634 const Geochem& geochem()
const;
635 bool compositionalMode()
const;
636 size_t numComps()
const;
637 bool co2Storage()
const noexcept;
638 bool co2Sol()
const noexcept;
639 bool h2Sol()
const noexcept;
640 bool h2Storage()
const noexcept;
641 bool micp()
const noexcept;
642 bool mech()
const noexcept;
643 bool frac()
const noexcept;
644 bool temp()
const noexcept;
645 bool compositional()
const noexcept;
646 bool biof()
const noexcept;
648 bool operator==(
const Runspec& data)
const;
649 static bool rst_cmp(
const Runspec& full_state,
const Runspec& rst_state);
651 template<
class Serializer>
654 serializer(this->m_start_time);
655 serializer(active_phases);
656 serializer(m_tabdims);
657 serializer(m_regdims);
658 serializer(endscale);
659 serializer(welldims);
660 serializer(wsegdims);
661 serializer(netwrkdims);
662 serializer(aquiferdims);
663 serializer(udq_params);
665 serializer(m_actdims);
666 serializer(m_sfuncctrl);
667 serializer(m_nupcol);
668 serializer(m_tracers);
670 serializer(m_co2storage);
671 serializer(m_co2sol);
673 serializer(m_h2storage);
678 serializer(m_mechsolver);
680 serializer(m_geochem);
684 std::time_t m_start_time{};
702 bool m_co2storage{
false};
703 bool m_co2sol{
false};
705 bool m_h2storage{
false};
713 std::size_t declaredMaxRegionID(
const Runspec& rspec);
717 #endif // OPM_RUNSPEC_HPP bool active() const
Specify whether hysteresis is enabled or not.
Definition: Runspec.cpp:483
Definition: Actdims.hpp:30
Definition: Runspec.hpp:75
double curvatureCapPrs() const
Curvature parameter used for capillary pressure hysteresis.
Definition: Runspec.cpp:495
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
bool activeWag() const
Wag hysteresis.
Definition: Runspec.cpp:498
bool doPcScaling() const
Do Pc scaling for scanning curves.
Definition: Runspec.cpp:501
Definition: Runspec.hpp:608
Definition: Runspec.hpp:386
Definition: Runspec.hpp:286
Definition: Runspec.hpp:442
int pcHysteresisModel() const
Return the type of the hysteresis model which is used for capillary pressure.
Definition: Runspec.cpp:486
double modParamTrapped() const
Regularisation parameter used for Killough model.
Definition: Runspec.cpp:492
Definition: Runspec.hpp:153
Definition: UDQParams.hpp:30
Definition: Runspec.hpp:564
Definition: Runspec.hpp:464
Definition: Runspec.hpp:198
Definition: Runspec.hpp:528
int krHysteresisModel() const
Return the type of the hysteresis model which is used for relative permeability.
Definition: Runspec.cpp:489
bool fixWettingPhaseKillough() const
Activate fix for wetting phase killough.
Definition: Runspec.cpp:504
Definition: EndpointScaling.hpp:28
Definition: Runspec.hpp:255
Class for (de-)serializing.
Definition: Serializer.hpp:94
Definition: Regdims.hpp:36
Definition: Tabdims.hpp:36
Definition: Runspec.hpp:45