changed: move the EnableGravity parameter to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving
2024-07-01 14:13:14 +02:00
parent 0ecb84857e
commit 67b10555d3
22 changed files with 156 additions and 94 deletions

View File

@@ -157,10 +157,6 @@ struct SolidEnergyLaw<TypeTag, TTag::Co2InjectionBaseProblem>
template<class TypeTag>
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionBaseProblem> { using type = TTag::ParallelAmgLinearSolver; };
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr bool value = true; };
// set the defaults for the problem specific properties
template<class TypeTag>
struct FluidSystemPressureLow<TypeTag, TTag::Co2InjectionBaseProblem>
@@ -210,6 +206,11 @@ struct SimulationName<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr
namespace Opm::Parameters {
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::Co2InjectionBaseProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::Co2InjectionBaseProblem>

View File

@@ -139,11 +139,6 @@ public:
using type = EffMaterialLaw;
};
// Enable gravity false
template <class TypeTag>
struct EnableGravity<TypeTag, TTag::CO2PTBaseProblem> { static constexpr bool value = false;
};
// set the defaults for the problem specific properties
template <class TypeTag>
struct Temperature<TypeTag, TTag::CO2PTBaseProblem> {
@@ -234,6 +229,11 @@ struct DomainSizeZ<TypeTag, Properties::TTag::CO2PTBaseProblem>
static constexpr type value = 1.0;
};
// Enable gravity false
template <class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::CO2PTBaseProblem>
{ static constexpr bool value = false; };
// The default for the end time of the simulation
template <class TypeTag>
struct EndTime<TypeTag, Properties::TTag::CO2PTBaseProblem>

View File

@@ -76,10 +76,6 @@ template<class TypeTag>
struct FluidSystem<TypeTag, TTag::CuvetteBaseProblem>
{ using type = Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::CuvetteBaseProblem> { static constexpr bool value = true; };
// Set the material Law
template<class TypeTag>
struct MaterialLaw<TypeTag, TTag::CuvetteBaseProblem>
@@ -120,6 +116,11 @@ public:
namespace Opm::Parameters {
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::CuvetteBaseProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::CuvetteBaseProblem>

View File

@@ -106,10 +106,6 @@ public:
template<class TypeTag>
struct EnableDiffusion<TypeTag, TTag::DiffusionBaseProblem> { static constexpr bool value = true; };
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::DiffusionBaseProblem> { static constexpr bool value = false; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@@ -148,6 +144,11 @@ struct DomainSizeZ<TypeTag, Properties::TTag::DiffusionBaseProblem>
static constexpr type value = 1.0;
};
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::DiffusionBaseProblem>
{ static constexpr bool value = false; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::DiffusionBaseProblem>

View File

@@ -128,10 +128,6 @@ struct MaterialLaw<TypeTag, TTag::FingerBaseProblem>
template<class TypeTag>
struct EnableConstraints<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = true; };
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::FingerBaseProblem> { static constexpr bool value = true; };
template<class TypeTag>
struct InitialWaterSaturation<TypeTag, TTag::FingerBaseProblem>
{
@@ -177,6 +173,11 @@ struct DomainSizeZ<TypeTag, Properties::TTag::FingerBaseProblem>
static constexpr type value = 0.1;
};
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::FingerBaseProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::FingerBaseProblem>

View File

@@ -152,10 +152,6 @@ template<class TypeTag>
struct SolidEnergyLaw<TypeTag, TTag::FractureProblem>
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::FractureProblem> { static constexpr bool value = false; };
// For this problem, we use constraints to specify the left boundary
template<class TypeTag>
struct EnableConstraints<TypeTag, TTag::FractureProblem> { static constexpr bool value = true; };
@@ -164,6 +160,11 @@ struct EnableConstraints<TypeTag, TTag::FractureProblem> { static constexpr bool
namespace Opm::Parameters {
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::FractureProblem>
{ static constexpr bool value = false; };
// Set the default value for the end time
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::FractureProblem>

View File

@@ -141,10 +141,6 @@ struct PermeabilityLens<TypeTag, TTag::GroundWaterBaseProblem>
static constexpr type value = 1e-12;
};
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::GroundWaterBaseProblem> { static constexpr bool value = true; };
// Use the conjugated gradient linear solver with the default preconditioner (i.e.,
// ILU-0) from dune-istl
template<class TypeTag>
@@ -158,6 +154,11 @@ struct LinearSolverWrapper<TypeTag, TTag::GroundWaterBaseProblem>
namespace Opm::Parameters {
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::GroundWaterBaseProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::GroundWaterBaseProblem>

View File

@@ -70,10 +70,6 @@ template<class TypeTag>
struct FluidSystem<TypeTag, TTag::InfiltrationBaseProblem>
{ using type = Opm::H2OAirMesityleneFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
// Enable gravity?
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr bool value = true; };
// Set the material Law
template<class TypeTag>
struct MaterialLaw<TypeTag, TTag::InfiltrationBaseProblem>
@@ -96,6 +92,11 @@ public:
namespace Opm::Parameters {
// Enable gravity?
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::InfiltrationBaseProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::InfiltrationBaseProblem>

View File

@@ -130,10 +130,6 @@ public:
};
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = true; };
// define the properties specific for the lens problem
template<class TypeTag>
struct LensLowerLeftX<TypeTag, TTag::LensBaseProblem>
@@ -209,6 +205,11 @@ struct DomainSizeZ<TypeTag, Properties::TTag::LensBaseProblem>
static constexpr type value = 1.0;
};
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::LensBaseProblem>
{ static constexpr bool value = true; };
// enable the cache for intensive quantities by default for this problem
template<class TypeTag>
struct EnableIntensiveQuantityCache<TypeTag, Properties::TTag::LensBaseProblem>

View File

@@ -111,14 +111,15 @@ template<class TypeTag>
struct SolidEnergyLaw<TypeTag, TTag::ObstacleBaseProblem>
{ using type = Opm::ConstantSolidHeatCapLaw<GetPropType<TypeTag, Properties::Scalar>>; };
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::ObstacleBaseProblem> { static constexpr bool value = true; };
} // namespace Opm::Properties
namespace Opm::Parameters {
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::ObstacleBaseProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::ObstacleBaseProblem>

View File

@@ -72,14 +72,15 @@ public:
using type = Opm::H2ON2LiquidPhaseFluidSystem<Scalar>;
};
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::OutflowBaseProblem> { static constexpr bool value = false; };
} // namespace Opm::Properties
namespace Opm::Parameters {
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::OutflowBaseProblem>
{ static constexpr bool value = false; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::OutflowBaseProblem>

View File

@@ -119,10 +119,6 @@ public:
using type = Opm::EffToAbsLaw<EffectiveLaw>;
};
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr bool value = false; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@@ -161,6 +157,11 @@ struct DomainSizeZ<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
static constexpr type value = 1.0;
};
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
{ static constexpr bool value = false; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::PowerInjectionBaseProblem>

View File

@@ -101,10 +101,6 @@ public:
using type = Opm::LinearMaterial<Traits>;
};
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = true; };
// Enable constraint DOFs?
template<class TypeTag>
struct EnableConstraints<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = true; };
@@ -153,6 +149,11 @@ public:
namespace Opm::Parameters {
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::ReservoirBaseProblem>
{ static constexpr bool value = true; };
//! The default for the end time of the simulation [s].
//!
//! By default this problem spans 1000 days (100 "settle down" days and 900 days of

View File

@@ -99,14 +99,15 @@ public:
using type = Opm::EffToAbsLaw<EffectiveLaw>;
};
// Enable gravitational acceleration
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::RichardsLensProblem> { static constexpr bool value = true; };
} // namespace Opm::Properties
namespace Opm::Parameters {
// Enable gravitational acceleration
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::RichardsLensProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::RichardsLensProblem>

View File

@@ -115,10 +115,6 @@ template<class TypeTag>
struct FluidSystem<TypeTag, TTag::WaterAirBaseProblem>
{ using type = Opm::H2OAirFluidSystem<GetPropType<TypeTag, Properties::Scalar>>; };
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::WaterAirBaseProblem> { static constexpr bool value = true; };
// Use the restarted GMRES linear solver with the ILU-2 preconditioner from dune-istl
template<class TypeTag>
struct LinearSolverSplice<TypeTag, TTag::WaterAirBaseProblem>
@@ -138,6 +134,11 @@ struct PreconditionerOrder<TypeTag, TTag::WaterAirBaseProblem> { static constexp
namespace Opm::Parameters {
// Enable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::WaterAirBaseProblem>
{ static constexpr bool value = true; };
// The default for the end time of the simulation (1 year)
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::WaterAirBaseProblem>

View File

@@ -120,10 +120,6 @@ public:
using type = Opm::EffToAbsLaw<RawMaterialLaw>; /*@\label{tutorial1:eff2abs}@*/
};
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::Tutorial1Problem> { static constexpr bool value = false; }; /*@\label{tutorial1:gravity}@*/
} // namespace Opm::Properties
namespace Opm::Parameters {
@@ -163,6 +159,11 @@ struct DomainSizeZ<TypeTag, Properties::TTag::Tutorial1Problem>
static constexpr type value = 0.0;
};
// Disable gravity
template<class TypeTag>
struct EnableGravity<TypeTag, Properties::TTag::Tutorial1Problem>
{ static constexpr bool value = false; }; /*@\label{tutorial1:gravity}@*/
// define how long the simulation should run [s]
template<class TypeTag>
struct EndTime<TypeTag, Properties::TTag::Tutorial1Problem>