mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move FlowProblem parameters to TypeTag-free parameter system
This commit is contained in:
@@ -1310,6 +1310,7 @@ namespace Opm {
|
|||||||
public:
|
public:
|
||||||
std::vector<bool> wasSwitched_;
|
std::vector<bool> wasSwitched_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
#endif // OPM_BLACKOILMODEL_HEADER_INCLUDED
|
#endif // OPM_BLACKOILMODEL_HEADER_INCLUDED
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ namespace Opm {
|
|||||||
|
|
||||||
// the default eWoms checkpoint/restart mechanism does not work with flow
|
// the default eWoms checkpoint/restart mechanism does not work with flow
|
||||||
Parameters::Hide<Parameters::RestartTime<Scalar>>();
|
Parameters::Hide<Parameters::RestartTime<Scalar>>();
|
||||||
Parameters::hideParam<TypeTag, Parameters::RestartWritingInterval>();
|
Parameters::Hide<Parameters::RestartWritingInterval>();
|
||||||
// hide all vtk related it is not currently possible to do this dependet on if the vtk writing is used
|
// hide all vtk related it is not currently possible to do this dependet on if the vtk writing is used
|
||||||
//if(not(Parameters::get<TypeTag,Properties::EnableVtkOutput>())){
|
//if(not(Parameters::get<TypeTag,Properties::EnableVtkOutput>())){
|
||||||
Parameters::Hide<Parameters::VtkWriteOilFormationVolumeFactor>();
|
Parameters::Hide<Parameters::VtkWriteOilFormationVolumeFactor>();
|
||||||
|
|||||||
@@ -233,20 +233,20 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
Parameters::registerParam<TypeTag, Parameters::EclOutputDoublePrecision>
|
Parameters::registerParam<TypeTag, Parameters::EclOutputDoublePrecision>
|
||||||
("Tell the output writer to use double precision. Useful for 'perfect' restarts");
|
("Tell the output writer to use double precision. Useful for 'perfect' restarts");
|
||||||
Parameters::registerParam<TypeTag, Parameters::RestartWritingInterval>
|
Parameters::Register<Parameters::RestartWritingInterval>
|
||||||
("The frequencies of which time steps are serialized to disk");
|
("The frequencies of which time steps are serialized to disk");
|
||||||
Parameters::registerParam<TypeTag, Parameters::EnableDriftCompensation>
|
Parameters::Register<Parameters::EnableDriftCompensation>
|
||||||
("Enable partial compensation of systematic mass losses via "
|
("Enable partial compensation of systematic mass losses via "
|
||||||
"the source term of the next time step");
|
"the source term of the next time step");
|
||||||
Parameters::registerParam<TypeTag, Parameters::OutputMode>
|
Parameters::Register<Parameters::OutputMode>
|
||||||
("Specify which messages are going to be printed. "
|
("Specify which messages are going to be printed. "
|
||||||
"Valid values are: none, log, all (default)");
|
"Valid values are: none, log, all (default)");
|
||||||
Parameters::registerParam<TypeTag, Parameters::NumPressurePointsEquil>
|
Parameters::Register<Parameters::NumPressurePointsEquil>
|
||||||
("Number of pressure points (in each direction) in tables used for equilibration");
|
("Number of pressure points (in each direction) in tables used for equilibration");
|
||||||
Parameters::hideParam<TypeTag, Parameters::NumPressurePointsEquil>(); // Users will typically not need to modify this parameter..
|
Parameters::Hide<Parameters::NumPressurePointsEquil>(); // Users will typically not need to modify this parameter..
|
||||||
Parameters::registerParam<TypeTag, Parameters::ExplicitRockCompaction>
|
Parameters::Register<Parameters::ExplicitRockCompaction>
|
||||||
("Use pressure from end of the last time step when evaluating rock compaction");
|
("Use pressure from end of the last time step when evaluating rock compaction");
|
||||||
Parameters::hideParam<TypeTag, Parameters::ExplicitRockCompaction>(); // Users will typically not need to modify this parameter..
|
Parameters::Hide<Parameters::ExplicitRockCompaction>(); // Users will typically not need to modify this parameter..
|
||||||
|
|
||||||
// By default, stop it after the universe will probably have stopped
|
// By default, stop it after the universe will probably have stopped
|
||||||
// to exist. (the ECL problem will finish the simulation explicitly
|
// to exist. (the ECL problem will finish the simulation explicitly
|
||||||
@@ -333,7 +333,7 @@ public:
|
|||||||
damarisWriter_ = std::make_unique<DamarisWriterType>(simulator);
|
damarisWriter_ = std::make_unique<DamarisWriterType>(simulator);
|
||||||
enableDamarisOutput_ = Parameters::Get<Parameters::EnableDamarisOutput>();
|
enableDamarisOutput_ = Parameters::Get<Parameters::EnableDamarisOutput>();
|
||||||
#endif
|
#endif
|
||||||
enableDriftCompensation_ = Parameters::get<TypeTag, Parameters::EnableDriftCompensation>();
|
enableDriftCompensation_ = Parameters::Get<Parameters::EnableDriftCompensation>();
|
||||||
|
|
||||||
enableEclOutput_ = Parameters::get<TypeTag, Parameters::EnableEclOutput>();
|
enableEclOutput_ = Parameters::get<TypeTag, Parameters::EnableEclOutput>();
|
||||||
enableVtkOutput_ = Parameters::Get<Parameters::EnableVtkOutput>();
|
enableVtkOutput_ = Parameters::Get<Parameters::EnableVtkOutput>();
|
||||||
@@ -346,14 +346,14 @@ public:
|
|||||||
// 1. Command line value (--num-pressure-points-equil=N)
|
// 1. Command line value (--num-pressure-points-equil=N)
|
||||||
// 2. EQLDIMS item 2
|
// 2. EQLDIMS item 2
|
||||||
// Default value is defined in opm-common/src/opm/input/eclipse/share/keywords/000_Eclipse100/E/EQLDIMS
|
// Default value is defined in opm-common/src/opm/input/eclipse/share/keywords/000_Eclipse100/E/EQLDIMS
|
||||||
if (Parameters::isSet<TypeTag, Parameters::NumPressurePointsEquil>())
|
if (Parameters::IsSet<Parameters::NumPressurePointsEquil>())
|
||||||
{
|
{
|
||||||
this->numPressurePointsEquil_ = Parameters::get<TypeTag, Parameters::NumPressurePointsEquil>();
|
this->numPressurePointsEquil_ = Parameters::Get<Parameters::NumPressurePointsEquil>();
|
||||||
} else {
|
} else {
|
||||||
this->numPressurePointsEquil_ = simulator.vanguard().eclState().getTableManager().getEqldims().getNumDepthNodesP();
|
this->numPressurePointsEquil_ = simulator.vanguard().eclState().getTableManager().getEqldims().getNumDepthNodesP();
|
||||||
}
|
}
|
||||||
|
|
||||||
explicitRockCompaction_ = Parameters::get<TypeTag, Parameters::ExplicitRockCompaction>();
|
explicitRockCompaction_ = Parameters::Get<Parameters::ExplicitRockCompaction>();
|
||||||
|
|
||||||
|
|
||||||
RelpermDiagnostics relpermDiagnostics;
|
RelpermDiagnostics relpermDiagnostics;
|
||||||
|
|||||||
@@ -28,29 +28,27 @@
|
|||||||
#ifndef OPM_FLOW_PROBLEM_PARAMETERS_HPP
|
#ifndef OPM_FLOW_PROBLEM_PARAMETERS_HPP
|
||||||
#define OPM_FLOW_PROBLEM_PARAMETERS_HPP
|
#define OPM_FLOW_PROBLEM_PARAMETERS_HPP
|
||||||
|
|
||||||
#include <opm/models/utils/propertysystem.hh>
|
#include <opm/input/eclipse/Parser/ParserKeywords/E.hpp>
|
||||||
|
|
||||||
namespace Opm::Parameters {
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
// Enable partial compensation of systematic mass losses via the source term of the next time
|
|
||||||
// step
|
// Enable partial compensation of systematic mass losses via
|
||||||
template<class TypeTag, class MyTypeTag>
|
// the source term of the next time step
|
||||||
struct EnableDriftCompensation { using type = Properties::UndefinedProperty; };
|
struct EnableDriftCompensation { static constexpr bool value = true; };
|
||||||
|
|
||||||
// implicit or explicit pressure in rock compaction
|
// implicit or explicit pressure in rock compaction
|
||||||
template<class TypeTag, class MyTypeTag>
|
struct ExplicitRockCompaction { static constexpr bool value = false; };
|
||||||
struct ExplicitRockCompaction { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
// Parameterize equilibration accuracy
|
// Parameterize equilibration accuracy
|
||||||
template<class TypeTag, class MyTypeTag>
|
struct NumPressurePointsEquil
|
||||||
struct NumPressurePointsEquil { using type = Properties::UndefinedProperty; };
|
{ static constexpr int value = ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue; };
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
struct OutputMode { static constexpr auto value = "all"; };
|
||||||
struct OutputMode { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
// The number of time steps skipped between writing two consequtive restart files
|
// The frequency of writing restart (*.ers) files. This is the number of time steps
|
||||||
template<class TypeTag, class MyTypeTag>
|
// between writing restart files
|
||||||
struct RestartWritingInterval { using type = Properties::UndefinedProperty; };
|
struct RestartWritingInterval { static constexpr int value = 0xffffff; }; // disable
|
||||||
|
|
||||||
} // namespace Opm::Parameters
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,6 @@
|
|||||||
#ifndef OPM_FLOW_PROBLEM_PROPERTIES_HPP
|
#ifndef OPM_FLOW_PROBLEM_PROPERTIES_HPP
|
||||||
#define OPM_FLOW_PROBLEM_PROPERTIES_HPP
|
#define OPM_FLOW_PROBLEM_PROPERTIES_HPP
|
||||||
|
|
||||||
#include <opm/input/eclipse/Parser/ParserKeywords/E.hpp>
|
|
||||||
|
|
||||||
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
|
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
|
||||||
#include <opm/material/thermal/EclThermalLawManager.hpp>
|
#include <opm/material/thermal/EclThermalLawManager.hpp>
|
||||||
|
|
||||||
@@ -311,26 +309,6 @@ template<class TypeTag>
|
|||||||
struct EnableWriteAllSolutions<TypeTag, Properties::TTag::FlowBaseProblem>
|
struct EnableWriteAllSolutions<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||||
{ static constexpr bool value = false; };
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
// By default, use implicit pressure in rock compaction
|
|
||||||
template<class TypeTag>
|
|
||||||
struct ExplicitRockCompaction<TypeTag, Properties::TTag::FlowBaseProblem>
|
|
||||||
{ static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// Parameterize equilibration accuracy
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NumPressurePointsEquil<TypeTag, Properties::TTag::FlowBaseProblem>
|
|
||||||
{ static constexpr int value = ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue; };
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct OutputMode<TypeTag, Properties::TTag::FlowBaseProblem>
|
|
||||||
{ static constexpr auto value = "all"; };
|
|
||||||
|
|
||||||
// The frequency of writing restart (*.ers) files. This is the number of time steps
|
|
||||||
// between writing restart files
|
|
||||||
template<class TypeTag>
|
|
||||||
struct RestartWritingInterval<TypeTag, Properties::TTag::FlowBaseProblem>
|
|
||||||
{ static constexpr int value = 0xffffff; }; // disable
|
|
||||||
|
|
||||||
} // namespace Opm::Parameters
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
#endif // OPM_FLOW_PROBLEM_PROPERTIES_HPP
|
#endif // OPM_FLOW_PROBLEM_PROPERTIES_HPP
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ private:
|
|||||||
std::string cmdline_params;
|
std::string cmdline_params;
|
||||||
if (outputCout_) {
|
if (outputCout_) {
|
||||||
printFlowBanner(FlowGenericVanguard::comm().size(),
|
printFlowBanner(FlowGenericVanguard::comm().size(),
|
||||||
getNumThreads<PreTypeTag>(),
|
getNumThreads(),
|
||||||
Opm::moduleVersionName());
|
Opm::moduleVersionName());
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
Parameters::printValues(str);
|
Parameters::printValues(str);
|
||||||
@@ -417,12 +417,12 @@ private:
|
|||||||
try {
|
try {
|
||||||
this->readDeck(deckFilename,
|
this->readDeck(deckFilename,
|
||||||
outputDir,
|
outputDir,
|
||||||
Parameters::get<PreTypeTag, Parameters::OutputMode>(),
|
Parameters::Get<Parameters::OutputMode>(),
|
||||||
!Parameters::Get<Parameters::SchedRestart>(),
|
!Parameters::Get<Parameters::SchedRestart>(),
|
||||||
Parameters::Get<Parameters::EnableLoggingFalloutWarning>(),
|
Parameters::Get<Parameters::EnableLoggingFalloutWarning>(),
|
||||||
Parameters::Get<Parameters::ParsingStrictness>(),
|
Parameters::Get<Parameters::ParsingStrictness>(),
|
||||||
Parameters::Get<Parameters::InputSkipMode>(),
|
Parameters::Get<Parameters::InputSkipMode>(),
|
||||||
getNumThreads<PreTypeTag>(),
|
getNumThreads(),
|
||||||
Parameters::Get<Parameters::EclOutputInterval>(),
|
Parameters::Get<Parameters::EclOutputInterval>(),
|
||||||
cmdline_params,
|
cmdline_params,
|
||||||
Opm::moduleVersion(),
|
Opm::moduleVersion(),
|
||||||
@@ -705,7 +705,6 @@ private:
|
|||||||
|
|
||||||
void setupVanguard();
|
void setupVanguard();
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
static int getNumThreads()
|
static int getNumThreads()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user