// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // vi: set et ts=4 sw=4 sts=4: /* This file is part of the Open Porous Media project (OPM). OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. OPM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OPM. If not, see . Consult the COPYING file in the top-level source directory of this module for the precise wording of the license and the list of copyright holders. */ /*! * \file * * \copydoc Opm::FlowProblem */ #ifndef OPM_FLOW_PROBLEM_PROPERTIES_HPP #define OPM_FLOW_PROBLEM_PROPERTIES_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if HAVE_DAMARIS #include #endif #include namespace Opm { template class FlowProblem; } namespace Opm::Properties { namespace TTag { struct FlowBaseProblem { using InheritsFrom = std::tuple; }; } // The class which deals with ECL aquifers template struct AquiferModel { using type = UndefinedProperty; }; // Specify whether API tracking should be enabled (replaces PVT regions). // TODO: This is not yet implemented template struct EnableApiTracking { using type = UndefinedProperty; }; // if thermal flux boundaries are enabled an effort is made to preserve the initial // thermal gradient specified via the TEMPVD keyword template struct EnableThermalFluxBoundaries { using type = UndefinedProperty; }; // The class which deals with wells template struct WellModel { using type = UndefinedProperty; }; // Set the problem property template struct Problem { using type = FlowProblem; }; template struct Model { using type = FIBlackOilModel; }; // Select the element centered finite volume method as spatial discretization template struct SpatialDiscretizationSplice { using type = TTag::EcfvDiscretization; }; // use automatic differentiation to linearize the system of PDEs template struct LocalLinearizerSplice { using type = TTag::AutoDiffLocalLinearizer; }; template struct BaseDiscretizationType { using type = FvBaseDiscretizationNoAdapt; }; template struct DiscreteFunction { using BaseDiscretization = FvBaseDiscretization; using type = typename BaseDiscretization::BlockVectorWrapper; }; template struct GridView { using type = typename GetPropType::LeafGridView; }; // Set the material law for fluid fluxes template struct MaterialLaw { private: using Scalar = GetPropType; using FluidSystem = GetPropType; using Traits = ThreePhaseMaterialTraits; public: using EclMaterialLawManager = ::Opm::EclMaterialLawManager; using type = typename EclMaterialLawManager::MaterialLaw; }; // Set the material law for energy storage in rock template struct SolidEnergyLaw { private: using Scalar = GetPropType; using FluidSystem = GetPropType; public: using EclThermalLawManager = ::Opm::EclThermalLawManager; using type = typename EclThermalLawManager::SolidEnergyLaw; }; // Set the material law for thermal conduction template struct ThermalConductionLaw { private: using Scalar = GetPropType; using FluidSystem = GetPropType; public: using EclThermalLawManager = ::Opm::EclThermalLawManager; using type = typename EclThermalLawManager::ThermalConductionLaw; }; // use a slightly faster stencil class because it does not need the normals and // the integration points of intersections template struct Stencil { private: using Scalar = GetPropType; using GridView = GetPropType; public: using type = EcfvStencil; }; // by default use the dummy aquifer "model" template struct AquiferModel { using type = BaseAquiferModel; }; // Enable diffusion template struct EnableDiffusion { static constexpr bool value = true; }; // Disable dispersion template struct EnableDispersion { static constexpr bool value = false; }; // Enable Convective Mixing template struct EnableConvectiveMixing { static constexpr bool value = true; }; // only write the solutions for the report steps to disk template struct EnableApiTracking { static constexpr bool value = false; }; // Use the "velocity module" which uses the Eclipse "NEWTRAN" transmissibilities template struct FluxModule { using type = NewTranFluxModule; }; // Use the dummy gradient calculator in order not to do unnecessary work. template struct GradientCalculator { using type = DummyGradientCalculator; }; // store temperature (but do not conserve energy, as long as EnableEnergy is false) template struct EnableTemperature { static constexpr bool value = true; }; template 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 { static constexpr bool value = false; }; template struct EnableSolvent { static constexpr bool value = false; }; template struct EnableEnergy { static constexpr bool value = false; }; template struct EnableFoam { static constexpr bool value = false; }; template struct EnableExtbo { static constexpr bool value = false; }; template struct EnableMICP { static constexpr bool value = false; }; // disable thermal flux boundaries by default template struct EnableThermalFluxBoundaries { static constexpr bool value = false; }; // By default, simulators derived from the FlowBaseProblem are production simulators, // i.e., experimental features must be explicitly enabled at compile time template struct EnableExperiments { static constexpr bool value = false; }; } // namespace Opm::Properties namespace Opm::Parameters { #ifdef HAVE_DAMARIS //! Disable the Damaris HDF5 output by default template struct EnableDamarisOutput { static constexpr bool value = false; }; // If Damaris is available, write specific variable output in parallel template 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 { static constexpr bool value = false; }; // Save the simulation fields (currently only PRESSURE) variables to HDF5 file template 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 { static constexpr auto value = ""; }; // Specifiy a Paraview Catalyst in situ visualisation script // (if Paraview is enabled in Damaris) template struct DamarisPythonParaviewScript { static constexpr auto value = ""; }; // Specify a unique name for the Damaris simulation (used as prefix to HDF5 filenames) template struct DamarisSimName { static constexpr auto value = ""; }; // Specify the number of Damaris cores (dc) to create (per-node). // Must divide into the remaining ranks // equally, e.g. mpirun -np 16 ... -> (if running on one node) // The following are allowed: // 1 dc + 15 sim ranks // or 2 dc + 14 sim // or 4 dc + 12 sim // *not* 3 dc + 13 sim ranks template struct DamarisDedicatedCores { static constexpr int value = 1; }; // Specify the number of Damaris nodes to create template 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 { static constexpr auto value = "" ; }; // Specify the shared memory file size template 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 { static constexpr auto value = "info"; }; // Specify the dask file jason file that specifies the Dask scheduler etc. template struct DamarisDaskFile { static constexpr auto value = ""; }; // Specify the the exact variables to be passed through // to Damaris (must exist in the XML file / intiDamarisXmlFile.cpp) template struct DamarisLimitVariables { static constexpr auto value = ""; }; #endif // By default, use single precision for the ECL formated results template struct EclOutputDoublePrecision { static constexpr bool value = false; }; // If available, write the ECL output in a non-blocking manner template struct EnableAsyncEclOutput { static constexpr bool value = true; }; // By default, we enable the debugging checks if we're compiled in debug mode template struct EnableDebuggingChecks { static constexpr bool value = true; }; // Drift compensation is an experimental feature, i.e., systematic errors in the // conservation quantities are only compensated for // as default if experimental mode is enabled. template struct EnableDriftCompensation { static constexpr bool value = true; }; // enable the ECL output by default template struct EnableEclOutput { static constexpr bool value = true; }; // Write ESMRY file for fast loading of summary data template struct EnableEsmry { static constexpr bool value = false; }; // Enable gravity template struct EnableGravity { static constexpr bool value = true; }; // the cache for intensive quantities can be used for ECL problems and also yields a // decent speedup... template 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 { static constexpr bool value = true; }; // Disable the VTK output by default for this problem ... template struct EnableVtkOutput { static constexpr bool value = false; }; // only write the solutions for the report steps to disk template struct EnableWriteAllSolutions { static constexpr bool value = false; }; // The default for the end time of the simulation [s] // // By default, stop it after the universe will probably have stopped // to exist. (the ECL problem will finish the simulation explicitly // after it simulated the last episode specified in the deck.) template struct EndTime { using type = GetPropType; static constexpr type value = 1e100; }; // By default, use implicit pressure in rock compaction template struct ExplicitRockCompaction { static constexpr bool value = false; }; // The default for the initial time step size of the simulation [s]. // // The chosen value means that the size of the first time step is the // one of the initial episode (if the length of the initial episode is // not millions of trillions of years, that is...) template 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 { using type = GetPropType; static constexpr type value = 1e-2; }; // Parameterize equilibration accuracy template struct NumPressurePointsEquil { static constexpr int value = ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue; }; // The default location for the ECL output files template struct OutputDir { static constexpr auto value = "."; }; template struct OutputMode { static constexpr auto value = "all"; }; // The frequency of writing restart (*.ers) files. This is the number of time steps // between writing restart files template struct RestartWritingInterval { static constexpr int value = 0xffffff; }; // disable } // namespace Opm::Parameters #endif // OPM_FLOW_PROBLEM_PROPERTIES_HPP