mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: move the EnableGravity parameter to Opm::Parameters
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <opm/models/blackoil/blackoilsolventparams.hh>
|
||||
#include <opm/models/io/vtkblackoilsolventmodule.hh>
|
||||
#include <opm/models/common/multiphasebaseparameters.hh>
|
||||
#include <opm/models/common/quantitycallbacks.hh>
|
||||
|
||||
#include <opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp>
|
||||
@@ -1368,7 +1369,7 @@ public:
|
||||
Valgrind::CheckDefined(solventPGrad);
|
||||
|
||||
// correct the pressure gradients by the gravitational acceleration
|
||||
if (Parameters::get<TypeTag, Properties::EnableGravity>()) {
|
||||
if (Parameters::get<TypeTag, Parameters::EnableGravity>()) {
|
||||
// estimate the gravitational acceleration at a given SCV face
|
||||
// using the arithmetic mean
|
||||
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
||||
|
||||
@@ -30,18 +30,16 @@
|
||||
#ifndef EWOMS_DARCY_FLUX_MODULE_HH
|
||||
#define EWOMS_DARCY_FLUX_MODULE_HH
|
||||
|
||||
#include "multiphasebaseproperties.hh"
|
||||
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
|
||||
#include <opm/models/common/quantitycallbacks.hh>
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
|
||||
#include <cmath>
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
|
||||
#include <opm/models/common/multiphasebaseparameters.hh>
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
#include <opm/models/common/quantitycallbacks.hh>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -214,7 +212,7 @@ protected:
|
||||
}
|
||||
|
||||
// correct the pressure gradients by the gravitational acceleration
|
||||
if (Parameters::get<TypeTag, Properties::EnableGravity>()) {
|
||||
if (Parameters::get<TypeTag, Parameters::EnableGravity>()) {
|
||||
// estimate the gravitational acceleration at a given SCV face
|
||||
// using the arithmetic mean
|
||||
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
||||
@@ -364,7 +362,7 @@ protected:
|
||||
K_ = intQuantsIn.intrinsicPermeability();
|
||||
|
||||
// correct the pressure gradients by the gravitational acceleration
|
||||
if (Parameters::get<TypeTag, Properties::EnableGravity>()) {
|
||||
if (Parameters::get<TypeTag, Parameters::EnableGravity>()) {
|
||||
// estimate the gravitational acceleration at a given SCV face
|
||||
// using the arithmetic mean
|
||||
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
||||
|
||||
@@ -30,20 +30,23 @@
|
||||
|
||||
#include <opm/material/densead/Math.hpp>
|
||||
|
||||
#include "multiphasebaseproperties.hh"
|
||||
#include "multiphasebaseproblem.hh"
|
||||
#include "multiphasebaseextensivequantities.hh"
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
|
||||
|
||||
#include <opm/material/thermal/NullSolidEnergyLaw.hpp>
|
||||
#include <opm/material/thermal/NullThermalConductionLaw.hpp>
|
||||
|
||||
#include <opm/models/common/flux.hh>
|
||||
#include <opm/models/common/multiphasebaseparameters.hh>
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
#include <opm/models/common/multiphasebaseproblem.hh>
|
||||
#include <opm/models/common/multiphasebaseextensivequantities.hh>
|
||||
|
||||
#include <opm/models/discretization/vcfv/vcfvdiscretization.hh>
|
||||
|
||||
#include <opm/models/io/vtkmultiphasemodule.hh>
|
||||
#include <opm/models/io/vtktemperaturemodule.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/thermal/NullThermalConductionLaw.hpp>
|
||||
#include <opm/material/thermal/NullSolidEnergyLaw.hpp>
|
||||
|
||||
namespace Opm {
|
||||
template <class TypeTag>
|
||||
class MultiPhaseBaseModel;
|
||||
@@ -134,12 +137,16 @@ template<class TypeTag>
|
||||
struct ThermalConductionLawParams<TypeTag, TTag::MultiPhaseBaseModel>
|
||||
{ using type = typename GetPropType<TypeTag, Properties::ThermalConductionLaw>::Params; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! disable gravity by default
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::MultiPhaseBaseModel> { static constexpr bool value = false; };
|
||||
struct EnableGravity<TypeTag, Properties::TTag::MultiPhaseBaseModel>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
|
||||
} // namespace Opm::Properties
|
||||
}
|
||||
|
||||
namespace Opm {
|
||||
|
||||
|
||||
43
opm/models/common/multiphasebaseparameters.hh
Normal file
43
opm/models/common/multiphasebaseparameters.hh
Normal file
@@ -0,0 +1,43 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
* \ingroup MultiPhaseBaseModel
|
||||
*
|
||||
* \brief Defines the common paramamters for the porous medium
|
||||
* multi-phase models.
|
||||
*/
|
||||
#ifndef EWOMS_MULTI_PHASE_BASE_PARAMETERS_HH
|
||||
#define EWOMS_MULTI_PHASE_BASE_PARAMETERS_HH
|
||||
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! Returns whether gravity is considered in the problem
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableGravity { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
#endif
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <opm/material/densead/Evaluation.hpp>
|
||||
|
||||
#include <opm/models/common/directionalmobility.hh>
|
||||
#include <opm/models/common/multiphasebaseparameters.hh>
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
|
||||
#include <opm/models/discretization/common/fvbaseproblem.hh>
|
||||
@@ -92,7 +93,7 @@ public:
|
||||
{
|
||||
ParentType::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::EnableGravity>
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableGravity>
|
||||
("Use the gravity correction for the pressure gradients.");
|
||||
}
|
||||
|
||||
@@ -397,7 +398,7 @@ private:
|
||||
void init_()
|
||||
{
|
||||
gravity_ = 0.0;
|
||||
if (Parameters::get<TypeTag, Properties::EnableGravity>())
|
||||
if (Parameters::get<TypeTag, Parameters::EnableGravity>())
|
||||
gravity_[dimWorld-1] = -9.81;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef EWOMS_MULTI_PHASE_BASE_PROPERTIES_HH
|
||||
#define EWOMS_MULTI_PHASE_BASE_PROPERTIES_HH
|
||||
|
||||
#include <opm/models/utils/basicproperties.hh>
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
@@ -74,9 +74,6 @@ struct FluxModule { using type = UndefinedProperty; };
|
||||
//! Specify whether energy should be considered as a conservation quantity or not
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableEnergy { using type = UndefinedProperty; };
|
||||
//! Returns whether gravity is considered in the problem
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableGravity { using type = UndefinedProperty; };
|
||||
//! Enable diffusive fluxes?
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableDiffusion { using type = UndefinedProperty; };
|
||||
|
||||
Reference in New Issue
Block a user