changed: move the VtkPTFlashModule parameters to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving
2024-07-01 14:13:14 +02:00
parent 09ac67b736
commit 218960a71d
2 changed files with 26 additions and 24 deletions

View File

@@ -200,16 +200,6 @@ struct VtkWriteFugacityCoeffs<TypeTag, TTag::CO2PTBaseProblem> {
static constexpr bool value = true; static constexpr bool value = true;
}; };
template <class TypeTag>
struct VtkWriteLiquidMoleFractions<TypeTag, TTag::CO2PTBaseProblem> {
static constexpr bool value = true;
};
template <class TypeTag>
struct VtkWriteEquilibriumConstants<TypeTag, TTag::CO2PTBaseProblem> {
static constexpr bool value = true;
};
// this is kinds of telling the report step length // this is kinds of telling the report step length
template <class TypeTag> template <class TypeTag>
struct EpisodeLength<TypeTag, TTag::CO2PTBaseProblem> { struct EpisodeLength<TypeTag, TTag::CO2PTBaseProblem> {
@@ -309,6 +299,14 @@ template <class TypeTag>
struct NewtonMaxIterations<TypeTag, Properties::TTag::CO2PTBaseProblem> struct NewtonMaxIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
{ static constexpr int value = 30; }; { static constexpr int value = 30; };
template <class TypeTag>
struct VtkWriteEquilibriumConstants<TypeTag, Properties::TTag::CO2PTBaseProblem>
{ static constexpr bool value = true; };
template <class TypeTag>
struct VtkWriteLiquidMoleFractions<TypeTag, Properties::TTag::CO2PTBaseProblem>
{ static constexpr bool value = true; };
} // namespace Opm::Parameters } // namespace Opm::Parameters
namespace Opm { namespace Opm {

View File

@@ -37,28 +37,32 @@
#include <opm/models/utils/propertysystem.hh> #include <opm/models/utils/propertysystem.hh>
#include <opm/models/utils/parametersystem.hh> #include <opm/models/utils/parametersystem.hh>
namespace Opm::Properties { namespace Opm::Properties::TTag {
namespace TTag {
// create new type tag for the VTK PTFlash output // create new type tag for the VTK PTFlash output
struct VtkPTFlash {}; struct VtkPTFlash {};
} // namespace TTag } // namespace Opm::Properties::TTag
namespace Opm::Parameters {
// create the property tags needed for the composition module // create the property tags needed for the composition module
template<class TypeTag, class MyTypeTag> template<class TypeTag, class MyTypeTag>
struct VtkWriteLiquidMoleFractions { using type = UndefinedProperty; }; struct VtkWriteLiquidMoleFractions { using type = Properties::UndefinedProperty; };
template<class TypeTag, class MyTypeTag> template<class TypeTag, class MyTypeTag>
struct VtkWriteEquilibriumConstants { using type = UndefinedProperty; }; struct VtkWriteEquilibriumConstants { using type = Properties::UndefinedProperty; };
// set default values for what quantities to output // set default values for what quantities to output
template<class TypeTag> template<class TypeTag>
struct VtkWriteLiquidMoleFractions<TypeTag, TTag::VtkPTFlash> { static constexpr bool value = false; }; struct VtkWriteLiquidMoleFractions<TypeTag, Properties::TTag::VtkPTFlash>
template<class TypeTag> { static constexpr bool value = false; };
struct VtkWriteEquilibriumConstants<TypeTag, TTag::VtkPTFlash> { static constexpr bool value = false; };
} // namespace Opm::Properties template<class TypeTag>
struct VtkWriteEquilibriumConstants<TypeTag, Properties::TTag::VtkPTFlash>
{ static constexpr bool value = false; };
} // namespace Opm::Parameters
namespace Opm { namespace Opm {
@@ -101,9 +105,9 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
Parameters::registerParam<TypeTag, Properties::VtkWriteLiquidMoleFractions> Parameters::registerParam<TypeTag, Parameters::VtkWriteLiquidMoleFractions>
("Include liquid mole fractions (L) in the VTK output files"); ("Include liquid mole fractions (L) in the VTK output files");
Parameters::registerParam<TypeTag, Properties::VtkWriteEquilibriumConstants> Parameters::registerParam<TypeTag, Parameters::VtkWriteEquilibriumConstants>
("Include equilibrium constants (K) in the VTK output files"); ("Include equilibrium constants (K) in the VTK output files");
} }
@@ -164,13 +168,13 @@ public:
private: private:
static bool LOutput_() static bool LOutput_()
{ {
static bool val = Parameters::get<TypeTag, Properties::VtkWriteLiquidMoleFractions>(); static bool val = Parameters::get<TypeTag, Parameters::VtkWriteLiquidMoleFractions>();
return val; return val;
} }
static bool equilConstOutput_() static bool equilConstOutput_()
{ {
static bool val = Parameters::get<TypeTag, Properties::VtkWriteEquilibriumConstants>(); static bool val = Parameters::get<TypeTag, Parameters::VtkWriteEquilibriumConstants>();
return val; return val;
} }