move FlashTwoPhaseMethod to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving 2024-07-05 17:49:51 +02:00
parent 65db009152
commit d2096030e5
4 changed files with 4 additions and 11 deletions

View File

@ -112,7 +112,7 @@ public:
const Scalar flashTolerance = Parameters::Get<Parameters::FlashTolerance<Scalar>>(); const Scalar flashTolerance = Parameters::Get<Parameters::FlashTolerance<Scalar>>();
const int flashVerbosity = Parameters::get<TypeTag, Parameters::FlashVerbosity>(); const int flashVerbosity = Parameters::get<TypeTag, Parameters::FlashVerbosity>();
const std::string flashTwoPhaseMethod = Parameters::get<TypeTag, Parameters::FlashTwoPhaseMethod>(); const std::string flashTwoPhaseMethod = Parameters::Get<Parameters::FlashTwoPhaseMethod>();
// extract the total molar densities of the components // extract the total molar densities of the components
ComponentVector z(0.); ComponentVector z(0.);

View File

@ -156,11 +156,6 @@ template<class TypeTag>
struct EnableThermodynamicHints<TypeTag, Properties::TTag::FlashModel> struct EnableThermodynamicHints<TypeTag, Properties::TTag::FlashModel>
{ static constexpr bool value = true; }; { static constexpr bool value = true; };
// Flash two-phase method
template<class TypeTag>
struct FlashTwoPhaseMethod<TypeTag, Properties::TTag::FlashModel>
{ static constexpr auto value = "ssi"; };
// Flash solver verbosity // Flash solver verbosity
template<class TypeTag> template<class TypeTag>
struct FlashVerbosity<TypeTag, Properties::TTag::FlashModel> struct FlashVerbosity<TypeTag, Properties::TTag::FlashModel>
@ -258,7 +253,7 @@ public:
"consider the solution converged"); "consider the solution converged");
Parameters::registerParam<TypeTag, Parameters::FlashVerbosity> Parameters::registerParam<TypeTag, Parameters::FlashVerbosity>
("Flash solver verbosity level"); ("Flash solver verbosity level");
Parameters::registerParam<TypeTag, Parameters::FlashTwoPhaseMethod> Parameters::Register<Parameters::FlashTwoPhaseMethod>
("Method for solving vapor-liquid composition. Available options include: " ("Method for solving vapor-liquid composition. Available options include: "
"ssi, newton, ssi+newton"); "ssi, newton, ssi+newton");

View File

@ -37,8 +37,7 @@
namespace Opm::Parameters { namespace Opm::Parameters {
//! Two-phase flash method //! Two-phase flash method
template<class TypeTag, class MyTypeTag> struct FlashTwoPhaseMethod { static constexpr auto value = "ssi"; };
struct FlashTwoPhaseMethod { using type = Properties::UndefinedProperty; };
//! The verbosity level of the flash solver //! The verbosity level of the flash solver
template<class TypeTag, class MyTypeTag> template<class TypeTag, class MyTypeTag>

View File

@ -100,8 +100,7 @@ struct ParamInfo
return other.paramName == paramName return other.paramName == paramName
&& other.paramTypeName == paramTypeName && other.paramTypeName == paramTypeName
&& other.typeTagName == typeTagName && other.typeTagName == typeTagName
&& other.usageString == usageString && other.usageString == usageString;
&& other.compileTimeValue == compileTimeValue;
} }
}; };