From 7b49bcb09ead612e84c9b22c26c98f2f13b81af4 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 6 Feb 2024 09:15:07 +0100 Subject: [PATCH] rename EclBaseProblem to FlowBaseProblem --- ebos/eclproblem_properties.hh | 140 +++++++++++++------------- opm/simulators/flow/BlackoilModel.hpp | 2 +- tests/TestTypeTag.hpp | 4 +- tests/test_equil.cpp | 6 +- 4 files changed, 76 insertions(+), 76 deletions(-) diff --git a/ebos/eclproblem_properties.hh b/ebos/eclproblem_properties.hh index 5695c9691..28c0a1d26 100644 --- a/ebos/eclproblem_properties.hh +++ b/ebos/eclproblem_properties.hh @@ -62,7 +62,7 @@ namespace Opm::Properties { namespace TTag { -struct EclBaseProblem { +struct FlowBaseProblem { using InheritsFrom = std::tuple; }; } @@ -140,47 +140,47 @@ struct ExplicitRockCompaction { // Set the problem property template -struct Problem { +struct Problem { using type = EclProblem; }; template -struct Model { +struct Model { using type = FIBlackOilModel; }; // Select the element centered finite volume method as spatial discretization template -struct SpatialDiscretizationSplice { +struct SpatialDiscretizationSplice { using type = TTag::EcfvDiscretization; }; //! for ebos, use automatic differentiation to linearize the system of PDEs template -struct LocalLinearizerSplice { +struct LocalLinearizerSplice { using type = TTag::AutoDiffLocalLinearizer; }; template -struct BaseDiscretizationType { +struct BaseDiscretizationType { using type = FvBaseDiscretizationNoAdapt; }; template -struct DiscreteFunction { +struct DiscreteFunction { using BaseDiscretization = FvBaseDiscretization; using type = typename BaseDiscretization::BlockVectorWrapper; }; template -struct GridView +struct GridView { using type = typename GetPropType::LeafGridView; }; // Set the material law for fluid fluxes template -struct MaterialLaw +struct MaterialLaw { private: using Scalar = GetPropType; @@ -199,7 +199,7 @@ public: // Set the material law for energy storage in rock template -struct SolidEnergyLaw +struct SolidEnergyLaw { private: using Scalar = GetPropType; @@ -213,7 +213,7 @@ public: // Set the material law for thermal conduction template -struct ThermalConductionLaw +struct ThermalConductionLaw { private: using Scalar = GetPropType; @@ -228,7 +228,7 @@ public: // ebos can use a slightly faster stencil class because it does not need the normals and // the integration points of intersections template -struct Stencil +struct Stencil { private: using Scalar = GetPropType; @@ -243,37 +243,37 @@ public: // by default use the dummy aquifer "model" template -struct AquiferModel { +struct AquiferModel { using type = BaseAquiferModel; }; // Enable gravity template -struct EnableGravity { +struct EnableGravity { static constexpr bool value = true; }; // Enable diffusion template -struct EnableDiffusion { +struct EnableDiffusion { static constexpr bool value = true; }; // Enable dispersion template -struct EnableDispersion { +struct EnableDispersion { static constexpr bool value = false; }; // only write the solutions for the report steps to disk template -struct EnableWriteAllSolutions { +struct EnableWriteAllSolutions { static constexpr bool value = false; }; // disable API tracking template -struct EnableApiTracking { +struct EnableApiTracking { static constexpr bool value = false; }; @@ -283,7 +283,7 @@ struct EnableApiTracking { // to exist. (the ECL problem will finish the simulation explicitly // after it simulated the last episode specified in the deck.) template -struct EndTime { +struct EndTime { using type = GetPropType; static constexpr type value = 1e100; }; @@ -294,14 +294,14 @@ struct EndTime { // one of the initial episode (if the length of the initial episode is // not millions of trillions of years, that is...) template -struct InitialTimeStepSize { +struct InitialTimeStepSize { using type = GetPropType; static constexpr type value = 3600*24; }; // the default for the allowed volumetric error for oil per second template -struct NewtonTolerance { +struct NewtonTolerance { using type = GetPropType; static constexpr type value = 1e-2; }; @@ -310,7 +310,7 @@ struct NewtonTolerance { // reservoir. this is scaled by the pore volume of the reservoir, i.e., larger reservoirs // will tolerate larger residuals. template -struct EclNewtonSumTolerance { +struct EclNewtonSumTolerance { using type = GetPropType; static constexpr type value = 1e-4; }; @@ -322,7 +322,7 @@ struct EclNewtonSumTolerance { // timestep for an reservoir that exhibits 1 m^3 of pore volume. A reservoir with a total // pore volume of 10^3 m^3 will tolerate 10 times as much. template -struct EclNewtonSumToleranceExponent { +struct EclNewtonSumToleranceExponent { using type = GetPropType; static constexpr type value = 1.0/3.0; }; @@ -330,28 +330,28 @@ struct EclNewtonSumToleranceExponent { // set number of Newton iterations where the volumetric residual is considered for // convergence template -struct EclNewtonStrictIterations { +struct EclNewtonStrictIterations { static constexpr int value = 8; }; // set fraction of the pore volume where the volumetric residual may be violated during // strict Newton iterations template -struct EclNewtonRelaxedVolumeFraction { +struct EclNewtonRelaxedVolumeFraction { using type = GetPropType; static constexpr type value = 0.03; }; // the maximum volumetric error of a cell in the relaxed region template -struct EclNewtonRelaxedTolerance { +struct EclNewtonRelaxedTolerance { using type = GetPropType; static constexpr type value = 1e9; }; // Ignore the maximum error mass for early termination of the newton method. template -struct NewtonMaxError { +struct NewtonMaxError { using type = GetPropType; static constexpr type value = 10e9; }; @@ -359,7 +359,7 @@ struct NewtonMaxError { // set the maximum number of Newton iterations to 14 because the likelyhood that a time // step succeeds at more than 14 Newton iteration is rather small template -struct NewtonMaxIterations { +struct NewtonMaxIterations { static constexpr int value = 14; }; @@ -367,55 +367,55 @@ struct NewtonMaxIterations { // this is only relevant if the time step is reduced from the report step size for some // reason. (because ebos first tries to do a report step using a single time step.) template -struct NewtonTargetIterations { +struct NewtonTargetIterations { static constexpr int value = 6; }; // Disable the VTK output by default for this problem ... template -struct EnableVtkOutput { +struct EnableVtkOutput { static constexpr bool value = false; }; // ... but enable the ECL output by default template -struct EnableEclOutput { +struct EnableEclOutput { static constexpr bool value = true; }; #ifdef HAVE_DAMARIS //! Disable the Damaris HDF5 output by default template -struct EnableDamarisOutput { +struct EnableDamarisOutput { static constexpr bool value = false; }; // If Damaris is available, write specific variable output in parallel template -struct DamarisOutputHdfCollective { +struct DamarisOutputHdfCollective { static constexpr bool value = true; }; // Save the reservoir model mesh data to the HDF5 file (even if field data HDF5 output is disabled) template -struct DamarisSaveMeshToHdf { +struct DamarisSaveMeshToHdf { static constexpr bool value = false; }; // Save the simulation fields (currently only PRESSURE) variables to HDF5 file template -struct DamarisSaveToHdf { +struct DamarisSaveToHdf { static constexpr bool value = true; }; // Specify path and filename of a Python script to run on each end of iteration output template -struct DamarisPythonScript { +struct DamarisPythonScript { static constexpr auto value = ""; }; // Specifiy a Paraview Catalyst in situ visualisation script (if Paraview is enabled in Damaris) template -struct DamarisPythonParaviewScript { +struct DamarisPythonParaviewScript { static constexpr auto value = ""; }; // Specify a unique name for the Damaris simulation (used as prefix to HDF5 filenames) template -struct DamarisSimName { +struct DamarisSimName { static constexpr auto value = ""; }; // Specify the number of Damaris cores (dc) to create (per-node). Must divide into the remaining ranks @@ -426,95 +426,95 @@ struct DamarisSimName { // or 4 dc + 12 sim // *not* 3 dc + 13 sim ranks template -struct DamarisDedicatedCores { +struct DamarisDedicatedCores { static constexpr int value = 1; }; // Specify the number of Damaris nodes to create template -struct DamarisDedicatedNodes { +struct DamarisDedicatedNodes { static constexpr int value = 0; }; // Specify a name for the Damaris shared memory file (a unique name will be created by default) template -struct DamarisSharedMemoryName { +struct DamarisSharedMemoryName { static constexpr auto value = "" ; // default name is empty, will make unique if needed in DamarisKeywords() }; // Specify the shared memory file size template -struct DamarisSharedMemorySizeBytes { +struct DamarisSharedMemorySizeBytes { static constexpr long value = 536870912; // 512 MB }; // Specify the Damaris log level - if set to debug then log is flushed regularly template -struct DamarisLogLevel { +struct DamarisLogLevel { static constexpr auto value = "info"; }; // Specify the dask file jason file that specifies the Dask scheduler etc. template -struct DamarisDaskFile { +struct DamarisDaskFile { static constexpr auto value = ""; }; #endif // If available, write the ECL output in a non-blocking manner template -struct EnableAsyncEclOutput { +struct EnableAsyncEclOutput { static constexpr bool value = true; }; // Write ESMRY file for fast loading of summary data template -struct EnableEsmry { +struct EnableEsmry { static constexpr bool value = false; }; // By default, use single precision for the ECL formated results template -struct EclOutputDoublePrecision { +struct EclOutputDoublePrecision { static constexpr bool value = false; }; // The default location for the ECL output files template -struct OutputDir { +struct OutputDir { static constexpr auto value = "."; }; // the cache for intensive quantities can be used for ECL problems and also yields a // decent speedup... template -struct EnableIntensiveQuantityCache { +struct EnableIntensiveQuantityCache { static constexpr bool value = true; }; // the cache for the storage term can also be used and also yields a decent speedup template -struct EnableStorageCache { +struct EnableStorageCache { static constexpr bool value = true; }; // Use the "velocity module" which uses the Eclipse "NEWTRAN" transmissibilities template -struct FluxModule { +struct FluxModule { using type = NewTranFluxModule; }; // Use the dummy gradient calculator in order not to do unnecessary work. template -struct GradientCalculator { +struct GradientCalculator { using type = DummyGradientCalculator; }; // Use a custom Newton-Raphson method class for ebos in order to attain more // sophisticated update and error computation mechanisms template -struct NewtonMethod { +struct NewtonMethod { using type = EclNewtonMethod; }; // The frequency of writing restart (*.ers) files. This is the number of time steps // between writing restart files template -struct RestartWritingInterval { +struct RestartWritingInterval { static constexpr int value = 0xffffff; // disable }; @@ -522,79 +522,79 @@ struct RestartWritingInterval { // conservation quantities are only compensated for // as default if experimental mode is enabled. template -struct EnableDriftCompensation { +struct EnableDriftCompensation { static constexpr bool value = true; }; // By default, we enable the debugging checks if we're compiled in debug mode template -struct EnableDebuggingChecks { +struct EnableDebuggingChecks { static constexpr bool value = true; }; // store temperature (but do not conserve energy, as long as EnableEnergy is false) template -struct EnableTemperature { +struct EnableTemperature { static constexpr bool value = true; }; template -struct EnableMech { +struct EnableMech { static constexpr bool value = false; }; // disable all extensions supported by black oil model. this should not really be // necessary but it makes things a bit more explicit template -struct EnablePolymer { +struct EnablePolymer { static constexpr bool value = false; }; template -struct EnableSolvent { +struct EnableSolvent { static constexpr bool value = false; }; template -struct EnableEnergy { +struct EnableEnergy { static constexpr bool value = false; }; template -struct EnableFoam { +struct EnableFoam { static constexpr bool value = false; }; template -struct EnableExtbo { +struct EnableExtbo { static constexpr bool value = false; }; template -struct EnableMICP { +struct EnableMICP { static constexpr bool value = false; }; // disable thermal flux boundaries by default template -struct EnableThermalFluxBoundaries { +struct EnableThermalFluxBoundaries { static constexpr bool value = false; }; -// By default, simulators derived from the EclBaseProblem are production simulators, +// By default, simulators derived from the FlowBaseProblem are production simulators, // i.e., experimental features must be explicitly enabled at compile time template -struct EnableExperiments { +struct EnableExperiments { static constexpr bool value = false; }; template -struct OutputMode { +struct OutputMode { static constexpr auto value = "all"; }; // Parameterize equilibration accuracy template -struct NumPressurePointsEquil { +struct NumPressurePointsEquil { static constexpr int value = ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue; }; // By default, use implicit pressure in rock compaction template -struct ExplicitRockCompaction { +struct ExplicitRockCompaction { static constexpr bool value = false; }; diff --git a/opm/simulators/flow/BlackoilModel.hpp b/opm/simulators/flow/BlackoilModel.hpp index 956457449..d7f0387f5 100644 --- a/opm/simulators/flow/BlackoilModel.hpp +++ b/opm/simulators/flow/BlackoilModel.hpp @@ -76,7 +76,7 @@ namespace Opm::Properties { namespace TTag { struct FlowProblem { using InheritsFrom = std::tuple; + FlowNonLinearSolver, FlowBaseProblem, BlackOilModel>; }; } template diff --git a/tests/TestTypeTag.hpp b/tests/TestTypeTag.hpp index 657b341b8..854eeb492 100644 --- a/tests/TestTypeTag.hpp +++ b/tests/TestTypeTag.hpp @@ -28,7 +28,7 @@ #ifndef OPM_TEST_TYPETAG_HPP #define OPM_TEST_TYPETAG_HPP -#include +#include #include @@ -41,7 +41,7 @@ namespace Opm::Properties { namespace TTag { struct TestTypeTag { - using InheritsFrom = std::tuple; + using InheritsFrom = std::tuple; }; } diff --git a/tests/test_equil.cpp b/tests/test_equil.cpp index ea97a8320..9a1bd60bc 100644 --- a/tests/test_equil.cpp +++ b/tests/test_equil.cpp @@ -70,7 +70,7 @@ namespace Opm::Properties { template -struct EnableTerminalOutput { +struct EnableTerminalOutput { static constexpr bool value = true; }; @@ -78,10 +78,10 @@ namespace TTag { struct TestEquilTypeTag { - using InheritsFrom = std::tuple; + using InheritsFrom = std::tuple; }; struct TestEquilVapwatTypeTag { - using InheritsFrom = std::tuple; + using InheritsFrom = std::tuple; }; }