opm-simulators
FlowGasWaterEnergyTypeTag.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  Copyright 2026 Equinor ASA
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20 */
30 #ifndef OPM_FLOW_GASWATER_ENERGY_TYPETAG_HPP
31 #define OPM_FLOW_GASWATER_ENERGY_TYPETAG_HPP
32 
33 #include <opm/material/thermal/EnergyModuleType.hpp>
34 
38 
40 
41 namespace Opm::Properties {
42 namespace TTag {
44  using InheritsFrom = std::tuple<FlowProblem>;
45 };
46 
51  using InheritsFrom = std::tuple<FlowGasWaterEnergyProblem>;
52 };
53 
54 } // namespace TTag
55 
56 // -----------------------------------------------------------------------
57 // FlowGasWaterEnergyProblemGPU property overrides that affect the layout
58 // of \c BlackOilIntensiveQuantities (and therefore must be visible to
59 // every translation unit that instantiates that class with this TypeTag,
60 // otherwise we get an ODR violation: e.g. the dispatcher TU and
61 // \c flow_gpu.cu would compile differently sized / ordered IQ structs).
62 //
63 // Dispersion is not yet supported on the GPU assembly path; disable it
64 // even though the CPU parent TypeTag enables it.
65 // -----------------------------------------------------------------------
66 template <class TypeTag>
67 struct EnableDispersion<TypeTag, TTag::FlowGasWaterEnergyProblemGPU> {
68  static constexpr bool value = false;
69 };
70 
71 template <class TypeTag>
72 struct EnableDiffusion<TypeTag, TTag::FlowGasWaterEnergyProblemGPU> {
73  static constexpr bool value = false;
74 };
75 
76 template <class TypeTag>
77 struct EnableEnergy<TypeTag, TTag::FlowGasWaterEnergyProblemGPU> {
78  static constexpr bool value = true;
79 };
80 
81 template<class TypeTag>
82 struct Linearizer<TypeTag, TTag::FlowGasWaterEnergyProblem> { using type = TpfaLinearizer<TypeTag>; };
83 
84 template<class TypeTag>
85 struct LocalResidual<TypeTag, TTag::FlowGasWaterEnergyProblem> { using type = BlackOilLocalResidualTPFA<TypeTag>; };
86 
87 template<class TypeTag>
88 struct EnableDiffusion<TypeTag, TTag::FlowGasWaterEnergyProblem> { static constexpr bool value = true; };
89 
90 template<class TypeTag>
91 struct EnableDispersion<TypeTag, TTag::FlowGasWaterEnergyProblem> { static constexpr bool value = true; };
92 
93 template<class TypeTag>
94 struct EnergyModuleType<TypeTag, TTag::FlowGasWaterEnergyProblem>
95 { static constexpr EnergyModules value = EnergyModules::FullyImplicitThermal; };
96 
97 template<class TypeTag>
98 struct EnableDisgasInWater<TypeTag, TTag::FlowGasWaterEnergyProblem> {
99  static constexpr bool value = true;
100 };
101 
102 template<class TypeTag>
103 struct EnableVapwat<TypeTag, TTag::FlowGasWaterEnergyProblem> {
104  static constexpr bool value = true;
105 };
106 
108 template<class TypeTag>
109 struct Indices<TypeTag, TTag::FlowGasWaterEnergyProblem>
110 {
111 private:
112  // it is unfortunately not possible to simply use 'TypeTag' here because
113  // this leads to cyclic definitions of some properties.
116  static constexpr EnergyModules energyModuleType = getPropValue<TypeTag, Properties::EnergyModuleType>();
117  static constexpr int numEnergyVars = energyModuleType == EnergyModules::FullyImplicitThermal;
118 public:
120  getPropValue<TypeTag, Properties::EnableExtbo>(),
121  getPropValue<TypeTag, Properties::EnablePolymer>(),
122  numEnergyVars,
123  getPropValue<TypeTag, Properties::EnableFoam>(),
124  getPropValue<TypeTag, Properties::EnableBrine>(),
125  /*PVOffset=*/0,
126  /*disabledCompIdx=*/FluidSystem::oilCompIdx,
127  getPropValue<TypeTag, Properties::EnableBioeffects>()>;
128 };
129 
130 } // namespace Opm::Properties
131 
132 #endif // OPM_FLOW_GASWATER_ENERGY_TYPETAG_HPP
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(...))
Definition: propertysystem.hh:233
Enable dispersive fluxes?
Definition: multiphasebaseproperties.hh:95
The type of the local residual function.
Definition: fvbaseproperties.hh:100
Enumerations used by the model.
Definition: multiphasebaseproperties.hh:51
Enable the ECL-blackoil extension for disolution of gas into water.
Definition: blackoilproperties.hh:79
Enable the ECL-blackoil extension for water evaporation.
Definition: blackoilproperties.hh:75
Calculates the local residual of the black oil model.
Definition: blackoillocalresidualtpfa.hh:66
Definition: BlackoilModelProperties.hpp:41
Calculates the local residual of the black oil model.
The common code for the linearizers of non-linear systems of equations.
The primary variable and equation indices for the black-oil model.
Definition: blackoiltwophaseindices.hh:52
Specifies who temperature is modeled by the simulator.
Definition: blackoilproperties.hh:108
The common code for the linearizers of non-linear systems of equations.
Definition: tpfalinearizer.hh:119
Specify whether energy should be considered as a conservation quantity or not.
Definition: multiphasebaseproperties.hh:87
Definition: FlowGasWaterEnergyTypeTag.hpp:43
The class which linearizes the non-linear system of equations.
Definition: newtonmethodproperties.hh:36
The primary variable and equation indices for the black-oil model.
GPU-simulation variant: all physics properties are inherited from FlowGasWaterEnergyProblem; the GPU-...
Definition: FlowGasWaterEnergyTypeTag.hpp:50
Definition: blackoilmodel.hh:75
Enable diffusive fluxes?
Definition: multiphasebaseproperties.hh:91