changed: move the DomainSize(X|Y|Z) parameters to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving
2024-07-01 10:20:05 +02:00
parent 6b11559bf4
commit fdf0179c5a
10 changed files with 154 additions and 142 deletions

View File

@@ -53,7 +53,6 @@
#include <dune/common/fmatrix.hh>
#include <sstream>
#include <iostream>
#include <string>
namespace Opm {
@@ -224,28 +223,6 @@ struct Vanguard<TypeTag, TTag::CO2PTBaseProblem> {
using type = Opm::StructuredGridVanguard<TypeTag>;
};
//\Note: from the Julia code, the problem is a 1D problem with 3X1 cell.
//\Note: DomainSizeX is 3.0 meters
//\Note: DomainSizeY is 1.0 meters
template <class TypeTag>
struct DomainSizeX<TypeTag, TTag::CO2PTBaseProblem> {
using type = GetPropType<TypeTag, Scalar>;
static constexpr type value = 300; // meter
};
template <class TypeTag>
struct DomainSizeY<TypeTag, TTag::CO2PTBaseProblem> {
using type = GetPropType<TypeTag, Scalar>;
static constexpr type value = 1.0;
};
// DomainSizeZ is not needed, while to keep structuredgridvanguard.hh compile
template <class TypeTag>
struct DomainSizeZ<TypeTag, TTag::CO2PTBaseProblem> {
using type = GetPropType<TypeTag, Scalar>;
static constexpr type value = 1.0;
};
template<class TypeTag>
struct CellsX<TypeTag, TTag::CO2PTBaseProblem> { static constexpr unsigned value = 30; };
template<class TypeTag>
@@ -263,6 +240,31 @@ struct EnableEnergy<TypeTag, TTag::CO2PTBaseProblem> {
namespace Opm::Parameters {
//\Note: from the Julia code, the problem is a 1D problem with 3X1 cell.
//\Note: DomainSizeX is 3.0 meters
//\Note: DomainSizeY is 1.0 meters
template <class TypeTag>
struct DomainSizeX<TypeTag, Properties::TTag::CO2PTBaseProblem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 300; // meter
};
template <class TypeTag>
struct DomainSizeY<TypeTag, Properties::TTag::CO2PTBaseProblem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 1.0;
};
// DomainSizeZ is not needed, while to keep structuredgridvanguard.hh compile
template <class TypeTag>
struct DomainSizeZ<TypeTag, Properties::TTag::CO2PTBaseProblem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 1.0;
};
// The default for the end time of the simulation
template <class TypeTag>
struct EndTime<TypeTag, Properties::TTag::CO2PTBaseProblem>