19 #ifndef OPM_RUNSPEC_HPP
20 #define OPM_RUNSPEC_HPP
26 #include <opm/common/OpmLog/KeywordLocation.hpp>
27 #include <opm/input/eclipse/EclipseState/Tables/Tabdims.hpp>
28 #include <opm/input/eclipse/EclipseState/Tables/Regdims.hpp>
29 #include <opm/input/eclipse/EclipseState/EndpointScaling.hpp>
30 #include <opm/input/eclipse/Schedule/UDQ/UDQParams.hpp>
31 #include <opm/input/eclipse/Schedule/Action/Actdims.hpp>
52 constexpr
int NUM_PHASES_IN_ENUM =
static_cast<int>(Phase::ZFRACTION) + 1;
54 Phase get_phase(
const std::string& );
55 std::ostream& operator<<( std::ostream&,
const Phase& );
59 Phases() noexcept =
default;
60 Phases(
bool oil,
bool gas,
bool wat,
bool solvent =
false,
bool polymer =
false,
bool energy =
false,
61 bool polymw =
false,
bool foam =
false,
bool brine =
false,
bool zfraction =
false ) noexcept;
63 static Phases serializationTestObject();
65 bool active( Phase )
const noexcept;
66 size_t size()
const noexcept;
68 bool operator==(
const Phases& data)
const;
70 template<
class Serializer>
77 std::bitset< NUM_PHASES_IN_ENUM > bits;
86 static Welldims serializationTestObject();
88 int maxConnPerWell()
const
93 int maxWellsPerGroup()
const
98 int maxGroupsInField()
const
103 int maxWellsInField()
const
108 int maxWellListsPrWell()
const
110 return this->nWlistPrWellMax;
113 int maxDynamicWellLists()
const
115 return this->nDynWlistMax;
118 const std::optional<KeywordLocation>& location()
const {
119 return this->m_location;
123 return full_dims.maxConnPerWell() == rst_dims.maxConnPerWell() &&
124 full_dims.maxWellsPerGroup() == rst_dims.maxWellsPerGroup() &&
125 full_dims.maxGroupsInField() == rst_dims.maxGroupsInField() &&
126 full_dims.maxWellsInField() == rst_dims.maxWellsInField() &&
127 full_dims.maxWellListsPrWell() == rst_dims.maxWellListsPrWell() &&
128 full_dims.maxDynamicWellLists() == rst_dims.maxDynamicWellLists();
131 bool operator==(
const Welldims& data)
const {
132 return this->location() == data.location() &&
133 rst_cmp(*
this, data);
137 template<
class Serializer>
144 serializer(nWlistPrWellMax);
145 serializer(nDynWlistMax);
146 serializer(m_location);
154 int nWlistPrWellMax { 1 };
155 int nDynWlistMax { 1 };
156 std::optional<KeywordLocation> m_location;
167 int maxSegmentedWells()
const
169 return this->nSegWellMax;
172 int maxSegmentsPerWell()
const
174 return this->nSegmentMax;
177 int maxLateralBranchesPerWell()
const
179 return this->nLatBranchMax;
184 template<
class Serializer>
187 serializer(nSegWellMax);
188 serializer(nSegmentMax);
189 serializer(nLatBranchMax);
205 int maxNONodes()
const
207 return this->nMaxNoNodes;
210 int maxNoBranches()
const
212 return this->nMaxNoBranches;
215 int maxNoBranchesConToNode()
const
217 return this->nMaxNoBranchesConToNode;
224 template<
class Serializer>
227 serializer(nMaxNoNodes);
228 serializer(nMaxNoBranches);
229 serializer(nMaxNoBranchesConToNode);
235 int nMaxNoBranchesConToNode;
245 int maxAnalyticAquifers()
const
247 return this->maxNumAnalyticAquifers;
250 int maxAnalyticAquiferConnections()
const
252 return this->maxNumAnalyticAquiferConn;
255 template <
class Serializer>
258 serializer(this->maxNumAnalyticAquifers);
259 serializer(this->maxNumAnalyticAquiferConn);
263 int maxNumAnalyticAquifers;
264 int maxNumAnalyticAquiferConn;
319 template<
class Serializer>
322 serializer(activeHyst);
323 serializer(pcHystMod);
324 serializer(krHystMod);
325 serializer(modParamTrappedValue);
326 serializer(curvatureCapPrsValue);
331 bool activeHyst {
false };
334 int pcHystMod { -1 };
335 int krHystMod { -1 };
337 double modParamTrappedValue { 0.1 };
339 double curvatureCapPrsValue { 0.1 };
344 enum class ThreePhaseOilKrModel {
350 enum class KeywordFamily {
359 const ThreePhaseOilKrModel model,
360 const KeywordFamily family);
364 double minimumRelpermMobilityThreshold()
const
366 return this->tolcrit;
369 ThreePhaseOilKrModel krModel()
const
371 return this->krmodel;
374 KeywordFamily family()
const
376 return this->satfunc_family;
381 template<
class Serializer>
386 serializer(satfunc_family);
391 ThreePhaseOilKrModel krmodel = ThreePhaseOilKrModel::Default;
392 KeywordFamily satfunc_family = KeywordFamily::Undefined;
399 explicit Nupcol(
int min_value);
400 void update(
int value);
403 static Nupcol serializationTestObject();
404 bool operator==(
const Nupcol& data)
const;
406 template<
class Serializer>
408 serializer(this->nupcol_value);
409 serializer(this->min_nupcol);
424 int water_tracers()
const;
426 template<
class Serializer>
428 serializer(this->m_oil_tracers);
429 serializer(this->m_water_tracers);
430 serializer(this->m_gas_tracers);
431 serializer(this->m_env_tracers);
432 serializer(this->diffusion_control);
433 serializer(this->max_iter);
434 serializer(this->min_iter);
437 static Tracers serializationTestObject();
438 bool operator==(
const Tracers& data)
const;
445 bool diffusion_control;
458 static Runspec serializationTestObject();
460 std::time_t start_time()
const noexcept;
461 const UDQParams& udqParams()
const noexcept;
462 const Phases& phases()
const noexcept;
463 const Tabdims& tabdims()
const noexcept;
464 const Regdims& regdims()
const noexcept;
466 const Welldims& wellDimensions()
const noexcept;
468 const NetworkDims& networkDimensions()
const noexcept;
470 int eclPhaseMask( )
const noexcept;
472 const Actdims& actdims()
const noexcept;
474 const Nupcol& nupcol()
const noexcept;
475 const Tracers& tracers()
const;
476 bool co2Storage()
const noexcept;
477 bool micp()
const noexcept;
479 bool operator==(
const Runspec& data)
const;
480 static bool rst_cmp(
const Runspec& full_state,
const Runspec& rst_state);
482 template<
class Serializer>
485 serializer(this->m_start_time);
486 serializer(active_phases);
487 serializer(m_tabdims);
488 serializer(m_regdims);
489 serializer(endscale);
490 serializer(welldims);
491 serializer(wsegdims);
492 serializer(netwrkdims);
493 serializer(aquiferdims);
494 serializer(udq_params);
496 serializer(m_actdims);
497 serializer(m_sfuncctrl);
498 serializer(m_nupcol);
499 serializer(m_co2storage);
504 std::time_t m_start_time;
Definition: Actdims.hpp:30
Definition: Runspec.hpp:238
Definition: Runspec.hpp:270
int pcHysteresisModel() const
Return the type of the hysteresis model which is used for capillary pressure.
double modParamTrapped() const
Regularisation parameter used for Killough model.
double curvatureCapPrs() const
Curvature parameter used for capillary pressure hysteresis.
bool active() const
Specify whether hysteresis is enabled or not.
int krHysteresisModel() const
Return the type of the hysteresis model which is used for relative permeability.
Definition: EndpointScaling.hpp:28
Definition: Runspec.hpp:198
Definition: Runspec.hpp:396
Definition: Runspec.hpp:57
Definition: Regdims.hpp:36
Definition: Runspec.hpp:453
Definition: Runspec.hpp:342
Class for (de-)serializing.
Definition: Serializer.hpp:75
Definition: Tabdims.hpp:36
Definition: Runspec.hpp:418
Definition: UDQParams.hpp:31
Definition: Runspec.hpp:159
Definition: Runspec.hpp:81
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29