opm-simulators
BlackOilIntensiveQuantitiesGlobalIndex.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_BLACK_OIL_INTENSIVE_QUANTITIES_GLOBAL_INDEX_HPP
29 #define OPM_BLACK_OIL_INTENSIVE_QUANTITIES_GLOBAL_INDEX_HPP
30 
32 
33 #include <dune/common/fmatrix.hh>
34 
35 #include <opm/common/ErrorMacros.hpp>
36 #include <opm/common/OpmLog/OpmLog.hpp>
37 
38 #include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
39 
40 #include <opm/material/fluidstates/BlackOilFluidState.hpp>
41 #include <opm/material/common/Valgrind.hpp>
42 
47 
48 #include <opm/utility/CopyablePtr.hpp>
49 
50 #include <stdexcept>
51 #include <utility>
52 
53 #include <fmt/format.h>
54 
55 namespace Opm {
56 
64 template <class TypeTag>
66  : public GetPropType<TypeTag, Properties::DiscIntensiveQuantities>
67  , public GetPropType<TypeTag, Properties::FluxModule>::FluxIntensiveQuantities
68  , public BlackOilDiffusionIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableDiffusion>()>
69  , public BlackOilSolventIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableSolvent>()>
70  , public BlackOilExtboIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableExtbo>()>
71  , public BlackOilPolymerIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnablePolymer>()>
72  , public BlackOilFoamIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableFoam>()>
73  , public BlackOilBrineIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableBrine>()>
74  , public BlackOilEnergyIntensiveQuantitiesGlobalIndex<TypeTag, getPropValue<TypeTag, Properties::EnergyModuleType>()>
75  , public BlackOilBioeffectsIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableBioeffects>()>
76  , public BlackOilConvectiveMixingIntensiveQuantities<TypeTag, getPropValue<TypeTag, Properties::EnableConvectiveMixing>()>
77 {
80 
90 
91  enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
92  enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
93  enum { enableExtbo = getPropValue<TypeTag, Properties::EnableExtbo>() };
94  enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
95  enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
96  enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
97  enum { enableVapwat = getPropValue<TypeTag, Properties::EnableVapwat>() };
98  enum { enableSaltPrecipitation = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>() };
99  static constexpr EnergyModules energyModuleType = getPropValue<TypeTag, Properties::EnergyModuleType>();
100  enum { enableDiffusion = getPropValue<TypeTag, Properties::EnableDiffusion>() };
101  enum { enableConvectiveMixing = getPropValue<TypeTag, Properties::EnableConvectiveMixing>() };
102  enum { enableBioeffects = getPropValue<TypeTag, Properties::EnableBioeffects>() };
103  enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
104  enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
105  enum { waterCompIdx = FluidSystem::waterCompIdx };
106  enum { oilCompIdx = FluidSystem::oilCompIdx };
107  enum { gasCompIdx = FluidSystem::gasCompIdx };
108  enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
109  enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
110  enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
111  enum { dimWorld = GridView::dimensionworld };
112  enum { compositionSwitchIdx = Indices::compositionSwitchIdx };
113 
114  static constexpr bool compositionSwitchEnabled = Indices::compositionSwitchIdx >= 0;
115  static constexpr bool waterEnabled = Indices::waterEnabled;
116  static constexpr bool gasEnabled = Indices::gasEnabled;
117  static constexpr bool oilEnabled = Indices::oilEnabled;
118 
119  using Toolbox = MathToolbox<Evaluation>;
120  using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
121  using FluxIntensiveQuantities = typename FluxModule::FluxIntensiveQuantities;
123 
124  using DirectionalMobilityPtr = Utility::CopyablePtr<DirectionalMobility<TypeTag>>;
125 
126 public:
127  using FluidState = BlackOilFluidState<Evaluation,
128  FluidSystem,
129  energyModuleType != EnergyModules::NoTemperature,
130  energyModuleType == EnergyModules::FullyImplicitThermal,
131  compositionSwitchEnabled,
132  enableVapwat,
133  enableBrine,
134  enableSaltPrecipitation,
135  false,
136  enableSolvent,
137  Indices::numPhases>;
139 
141  {
142  if constexpr (compositionSwitchEnabled) {
143  fluidState_.setRs(0.0);
144  fluidState_.setRv(0.0);
145  }
146  if constexpr (enableVapwat) {
147  fluidState_.setRvw(0.0);
148  }
149  }
150 
154  void update(const ElementContext& elemCtx, unsigned dofIdx, unsigned timeIdx)
155  {
156  ParentType::update(elemCtx, dofIdx, timeIdx);
157 
158  const auto& problem = elemCtx.problem();
159  const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
160  unsigned globalSpaceIdx = elemCtx.globalSpaceIndex(dofIdx, timeIdx);
161  this->update(problem,priVars,globalSpaceIdx,timeIdx);
162  }
163 
164  void update(const Problem& problem,
165  const PrimaryVariables& priVars,
166  unsigned globalSpaceIdx,
167  unsigned timeIdx)
168  {
169 
170  this->extrusionFactor_ = 1.0;// to avoid fixing parent update
171  OPM_TIMEBLOCK_LOCAL(UpdateIntensiveQuantities, Subsystem::PvtProps | Subsystem::SatProps);
172  Scalar RvMax = FluidSystem::enableVaporizedOil()
173  ? problem.maxOilVaporizationFactor(timeIdx, globalSpaceIdx)
174  : 0.0;
175  Scalar RsMax = FluidSystem::enableDissolvedGas()
176  ? problem.maxGasDissolutionFactor(timeIdx, globalSpaceIdx)
177  : 0.0;
178 
179  asImp_().updateTemperature_(problem, priVars, globalSpaceIdx, timeIdx);
180 
181  unsigned pvtRegionIdx = priVars.pvtRegionIndex();
182  fluidState_.setPvtRegionIndex(pvtRegionIdx);
183 
184  //asImp_().updateSaltConcentration_(elemCtx, dofIdx, timeIdx);
185 
186  // extract the water and the gas saturations for convenience
187  Evaluation Sw = 0.0;
188  if constexpr (waterEnabled) {
189  if (priVars.primaryVarsMeaningWater() == PrimaryVariables::WaterMeaning::Sw) {
190  Sw = priVars.makeEvaluation(Indices::waterSwitchIdx, timeIdx);
191  } else if (priVars.primaryVarsMeaningWater() == PrimaryVariables::WaterMeaning::Disabled) {
192  // water is enabled but is not a primary variable i.e. one phase case
193  Sw = 1.0;
194  }
195  }
196  Evaluation Sg = 0.0;
197  if constexpr (gasEnabled) {
198  if (priVars.primaryVarsMeaningGas() == PrimaryVariables::GasMeaning::Sg) {
199  Sg = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
200  } else if (priVars.primaryVarsMeaningGas() == PrimaryVariables::GasMeaning::Rv) {
201  Sg = 1.0 - Sw;
202  } else if (priVars.primaryVarsMeaningGas() == PrimaryVariables::GasMeaning::Disabled) {
203  if constexpr (waterEnabled) {
204  Sg = 1.0 - Sw; // two phase water + gas
205  } else {
206  // one phase case
207  Sg = 1.0;
208  }
209  }
210  }
211  Valgrind::CheckDefined(Sg);
212  Valgrind::CheckDefined(Sw);
213 
214  Evaluation So = 1.0 - Sw - Sg;
215 
216  // deal with solvent
217  if constexpr (enableSolvent) {
218  So -= priVars.makeEvaluation(Indices::solventSaturationIdx, timeIdx);
219  }
220 
221  if (FluidSystem::phaseIsActive(waterPhaseIdx)) {
222  fluidState_.setSaturation(waterPhaseIdx, Sw);
223  }
224 
225  if (FluidSystem::phaseIsActive(gasPhaseIdx)) {
226  fluidState_.setSaturation(gasPhaseIdx, Sg);
227  }
228 
229  if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
230  fluidState_.setSaturation(oilPhaseIdx, So);
231  }
232 
233  std::array<Evaluation, numPhases> pC{};
234  computeRelpermAndPC(mobility_, pC, problem, fluidState_, globalSpaceIdx);
235  // oil is the reference phase for pressure
236  if (priVars.primaryVarsMeaningPressure() == PrimaryVariables::PressureMeaning::Pg) {
237  const Evaluation& pg = priVars.makeEvaluation(Indices::pressureSwitchIdx, timeIdx);
238  for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
239  if (FluidSystem::phaseIsActive(phaseIdx)) {
240  fluidState_.setPressure(phaseIdx, pg + (pC[phaseIdx] - pC[gasPhaseIdx]));
241  }
242  }
243  } else {
244  const Evaluation& po = priVars.makeEvaluation(Indices::pressureSwitchIdx, timeIdx);
245  for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
246  if (FluidSystem::phaseIsActive(phaseIdx)) {
247  fluidState_.setPressure(phaseIdx, po + (pC[phaseIdx] - pC[oilPhaseIdx]));
248  }
249  }
250  }
251 
252  Evaluation SoMax = 0.0;
253  if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
254  SoMax = max(fluidState_.saturation(oilPhaseIdx),
255  problem.maxOilSaturation(globalSpaceIdx));
256  }
257 
258  // take the meaning of the switching primary variable into account for the gas
259  // and oil phase compositions
260  if (priVars.primaryVarsMeaningGas() == PrimaryVariables::GasMeaning::Rs) {
261  const auto& Rs = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
262  fluidState_.setRs(Rs);
263  } else {
264  if (FluidSystem::enableDissolvedGas()) { // Add So > 0? i.e. if only water set rs = 0)
265  OPM_TIMEBLOCK_LOCAL(UpdateSaturatedRs, Subsystem::PvtProps);
266  if constexpr (enableExtbo) {
267  fluidState_.setRs(min(RsMax, asImp_().rs()));
268  }
269  else {
270  const Evaluation& RsSat =
271  FluidSystem::saturatedDissolutionFactor(fluidState_,
272  oilPhaseIdx,
273  pvtRegionIdx,
274  SoMax);
275  fluidState_.setRs(min(RsMax, RsSat));
276  }
277  }
278  else if constexpr (compositionSwitchEnabled) {
279  fluidState_.setRs(0.0);
280  }
281  }
282 
283  if (priVars.primaryVarsMeaningGas() == PrimaryVariables::GasMeaning::Rv) {
284  const auto& Rv = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
285  fluidState_.setRv(Rv);
286  } else {
287  if (FluidSystem::enableVaporizedOil() ) { // Add Sg > 0? i.e. if only water set rv = 0)
288  OPM_TIMEBLOCK_LOCAL(UpdateSaturatedRv, Subsystem::PvtProps);
289  //NB! should save the indexing for later evaluation
290  if constexpr (enableExtbo) {
291  fluidState_.setRv(min(RvMax, asImp_().rv()));
292  }
293  else {
294  const Evaluation& RvSat =
295  FluidSystem::saturatedDissolutionFactor(fluidState_,
296  gasPhaseIdx,
297  pvtRegionIdx,
298  SoMax);
299  fluidState_.setRv(min(RvMax, RvSat));
300  }
301  }
302  else if constexpr (compositionSwitchEnabled) {
303  fluidState_.setRv(0.0);
304  }
305  }
306 
307  if constexpr (enableVapwat) {
308  if (priVars.primaryVarsMeaningWater() == PrimaryVariables::WaterMeaning::Rvw) {
309  const auto& Rvw = priVars.makeEvaluation(Indices::waterSwitchIdx, timeIdx);
310  fluidState_.setRvw(Rvw);
311  } else {
312  //NB! should save the indexing for later evaluation
313  if (FluidSystem::enableVaporizedWater()) { // Add Sg > 0? i.e. if only water set rv = 0)
314  OPM_TIMEBLOCK_LOCAL(UpdateSaturatedRv, Subsystem::PvtProps);
315  const Evaluation& RvwSat = FluidSystem::saturatedVaporizationFactor(fluidState_,
316  gasPhaseIdx,
317  pvtRegionIdx);
318  fluidState_.setRvw(RvwSat);
319  }
320  }
321  }
322 
323  for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
324  if (!FluidSystem::phaseIsActive(phaseIdx)) {
325  continue;
326  }
327  computeInverseFormationVolumeFactorAndViscosity(fluidState_, phaseIdx, pvtRegionIdx);
328  }
329  Valgrind::CheckDefined(mobility_);
330 
331  // calculate the phase densities
332  Evaluation rho;
333  if (FluidSystem::phaseIsActive(waterPhaseIdx)) {
334  OPM_TIMEBLOCK_LOCAL(UpdateWDensity, Subsystem::PvtProps);
335  rho = fluidState_.invB(waterPhaseIdx);
336  rho *= FluidSystem::referenceDensity(waterPhaseIdx, pvtRegionIdx);
337  fluidState_.setDensity(waterPhaseIdx, rho);
338  }
339 
340  if (FluidSystem::phaseIsActive(gasPhaseIdx)) {
341  OPM_TIMEBLOCK_LOCAL(UpdateGDensity, Subsystem::PvtProps);
342  rho = fluidState_.invB(gasPhaseIdx);
343  rho *= FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
344  if (FluidSystem::enableVaporizedOil()) {
345  rho += fluidState_.invB(gasPhaseIdx) *
346  fluidState_.Rv() *
347  FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx);
348  }
349  if (FluidSystem::enableVaporizedWater()) {
350  rho += fluidState_.invB(gasPhaseIdx) *
351  fluidState_.Rvw() *
352  FluidSystem::referenceDensity(waterPhaseIdx, pvtRegionIdx);
353  }
354  fluidState_.setDensity(gasPhaseIdx, rho);
355  }
356 
357  if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
358  OPM_TIMEBLOCK_LOCAL(UpdateODensity, Subsystem::PvtProps);
359  rho = fluidState_.invB(oilPhaseIdx);
360  rho *= FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx);
361  if (FluidSystem::enableDissolvedGas()) {
362  rho += fluidState_.invB(oilPhaseIdx) *
363  fluidState_.Rs() *
364  FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
365  }
366  fluidState_.setDensity(oilPhaseIdx, rho);
367  }
368 
369  // retrieve the porosity from the problem
370  referencePorosity_ = problem.porosity(globalSpaceIdx,timeIdx);
371  porosity_ = referencePorosity_;
372  // the porosity must be modified by the compressibility of the
373  // rock...
374  Scalar rockCompressibility = problem.rockCompressibility(globalSpaceIdx);
375  if (rockCompressibility > 0.0) {
376  OPM_TIMEBLOCK_LOCAL(UpdateRockCompressibility, Subsystem::PvtProps);
377  Scalar rockRefPressure = problem.rockReferencePressure(globalSpaceIdx);
378  Evaluation x;
379  if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
380  x = rockCompressibility*(fluidState_.pressure(oilPhaseIdx) - rockRefPressure);
381  } else if (FluidSystem::phaseIsActive(waterPhaseIdx)) {
382  x = rockCompressibility*(fluidState_.pressure(waterPhaseIdx) - rockRefPressure);
383  } else {
384  x = rockCompressibility*(fluidState_.pressure(gasPhaseIdx) - rockRefPressure);
385  }
386  porosity_ *= 1.0 + x + 0.5 * x * x;
387  }
388 
389  // deal with water induced rock compaction
390  porosity_ *= problem.template rockCompPoroMultiplier<Evaluation>(*this, globalSpaceIdx);
391 
392  rockCompTransMultiplier_ = problem.template rockCompTransMultiplier<Evaluation>(*this, globalSpaceIdx);
393 
394  if constexpr (enableConvectiveMixing) {
395  asImp_().updateSaturatedDissolutionFactor_();
396  }
397 
398 #ifndef NDEBUG
399  // some safety checks in debug mode
400  for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
401  if (!FluidSystem::phaseIsActive(phaseIdx)) {
402  continue;
403  }
404 
405  assert(isfinite(fluidState_.density(phaseIdx)));
406  assert(isfinite(fluidState_.saturation(phaseIdx)));
407  assert(isfinite(fluidState_.temperature(phaseIdx)));
408  assert(isfinite(fluidState_.pressure(phaseIdx)));
409  assert(isfinite(fluidState_.invB(phaseIdx)));
410  }
411  assert(isfinite(fluidState_.Rs()));
412  assert(isfinite(fluidState_.Rv()));
413 #endif
414  }
415 
419  const FluidState& fluidState() const
420  { return fluidState_; }
421 
425  const Evaluation& mobility(unsigned phaseIdx) const
426  { return mobility_[phaseIdx]; }
427 
428  const Evaluation& mobility(unsigned phaseIdx, FaceDir::DirEnum facedir) const
429  {
430  using Dir = FaceDir::DirEnum;
431  if (dirMob_) {
432  switch (facedir) {
433  case Dir::XPlus:
434  return dirMob_->getArray(0)[phaseIdx];
435  case Dir::YPlus:
436  return dirMob_->getArray(1)[phaseIdx];
437  case Dir::ZPlus:
438  return dirMob_->getArray(2)[phaseIdx];
439  default:
440  throw std::runtime_error("Unexpected face direction");
441  }
442  } else {
443  return mobility_[phaseIdx];
444  }
445  }
446 
447  void computeInverseFormationVolumeFactorAndViscosity(FluidState& fluidState,
448  unsigned phaseIdx,
449  unsigned pvtRegionIdx) {
450  OPM_TIMEBLOCK_LOCAL(UpdateInverseFormationFactorAndViscosity, Subsystem::PvtProps);
451  {
452  OPM_TIMEBLOCK_LOCAL(UpdateFormationFactor, Subsystem::PvtProps);
453  const auto& b = FluidSystem::inverseFormationVolumeFactor(fluidState, phaseIdx, pvtRegionIdx);
454  fluidState_.setInvB(phaseIdx, b);
455  }
456  {
457  OPM_TIMEBLOCK_LOCAL(UpdateViscosity, Subsystem::PvtProps);
458  typename FluidSystem::template ParameterCache<Evaluation> paramCache;
459  paramCache.setRegionIndex(pvtRegionIdx);
460  paramCache.updateAll(fluidState_);
461 
462  const auto& mu = FluidSystem::viscosity(fluidState, paramCache, phaseIdx);
463  mobility_[phaseIdx] /= mu;
464  }
465  }
466 
467  void computeRelpermAndPC(std::array<Evaluation,numPhases>& mobility,
468  std::array<Evaluation, numPhases>& pC,
469  const Problem& problem,
470  const FluidState& fluidState,
471  unsigned globalSpaceIdx){
472  OPM_TIMEBLOCK_LOCAL(UpdateRelperm, Subsystem::SatProps);
473  const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
474  MaterialLaw::capillaryPressures(pC, materialParams, fluidState_);
475  problem.updateRelperms(mobility, dirMob_, fluidState, globalSpaceIdx);
476  }
477 
481  const Evaluation& porosity() const
482  { return porosity_; }
483 
487  const Evaluation& rockCompTransMultiplier() const
488  { return rockCompTransMultiplier_; }
489 
503  auto pvtRegionIndex() const -> decltype(std::declval<FluidState>().pvtRegionIndex())
504  { return fluidState_.pvtRegionIndex(); }
505 
509  Evaluation relativePermeability(unsigned phaseIdx) const
510  {
511  // warning: slow
512  return fluidState_.viscosity(phaseIdx)*mobility(phaseIdx);
513  }
514 
521  Scalar referencePorosity() const
522  { return referencePorosity_; }
523 
524  const Evaluation& permFactor() const
525  {
526  throw std::logic_error("permFactor() is not yet implemented for compositional modeling");
527  }
528 
532  OPM_HOST_DEVICE const auto& getFluidSystem() const
533  {
534  return fluidState_.fluidSystem();
535  }
536 
537 private:
543  friend BlackOilBrineIntensiveQuantities<TypeTag, enableBrine>;
545 
546  Implementation& asImp_()
547  { return *static_cast<Implementation*>(this); }
548 
549  FluidState fluidState_;
550  Scalar referencePorosity_;
551  Evaluation porosity_;
552  Evaluation rockCompTransMultiplier_;
553  std::array<Evaluation,numPhases> mobility_;
554 
555  // Instead of writing a custom copy constructor and a custom assignment operator just to handle
556  // the dirMob_ unique ptr member variable when copying BlackOilIntensiveQuantites (see for example
557  // updateIntensitiveQuantities_() in fvbaseelementcontext.hh for a copy example) we write the below
558  // custom wrapper class CopyablePtr which wraps the unique ptr and makes it copyable.
559  //
560  // The advantage of this approach is that we avoid having to call all the base class copy constructors and
561  // assignment operators explicitly (which is needed when writing the custom copy constructor and assignment
562  // operators) which could become a maintenance burden. For example, when adding a new base class (if that should
563  // be needed sometime in the future) to BlackOilIntensiveQuantites we could forget to update the copy
564  // constructor and assignment operators.
565  //
566  // We want each copy of the BlackOilIntensiveQuantites to be unique, (TODO: why?) so we have to make a copy
567  // of the unique_ptr each time we copy construct or assign to it from another BlackOilIntensiveQuantites.
568  // (On the other hand, if a copy could share the ptr with the original, a shared_ptr could be used instead and the
569  // wrapper would not be needed)
570  DirectionalMobilityPtr dirMob_;
571 };
572 
573 } // namespace Opm
574 
575 #endif
Contains the classes required to extend the black-oil model by energy.
Provides the volumetric quantities required for the equations needed by the convective mixing (DRSDTC...
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
Definition: BlackOilEnergyIntensiveQuantitiesGlobalIndex.hpp:36
Classes required for dynamic convective mixing.
const Evaluation & porosity() const
Returns the average porosity within the control volume.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:481
Provides the volumetric quantities required for the calculation of molecular diffusive fluxes...
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
Contains classes extending the black-oil model.
Contains the quantities which are are constant within a finite volume in the black-oil model using gl...
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:65
Declares the properties required by the black oil model.
const Evaluation & rockCompTransMultiplier() const
The pressure-dependent transmissibility multiplier due to rock compressibility.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:487
auto pvtRegionIndex() const -> decltype(std::declval< FluidState >().pvtRegionIndex())
Returns the index of the PVT region used to calculate the thermodynamic quantities.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:503
Provides the volumetric quantities required for the equations needed by the polymers extension of the...
OPM_HOST_DEVICE const auto & getFluidSystem() const
Returns the fluid system used by this intensive quantities.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:532
Provides the volumetric quantities required for the equations needed by the polymers extension of the...
const Evaluation & mobility(unsigned phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:425
Evaluation relativePermeability(unsigned phaseIdx) const
Returns the relative permeability of a given phase within the control volume.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:509
Provides the volumetric quantities required for the equations needed by the solvents extension of the...
Provides the volumetric quantities required for the equations needed by the solvents extension of the...
This file contains definitions related to directional mobilities.
const FluidState & fluidState() const
Returns the phase state for the control-volume.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:419
void update(const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx)
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:154
Provides the volumetric quantities required for the equations needed by the bioeffects extension of t...
Scalar referencePorosity() const
Returns the porosity of the rock at reference conditions.
Definition: BlackOilIntensiveQuantitiesGlobalIndex.hpp:521