diff --git a/examples/problems/co2injectionproblem.hh b/examples/problems/co2injectionproblem.hh index 3ae50a217..3f365750d 100644 --- a/examples/problems/co2injectionproblem.hh +++ b/examples/problems/co2injectionproblem.hh @@ -57,11 +57,12 @@ #include namespace Opm { + //! \cond SKIP_THIS template class Co2InjectionProblem; - //! \endcond + } namespace Opm::Properties { @@ -70,27 +71,6 @@ namespace TTag { struct Co2InjectionBaseProblem {}; } -// declare the CO2 injection problem specific property tags -template -struct FluidSystemPressureLow { using type = UndefinedProperty; }; -template -struct FluidSystemPressureHigh { using type = UndefinedProperty; }; -template -struct FluidSystemNumPressure { using type = UndefinedProperty; }; -template -struct FluidSystemTemperatureLow { using type = UndefinedProperty; }; -template -struct FluidSystemTemperatureHigh { using type = UndefinedProperty; }; -template -struct FluidSystemNumTemperature { using type = UndefinedProperty; }; - -template -struct MaxDepth { using type = UndefinedProperty; }; -template -struct Temperature { using type = UndefinedProperty; }; -template -struct SimulationName { using type = UndefinedProperty; }; - // Set the grid type template struct Grid { using type = Dune::YaspGrid<2>; }; @@ -157,55 +137,38 @@ struct SolidEnergyLaw template struct LinearSolverSplice { using type = TTag::ParallelAmgLinearSolver; }; -// set the defaults for the problem specific properties -template -struct FluidSystemPressureLow -{ - using type = GetPropType; - static constexpr type value = 3e7; -}; -template -struct FluidSystemPressureHigh -{ - using type = GetPropType; - static constexpr type value = 4e7; -}; -template -struct FluidSystemNumPressure { static constexpr unsigned value = 100; }; -template -struct FluidSystemTemperatureLow -{ - using type = GetPropType; - static constexpr type value = 290; -}; -template -struct FluidSystemTemperatureHigh -{ - using type = GetPropType; - static constexpr type value = 500; -}; -template -struct FluidSystemNumTemperature { static constexpr unsigned value = 100; }; - -template -struct MaxDepth -{ - using type = GetPropType; - static constexpr type value = 2500; -}; -template -struct Temperature -{ - using type = GetPropType; - static constexpr type value = 293.15; -}; -template -struct SimulationName { static constexpr auto value = "co2injection"; }; - } // namespace Opm::Properties namespace Opm::Parameters { +// declare the CO2 injection problem specific property tags +template +struct FluidSystemPressureLow { using type = Properties::UndefinedProperty; }; + +template +struct FluidSystemPressureHigh { using type = Properties::UndefinedProperty; }; + +template +struct FluidSystemNumPressure { using type = Properties::UndefinedProperty; }; + +template +struct FluidSystemTemperatureLow { using type = Properties::UndefinedProperty; }; + +template +struct FluidSystemTemperatureHigh { using type = Properties::UndefinedProperty; }; + +template +struct FluidSystemNumTemperature { using type = Properties::UndefinedProperty; }; + +template +struct MaxDepth { using type = Properties::UndefinedProperty; }; + +template +struct Temperature { using type = Properties::UndefinedProperty; }; + +template +struct SimulationName { using type = Properties::UndefinedProperty; }; + // Enable gravity template struct EnableGravity @@ -219,6 +182,42 @@ struct EndTime static constexpr type value = 1e4; }; +template +struct FluidSystemNumPressure +{ static constexpr unsigned value = 100; }; + +template +struct FluidSystemNumTemperature +{ static constexpr unsigned value = 100; }; + +template +struct FluidSystemPressureHigh +{ + using type = GetPropType; + static constexpr type value = 4e7; +}; + +template +struct FluidSystemPressureLow +{ + using type = GetPropType; + static constexpr type value = 3e7; +}; + +template +struct FluidSystemTemperatureHigh +{ + using type = GetPropType; + static constexpr type value = 500; +}; + +template +struct FluidSystemTemperatureLow +{ + using type = GetPropType; + static constexpr type value = 290; +}; + // The default DGF file to load template struct GridFile @@ -232,11 +231,29 @@ struct InitialTimeStepSize static constexpr type value = 250; }; +template +struct MaxDepth +{ + using type = GetPropType; + static constexpr type value = 2500; +}; + // Write the Newton convergence behavior to disk? template struct NewtonWriteConvergence { static constexpr bool value = false; }; +template +struct SimulationName +{ static constexpr auto value = "co2injection"; }; + +template +struct Temperature +{ + using type = GetPropType; + static constexpr type value = 293.15; +}; + } // namespace Opm::Parameters namespace Opm { @@ -318,16 +335,16 @@ public: eps_ = 1e-6; - temperatureLow_ = Parameters::get(); - temperatureHigh_ = Parameters::get(); - nTemperature_ = Parameters::get(); + temperatureLow_ = Parameters::get(); + temperatureHigh_ = Parameters::get(); + nTemperature_ = Parameters::get(); - pressureLow_ = Parameters::get(); - pressureHigh_ = Parameters::get(); - nPressure_ = Parameters::get(); + pressureLow_ = Parameters::get(); + pressureHigh_ = Parameters::get(); + nPressure_ = Parameters::get(); - maxDepth_ = Parameters::get(); - temperature_ = Parameters::get(); + maxDepth_ = Parameters::get(); + temperature_ = Parameters::get(); // initialize the tables of the fluid system // FluidSystem::init(); @@ -380,23 +397,23 @@ public: { ParentType::registerParameters(); - Parameters::registerParam + Parameters::registerParam ("The lower temperature [K] for tabulation of the fluid system"); - Parameters::registerParam + Parameters::registerParam ("The upper temperature [K] for tabulation of the fluid system"); - Parameters::registerParam + Parameters::registerParam ("The number of intervals between the lower and upper temperature"); - Parameters::registerParam + Parameters::registerParam ("The lower pressure [Pa] for tabulation of the fluid system"); - Parameters::registerParam + Parameters::registerParam ("The upper pressure [Pa] for tabulation of the fluid system"); - Parameters::registerParam + Parameters::registerParam ("The number of intervals between the lower and upper pressure"); - Parameters::registerParam + Parameters::registerParam ("The temperature [K] in the reservoir"); - Parameters::registerParam + Parameters::registerParam ("The maximum depth [m] of the reservoir"); - Parameters::registerParam + Parameters::registerParam ("The name of the simulation used for the output files"); } @@ -411,7 +428,7 @@ public: std::string name() const { std::ostringstream oss; - oss << Parameters::get() + oss << Parameters::get() << "_" << Model::name(); if (getPropValue()) oss << "_ni"; @@ -706,6 +723,7 @@ private: Scalar pressureLow_, pressureHigh_; Scalar temperatureLow_, temperatureHigh_; }; + } // namespace Opm #endif