changed: move the PressureScale parameter to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving 2024-07-01 14:13:14 +02:00
parent 023511962b
commit 88fc367633

View File

@ -24,46 +24,36 @@
#ifndef EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH #ifndef EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH
#define EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH #define EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH
#include "blackoilproperties.hh" #include <dune/common/fvector.hh>
#include "blackoilsolventmodules.hh"
#include "blackoilextbomodules.hh" #include <opm/material/common/Valgrind.hpp>
#include "blackoilpolymermodules.hh" #include <opm/material/constraintsolvers/NcpFlash.hpp>
#include "blackoilenergymodules.hh" #include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
#include "blackoilfoammodules.hh" #include <opm/material/fluidstates/CompositionalFluidState.hpp>
#include "blackoilbrinemodules.hh" #include <opm/material/fluidstates/SimpleModularFluidState.hpp>
#include "blackoilmicpmodules.hh"
#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 <opm/models/discretization/common/fvbaseprimaryvariables.hh>
#include <dune/common/fvector.hh> namespace Opm::Parameters {
#include <opm/material/constraintsolvers/NcpFlash.hpp> template<class TypeTag, class MyTypeTag>
#include <opm/material/fluidstates/CompositionalFluidState.hpp> struct PressureScale {
#include <opm/material/fluidstates/SimpleModularFluidState.hpp> using type = GetPropType<TypeTag, Properties::Scalar>;
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp> static constexpr type value = 1.0;
#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;
};
}
} // namespace Opm::Parameters
namespace Opm { 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 * \ingroup BlackOilModel
@ -147,6 +137,7 @@ public:
Pg, // gas pressure Pg, // gas pressure
Pw, // water pressure Pw, // water pressure
}; };
enum class GasMeaning { enum class GasMeaning {
Sg, // gas saturation Sg, // gas saturation
Rs, // dissolved gas in oil Rs, // dissolved gas in oil
@ -212,12 +203,12 @@ public:
static void init() static void init()
{ {
// TODO: these parameters have undocumented non-trivial dependencies // TODO: these parameters have undocumented non-trivial dependencies
pressureScale_ = Parameters::get<TypeTag, Properties::PressureScale>(); pressureScale_ = Parameters::get<TypeTag, Parameters::PressureScale>();
} }
static void registerParameters() static void registerParameters()
{ {
Parameters::registerParam<TypeTag, Properties::PressureScale> Parameters::registerParam<TypeTag, Parameters::PressureScale>
("Scaling of pressure primary variable"); ("Scaling of pressure primary variable");
} }
@ -1158,7 +1149,6 @@ private:
static inline Scalar pressureScale_ = 1.0; static inline Scalar pressureScale_ = 1.0;
}; };
} // namespace Opm } // namespace Opm
#endif #endif