FlowProblemProperties.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
28#ifndef OPM_FLOW_PROBLEM_PROPERTIES_HPP
29#define OPM_FLOW_PROBLEM_PROPERTIES_HPP
30
31#include <opm/input/eclipse/Parser/ParserKeywords/E.hpp>
32
33#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
34#include <opm/material/thermal/EclThermalLawManager.hpp>
35
36#include <opm/models/discretization/ecfv/ecfvdiscretization.hh>
37#include <opm/models/utils/propertysystem.hh>
38
47
48#if HAVE_DAMARIS
50#endif
51
52#include <tuple>
53
54namespace Opm {
55template <class TypeTag>
56class FlowProblem;
57}
58
59namespace Opm::Properties {
60
61namespace TTag {
62
64 using InheritsFrom = std::tuple<VtkTracer, OutputBlackOil, CpGridVanguard>;
65};
66}
67
68// The class which deals with wells
69template<class TypeTag, class MyTypeTag>
70struct WellModel {
71 using type = UndefinedProperty;
72};
73
74// Write all solutions for visualization, not just the ones for the
75// report steps...
76template<class TypeTag, class MyTypeTag>
78 using type = UndefinedProperty;
79};
80
81// The number of time steps skipped between writing two consequtive restart files
82template<class TypeTag, class MyTypeTag>
84 using type = UndefinedProperty;
85};
86
87// Enable partial compensation of systematic mass losses via the source term of the next time
88// step
89template<class TypeTag, class MyTypeTag>
91 using type = UndefinedProperty;
92};
93
94// Enable the additional checks even if compiled in debug mode (i.e., with the NDEBUG
95// macro undefined). Next to a slightly better performance, this also eliminates some
96// print statements in debug mode.
97template<class TypeTag, class MyTypeTag>
99 using type = UndefinedProperty;
100};
101
102// if thermal flux boundaries are enabled an effort is made to preserve the initial
103// thermal gradient specified via the TEMPVD keyword
104template<class TypeTag, class MyTypeTag>
106 using type = UndefinedProperty;
107};
108
109// Specify whether API tracking should be enabled (replaces PVT regions).
110// TODO: This is not yet implemented
111template<class TypeTag, class MyTypeTag>
113 using type = UndefinedProperty;
114};
115
116// The class which deals with ECL aquifers
117template<class TypeTag, class MyTypeTag>
119 using type = UndefinedProperty;
120};
121
122template<class TypeTag, class MyTypeTag>
124 using type = UndefinedProperty;
125};
126// Parameterize equilibration accuracy
127template<class TypeTag, class MyTypeTag>
129 using type = UndefinedProperty;
130};
131// implicit or explicit pressure in rock compaction
132template<class TypeTag, class MyTypeTag>
134 using type = UndefinedProperty;
135};
136
137
138
139// Set the problem property
140template<class TypeTag>
141struct Problem<TypeTag, TTag::FlowBaseProblem> {
143};
144
145template<class TypeTag>
146struct Model<TypeTag, TTag::FlowBaseProblem> {
148};
149
150// Select the element centered finite volume method as spatial discretization
151template<class TypeTag>
152struct SpatialDiscretizationSplice<TypeTag, TTag::FlowBaseProblem> {
153 using type = TTag::EcfvDiscretization;
154};
155
156// use automatic differentiation to linearize the system of PDEs
157template<class TypeTag>
158struct LocalLinearizerSplice<TypeTag, TTag::FlowBaseProblem> {
159 using type = TTag::AutoDiffLocalLinearizer;
160};
161
162template<class TypeTag>
163struct BaseDiscretizationType<TypeTag, TTag::FlowBaseProblem> {
164 using type = FvBaseDiscretizationNoAdapt<TypeTag>;
165};
166
167template<class TypeTag>
168struct DiscreteFunction<TypeTag, TTag::FlowBaseProblem> {
169 using BaseDiscretization = FvBaseDiscretization<TypeTag>;
170 using type = typename BaseDiscretization::BlockVectorWrapper;
171};
172
173template<class TypeTag>
174struct GridView<TypeTag, TTag::FlowBaseProblem>
175{
176 using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
177};
178
179// Set the material law for fluid fluxes
180template<class TypeTag>
181struct MaterialLaw<TypeTag, TTag::FlowBaseProblem>
182{
183private:
184 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
185 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
186
187 using Traits = ThreePhaseMaterialTraits<Scalar,
188 /*wettingPhaseIdx=*/FluidSystem::waterPhaseIdx,
189 /*nonWettingPhaseIdx=*/FluidSystem::oilPhaseIdx,
190 /*gasPhaseIdx=*/FluidSystem::gasPhaseIdx>;
191
192public:
193 using EclMaterialLawManager = ::Opm::EclMaterialLawManager<Traits>;
194
195 using type = typename EclMaterialLawManager::MaterialLaw;
196};
197
198// Set the material law for energy storage in rock
199template<class TypeTag>
200struct SolidEnergyLaw<TypeTag, TTag::FlowBaseProblem>
201{
202private:
203 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
204 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
205
206public:
207 using EclThermalLawManager = ::Opm::EclThermalLawManager<Scalar, FluidSystem>;
208
209 using type = typename EclThermalLawManager::SolidEnergyLaw;
210};
211
212// Set the material law for thermal conduction
213template<class TypeTag>
214struct ThermalConductionLaw<TypeTag, TTag::FlowBaseProblem>
215{
216private:
217 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
218 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
219
220public:
221 using EclThermalLawManager = ::Opm::EclThermalLawManager<Scalar, FluidSystem>;
222
223 using type = typename EclThermalLawManager::ThermalConductionLaw;
224};
225
226// use a slightly faster stencil class because it does not need the normals and
227// the integration points of intersections
228template<class TypeTag>
229struct Stencil<TypeTag, TTag::FlowBaseProblem>
230{
231private:
232 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
233 using GridView = GetPropType<TypeTag, Properties::GridView>;
234
235public:
236 using type = EcfvStencil<Scalar,
237 GridView,
238 /*needIntegrationPos=*/false,
239 /*needNormal=*/false>;
240};
241
242// by default use the dummy aquifer "model"
243template<class TypeTag>
244struct AquiferModel<TypeTag, TTag::FlowBaseProblem> {
246};
247
248// Enable gravity
249template<class TypeTag>
250struct EnableGravity<TypeTag, TTag::FlowBaseProblem> {
251 static constexpr bool value = true;
252};
253
254// Enable diffusion
255template<class TypeTag>
256struct EnableDiffusion<TypeTag, TTag::FlowBaseProblem> {
257 static constexpr bool value = true;
258};
259
260// Enable dispersion
261template<class TypeTag>
262struct EnableDispersion<TypeTag, TTag::FlowBaseProblem> {
263 static constexpr bool value = false;
264};
265
266// only write the solutions for the report steps to disk
267template<class TypeTag>
268struct EnableWriteAllSolutions<TypeTag, TTag::FlowBaseProblem> {
269 static constexpr bool value = false;
270};
271
272// disable API tracking
273template<class TypeTag>
274struct EnableApiTracking<TypeTag, TTag::FlowBaseProblem> {
275 static constexpr bool value = false;
276};
277
278// The default for the end time of the simulation [s]
279//
280// By default, stop it after the universe will probably have stopped
281// to exist. (the ECL problem will finish the simulation explicitly
282// after it simulated the last episode specified in the deck.)
283template<class TypeTag>
284struct EndTime<TypeTag, TTag::FlowBaseProblem> {
285 using type = GetPropType<TypeTag, Scalar>;
286 static constexpr type value = 1e100;
287};
288
289// The default for the initial time step size of the simulation [s].
290//
291// The chosen value means that the size of the first time step is the
292// one of the initial episode (if the length of the initial episode is
293// not millions of trillions of years, that is...)
294template<class TypeTag>
295struct InitialTimeStepSize<TypeTag, TTag::FlowBaseProblem> {
296 using type = GetPropType<TypeTag, Scalar>;
297 static constexpr type value = 3600*24;
298};
299
300// the default for the allowed volumetric error for oil per second
301template<class TypeTag>
302struct NewtonTolerance<TypeTag, TTag::FlowBaseProblem> {
303 using type = GetPropType<TypeTag, Scalar>;
304 static constexpr type value = 1e-2;
305};
306
307// Disable the VTK output by default for this problem ...
308template<class TypeTag>
309struct EnableVtkOutput<TypeTag, TTag::FlowBaseProblem> {
310 static constexpr bool value = false;
311};
312
313// ... but enable the ECL output by default
314template<class TypeTag>
315struct EnableEclOutput<TypeTag,TTag::FlowBaseProblem> {
316 static constexpr bool value = true;
317};
318#ifdef HAVE_DAMARIS
320template<class TypeTag>
321struct EnableDamarisOutput<TypeTag, TTag::FlowBaseProblem> {
322 static constexpr bool value = false;
323};
324// If Damaris is available, write specific variable output in parallel
325template<class TypeTag>
326struct DamarisOutputHdfCollective<TypeTag, TTag::FlowBaseProblem> {
327 static constexpr bool value = true;
328};
329// Save the reservoir model mesh data to the HDF5 file (even if field data HDF5 output is disabled)
330template<class TypeTag>
331struct DamarisSaveMeshToHdf<TypeTag, TTag::FlowBaseProblem> {
332 static constexpr bool value = false;
333};
334// Save the simulation fields (currently only PRESSURE) variables to HDF5 file
335template<class TypeTag>
336struct DamarisSaveToHdf<TypeTag, TTag::FlowBaseProblem> {
337 static constexpr bool value = true;
338};
339// Specify path and filename of a Python script to run on each end of iteration output
340template<class TypeTag>
341struct DamarisPythonScript<TypeTag, TTag::FlowBaseProblem> {
342 static constexpr auto value = "";
343};
344// Specifiy a Paraview Catalyst in situ visualisation script (if Paraview is enabled in Damaris)
345template<class TypeTag>
346struct DamarisPythonParaviewScript<TypeTag, TTag::FlowBaseProblem> {
347 static constexpr auto value = "";
348};
349// Specify a unique name for the Damaris simulation (used as prefix to HDF5 filenames)
350template<class TypeTag>
351struct DamarisSimName<TypeTag, TTag::FlowBaseProblem> {
352 static constexpr auto value = "";
353};
354// Specify the number of Damaris cores (dc) to create (per-node). Must divide into the remaining ranks
355// equally, e.g. mpirun -np 16 ... -> (if running on one node)
356// The following are allowed:
357// 1 dc + 15 sim ranks
358// or 2 dc + 14 sim
359// or 4 dc + 12 sim
360// *not* 3 dc + 13 sim ranks
361template<class TypeTag>
362struct DamarisDedicatedCores<TypeTag, TTag::FlowBaseProblem> {
363 static constexpr int value = 1;
364};
365// Specify the number of Damaris nodes to create
366template<class TypeTag>
367struct DamarisDedicatedNodes<TypeTag, TTag::FlowBaseProblem> {
368 static constexpr int value = 0;
369};
370// Specify a name for the Damaris shared memory file (a unique name will be created by default)
371template<class TypeTag>
372struct DamarisSharedMemoryName<TypeTag, TTag::FlowBaseProblem> {
373 static constexpr auto value = "" ; // default name is empty, will make unique if needed in DamarisKeywords()
374};
375// Specify the shared memory file size
376template<class TypeTag>
377struct DamarisSharedMemorySizeBytes<TypeTag, TTag::FlowBaseProblem> {
378 static constexpr long value = 536870912; // 512 MB
379};
380// Specify the Damaris log level - if set to debug then log is flushed regularly
381template<class TypeTag>
382struct DamarisLogLevel<TypeTag, TTag::FlowBaseProblem> {
383 static constexpr auto value = "info";
384};
385// Specify the dask file jason file that specifies the Dask scheduler etc.
386template<class TypeTag>
387struct DamarisDaskFile<TypeTag, TTag::FlowBaseProblem> {
388 static constexpr auto value = "";
389};
390#endif
391// If available, write the ECL output in a non-blocking manner
392template<class TypeTag>
393struct EnableAsyncEclOutput<TypeTag, TTag::FlowBaseProblem> {
394 static constexpr bool value = true;
395};
396
397// Write ESMRY file for fast loading of summary data
398template<class TypeTag>
399struct EnableEsmry<TypeTag, TTag::FlowBaseProblem> {
400 static constexpr bool value = false;
401};
402
403// By default, use single precision for the ECL formated results
404template<class TypeTag>
405struct EclOutputDoublePrecision<TypeTag, TTag::FlowBaseProblem> {
406 static constexpr bool value = false;
407};
408
409// The default location for the ECL output files
410template<class TypeTag>
411struct OutputDir<TypeTag, TTag::FlowBaseProblem> {
412 static constexpr auto value = ".";
413};
414
415// the cache for intensive quantities can be used for ECL problems and also yields a
416// decent speedup...
417template<class TypeTag>
418struct EnableIntensiveQuantityCache<TypeTag, TTag::FlowBaseProblem> {
419 static constexpr bool value = true;
420};
421
422// the cache for the storage term can also be used and also yields a decent speedup
423template<class TypeTag>
424struct EnableStorageCache<TypeTag, TTag::FlowBaseProblem> {
425 static constexpr bool value = true;
426};
427
428// Use the "velocity module" which uses the Eclipse "NEWTRAN" transmissibilities
429template<class TypeTag>
430struct FluxModule<TypeTag, TTag::FlowBaseProblem> {
432};
433
434// Use the dummy gradient calculator in order not to do unnecessary work.
435template<class TypeTag>
436struct GradientCalculator<TypeTag, TTag::FlowBaseProblem> {
438};
439
440// The frequency of writing restart (*.ers) files. This is the number of time steps
441// between writing restart files
442template<class TypeTag>
443struct RestartWritingInterval<TypeTag, TTag::FlowBaseProblem> {
444 static constexpr int value = 0xffffff; // disable
445};
446
447// Drift compensation is an experimental feature, i.e., systematic errors in the
448// conservation quantities are only compensated for
449// as default if experimental mode is enabled.
450template<class TypeTag>
451struct EnableDriftCompensation<TypeTag, TTag::FlowBaseProblem> {
452 static constexpr bool value = true;
453};
454
455// By default, we enable the debugging checks if we're compiled in debug mode
456template<class TypeTag>
457struct EnableDebuggingChecks<TypeTag, TTag::FlowBaseProblem> {
458 static constexpr bool value = true;
459};
460
461// store temperature (but do not conserve energy, as long as EnableEnergy is false)
462template<class TypeTag>
463struct EnableTemperature<TypeTag, TTag::FlowBaseProblem> {
464 static constexpr bool value = true;
465};
466
467template<class TypeTag>
468struct EnableMech<TypeTag, TTag::FlowBaseProblem> {
469 static constexpr bool value = false;
470};
471// disable all extensions supported by black oil model. this should not really be
472// necessary but it makes things a bit more explicit
473template<class TypeTag>
474struct EnablePolymer<TypeTag, TTag::FlowBaseProblem> {
475 static constexpr bool value = false;
476};
477template<class TypeTag>
478struct EnableSolvent<TypeTag, TTag::FlowBaseProblem> {
479 static constexpr bool value = false;
480};
481template<class TypeTag>
482struct EnableEnergy<TypeTag, TTag::FlowBaseProblem> {
483 static constexpr bool value = false;
484};
485template<class TypeTag>
486struct EnableFoam<TypeTag, TTag::FlowBaseProblem> {
487 static constexpr bool value = false;
488};
489template<class TypeTag>
490struct EnableExtbo<TypeTag, TTag::FlowBaseProblem> {
491 static constexpr bool value = false;
492};
493template<class TypeTag>
494struct EnableMICP<TypeTag, TTag::FlowBaseProblem> {
495 static constexpr bool value = false;
496};
497
498// disable thermal flux boundaries by default
499template<class TypeTag>
500struct EnableThermalFluxBoundaries<TypeTag, TTag::FlowBaseProblem> {
501 static constexpr bool value = false;
502};
503
504// By default, simulators derived from the FlowBaseProblem are production simulators,
505// i.e., experimental features must be explicitly enabled at compile time
506template<class TypeTag>
507struct EnableExperiments<TypeTag, TTag::FlowBaseProblem> {
508 static constexpr bool value = false;
509};
510
511template<class TypeTag>
512struct OutputMode<TypeTag, TTag::FlowBaseProblem> {
513 static constexpr auto value = "all";
514};
515// Parameterize equilibration accuracy
516template<class TypeTag>
517struct NumPressurePointsEquil<TypeTag, TTag::FlowBaseProblem> {
518 static constexpr int value = ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue;
519};
520// By default, use implicit pressure in rock compaction
521template<class TypeTag>
522struct ExplicitRockCompaction<TypeTag, TTag::FlowBaseProblem> {
523 static constexpr bool value = false;
524};
525
526} // namespace Opm::Properties
527
528#endif // OPM_FLOW_PROBLEM_PROPERTIES_HPP
This file contains the flux module which is used for flow problems.
The base class which specifies the API of aquifer models.
Definition: BaseAquiferModel.hpp:50
This is a "dummy" gradient calculator which does not do anything.
Definition: DummyGradientCalculator.hpp:50
Definition: FIBlackoilModel.hpp:44
This problem simulates an input file given in the data format used by the commercial ECLiPSE simulato...
Definition: FlowProblem.hpp:112
Definition: AluGridVanguard.hpp:57
Definition: BlackoilPhases.hpp:27
Specifies a flux module which uses ECL transmissibilities.
Definition: NewTranFluxModule.hpp:67
Definition: FlowProblemProperties.hpp:118
UndefinedProperty type
Definition: FlowProblemProperties.hpp:119
FvBaseDiscretizationNoAdapt< TypeTag > type
Definition: FlowProblemProperties.hpp:164
FvBaseDiscretization< TypeTag > BaseDiscretization
Definition: FlowProblemProperties.hpp:169
typename BaseDiscretization::BlockVectorWrapper type
Definition: FlowProblemProperties.hpp:170
Definition: EclWriter.hpp:64
Definition: FlowProblemProperties.hpp:112
UndefinedProperty type
Definition: FlowProblemProperties.hpp:113
Definition: EclWriter.hpp:60
Definition: DamarisProperties.hpp:39
Definition: FlowProblemProperties.hpp:98
UndefinedProperty type
Definition: FlowProblemProperties.hpp:99
Definition: FlowProblemProperties.hpp:90
UndefinedProperty type
Definition: FlowProblemProperties.hpp:91
Definition: EclWriter.hpp:56
Definition: EclWriter.hpp:68
Definition: FlowProblemProperties.hpp:105
UndefinedProperty type
Definition: FlowProblemProperties.hpp:106
Definition: FlowProblemProperties.hpp:77
UndefinedProperty type
Definition: FlowProblemProperties.hpp:78
GetPropType< TypeTag, Scalar > type
Definition: FlowProblemProperties.hpp:285
Definition: FlowProblemProperties.hpp:133
UndefinedProperty type
Definition: FlowProblemProperties.hpp:134
typename GetPropType< TypeTag, Properties::Grid >::LeafGridView type
Definition: FlowProblemProperties.hpp:176
GetPropType< TypeTag, Scalar > type
Definition: FlowProblemProperties.hpp:296
TTag::AutoDiffLocalLinearizer type
Definition: FlowProblemProperties.hpp:159
::Opm::EclMaterialLawManager< Traits > EclMaterialLawManager
Definition: FlowProblemProperties.hpp:193
typename EclMaterialLawManager::MaterialLaw type
Definition: FlowProblemProperties.hpp:195
GetPropType< TypeTag, Scalar > type
Definition: FlowProblemProperties.hpp:303
Definition: FlowProblemProperties.hpp:128
UndefinedProperty type
Definition: FlowProblemProperties.hpp:129
Definition: FlowProblemProperties.hpp:123
UndefinedProperty type
Definition: FlowProblemProperties.hpp:124
Definition: FlowProblemProperties.hpp:83
UndefinedProperty type
Definition: FlowProblemProperties.hpp:84
typename EclThermalLawManager::SolidEnergyLaw type
Definition: FlowProblemProperties.hpp:209
::Opm::EclThermalLawManager< Scalar, FluidSystem > EclThermalLawManager
Definition: FlowProblemProperties.hpp:207
TTag::EcfvDiscretization type
Definition: FlowProblemProperties.hpp:153
EcfvStencil< Scalar, GridView, false, false > type
Definition: FlowProblemProperties.hpp:239
Definition: FlowProblemProperties.hpp:63
std::tuple< VtkTracer, OutputBlackOil, CpGridVanguard > InheritsFrom
Definition: FlowProblemProperties.hpp:64
::Opm::EclThermalLawManager< Scalar, FluidSystem > EclThermalLawManager
Definition: FlowProblemProperties.hpp:221
typename EclThermalLawManager::ThermalConductionLaw type
Definition: FlowProblemProperties.hpp:223
Definition: FlowProblemProperties.hpp:70
UndefinedProperty type
Definition: FlowProblemProperties.hpp:71