mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: move the Cells(X|Y|Z) parameters to Opm::Parameters
This commit is contained in:
@@ -223,14 +223,6 @@ struct Vanguard<TypeTag, TTag::CO2PTBaseProblem> {
|
||||
using type = Opm::StructuredGridVanguard<TypeTag>;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::CO2PTBaseProblem> { static constexpr unsigned value = 30; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::CO2PTBaseProblem> { static constexpr unsigned value = 1; };
|
||||
// CellsZ is not needed, while to keep structuredgridvanguard.hh compile
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::CO2PTBaseProblem> { static constexpr unsigned value = 1; };
|
||||
|
||||
template <class TypeTag>
|
||||
struct EnableEnergy<TypeTag, TTag::CO2PTBaseProblem> {
|
||||
static constexpr bool value = false;
|
||||
@@ -240,6 +232,19 @@ struct EnableEnergy<TypeTag, TTag::CO2PTBaseProblem> {
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||
{ static constexpr unsigned value = 30; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
// CellsZ is not needed, while to keep structuredgridvanguard.hh compile
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
//\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
|
||||
@@ -512,7 +517,7 @@ public:
|
||||
{
|
||||
int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||
int inj = 0;
|
||||
int prod = Parameters::get<TypeTag, Properties::CellsX>() - 1;
|
||||
int prod = Parameters::get<TypeTag, Parameters::CellsX>() - 1;
|
||||
if (spatialIdx == inj || spatialIdx == prod) {
|
||||
return 1.0;
|
||||
} else {
|
||||
@@ -520,7 +525,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::materialLawParams
|
||||
*/
|
||||
template <class Context>
|
||||
@@ -563,7 +568,7 @@ private:
|
||||
// p0 = 75e5
|
||||
// T0 = 423.25
|
||||
int inj = 0;
|
||||
int prod = Parameters::get<TypeTag, Properties::CellsX>() - 1;
|
||||
int prod = Parameters::get<TypeTag, Parameters::CellsX>() - 1;
|
||||
int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||
ComponentVector comp;
|
||||
comp[0] = Evaluation::createVariable(0.5, 1);
|
||||
|
||||
@@ -110,17 +110,22 @@ struct EnableDiffusion<TypeTag, TTag::DiffusionBaseProblem> { static constexpr b
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::DiffusionBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::DiffusionBaseProblem> { static constexpr unsigned value = 250; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::DiffusionBaseProblem> { static constexpr unsigned value = 1; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::DiffusionBaseProblem> { static constexpr unsigned value = 1; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
||||
{ static constexpr unsigned value = 250; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
// define the properties specific for the diffusion problem
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, Properties::TTag::DiffusionBaseProblem>
|
||||
|
||||
@@ -143,17 +143,22 @@ struct InitialWaterSaturation<TypeTag, TTag::FingerBaseProblem>
|
||||
static constexpr type value = 0.01;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::FingerBaseProblem> { static constexpr unsigned value = 20; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::FingerBaseProblem> { static constexpr unsigned value = 70; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::FingerBaseProblem> { static constexpr unsigned value = 1; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||
{ static constexpr unsigned value = 20; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||
{ static constexpr unsigned value = 70; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
// define the properties specific for the finger problem
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||
|
||||
@@ -175,13 +175,6 @@ struct LensUpperRightZ<TypeTag, TTag::LensBaseProblem>
|
||||
static constexpr type value = 1.0;
|
||||
};
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::LensBaseProblem> { static constexpr unsigned value = 48; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::LensBaseProblem> { static constexpr unsigned value = 32; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::LensBaseProblem> { static constexpr unsigned value = 16; };
|
||||
|
||||
// By default, include the intrinsic permeability tensor to the VTK output files
|
||||
template<class TypeTag>
|
||||
struct VtkWriteIntrinsicPermeabilities<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = true; };
|
||||
@@ -190,6 +183,18 @@ struct VtkWriteIntrinsicPermeabilities<TypeTag, TTag::LensBaseProblem> { static
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, Properties::TTag::LensBaseProblem>
|
||||
{ static constexpr unsigned value = 48; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, Properties::TTag::LensBaseProblem>
|
||||
{ static constexpr unsigned value = 32; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, Properties::TTag::LensBaseProblem>
|
||||
{ static constexpr unsigned value = 16; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, Properties::TTag::LensBaseProblem>
|
||||
{
|
||||
|
||||
@@ -127,17 +127,22 @@ struct VtkWriteFilterVelocities<TypeTag, TTag::PowerInjectionBaseProblem> { stat
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr bool value = false; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr unsigned value = 250; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr unsigned value = 1; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::PowerInjectionBaseProblem> { static constexpr unsigned value = 1; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
||||
{ static constexpr unsigned value = 250; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
// define the properties specific for the power injection problem
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, Properties::TTag::PowerInjectionBaseProblem>
|
||||
|
||||
@@ -124,18 +124,23 @@ public:
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::Tutorial1Problem> { static constexpr bool value = false; }; /*@\label{tutorial1:gravity}@*/
|
||||
|
||||
// // define the number of cells used for discretizing the physical domain
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, TTag::Tutorial1Problem> { static constexpr unsigned value = 100; };
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, TTag::Tutorial1Problem> { static constexpr unsigned value = 1; };
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, TTag::Tutorial1Problem> { static constexpr unsigned value = 1; }; /*@\label{tutorial1:default-params-end}@*/
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
// // define the number of cells used for discretizing the physical domain
|
||||
template<class TypeTag>
|
||||
struct CellsX<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
{ static constexpr unsigned value = 100; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsY<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
{ static constexpr unsigned value = 1; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct CellsZ<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
{ static constexpr unsigned value = 1; }; /*@\label{tutorial1:default-params-end}@*/
|
||||
|
||||
// define the physical size of the problem's domain [m]
|
||||
template<class TypeTag>
|
||||
struct DomainSizeX<TypeTag, Properties::TTag::Tutorial1Problem>
|
||||
|
||||
@@ -72,18 +72,18 @@ public:
|
||||
"executed after it was loaded");
|
||||
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, 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, 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");
|
||||
}
|
||||
}
|
||||
@@ -102,14 +102,14 @@ public:
|
||||
cellRes[i] = 0;
|
||||
|
||||
upperRight[0] = Parameters::get<TypeTag, Parameters::DomainSizeX>();
|
||||
cellRes[0] = Parameters::get<TypeTag, Properties::CellsX>();
|
||||
cellRes[0] = Parameters::get<TypeTag, Parameters::CellsX>();
|
||||
if (dimWorld > 1) {
|
||||
upperRight[1] = Parameters::get<TypeTag, Parameters::DomainSizeY>();
|
||||
cellRes[1] = Parameters::get<TypeTag, Properties::CellsY>();
|
||||
cellRes[1] = Parameters::get<TypeTag, Parameters::CellsY>();
|
||||
}
|
||||
if (dimWorld > 2) {
|
||||
upperRight[2] = Parameters::get<TypeTag, Parameters::DomainSizeZ>();
|
||||
cellRes[2] = Parameters::get<TypeTag, Properties::CellsZ>();
|
||||
cellRes[2] = Parameters::get<TypeTag, Parameters::CellsZ>();
|
||||
}
|
||||
|
||||
unsigned numRefinements = Parameters::get<TypeTag, Parameters::GridGlobalRefinements>();
|
||||
|
||||
@@ -113,18 +113,18 @@ public:
|
||||
"executed after it was loaded");
|
||||
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 (dim > 1) {
|
||||
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 (dim > 2) {
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -144,11 +144,11 @@ public:
|
||||
upperRight[0] = Parameters::get<TypeTag, Parameters::DomainSizeX>();
|
||||
upperRight[1] = Parameters::get<TypeTag, Parameters::DomainSizeY>();
|
||||
|
||||
cellRes[0] = Parameters::get<TypeTag, Properties::CellsX>();
|
||||
cellRes[1] = Parameters::get<TypeTag, Properties::CellsY>();
|
||||
cellRes[0] = Parameters::get<TypeTag, Parameters::CellsX>();
|
||||
cellRes[1] = Parameters::get<TypeTag, Parameters::CellsY>();
|
||||
if (dim == 3) {
|
||||
upperRight[2] = Parameters::get<TypeTag, Parameters::DomainSizeZ>();
|
||||
cellRes[2] = Parameters::get<TypeTag, Properties::CellsZ>();
|
||||
cellRes[2] = Parameters::get<TypeTag, Parameters::CellsZ>();
|
||||
}
|
||||
|
||||
std::stringstream dgffile;
|
||||
|
||||
@@ -32,11 +32,23 @@
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! grid resolution
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct CellsX { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct CellsY { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct CellsZ { using type = Properties::UndefinedProperty; };
|
||||
|
||||
//! domain size
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DomainSizeX { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DomainSizeY { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct DomainSizeZ { using type = Properties::UndefinedProperty; };
|
||||
|
||||
|
||||
@@ -105,14 +105,6 @@ template<class TypeTag, class MyTypeTag>
|
||||
struct GridPart { using type = UndefinedProperty; };
|
||||
#endif
|
||||
|
||||
//! grid resolution
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct CellsX { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct CellsY { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct CellsZ { using type = UndefinedProperty; };
|
||||
|
||||
//! name of the grid file
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct GridFile { using type = UndefinedProperty; };
|
||||
|
||||
Reference in New Issue
Block a user