mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
Merge pull request #912 from akva2/move_various_params_to_params
Move various parameters to Opm::Parameters namespace
This commit is contained in:
commit
0ecb84857e
@ -46,12 +46,16 @@ struct ObstacleProblem
|
||||
|
||||
} // end namespace TTag
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
// Verbosity of the PVS model (0=silent, 1=medium, 2=chatty)
|
||||
template<class TypeTag>
|
||||
struct PvsVerbosity<TypeTag, TTag::ObstacleProblem>
|
||||
struct PvsVerbosity<TypeTag, Properties::TTag::ObstacleProblem>
|
||||
{ static constexpr int value = 1; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
@ -44,12 +44,16 @@ struct OutflowProblem
|
||||
|
||||
} // end namespace TTag
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
// Verbosity of the PVS model (0=silent, 1=medium, 2=chatty)
|
||||
template<class TypeTag>
|
||||
struct PvsVerbosity<TypeTag, TTag::OutflowProblem>
|
||||
struct PvsVerbosity<TypeTag, Properties::TTag::OutflowProblem>
|
||||
{ static constexpr int value = 1; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
@ -124,10 +124,6 @@ struct MaterialLaw<TypeTag, TTag::FingerBaseProblem>
|
||||
using type = ParkerLenhard;
|
||||
};
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = +1; };
|
||||
|
||||
// Enable constraints
|
||||
template<class TypeTag>
|
||||
struct EnableConstraints<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = true; };
|
||||
@ -202,6 +198,11 @@ template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||
{ static constexpr int value = +1; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -74,10 +74,6 @@ struct FluidSystem<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// -1 backward differences, 0: central differences, +1: forward differences
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr int value = 1; };
|
||||
|
||||
// Set the material Law
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::InfiltrationBaseProblem>
|
||||
@ -126,6 +122,11 @@ template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, Properties::TTag::InfiltrationBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// -1 backward differences, 0: central differences, +1: forward differences
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, Properties::TTag::InfiltrationBaseProblem>
|
||||
{ static constexpr int value = 1; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -129,9 +129,6 @@ public:
|
||||
using type = Opm::EffToAbsLaw<EffectiveLaw>;
|
||||
};
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::LensBaseProblem> { static constexpr int value = +1; };
|
||||
|
||||
// Enable gravity
|
||||
template<class TypeTag>
|
||||
@ -243,11 +240,6 @@ template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, Properties::TTag::LensBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// By default, include the intrinsic permeability tensor to the VTK output files
|
||||
template<class TypeTag>
|
||||
struct VtkWriteIntrinsicPermeabilities<TypeTag, Properties::TTag::LensBaseProblem>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -103,10 +103,6 @@ public:
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::RichardsLensProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Use central differences to approximate the Jacobian matrix
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 0; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
@ -147,6 +143,11 @@ template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, Properties::TTag::RichardsLensProblem>
|
||||
{ static constexpr int value = 28; };
|
||||
|
||||
// Use central differences to approximate the Jacobian matrix
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, Properties::TTag::RichardsLensProblem>
|
||||
{ static constexpr int value = 0; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -119,10 +119,6 @@ struct FluidSystem<TypeTag, TTag::WaterAirBaseProblem>
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::WaterAirBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::WaterAirBaseProblem> { static constexpr int value = +1; };
|
||||
|
||||
// Use the restarted GMRES linear solver with the ILU-2 preconditioner from dune-istl
|
||||
template<class TypeTag>
|
||||
struct LinearSolverSplice<TypeTag, TTag::WaterAirBaseProblem>
|
||||
@ -168,6 +164,11 @@ template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, Properties::TTag::WaterAirBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// Use forward differences instead of central differences
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, Properties::TTag::WaterAirBaseProblem>
|
||||
{ static constexpr int value = +1; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -28,7 +28,8 @@
|
||||
#ifndef EWOMS_BLACK_OIL_NEWTON_METHOD_HH
|
||||
#define EWOMS_BLACK_OIL_NEWTON_METHOD_HH
|
||||
|
||||
#include "blackoilproperties.hh"
|
||||
#include <opm/models/blackoil/blackoilnewtonmethodparameters.hh>
|
||||
#include <opm/models/blackoil/blackoilproperties.hh>
|
||||
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
|
||||
@ -41,91 +42,85 @@ namespace Opm::Properties {
|
||||
template <class TypeTag, class MyTypeTag>
|
||||
struct DiscNewtonMethod;
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DpMaxRel { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DsMax { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PriVarOscilationThreshold { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ProjectSaturations { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaxTemperatureChange { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct TemperatureMax { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct TemperatureMin { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PressureMax { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PressureMin { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaximumWaterSaturation { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct WaterOnlyThreshold { using type = UndefinedProperty; };
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm:: Parameters {
|
||||
|
||||
template<class TypeTag>
|
||||
struct DpMaxRel<TypeTag, TTag::NewtonMethod>
|
||||
struct DpMaxRel<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 0.3;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct DsMax<TypeTag, TTag::NewtonMethod>
|
||||
struct DsMax<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 0.2;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct PriVarOscilationThreshold<TypeTag, TTag::NewtonMethod>
|
||||
struct PriVarOscilationThreshold<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1e-5;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct ProjectSaturations<TypeTag, TTag::NewtonMethod> { static constexpr bool value = false; };
|
||||
struct ProjectSaturations<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct MaxTemperatureChange<TypeTag, TTag::NewtonMethod>
|
||||
struct MaxTemperatureChange<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 5; //Kelvin
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct TemperatureMax<TypeTag, TTag::NewtonMethod>
|
||||
struct TemperatureMax<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e9; //Kelvin
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1e9; // Kelvin
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct TemperatureMin<TypeTag, TTag::NewtonMethod>
|
||||
struct TemperatureMin<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 0.0; //Kelvin
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 0.0; // Kelvin
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct PressureMax<TypeTag, TTag::NewtonMethod>
|
||||
struct PressureMax<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e99; //Kelvin
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1e99; // Kelvin
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct PressureMin<TypeTag, TTag::NewtonMethod>
|
||||
struct PressureMin<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = -1e99; //Kelvin
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = -1e99; // Kelvin
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct MaximumWaterSaturation<TypeTag, TTag::NewtonMethod>
|
||||
struct MaximumWaterSaturation<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct WaterOnlyThreshold<TypeTag, TTag::NewtonMethod>
|
||||
struct WaterOnlyThreshold<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
} // namespace Opm::Properties
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -155,17 +150,17 @@ class BlackOilNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonM
|
||||
public:
|
||||
BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
{
|
||||
priVarOscilationThreshold_ = Parameters::get<TypeTag, Properties::PriVarOscilationThreshold>();
|
||||
dpMaxRel_ = Parameters::get<TypeTag, Properties::DpMaxRel>();
|
||||
dsMax_ = Parameters::get<TypeTag, Properties::DsMax>();
|
||||
projectSaturations_ = Parameters::get<TypeTag, Properties::ProjectSaturations>();
|
||||
maxTempChange_ = Parameters::get<TypeTag, Properties::MaxTemperatureChange>();
|
||||
tempMax_ = Parameters::get<TypeTag, Properties::TemperatureMax>();
|
||||
tempMin_ = Parameters::get<TypeTag, Properties::TemperatureMin>();
|
||||
pressMax_ = Parameters::get<TypeTag, Properties::PressureMax>();
|
||||
pressMin_ = Parameters::get<TypeTag, Properties::PressureMin>();
|
||||
waterSaturationMax_ = Parameters::get<TypeTag, Properties::MaximumWaterSaturation>();
|
||||
waterOnlyThreshold_ = Parameters::get<TypeTag, Properties::WaterOnlyThreshold>();
|
||||
priVarOscilationThreshold_ = Parameters::get<TypeTag, Parameters::PriVarOscilationThreshold>();
|
||||
dpMaxRel_ = Parameters::get<TypeTag, Parameters::DpMaxRel>();
|
||||
dsMax_ = Parameters::get<TypeTag, Parameters::DsMax>();
|
||||
projectSaturations_ = Parameters::get<TypeTag, Parameters::ProjectSaturations>();
|
||||
maxTempChange_ = Parameters::get<TypeTag, Parameters::MaxTemperatureChange>();
|
||||
tempMax_ = Parameters::get<TypeTag, Parameters::TemperatureMax>();
|
||||
tempMin_ = Parameters::get<TypeTag, Parameters::TemperatureMin>();
|
||||
pressMax_ = Parameters::get<TypeTag, Parameters::PressureMax>();
|
||||
pressMin_ = Parameters::get<TypeTag, Parameters::PressureMin>();
|
||||
waterSaturationMax_ = Parameters::get<TypeTag, Parameters::MaximumWaterSaturation>();
|
||||
waterOnlyThreshold_ = Parameters::get<TypeTag, Parameters::WaterOnlyThreshold>();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -186,28 +181,28 @@ public:
|
||||
{
|
||||
ParentType::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::DpMaxRel>
|
||||
Parameters::registerParam<TypeTag, Parameters::DpMaxRel>
|
||||
("Maximum relative change of pressure in a single iteration");
|
||||
Parameters::registerParam<TypeTag, Properties::DsMax>
|
||||
Parameters::registerParam<TypeTag, Parameters::DsMax>
|
||||
("Maximum absolute change of any saturation in a single iteration");
|
||||
Parameters::registerParam<TypeTag, Properties::PriVarOscilationThreshold>
|
||||
Parameters::registerParam<TypeTag, Parameters::PriVarOscilationThreshold>
|
||||
("The threshold value for the primary variable switching conditions "
|
||||
"after its meaning has switched to hinder oscilations");
|
||||
Parameters::registerParam<TypeTag, Properties::ProjectSaturations>
|
||||
Parameters::registerParam<TypeTag, Parameters::ProjectSaturations>
|
||||
("Option for doing saturation projection");
|
||||
Parameters::registerParam<TypeTag, Properties::MaxTemperatureChange>
|
||||
Parameters::registerParam<TypeTag, Parameters::MaxTemperatureChange>
|
||||
("Maximum absolute change of temperature in a single iteration");
|
||||
Parameters::registerParam<TypeTag, Properties::TemperatureMax>
|
||||
Parameters::registerParam<TypeTag, Parameters::TemperatureMax>
|
||||
("Maximum absolute temperature");
|
||||
Parameters::registerParam<TypeTag, Properties::TemperatureMin>
|
||||
Parameters::registerParam<TypeTag, Parameters::TemperatureMin>
|
||||
("Minimum absolute temperature");
|
||||
Parameters::registerParam<TypeTag, Properties::PressureMax>
|
||||
Parameters::registerParam<TypeTag, Parameters::PressureMax>
|
||||
("Maximum absolute pressure");
|
||||
Parameters::registerParam<TypeTag, Properties::PressureMin>
|
||||
Parameters::registerParam<TypeTag, Parameters::PressureMin>
|
||||
("Minimum absolute pressure");
|
||||
Parameters::registerParam<TypeTag, Properties::MaximumWaterSaturation>
|
||||
Parameters::registerParam<TypeTag, Parameters::MaximumWaterSaturation>
|
||||
("Maximum water saturation");
|
||||
Parameters::registerParam<TypeTag, Properties::WaterOnlyThreshold>
|
||||
Parameters::registerParam<TypeTag, Parameters::WaterOnlyThreshold>
|
||||
("Cells with water saturation above or equal is considered one-phase water only");
|
||||
}
|
||||
|
||||
|
70
opm/models/blackoil/blackoilnewtonmethodparameters.hh
Normal file
70
opm/models/blackoil/blackoilnewtonmethodparameters.hh
Normal file
@ -0,0 +1,70 @@
|
||||
// -*- 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
|
||||
*
|
||||
* \copydoc Opm::BlackOilNewtonMethod
|
||||
*/
|
||||
#ifndef EWOMS_BLACK_OIL_NEWTON_METHOD_PARAMETERS_HH
|
||||
#define EWOMS_BLACK_OIL_NEWTON_METHOD_PARAMETERS_HH
|
||||
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DpMaxRel { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DsMax { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PriVarOscilationThreshold { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ProjectSaturations { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaxTemperatureChange { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct TemperatureMax { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct TemperatureMin { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PressureMax { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PressureMin { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaximumWaterSaturation { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct WaterOnlyThreshold { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
#endif
|
@ -24,46 +24,36 @@
|
||||
#ifndef EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH
|
||||
#define EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH
|
||||
|
||||
#include "blackoilproperties.hh"
|
||||
#include "blackoilsolventmodules.hh"
|
||||
#include "blackoilextbomodules.hh"
|
||||
#include "blackoilpolymermodules.hh"
|
||||
#include "blackoilenergymodules.hh"
|
||||
#include "blackoilfoammodules.hh"
|
||||
#include "blackoilbrinemodules.hh"
|
||||
#include "blackoilmicpmodules.hh"
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
#include <opm/material/constraintsolvers/NcpFlash.hpp>
|
||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidstates/SimpleModularFluidState.hpp>
|
||||
|
||||
#include <opm/models/blackoil/blackoilbrinemodules.hh>
|
||||
#include <opm/models/blackoil/blackoilenergymodules.hh>
|
||||
#include <opm/models/blackoil/blackoilextbomodules.hh>
|
||||
#include <opm/models/blackoil/blackoilfoammodules.hh>
|
||||
#include <opm/models/blackoil/blackoilmicpmodules.hh>
|
||||
#include <opm/models/blackoil/blackoilpolymermodules.hh>
|
||||
#include <opm/models/blackoil/blackoilproperties.hh>
|
||||
#include <opm/models/blackoil/blackoilsolventmodules.hh>
|
||||
|
||||
#include <opm/models/discretization/common/fvbaseprimaryvariables.hh>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
namespace Opm::Parameters {
|
||||
|
||||
#include <opm/material/constraintsolvers/NcpFlash.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidstates/SimpleModularFluidState.hpp>
|
||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
|
||||
namespace Opm::Properties {
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PressureScale {
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
}
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PressureScale {
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
template <class TypeTag, bool enableSolvent>
|
||||
class BlackOilSolventModule;
|
||||
|
||||
template <class TypeTag, bool enableExtbo>
|
||||
class BlackOilExtboModule;
|
||||
|
||||
template <class TypeTag, bool enablePolymer>
|
||||
class BlackOilPolymerModule;
|
||||
|
||||
template <class TypeTag, bool enableBrine>
|
||||
class BlackOilBrineModule;
|
||||
|
||||
/*!
|
||||
* \ingroup BlackOilModel
|
||||
@ -147,6 +137,7 @@ public:
|
||||
Pg, // gas pressure
|
||||
Pw, // water pressure
|
||||
};
|
||||
|
||||
enum class GasMeaning {
|
||||
Sg, // gas saturation
|
||||
Rs, // dissolved gas in oil
|
||||
@ -212,12 +203,12 @@ public:
|
||||
static void init()
|
||||
{
|
||||
// TODO: these parameters have undocumented non-trivial dependencies
|
||||
pressureScale_ = Parameters::get<TypeTag, Properties::PressureScale>();
|
||||
pressureScale_ = Parameters::get<TypeTag, Parameters::PressureScale>();
|
||||
}
|
||||
|
||||
static void registerParameters()
|
||||
{
|
||||
Parameters::registerParam<TypeTag, Properties::PressureScale>
|
||||
Parameters::registerParam<TypeTag, Parameters::PressureScale>
|
||||
("Scaling of pressure primary variable");
|
||||
}
|
||||
|
||||
@ -1158,7 +1149,6 @@ private:
|
||||
static inline Scalar pressureScale_ = 1.0;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif
|
||||
|
@ -28,12 +28,13 @@
|
||||
#ifndef OPM_DIFFUSION_MODULE_HH
|
||||
#define OPM_DIFFUSION_MODULE_HH
|
||||
|
||||
#include <opm/models/discretization/common/fvbaseproperties.hh>
|
||||
#include <opm/models/common/quantitycallbacks.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
#include <opm/models/common/quantitycallbacks.hh>
|
||||
#include <opm/models/discretization/common/fvbaseproperties.hh>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
|
@ -29,12 +29,14 @@
|
||||
#ifndef EWOMS_ENERGY_MODULE_HH
|
||||
#define EWOMS_ENERGY_MODULE_HH
|
||||
|
||||
#include <opm/models/discretization/common/fvbaseproperties.hh>
|
||||
#include <opm/models/common/quantitycallbacks.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
#include <opm/models/common/quantitycallbacks.hh>
|
||||
|
||||
#include <opm/models/discretization/common/fvbaseproperties.hh>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -58,8 +58,6 @@ namespace TTag {
|
||||
struct FiniteDifferenceLocalLinearizer {};
|
||||
} // namespace TTag
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NumericDifferenceMethod { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct BaseEpsilon { using type = UndefinedProperty; };
|
||||
|
||||
@ -72,16 +70,6 @@ template<class TypeTag>
|
||||
struct Evaluation<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
|
||||
{ using type = GetPropType<TypeTag, Properties::Scalar>; };
|
||||
|
||||
/*!
|
||||
* \brief Specify which kind of method should be used to numerically
|
||||
* calculate the partial derivatives of the residual.
|
||||
*
|
||||
* -1 means backward differences, 0 means central differences, 1 means
|
||||
* forward differences. By default we use central differences.
|
||||
*/
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::FiniteDifferenceLocalLinearizer> { static constexpr int value = +1; };
|
||||
|
||||
//! The base epsilon value for finite difference calculations
|
||||
template<class TypeTag>
|
||||
struct BaseEpsilon<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
|
||||
@ -92,6 +80,24 @@ struct BaseEpsilon<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NumericDifferenceMethod { using type = Properties::UndefinedProperty; };
|
||||
|
||||
/*!
|
||||
* \brief Specify which kind of method should be used to numerically
|
||||
* calculate the partial derivatives of the residual.
|
||||
*
|
||||
* -1 means backward differences, 0 means central differences, 1 means
|
||||
* forward differences. By default we use forward differences.
|
||||
*/
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, Properties::TTag::FiniteDifferenceLocalLinearizer>
|
||||
{ static constexpr int value = +1; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
||||
/*!
|
||||
@ -182,7 +188,7 @@ public:
|
||||
*/
|
||||
static void registerParameters()
|
||||
{
|
||||
Parameters::registerParam<TypeTag, Properties::NumericDifferenceMethod>
|
||||
Parameters::registerParam<TypeTag, Parameters::NumericDifferenceMethod>
|
||||
("The method used for numeric differentiation (-1: backward "
|
||||
"differences, 0: central differences, 1: forward differences)");
|
||||
}
|
||||
@ -335,7 +341,10 @@ protected:
|
||||
* \brief Returns the numeric difference method which is applied.
|
||||
*/
|
||||
static int numericDifferenceMethod_()
|
||||
{ return Parameters::get<TypeTag, Properties::NumericDifferenceMethod>(); }
|
||||
{
|
||||
static int diff = Parameters::get<TypeTag, Parameters::NumericDifferenceMethod>();
|
||||
return diff;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Resize all internal attributes to the size of the
|
||||
|
@ -28,8 +28,9 @@
|
||||
#ifndef TPFA_LINEARIZER_HH
|
||||
#define TPFA_LINEARIZER_HH
|
||||
|
||||
#include "fvbaseproperties.hh"
|
||||
#include "linearizationtype.hh"
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
@ -40,27 +41,24 @@
|
||||
#include <opm/input/eclipse/Schedule/BCProp.hpp>
|
||||
|
||||
#include <opm/models/discretization/common/baseauxiliarymodule.hh>
|
||||
#include <opm/models/discretization/common/fvbaseproperties.hh>
|
||||
#include <opm/models/discretization/common/linearizationtype.hh>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
|
||||
#include <type_traits>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
#include <set>
|
||||
#include <exception> // current_exception, rethrow_exception
|
||||
#include <mutex>
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
#include <set>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm::Properties {
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct SeparateSparseSourceTerms {
|
||||
using type = bool;
|
||||
static constexpr type value = false;
|
||||
};
|
||||
}
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct SeparateSparseSourceTerms {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -122,7 +120,7 @@ public:
|
||||
: jacobian_()
|
||||
{
|
||||
simulatorPtr_ = 0;
|
||||
separateSparseSourceTerms_ = Parameters::get<TypeTag, Properties::SeparateSparseSourceTerms>();
|
||||
separateSparseSourceTerms_ = Parameters::get<TypeTag, Parameters::SeparateSparseSourceTerms>();
|
||||
}
|
||||
|
||||
~TpfaLinearizer()
|
||||
@ -134,7 +132,7 @@ public:
|
||||
*/
|
||||
static void registerParameters()
|
||||
{
|
||||
Parameters::registerParam<TypeTag, Properties::SeparateSparseSourceTerms>
|
||||
Parameters::registerParam<TypeTag, Parameters::SeparateSparseSourceTerms>
|
||||
("Treat well source terms all in one go, instead of on a cell by cell basis.");
|
||||
}
|
||||
|
||||
|
@ -28,17 +28,18 @@
|
||||
#ifndef EWOMS_FLASH_INTENSIVE_QUANTITIES_HH
|
||||
#define EWOMS_FLASH_INTENSIVE_QUANTITIES_HH
|
||||
|
||||
#include "flashproperties.hh"
|
||||
#include "flashindices.hh"
|
||||
|
||||
#include <opm/models/common/energymodule.hh>
|
||||
#include <opm/models/common/diffusionmodule.hh>
|
||||
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
|
||||
#include <opm/models/common/diffusionmodule.hh>
|
||||
#include <opm/models/common/energymodule.hh>
|
||||
|
||||
#include <opm/models/flash/flashindices.hh>
|
||||
#include <opm/models/flash/flashparameters.hh>
|
||||
#include <opm/models/flash/flashproperties.hh>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -106,7 +107,7 @@ public:
|
||||
|
||||
const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
|
||||
const auto& problem = elemCtx.problem();
|
||||
Scalar flashTolerance = Parameters::get<TypeTag, Properties::FlashTolerance>();
|
||||
Scalar flashTolerance = Parameters::get<TypeTag, Parameters::FlashTolerance>();
|
||||
|
||||
// extract the total molar densities of the components
|
||||
ComponentVector cTotal;
|
||||
|
@ -28,25 +28,29 @@
|
||||
#ifndef EWOMS_FLASH_MODEL_HH
|
||||
#define EWOMS_FLASH_MODEL_HH
|
||||
|
||||
#include <opm/material/constraintsolvers/NcpFlash.hpp>
|
||||
|
||||
#include <opm/material/densead/Math.hpp>
|
||||
|
||||
#include "flashproperties.hh"
|
||||
#include "flashprimaryvariables.hh"
|
||||
#include "flashlocalresidual.hh"
|
||||
#include "flashratevector.hh"
|
||||
#include "flashboundaryratevector.hh"
|
||||
#include "flashintensivequantities.hh"
|
||||
#include "flashextensivequantities.hh"
|
||||
#include "flashindices.hh"
|
||||
|
||||
#include <opm/models/common/multiphasebasemodel.hh>
|
||||
#include <opm/models/common/energymodule.hh>
|
||||
#include <opm/models/io/vtkcompositionmodule.hh>
|
||||
#include <opm/models/io/vtkenergymodule.hh>
|
||||
#include <opm/models/io/vtkdiffusionmodule.hh>
|
||||
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/constraintsolvers/NcpFlash.hpp>
|
||||
|
||||
#include <opm/models/common/energymodule.hh>
|
||||
#include <opm/models/common/multiphasebasemodel.hh>
|
||||
|
||||
#include <opm/models/flash/flashboundaryratevector.hh>
|
||||
#include <opm/models/flash/flashextensivequantities.hh>
|
||||
#include <opm/models/flash/flashindices.hh>
|
||||
#include <opm/models/flash/flashintensivequantities.hh>
|
||||
#include <opm/models/flash/flashlocalresidual.hh>
|
||||
#include <opm/models/flash/flashparameters.hh>
|
||||
#include <opm/models/flash/flashproperties.hh>
|
||||
#include <opm/models/flash/flashprimaryvariables.hh>
|
||||
#include <opm/models/flash/flashratevector.hh>
|
||||
|
||||
#include <opm/models/io/vtkcompositionmodule.hh>
|
||||
#include <opm/models/io/vtkdiffusionmodule.hh>
|
||||
#include <opm/models/io/vtkenergymodule.hh>
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@ -76,14 +80,6 @@ struct FlashSolver<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::NcpFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
//! Let the flash solver choose its tolerance by default
|
||||
template<class TypeTag>
|
||||
struct FlashTolerance<TypeTag, TTag::FlashModel>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = -1.0;
|
||||
};
|
||||
|
||||
//! the Model property
|
||||
template<class TypeTag>
|
||||
struct Model<TypeTag, TTag::FlashModel> { using type = Opm::FlashModel<TypeTag>; };
|
||||
@ -137,6 +133,14 @@ template<class TypeTag>
|
||||
struct EnableThermodynamicHints<TypeTag, Properties::TTag::FlashModel>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
//! Let the flash solver choose its tolerance by default
|
||||
template<class TypeTag>
|
||||
struct FlashTolerance<TypeTag, Properties::TTag::FlashModel>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = -1.0;
|
||||
};
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
@ -240,7 +244,7 @@ public:
|
||||
if (enableEnergy)
|
||||
Opm::VtkEnergyModule<TypeTag>::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::FlashTolerance>
|
||||
Parameters::registerParam<TypeTag, Parameters::FlashTolerance>
|
||||
("The maximum tolerance for the flash solver to "
|
||||
"consider the solution converged");
|
||||
}
|
||||
|
43
opm/models/flash/flashparameters.hh
Normal file
43
opm/models/flash/flashparameters.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 FlashModel
|
||||
*
|
||||
* \brief Declares the parameters for the compositional
|
||||
* multi-phase model based on flash calculations.
|
||||
*/
|
||||
#ifndef EWOMS_FLASH_PARAMETERS_HH
|
||||
#define EWOMS_FLASH_PARAMETERS_HH
|
||||
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! The maximum accepted error of the flash solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashTolerance { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
#endif
|
@ -30,19 +30,13 @@
|
||||
#ifndef EWOMS_FLASH_PROPERTIES_HH
|
||||
#define EWOMS_FLASH_PROPERTIES_HH
|
||||
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
#include <opm/models/io/vtkcompositionmodule.hh>
|
||||
#include <opm/models/io/vtkenergymodule.hh>
|
||||
#include <opm/models/io/vtkdiffusionmodule.hh>
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
//! The type of the flash constraint solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashSolver { using type = UndefinedProperty; };
|
||||
//! The maximum accepted error of the flash solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashTolerance { using type = UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
|
@ -27,12 +27,15 @@
|
||||
#ifndef EWOMS_SIMPLEX_GRID_VANGUARD_HH
|
||||
#define EWOMS_SIMPLEX_GRID_VANGUARD_HH
|
||||
|
||||
#include <opm/models/utils/basicproperties.hh>
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
#include <opm/models/utils/parametersystem.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <dune/grid/utility/structuredgridfactory.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <opm/models/io/basevanguard.hh>
|
||||
|
||||
#include <opm/models/utils/basicproperties.hh>
|
||||
#include <opm/models/utils/parametersystem.hh>
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -59,23 +62,23 @@ public:
|
||||
*/
|
||||
static void registerParameters()
|
||||
{
|
||||
Parameters::registerParam<TypeTag, Properties::GridGlobalRefinements>
|
||||
Parameters::registerParam<TypeTag, Parameters::GridGlobalRefinements>
|
||||
("The number of global refinements of the grid "
|
||||
"executed after it was loaded");
|
||||
Parameters::registerParam<TypeTag, Properties::DomainSizeX>
|
||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeX>
|
||||
("The size of the domain in x direction");
|
||||
Parameters::registerParam<TypeTag, Properties::CellsX>
|
||||
Parameters::registerParam<TypeTag, Parameters::CellsX>
|
||||
("The number of intervalls in x direction");
|
||||
if (dimWorld > 1) {
|
||||
Parameters::registerParam<TypeTag, Properties::DomainSizeY>
|
||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeY>
|
||||
("The size of the domain in y direction");
|
||||
Parameters::registerParam<TypeTag, Properties::CellsY>
|
||||
Parameters::registerParam<TypeTag, Parameters::CellsY>
|
||||
("The number of intervalls in y direction");
|
||||
}
|
||||
if (dimWorld > 2) {
|
||||
Parameters::registerParam<TypeTag, Properties::DomainSizeZ>
|
||||
Parameters::registerParam<TypeTag, Parameters::DomainSizeZ>
|
||||
("The size of the domain in z direction");
|
||||
Parameters::registerParam<TypeTag, Properties::CellsZ>
|
||||
Parameters::registerParam<TypeTag, Parameters::CellsZ>
|
||||
("The number of intervalls in z direction");
|
||||
}
|
||||
}
|
||||
@ -91,24 +94,24 @@ public:
|
||||
GlobalPosition lowerLeft;
|
||||
|
||||
lowerLeft[0] = 0.0;
|
||||
upperRight[0] = Parameters::get<TypeTag, Properties::DomainSizeX>();
|
||||
cellRes[0] = Parameters::get<TypeTag, Properties::CellsX>();
|
||||
upperRight[0] = Parameters::get<TypeTag, Parameters::DomainSizeX>();
|
||||
cellRes[0] = Parameters::get<TypeTag, Parameters::CellsX>();
|
||||
if (dimWorld > 1) {
|
||||
lowerLeft[1] = 0.0;
|
||||
upperRight[1] = Parameters::get<TypeTag, Properties::DomainSizeY>();
|
||||
cellRes[1] = Parameters::get<TypeTag, Properties::CellsY>();
|
||||
upperRight[1] = Parameters::get<TypeTag, Parameters::DomainSizeY>();
|
||||
cellRes[1] = Parameters::get<TypeTag, Parameters::CellsY>();
|
||||
}
|
||||
if (dimWorld > 2) {
|
||||
lowerLeft[2] = 0.0;
|
||||
upperRight[2] = Parameters::get<TypeTag, Properties::DomainSizeZ>();
|
||||
cellRes[2] = Parameters::get<TypeTag, Properies::CellsZ>();
|
||||
upperRight[2] = Parameters::get<TypeTag, Parameters::DomainSizeZ>();
|
||||
cellRes[2] = Parameters::get<TypeTag, Parameters::CellsZ>();
|
||||
}
|
||||
|
||||
simplexGrid_ = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft,
|
||||
upperRight,
|
||||
cellRes);
|
||||
|
||||
unsigned numRefinments = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
|
||||
unsigned numRefinments = Parameters::get<TypeTag, Parameters::GridGlobalRefinements>();
|
||||
simplexGrid_->globalRefine(numRefinments);
|
||||
|
||||
this->finalizeInit_();
|
||||
|
@ -52,10 +52,10 @@ class UnstructuredGridVanguard : public BaseVanguard<TypeTag> {
|
||||
* unstructured grid simulator vanguard.
|
||||
*/
|
||||
static void registerParameters() {
|
||||
Parameters::registerParam<TypeTag, Properties::GridGlobalRefinements>
|
||||
Parameters::registerParam<TypeTag, Parameters::GridGlobalRefinements>
|
||||
("The number of global refinements of the grid "
|
||||
"executed after it was loaded");
|
||||
Parameters::registerParam<TypeTag, Properties::GridFile>,
|
||||
Parameters::registerParam<TypeTag, Parameters::GridFile>,
|
||||
("The file name of the file to load");
|
||||
}
|
||||
|
||||
@ -64,8 +64,8 @@ class UnstructuredGridVanguard : public BaseVanguard<TypeTag> {
|
||||
*/
|
||||
UnstructuredGridVanguard(Simulator& simulator) : ParentType(simulator){
|
||||
#ifdef HAVE_OPM_GRID
|
||||
const std::string gridFileName = Parameters::get<TypeTag, Properties::GridFile>();
|
||||
unsigned numRefinments = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
|
||||
const std::string gridFileName = Parameters::get<TypeTag, Parameters::GridFile>();
|
||||
unsigned numRefinments = Parameters::get<TypeTag, Parameters::GridGlobalRefinements>();
|
||||
|
||||
const char* c_str = gridFileName.c_str();
|
||||
|
||||
|
@ -28,17 +28,20 @@
|
||||
#ifndef OPM_FLASH_INTENSIVE_QUANTITIES_HH
|
||||
#define OPM_FLASH_INTENSIVE_QUANTITIES_HH
|
||||
|
||||
#include "flashproperties.hh"
|
||||
#include "flashindices.hh"
|
||||
#include <dune/common/fmatrix.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
#include <opm/material/Constants.hpp>
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
|
||||
#include <opm/models/common/energymodule.hh>
|
||||
#include <opm/models/common/diffusionmodule.hh>
|
||||
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
#include <opm/models/flash/flashproperties.hh>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
#include <opm/models/ptflash/flashindices.hh>
|
||||
#include <opm/models/ptflash/flashparameters.hh>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -107,9 +110,9 @@ public:
|
||||
const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
|
||||
const auto& problem = elemCtx.problem();
|
||||
|
||||
const Scalar flashTolerance = Parameters::get<TypeTag, Properties::FlashTolerance>();
|
||||
const int flashVerbosity = Parameters::get<TypeTag, Properties::FlashVerbosity>();
|
||||
const std::string flashTwoPhaseMethod = Parameters::get<TypeTag, Properties::FlashTwoPhaseMethod>();
|
||||
const Scalar flashTolerance = Parameters::get<TypeTag, Parameters::FlashTolerance>();
|
||||
const int flashVerbosity = Parameters::get<TypeTag, Parameters::FlashVerbosity>();
|
||||
const std::string flashTwoPhaseMethod = Parameters::get<TypeTag, Parameters::FlashTwoPhaseMethod>();
|
||||
|
||||
// extract the total molar densities of the components
|
||||
ComponentVector z(0.);
|
||||
|
@ -28,34 +28,41 @@
|
||||
#ifndef OPM_PTFLASH_MODEL_HH
|
||||
#define OPM_PTFLASH_MODEL_HH
|
||||
|
||||
#include <opm/material/constraintsolvers/PTFlash.hpp>
|
||||
|
||||
#include <opm/material/densead/Math.hpp>
|
||||
|
||||
#include "flashproperties.hh"
|
||||
#include "flashprimaryvariables.hh"
|
||||
#include "flashlocalresidual.hh"
|
||||
#include <opm/models/flash/flashratevector.hh>
|
||||
#include <opm/models/flash/flashboundaryratevector.hh>
|
||||
#include "flashintensivequantities.hh"
|
||||
#include <opm/models/flash/flashextensivequantities.hh>
|
||||
#include "flashindices.hh"
|
||||
#include "flashnewtonmethod.hh"
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
|
||||
|
||||
#include <opm/models/common/multiphasebasemodel.hh>
|
||||
#include <opm/models/common/energymodule.hh>
|
||||
|
||||
#include <opm/models/flash/flashratevector.hh>
|
||||
#include <opm/models/flash/flashboundaryratevector.hh>
|
||||
#include <opm/models/flash/flashextensivequantities.hh>
|
||||
#include <opm/models/flash/flashproperties.hh>
|
||||
|
||||
#include <opm/models/io/vtkcompositionmodule.hh>
|
||||
#include <opm/models/io/vtkenergymodule.hh>
|
||||
#include <opm/models/io/vtkdiffusionmodule.hh>
|
||||
#include <opm/models/io/vtkenergymodule.hh>
|
||||
#include <opm/models/io/vtkptflashmodule.hh>
|
||||
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/constraintsolvers/PTFlash.hpp>
|
||||
|
||||
#include <opm/models/ptflash/flashindices.hh>
|
||||
#include <opm/models/ptflash/flashintensivequantities.hh>
|
||||
#include <opm/models/ptflash/flashlocalresidual.hh>
|
||||
#include <opm/models/ptflash/flashnewtonmethod.hh>
|
||||
#include <opm/models/ptflash/flashparameters.hh>
|
||||
#include <opm/models/ptflash/flashprimaryvariables.hh>
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
template <class TypeTag>
|
||||
class FlashModel;
|
||||
|
||||
}
|
||||
|
||||
namespace Opm::Properties {
|
||||
@ -71,69 +78,66 @@ struct FlashModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
|
||||
//! Use the FlashLocalResidual function for the flash model
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::FlashModel> { using type = Opm::FlashLocalResidual<TypeTag>; };
|
||||
struct LocalResidual<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the PT flash specific newton method for the flash model
|
||||
template<class TypeTag>
|
||||
struct NewtonMethod<TypeTag, TTag::FlashModel> { using type = Opm::FlashNewtonMethod<TypeTag>; };
|
||||
struct NewtonMethod<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashNewtonMethod<TypeTag>; };
|
||||
|
||||
//! Use the Pt flash solver by default
|
||||
template<class TypeTag>
|
||||
struct FlashSolver<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::PTFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>; };
|
||||
|
||||
//! Let the flash solver choose its tolerance by default
|
||||
template<class TypeTag>
|
||||
struct FlashTolerance<TypeTag, TTag::FlashModel>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1.e-12;
|
||||
using type = Opm::PTFlash<GetPropType<TypeTag, Properties::Scalar>,
|
||||
GetPropType<TypeTag, Properties::FluidSystem>>;
|
||||
};
|
||||
|
||||
// Flash solver verbosity
|
||||
template<class TypeTag>
|
||||
struct FlashVerbosity<TypeTag, TTag::FlashModel> { static constexpr int value = 0; };
|
||||
|
||||
// Flash two-phase method
|
||||
template<class TypeTag>
|
||||
struct FlashTwoPhaseMethod<TypeTag, TTag::FlashModel> { static constexpr auto value = "ssi"; };
|
||||
|
||||
//! the Model property
|
||||
template<class TypeTag>
|
||||
struct Model<TypeTag, TTag::FlashModel> { using type = Opm::FlashModel<TypeTag>; };
|
||||
struct Model<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashModel<TypeTag>; };
|
||||
|
||||
//! the PrimaryVariables property
|
||||
template<class TypeTag>
|
||||
struct PrimaryVariables<TypeTag, TTag::FlashModel> { using type = Opm::FlashPrimaryVariables<TypeTag>; };
|
||||
struct PrimaryVariables<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashPrimaryVariables<TypeTag>; };
|
||||
|
||||
//! the RateVector property
|
||||
template<class TypeTag>
|
||||
struct RateVector<TypeTag, TTag::FlashModel> { using type = Opm::FlashRateVector<TypeTag>; };
|
||||
struct RateVector<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashRateVector<TypeTag>; };
|
||||
|
||||
//! the BoundaryRateVector property
|
||||
template<class TypeTag>
|
||||
struct BoundaryRateVector<TypeTag, TTag::FlashModel> { using type = Opm::FlashBoundaryRateVector<TypeTag>; };
|
||||
struct BoundaryRateVector<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashBoundaryRateVector<TypeTag>; };
|
||||
|
||||
//! the IntensiveQuantities property
|
||||
template<class TypeTag>
|
||||
struct IntensiveQuantities<TypeTag, TTag::FlashModel> { using type = Opm::FlashIntensiveQuantities<TypeTag>; };
|
||||
struct IntensiveQuantities<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashIntensiveQuantities<TypeTag>; };
|
||||
|
||||
//! the ExtensiveQuantities property
|
||||
template<class TypeTag>
|
||||
struct ExtensiveQuantities<TypeTag, TTag::FlashModel> { using type = Opm::FlashExtensiveQuantities<TypeTag>; };
|
||||
struct ExtensiveQuantities<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashExtensiveQuantities<TypeTag>; };
|
||||
|
||||
//! The indices required by the flash-baseed isothermal compositional model
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::FlashModel> { using type = Opm::FlashIndices<TypeTag, /*PVIdx=*/0>; };
|
||||
struct Indices<TypeTag, TTag::FlashModel>
|
||||
{ using type = Opm::FlashIndices<TypeTag, /*PVIdx=*/0>; };
|
||||
|
||||
// disable molecular diffusion by default
|
||||
template<class TypeTag>
|
||||
struct EnableDiffusion<TypeTag, TTag::FlashModel> { static constexpr bool value = false; };
|
||||
struct EnableDiffusion<TypeTag, TTag::FlashModel>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
//! Disable the energy equation by default
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::FlashModel> { static constexpr bool value = false; };
|
||||
struct EnableEnergy<TypeTag, TTag::FlashModel>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
@ -152,6 +156,24 @@ template<class TypeTag>
|
||||
struct EnableThermodynamicHints<TypeTag, Properties::TTag::FlashModel>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
//! Let the flash solver choose its tolerance by default
|
||||
template<class TypeTag>
|
||||
struct FlashTolerance<TypeTag, Properties::TTag::FlashModel>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1.e-12;
|
||||
};
|
||||
|
||||
// Flash two-phase method
|
||||
template<class TypeTag>
|
||||
struct FlashTwoPhaseMethod<TypeTag, Properties::TTag::FlashModel>
|
||||
{ static constexpr auto value = "ssi"; };
|
||||
|
||||
// Flash solver verbosity
|
||||
template<class TypeTag>
|
||||
struct FlashVerbosity<TypeTag, Properties::TTag::FlashModel>
|
||||
{ static constexpr int value = 0; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
@ -239,12 +261,12 @@ public:
|
||||
if (enableEnergy)
|
||||
Opm::VtkEnergyModule<TypeTag>::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::FlashTolerance>
|
||||
Parameters::registerParam<TypeTag, Parameters::FlashTolerance>
|
||||
("The maximum tolerance for the flash solver to "
|
||||
"consider the solution converged");
|
||||
Parameters::registerParam<TypeTag, Properties::FlashVerbosity>
|
||||
Parameters::registerParam<TypeTag, Parameters::FlashVerbosity>
|
||||
("Flash solver verbosity level");
|
||||
Parameters::registerParam<TypeTag, Properties::FlashTwoPhaseMethod>
|
||||
Parameters::registerParam<TypeTag, Parameters::FlashTwoPhaseMethod>
|
||||
("Method for solving vapor-liquid composition. Available options include: "
|
||||
"ssi, newton, ssi+newton");
|
||||
}
|
||||
|
@ -24,32 +24,26 @@
|
||||
* \file
|
||||
* \ingroup FlashModel
|
||||
*
|
||||
* \brief Declares the properties required by the compositional
|
||||
* \brief Declares the parameters for the compositional
|
||||
* multi-phase model based on flash calculations.
|
||||
*/
|
||||
#ifndef OPM_PTFLASH_PROPERTIES_HH
|
||||
#define OPM_PTFLASH_PROPERTIES_HH
|
||||
#ifndef EWOMS_PTFLASH_PARAMETERS_HH
|
||||
#define EWOMS_PTFLASH_PARAMETERS_HH
|
||||
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
#include <opm/models/io/vtkcompositionmodule.hh>
|
||||
#include <opm/models/io/vtkenergymodule.hh>
|
||||
#include <opm/models/io/vtkdiffusionmodule.hh>
|
||||
#include <opm/models/flash/flashparameters.hh>
|
||||
|
||||
namespace Opm::Properties {
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! The type of the flash constraint solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashSolver { using type = UndefinedProperty; };
|
||||
//! The maximum accepted error of the flash solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashTolerance { using type = UndefinedProperty; };
|
||||
//! The verbosity level of the flash solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashVerbosity { using type = UndefinedProperty; };
|
||||
//! Two-phase flash method
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashTwoPhaseMethod { using type = UndefinedProperty; };
|
||||
struct FlashTwoPhaseMethod { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
//! The verbosity level of the flash solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct FlashVerbosity { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
#endif
|
@ -28,29 +28,29 @@
|
||||
#ifndef EWOMS_PVS_MODEL_HH
|
||||
#define EWOMS_PVS_MODEL_HH
|
||||
|
||||
#include <opm/material/densead/Math.hpp>
|
||||
|
||||
#include "pvsproperties.hh"
|
||||
#include "pvslocalresidual.hh"
|
||||
#include "pvsnewtonmethod.hh"
|
||||
#include "pvsprimaryvariables.hh"
|
||||
#include "pvsratevector.hh"
|
||||
#include "pvsboundaryratevector.hh"
|
||||
#include "pvsintensivequantities.hh"
|
||||
#include "pvsextensivequantities.hh"
|
||||
#include "pvsindices.hh"
|
||||
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
|
||||
#include <opm/models/common/multiphasebasemodel.hh>
|
||||
#include <opm/material/densead/Math.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
|
||||
|
||||
#include <opm/models/common/diffusionmodule.hh>
|
||||
#include <opm/models/common/energymodule.hh>
|
||||
#include <opm/models/common/multiphasebasemodel.hh>
|
||||
|
||||
#include <opm/models/io/vtkcompositionmodule.hh>
|
||||
#include <opm/models/io/vtkenergymodule.hh>
|
||||
#include <opm/models/io/vtkdiffusionmodule.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/models/pvs/pvsboundaryratevector.hh>
|
||||
#include <opm/models/pvs/pvsextensivequantities.hh>
|
||||
#include <opm/models/pvs/pvsindices.hh>
|
||||
#include <opm/models/pvs/pvsintensivequantities.hh>
|
||||
#include <opm/models/pvs/pvslocalresidual.hh>
|
||||
#include <opm/models/pvs/pvsnewtonmethod.hh>
|
||||
#include <opm/models/pvs/pvsprimaryvariables.hh>
|
||||
#include <opm/models/pvs/pvsproperties.hh>
|
||||
#include <opm/models/pvs/pvsratevector.hh>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@ -65,61 +65,71 @@ class PvsModel;
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
|
||||
//! The type tag for the isothermal single phase problems
|
||||
struct PvsModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
VtkComposition,
|
||||
VtkPhasePresence,
|
||||
MultiPhaseBaseModel>; };
|
||||
struct PvsModel
|
||||
{
|
||||
using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
VtkComposition,
|
||||
VtkPhasePresence,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
||||
//! Use the PVS local jacobian operator for the PVS model
|
||||
template<class TypeTag>
|
||||
struct LocalResidual<TypeTag, TTag::PvsModel> { using type = Opm::PvsLocalResidual<TypeTag>; };
|
||||
struct LocalResidual<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsLocalResidual<TypeTag>; };
|
||||
|
||||
//! Use the PVS specific newton method for the PVS model
|
||||
template<class TypeTag>
|
||||
struct NewtonMethod<TypeTag, TTag::PvsModel> { using type = Opm::PvsNewtonMethod<TypeTag>; };
|
||||
struct NewtonMethod<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsNewtonMethod<TypeTag>; };
|
||||
|
||||
//! the Model property
|
||||
template<class TypeTag>
|
||||
struct Model<TypeTag, TTag::PvsModel> { using type = Opm::PvsModel<TypeTag>; };
|
||||
struct Model<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsModel<TypeTag>; };
|
||||
|
||||
//! the PrimaryVariables property
|
||||
template<class TypeTag>
|
||||
struct PrimaryVariables<TypeTag, TTag::PvsModel> { using type = Opm::PvsPrimaryVariables<TypeTag>; };
|
||||
struct PrimaryVariables<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsPrimaryVariables<TypeTag>; };
|
||||
|
||||
//! the RateVector property
|
||||
template<class TypeTag>
|
||||
struct RateVector<TypeTag, TTag::PvsModel> { using type = Opm::PvsRateVector<TypeTag>; };
|
||||
struct RateVector<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsRateVector<TypeTag>; };
|
||||
|
||||
//! the BoundaryRateVector property
|
||||
template<class TypeTag>
|
||||
struct BoundaryRateVector<TypeTag, TTag::PvsModel> { using type = Opm::PvsBoundaryRateVector<TypeTag>; };
|
||||
struct BoundaryRateVector<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsBoundaryRateVector<TypeTag>; };
|
||||
|
||||
//! the IntensiveQuantities property
|
||||
template<class TypeTag>
|
||||
struct IntensiveQuantities<TypeTag, TTag::PvsModel> { using type = Opm::PvsIntensiveQuantities<TypeTag>; };
|
||||
struct IntensiveQuantities<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsIntensiveQuantities<TypeTag>; };
|
||||
|
||||
//! the ExtensiveQuantities property
|
||||
template<class TypeTag>
|
||||
struct ExtensiveQuantities<TypeTag, TTag::PvsModel> { using type = Opm::PvsExtensiveQuantities<TypeTag>; };
|
||||
struct ExtensiveQuantities<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsExtensiveQuantities<TypeTag>; };
|
||||
|
||||
//! The indices required by the isothermal PVS model
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::PvsModel> { using type = Opm::PvsIndices<TypeTag, /*PVIdx=*/0>; };
|
||||
|
||||
// set the model to a medium verbosity
|
||||
template<class TypeTag>
|
||||
struct PvsVerbosity<TypeTag, TTag::PvsModel> { static constexpr int value = 1; };
|
||||
struct Indices<TypeTag, TTag::PvsModel>
|
||||
{ using type = Opm::PvsIndices<TypeTag, /*PVIdx=*/0>; };
|
||||
|
||||
//! Disable the energy equation by default
|
||||
template<class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::PvsModel> { static constexpr bool value = false; };
|
||||
struct EnableEnergy<TypeTag, TTag::PvsModel>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// disable molecular diffusion by default
|
||||
template<class TypeTag>
|
||||
struct EnableDiffusion<TypeTag, TTag::PvsModel> { static constexpr bool value = false; };
|
||||
struct EnableDiffusion<TypeTag, TTag::PvsModel>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
//! The basis value for the weight of the pressure primary variable
|
||||
template<class TypeTag>
|
||||
@ -147,6 +157,19 @@ struct PvsMoleFractionsBaseWeight<TypeTag, TTag::PvsModel>
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! The verbosity of the model (0 -> do not print anything, 2 -> spam stdout a lot)
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PvsVerbosity { using type = Properties::UndefinedProperty; };
|
||||
|
||||
// set the model to a medium verbosity
|
||||
template<class TypeTag>
|
||||
struct PvsVerbosity<TypeTag, Properties::TTag::PvsModel>
|
||||
{ static constexpr int value = 1; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
||||
/*!
|
||||
@ -275,7 +298,7 @@ public:
|
||||
PvsModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
verbosity_ = Parameters::get<TypeTag, Properties::PvsVerbosity>();
|
||||
verbosity_ = Parameters::get<TypeTag, Parameters::PvsVerbosity>();
|
||||
numSwitched_ = 0;
|
||||
}
|
||||
|
||||
@ -296,7 +319,7 @@ public:
|
||||
if (enableEnergy)
|
||||
Opm::VtkEnergyModule<TypeTag>::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::PvsVerbosity>
|
||||
Parameters::registerParam<TypeTag, Parameters::PvsVerbosity>
|
||||
("The verbosity level of the primary variable "
|
||||
"switching model");
|
||||
}
|
||||
|
@ -40,9 +40,6 @@
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
//! The verbosity of the model (0 -> do not print anything, 2 -> spam stdout a lot)
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PvsVerbosity { using type = UndefinedProperty; };
|
||||
//! The basis value for the weight of the pressure primary variable
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PvsPressureBaseWeight { using type = UndefinedProperty; };
|
||||
|
Loading…
Reference in New Issue
Block a user