opm-common
Loading...
Searching...
No Matches
NullOilPvt.hpp
1/*
2 Copyright 2025 Equinor ASA
3 This file is part of the Open Porous Media project (OPM).
4 OPM is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8 OPM is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with OPM. If not, see <http://www.gnu.org/licenses/>.
14*/
15#ifndef OPM_NULL_OIL_PVT_HPP
16#define OPM_NULL_OIL_PVT_HPP
17
18#include <opm/common/ErrorMacros.hpp>
19#include <opm/common/utility/gpuDecorators.hpp>
20
22
23namespace Opm
24{
25
33template <class Scalar>
35{
36public:
37 // Approach method
38 OPM_HOST_DEVICE static constexpr auto approach()
39 {
40 return OilPvtApproach::NoOil;
41 } // NoOil approach
42
43 OPM_HOST_DEVICE static constexpr bool isActive()
44 {
45 return false;
46 }
47
48 // Formation volume factor methods
49 template <class Evaluation>
50 OPM_HOST_DEVICE Evaluation inverseFormationVolumeFactor(unsigned /*regionIdx*/,
51 const Evaluation& /*temperature*/,
52 const Evaluation& /*pressure*/,
53 const Evaluation& /*Rs*/) const
54 {
55 return 1.0;
56 }
57
58 template <class Evaluation>
59 OPM_HOST_DEVICE Evaluation saturatedInverseFormationVolumeFactor(unsigned /*regionIdx*/,
60 const Evaluation& /*temperature*/,
61 const Evaluation& /*pressure*/) const
62 {
63 return 1.0;
64 }
65
66 // Dissolution factor methods
67 template <class Evaluation>
68 OPM_HOST_DEVICE Evaluation saturatedGasDissolutionFactor(unsigned /*regionIdx*/,
69 const Evaluation& /*temperature*/,
70 const Evaluation& /*pressure*/) const
71 {
72 return 0.0;
73 }
74
75 template <class Evaluation>
76 OPM_HOST_DEVICE Evaluation saturatedGasDissolutionFactor(unsigned /*regionIdx*/,
77 const Evaluation& /*temperature*/,
78 const Evaluation& /*pressure*/,
79 const Evaluation& /*oilSaturation*/,
80 const Evaluation& /*maxOilSaturation*/) const
81 {
82 return 0.0;
83 }
84
85 // Saturation pressure method
86 template <class Evaluation>
87 OPM_HOST_DEVICE Evaluation saturationPressure(unsigned /*regionIdx*/,
88 const Evaluation& /*temperature*/,
89 const Evaluation& /*Rs*/) const
90 {
91 return 0.0;
92 }
93
94 // Viscosity methods
95 template <class Evaluation>
96 OPM_HOST_DEVICE Evaluation viscosity(unsigned /*regionIdx*/,
97 const Evaluation& /*temperature*/,
98 const Evaluation& /*pressure*/,
99 const Evaluation& /*Rs*/) const
100 {
101 return 0.0;
102 }
103
104 template <class Evaluation>
105 OPM_HOST_DEVICE Evaluation saturatedViscosity(unsigned /*regionIdx*/,
106 const Evaluation& /*temperature*/,
107 const Evaluation& /*pressure*/) const
108 {
109 return 0.0;
110 }
111
112 // Internal energy methods
113 template <class Evaluation>
114 OPM_HOST_DEVICE Evaluation internalEnergy(unsigned /*regionIdx*/,
115 const Evaluation& /*temperature*/,
116 const Evaluation& /*pressure*/,
117 const Evaluation& /*Rs*/) const
118 {
119 return 0.0;
120 }
121
122 // Vaporization parameter methods
123 OPM_HOST_DEVICE void setVapPars(const Scalar /*par1*/, const Scalar /*par2*/) const
124 {
125 }
126
127 // Heat of vaporization
128 OPM_HOST_DEVICE Scalar hVap(unsigned /*regionIdx*/) const
129 {
130 return 0.0;
131 }
132
133 // Mixing energy flag
134 OPM_HOST_DEVICE static constexpr bool mixingEnergy()
135 {
136 return false;
137 }
138
139 // Diffusion coefficient
140 template <class Evaluation>
141 OPM_HOST_DEVICE Evaluation diffusionCoefficient(const Evaluation& /*temperature*/,
142 const Evaluation& /*pressure*/,
143 unsigned /*compIdx*/) const
144 {
145 return 0.0;
146 }
147
148 OPM_HOST_DEVICE Scalar oilReferenceDensity(unsigned /*regionIdx*/) const
149 {
150 OPM_THROW(std::logic_error, "NullOilPvt does not support oil reference density.");
151 }
152};
153
154} // namespace Opm
155
156#endif // OPM_NULL_OIL_PVT_HPP
This class represents the Pressure-Volume-Temperature relations of the oil phase in the black-oil mod...
Null object for oil PVT calculations.
Definition NullOilPvt.hpp:35
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30