blackoilprimaryvariables.hh
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 OPM is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9 OPM is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with OPM. If not, see <http://www.gnu.org/licenses/>.
15 Consult the COPYING file in the top-level source directory of this
16 module for the precise wording of the license and the list of
17 copyright holders.
18*/
24#ifndef EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH
25#define EWOMS_BLACK_OIL_PRIMARY_VARIABLES_HH
26
27#include <dune/common/fvector.hh>
28
29#include <opm/material/common/MathToolbox.hpp>
30#include <opm/material/common/Valgrind.hpp>
31#include <opm/material/constraintsolvers/NcpFlash.hpp>
32#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
33#include <opm/material/fluidstates/CompositionalFluidState.hpp>
34#include <opm/material/fluidstates/SimpleModularFluidState.hpp>
35
44
46
47#include <algorithm>
48#include <array>
49#include <cassert>
50#include <cstddef>
51#include <cstdint>
52#include <stdexcept>
53#include <type_traits>
54
55namespace Opm::Parameters {
56
57template<class Scalar>
59{ static constexpr Scalar value = 1.0; };
60
61} // namespace Opm::Parameters
62
63namespace Opm {
64
70template <class TypeTag>
72{
75
83
84 // number of equations
85 enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
86
87 // primary variable indices
88 enum { waterSwitchIdx = Indices::waterSwitchIdx };
89 enum { pressureSwitchIdx = Indices::pressureSwitchIdx };
90 enum { compositionSwitchIdx = Indices::compositionSwitchIdx };
91 enum { saltConcentrationIdx = Indices::saltConcentrationIdx };
92 enum { solventSaturationIdx = Indices::solventSaturationIdx };
93
94 static constexpr bool compositionSwitchEnabled = Indices::compositionSwitchIdx >= 0;
95 static constexpr bool waterEnabled = Indices::waterEnabled;
96 static constexpr bool gasEnabled = Indices::gasEnabled;
97 static constexpr bool oilEnabled = Indices::oilEnabled;
98
99 // phase indices from the fluid system
100 enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
101 enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
102 enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
103 enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
104
105 // component indices from the fluid system
106 enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
107 enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
108 enum { enableExtbo = getPropValue<TypeTag, Properties::EnableExtbo>() };
109 enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
110 enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
111 enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
112 enum { enableSaltPrecipitation = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>() };
113 enum { enableVapwat = getPropValue<TypeTag, Properties::EnableVapwat>() };
114 enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
115 enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
116 enum { enableMICP = getPropValue<TypeTag, Properties::EnableMICP>() };
117 enum { gasCompIdx = FluidSystem::gasCompIdx };
118 enum { waterCompIdx = FluidSystem::waterCompIdx };
119 enum { oilCompIdx = FluidSystem::oilCompIdx };
120
121 using Toolbox = MathToolbox<Evaluation>;
122 using ComponentVector = Dune::FieldVector<Scalar, numComponents>;
130
131 static_assert(numPhases == 3, "The black-oil model assumes three phases!");
132 static_assert(numComponents == 3, "The black-oil model assumes three components!");
133
134public:
135 enum class WaterMeaning : std::uint8_t {
136 Sw, // water saturation
137 Rvw, // vaporized water
138 Rsw, // dissolved gas in water
139 Disabled, // The primary variable is not used
140 };
141
142 enum class PressureMeaning : std::uint8_t {
143 Po, // oil pressure
144 Pg, // gas pressure
145 Pw, // water pressure
146 };
147
148 enum class GasMeaning : std::uint8_t {
149 Sg, // gas saturation
150 Rs, // dissolved gas in oil
151 Rv, // vapporized oil
152 Disabled, // The primary variable is not used
153 };
154
155 enum class BrineMeaning : std::uint8_t {
156 Cs, // salt concentration
157 Sp, // (precipitated) salt saturation
158 Disabled, // The primary variable is not used
159 };
160
161 enum class SolventMeaning : std::uint8_t {
162 Ss, // solvent saturation
163 Rsolw, // dissolved solvent in water
164 Disabled, // The primary variable is not used
165 };
166
168 {
169 Valgrind::SetUndefined(*this);
170 pvtRegionIdx_ = 0;
171 }
172
177
179 {
181 result.pvtRegionIdx_ = 1;
182 result.primaryVarsMeaningBrine_ = BrineMeaning::Sp;
183 result.primaryVarsMeaningGas_ = GasMeaning::Rv;
184 result.primaryVarsMeaningPressure_ = PressureMeaning::Pg;
185 result.primaryVarsMeaningWater_ = WaterMeaning::Rsw;
186 result.primaryVarsMeaningSolvent_ = SolventMeaning::Ss;
187 for (std::size_t i = 0; i < result.size(); ++i) {
188 result[i] = i + 1;
189 }
190
191 return result;
192 }
193
194 static void init()
195 {
196 // TODO: these parameters have undocumented non-trivial dependencies
197 pressureScale_ = Parameters::Get<Parameters::PressureScale<Scalar>>();
198 }
199
200 static void registerParameters()
201 {
202 Parameters::Register<Parameters::PressureScale<Scalar>>
203 ("Scaling of pressure primary variable");
204 }
205
206 void setPressureScale(Scalar val)
207 { pressureScale_ = val; }
208
209 Evaluation
210 makeEvaluation(unsigned varIdx, unsigned timeIdx,
211 LinearizationType linearizationType = LinearizationType()) const
212 {
213 const Scalar scale = varIdx == pressureSwitchIdx ? this->pressureScale_ : Scalar{1.0};
214 if (std::is_same_v<Evaluation, Scalar>) {
215 return (*this)[varIdx] * scale; // finite differences
216 }
217 else {
218 // automatic differentiation
219 if (timeIdx == linearizationType.time) {
220 return Toolbox::createVariable((*this)[varIdx], varIdx) * scale;
221 }
222 else {
223 return Toolbox::createConstant((*this)[varIdx]) * scale;
224 }
225 }
226 }
227
235 void setPvtRegionIndex(unsigned value)
236 { pvtRegionIdx_ = static_cast<unsigned short>(value); }
237
241 unsigned pvtRegionIndex() const
242 { return pvtRegionIdx_; }
243
249 { return primaryVarsMeaningWater_; }
250
256 { primaryVarsMeaningWater_ = newMeaning; }
257
263 { return primaryVarsMeaningPressure_; }
264
270 { primaryVarsMeaningPressure_ = newMeaning; }
271
277 { return primaryVarsMeaningGas_; }
278
284 { primaryVarsMeaningGas_ = newMeaning; }
285
287 { return primaryVarsMeaningBrine_; }
288
294 { primaryVarsMeaningBrine_ = newMeaning; }
295
297 { return primaryVarsMeaningSolvent_; }
298
304 { primaryVarsMeaningSolvent_ = newMeaning; }
305
309 template <class FluidState>
310 void assignMassConservative(const FluidState& fluidState,
311 const MaterialLawParams& matParams,
312 bool isInEquilibrium = false)
313 {
314 using ConstEvaluation = std::remove_reference_t<typename FluidState::Scalar>;
315 using FsEvaluation = std::remove_const_t<ConstEvaluation>;
316 using FsToolbox = MathToolbox<FsEvaluation>;
317
318#ifndef NDEBUG
319 // make sure the temperature is the same in all fluid phases
320 for (unsigned phaseIdx = 1; phaseIdx < numPhases; ++phaseIdx) {
321 Valgrind::CheckDefined(fluidState.temperature(0));
322 Valgrind::CheckDefined(fluidState.temperature(phaseIdx));
323
324 assert(fluidState.temperature(0) == fluidState.temperature(phaseIdx));
325 }
326#endif // NDEBUG
327
328 // for the equilibrium case, we don't need complicated
329 // computations.
330 if (isInEquilibrium) {
331 assignNaive(fluidState);
332 return;
333 }
334
335 // If your compiler bails out here, you're probably not using a suitable black
336 // oil fluid system.
337 typename FluidSystem::template ParameterCache<Scalar> paramCache;
338 paramCache.setRegionIndex(pvtRegionIdx_);
339 paramCache.setMaxOilSat(FsToolbox::value(fluidState.saturation(oilPhaseIdx)));
340
341 // create a mutable fluid state with well defined densities based on the input
342 using NcpFlash = NcpFlash<Scalar, FluidSystem>;
343 using FlashFluidState = CompositionalFluidState<Scalar, FluidSystem>;
344 FlashFluidState fsFlash;
345 fsFlash.setTemperature(FsToolbox::value(fluidState.temperature(/*phaseIdx=*/0)));
346 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
347 fsFlash.setPressure(phaseIdx, FsToolbox::value(fluidState.pressure(phaseIdx)));
348 fsFlash.setSaturation(phaseIdx, FsToolbox::value(fluidState.saturation(phaseIdx)));
349 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
350 fsFlash.setMoleFraction(phaseIdx, compIdx,
351 FsToolbox::value(fluidState.moleFraction(phaseIdx, compIdx)));
352 }
353 }
354
355 paramCache.updateAll(fsFlash);
356 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
357 if (!FluidSystem::phaseIsActive(phaseIdx)) {
358 continue;
359 }
360
361 const Scalar rho =
362 FluidSystem::template density<FlashFluidState, Scalar>(fsFlash, paramCache, phaseIdx);
363 fsFlash.setDensity(phaseIdx, rho);
364 }
365
366 // calculate the "global molarities"
367 ComponentVector globalMolarities(0.0);
368 for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
369 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
370 if (!FluidSystem::phaseIsActive(phaseIdx)) {
371 continue;
372 }
373
374 globalMolarities[compIdx] +=
375 fsFlash.saturation(phaseIdx) * fsFlash.molarity(phaseIdx, compIdx);
376 }
377 }
378
379 // use a flash calculation to calculate a fluid state in
380 // thermodynamic equilibrium
381
382 // run the flash calculation
383 NcpFlash::template solve<MaterialLaw>(fsFlash, matParams, paramCache, globalMolarities);
384
385 // use the result to assign the primary variables
386 assignNaive(fsFlash);
387 }
388
392 template <class FluidState>
393 void assignNaive(const FluidState& fluidState)
394 {
395 using ConstEvaluation = std::remove_reference_t<typename FluidState::Scalar>;
396 using FsEvaluation = std::remove_const_t<ConstEvaluation>;
397 using FsToolbox = MathToolbox<FsEvaluation>;
398
399 const bool gasPresent =
400 FluidSystem::phaseIsActive(gasPhaseIdx)
401 ? fluidState.saturation(gasPhaseIdx) > 0.0
402 : false;
403 const bool oilPresent =
404 FluidSystem::phaseIsActive(oilPhaseIdx)
405 ? fluidState.saturation(oilPhaseIdx) > 0.0
406 : false;
407 const bool waterPresent =
408 FluidSystem::phaseIsActive(waterPhaseIdx)
409 ? fluidState.saturation(waterPhaseIdx) > 0.0
410 : false;
411 const auto& saltSaturation =
412 BlackOil::getSaltSaturation_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
413 const bool precipitatedSaltPresent = enableSaltPrecipitation ? saltSaturation > 0.0 : false;
414 const bool oneActivePhases = FluidSystem::numActivePhases() == 1;
415 // deal with the primary variables for the energy extension
416 EnergyModule::assignPrimaryVars(*this, fluidState);
417
418 // Determine the meaning of the pressure primary variables
419 // Depending on the phases present, this variable is either interpreted as the
420 // pressure of the oil phase, gas phase (if no oil) or water phase (if only water)
421 if (gasPresent && FluidSystem::enableVaporizedOil() && !oilPresent) {
422 primaryVarsMeaningPressure_ = PressureMeaning::Pg;
423 }
424 else if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
425 primaryVarsMeaningPressure_ = PressureMeaning::Po;
426 }
427 else if (waterPresent && FluidSystem::enableDissolvedGasInWater() && !gasPresent) {
428 primaryVarsMeaningPressure_ = PressureMeaning::Pw;
429 }
430 else if (FluidSystem::phaseIsActive(gasPhaseIdx)) {
431 primaryVarsMeaningPressure_ = PressureMeaning::Pg;
432 }
433 else {
434 assert(FluidSystem::phaseIsActive(waterPhaseIdx));
435 primaryVarsMeaningPressure_ = PressureMeaning::Pw;
436 }
437
438 // Determine the meaning of the water primary variables
439 // Depending on the phases present, this variable is either interpreted as
440 // water saturation or vapporized water in the gas phase
441 // For two-phase gas-oil models and one-phase case the variable is disabled.
442 if (waterPresent && gasPresent) {
443 primaryVarsMeaningWater_ = WaterMeaning::Sw;
444 }
445 else if (gasPresent && FluidSystem::enableVaporizedWater()) {
446 primaryVarsMeaningWater_ = WaterMeaning::Rvw;
447 }
448 else if (waterPresent && FluidSystem::enableDissolvedGasInWater()) {
449 primaryVarsMeaningWater_ = WaterMeaning::Rsw;
450 }
451 else if (FluidSystem::phaseIsActive(waterPhaseIdx) && !oneActivePhases) {
452 primaryVarsMeaningWater_ = WaterMeaning::Sw;
453 }
454 else {
455 primaryVarsMeaningWater_ = WaterMeaning::Disabled;
456 }
457
458 // Determine the meaning of the gas primary variables
459 // Depending on the phases present, this variable is either interpreted as the
460 // saturation of the gas phase, as the fraction of the gas component in the oil
461 // phase (Rs) or as the fraction of the oil component (Rv) in the gas phase.
462 // For two-phase water-oil and water-gas models and one-phase case the variable is disabled.
463 if (gasPresent && oilPresent) {
464 primaryVarsMeaningGas_ = GasMeaning::Sg;
465 }
466 else if (oilPresent && FluidSystem::enableDissolvedGas()) {
467 primaryVarsMeaningGas_ = GasMeaning::Rs;
468 }
469 else if (gasPresent && FluidSystem::enableVaporizedOil()) {
470 primaryVarsMeaningGas_ = GasMeaning::Rv;
471 }
472 else if (FluidSystem::phaseIsActive(gasPhaseIdx) && FluidSystem::phaseIsActive(oilPhaseIdx)) {
473 primaryVarsMeaningGas_ = GasMeaning::Sg;
474 }
475 else {
476 primaryVarsMeaningGas_ = GasMeaning::Disabled;
477 }
478
479 // Determine the meaning of the brine primary variables
480 if constexpr (enableSaltPrecipitation) {
481 if (precipitatedSaltPresent) {
482 primaryVarsMeaningBrine_ = BrineMeaning::Sp;
483 }
484 else {
485 primaryVarsMeaningBrine_ = BrineMeaning::Cs;
486 }
487 }
488 else {
489 primaryVarsMeaningBrine_ = BrineMeaning::Disabled;
490 }
491
492 // assign the actual primary variables
493 switch (primaryVarsMeaningPressure()) {
495 this->setScaledPressure_(FsToolbox::value(fluidState.pressure(oilPhaseIdx)));
496 break;
498 this->setScaledPressure_(FsToolbox::value(fluidState.pressure(gasPhaseIdx)));
499 break;
501 this->setScaledPressure_(FsToolbox::value(fluidState.pressure(waterPhaseIdx)));
502 break;
503 default:
504 throw std::logic_error("No valid primary variable selected for pressure");
505 }
506
507 switch (primaryVarsMeaningWater()) {
508 case WaterMeaning::Sw:
509 {
510 (*this)[waterSwitchIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
511 break;
512 }
514 {
515 const auto& rvw = BlackOil::getRvw_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
516 (*this)[waterSwitchIdx] = rvw;
517 break;
518 }
520 {
521 const auto& Rsw = BlackOil::getRsw_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
522 (*this)[waterSwitchIdx] = Rsw;
523 break;
524 }
526 break;
527 default:
528 throw std::logic_error("No valid primary variable selected for water");
529 }
530 switch (primaryVarsMeaningGas()) {
531 case GasMeaning::Sg:
532 (*this)[compositionSwitchIdx] = FsToolbox::value(fluidState.saturation(gasPhaseIdx));
533 break;
534 case GasMeaning::Rs:
535 {
536 const auto& rs = BlackOil::getRs_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
537 (*this)[compositionSwitchIdx] = rs;
538 break;
539 }
540 case GasMeaning::Rv:
541 {
542 const auto& rv = BlackOil::getRv_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
543 (*this)[compositionSwitchIdx] = rv;
544 break;
545 }
547 break;
548 default:
549 throw std::logic_error("No valid primary variable selected for composision");
550 }
551 }
552
564 bool adaptPrimaryVariables(const Problem& problem,
565 unsigned globalDofIdx,
566 [[maybe_unused]] Scalar swMaximum,
567 Scalar thresholdWaterFilledCell, Scalar eps = 0.0)
568 {
569 // this function accesses quite a few black-oil specific low-level functions
570 // directly for better performance (instead of going the canonical way through
571 // the IntensiveQuantities). The reason is that most intensive quantities are not
572 // required to be able to decide if the primary variables needs to be switched or
573 // not, so it would be a waste to compute them.
574
575 // Both the primary variable meaning of water and gas are disabled i.e.
576 // It is a one-phase case and we no variable meaning switch is needed.
579 {
580 return false;
581 }
582
583 // Read the current saturation from the primary variables
584 Scalar sw = 0.0;
585 Scalar sg = 0.0;
586 Scalar saltConcentration = 0.0;
587 const Scalar& T = asImp_().temperature_(problem, globalDofIdx);
589 sw = (*this)[waterSwitchIdx];
590 }
592 sg = (*this)[compositionSwitchIdx];
593 }
595 sw = 1.0;
596 }
597
598 if (primaryVarsMeaningGas() == GasMeaning::Disabled && gasEnabled) {
599 sg = 1.0 - sw; // water + gas case
600 }
601
602 // if solid phase disappeares: Sp (Solid salt saturation) -> Cs (salt concentration)
603 // if solid phase appears: Cs (salt concentration) -> Sp (Solid salt saturation)
604 if constexpr (enableSaltPrecipitation) {
605 const Scalar saltSolubility = BrineModule::saltSol(pvtRegionIndex());
607 saltConcentration = saltSolubility;
608 const Scalar saltSat = (*this)[saltConcentrationIdx];
609 if (saltSat < -eps) { // precipitated salt dissappears
611 (*this)[saltConcentrationIdx] = saltSolubility; // set salt concentration to solubility limit
612 }
613 }
615 saltConcentration = (*this)[saltConcentrationIdx];
616 if (saltConcentration > saltSolubility + eps) { // salt concentration exceeds solubility limit
618 (*this)[saltConcentrationIdx] = 0.0;
619 }
620 }
621 }
622
623 // if solvent saturation disappeares: Ss (Solvent saturation) -> Rsolw (solvent dissolved in water)
624 // if solvent saturation appears: Rsolw (solvent dissolved in water) -> Ss (Solvent saturation)
625 // Scalar rsolw = 0.0; // not needed at the moment since we dont allow for vapwat in combination with rsolw
626 if constexpr (enableSolvent) {
628 const Scalar p = (*this)[pressureSwitchIdx]; // cap-pressure?
629 const Scalar solLimit =
630 SolventModule::solubilityLimit(pvtRegionIndex(), T , p, saltConcentration);
632 const Scalar solSat = (*this)[solventSaturationIdx];
633 if (solSat < -eps) { // solvent dissappears
635 (*this)[solventSaturationIdx] = solLimit; // set rsolw to solubility limit
636 }
637 }
639 const Scalar rsolw = (*this)[solventSaturationIdx];
640 if (rsolw > solLimit + eps) { // solvent appears as phase
642 (*this)[solventSaturationIdx] = 0.0;
643 }
644 }
645 }
646 }
647
648 // keep track if any meaning has changed
649 bool changed = false;
650
651 // Special case for cells with almost only water
652 // for these cells both saturations (if the phase is enabled) is used
653 // to avoid singular systems.
654 // If dissolved gas in water is enabled we shouldn't enter
655 // here but instead switch to Rsw as primary variable
656 // as sw >= 1.0 -> gas <= 0 (i.e. gas phase disappears)
657 if (sw >= thresholdWaterFilledCell && !FluidSystem::enableDissolvedGasInWater()) {
658 // make sure water saturations does not exceed sw_maximum. Default to 1.0
659 if constexpr (waterEnabled) {
660 (*this)[Indices::waterSwitchIdx] = std::min(swMaximum, sw);
662 }
663 // the hydrocarbon gas saturation is set to 0.0
664 if constexpr (compositionSwitchEnabled) {
665 (*this)[Indices::compositionSwitchIdx] = 0.0;
666 }
667
669 if (changed) {
670 if constexpr (compositionSwitchEnabled) {
672 }
673
674 // use water pressure?
675 }
676 return changed;
677 }
678
680 const unsigned satnumRegionIdx = problem.satnumRegionIndex(globalDofIdx);
681 const Scalar Sp = saltConcentration_();
682 const Scalar porosityFactor = min(1.0 - Sp, 1.0); //phi/phi_0
683 const auto& pcfactTable = BrineModule::pcfactTable(satnumRegionIdx);
684 pcFactor_ = pcfactTable.eval(porosityFactor, /*extrapolation=*/true);
685 }
686 else {
687 pcFactor_ = 1.0;
688 }
689
690 switch (primaryVarsMeaningWater()) {
691 case WaterMeaning::Sw:
692 {
693 // if water phase disappeares: Sw (water saturation) -> Rvw (fraction of water in gas phase)
694 if (sw < -eps && sg > eps && FluidSystem::enableVaporizedWater()) {
695 Scalar p = this->pressure_();
697 std::array<Scalar, numPhases> pC{};
698 const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
699 const Scalar so = 1.0 - sg - solventSaturation_();
700 computeCapillaryPressures_(pC, so, sg + solventSaturation_(), /*sw=*/ 0.0, matParams);
701 p += pcFactor_ * (pC[gasPhaseIdx] - pC[oilPhaseIdx]);
702 }
703 const Scalar rvwSat =
704 FluidSystem::gasPvt().saturatedWaterVaporizationFactor(pvtRegionIdx_,
705 T,
706 p,
707 saltConcentration);
709 (*this)[Indices::waterSwitchIdx] = rvwSat; // primary variable becomes Rvw
710 changed = true;
711 break;
712 }
713 // if gas phase disappeares: Sw (water saturation) -> Rsw (fraction of gas in water phase)
714 // and Pg (gas pressure) -> Pw ( water pressure)
715 if (sg < -eps && sw > eps && FluidSystem::enableDissolvedGasInWater()) {
716 const Scalar pg = this->pressure_();
718 std::array<Scalar, numPhases> pC = { 0.0 };
719 const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
720 const Scalar so = 1.0 - sw - solventSaturation_();
721 computeCapillaryPressures_(pC, so, /*sg=*/ 0.0, sw, matParams);
722 const Scalar pw = pg + pcFactor_ * (pC[waterPhaseIdx] - pC[gasPhaseIdx]);
723 const Scalar rswSat =
724 FluidSystem::waterPvt().saturatedGasDissolutionFactor(pvtRegionIdx_,
725 T,
726 pw,
727 saltConcentration);
729 const Scalar rswMax = problem.maxGasDissolutionFactor(/*timeIdx=*/0, globalDofIdx);
730 (*this)[Indices::waterSwitchIdx] = min(rswSat, rswMax); //primary variable becomes Rsw
732 this->setScaledPressure_(pw);
733 changed = true;
734 break;
735 }
736 break;
737 }
739 {
740 const Scalar& rvw = (*this)[waterSwitchIdx];
741 Scalar p = this->pressure_();
743 std::array<Scalar, numPhases> pC{};
744 const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
745 const Scalar so = 1.0 - sg - solventSaturation_();
746 computeCapillaryPressures_(pC, so, sg + solventSaturation_(), /*sw=*/ 0.0, matParams);
747 p += pcFactor_ * (pC[gasPhaseIdx] - pC[oilPhaseIdx]);
748 }
749 const Scalar rvwSat =
750 FluidSystem::gasPvt().saturatedWaterVaporizationFactor(pvtRegionIdx_,
751 T,
752 p,
753 saltConcentration);
754 // if water phase appears: Rvw (fraction of water in gas phase) -> Sw (water saturation)
755 if (rvw > rvwSat * (1.0 + eps)) {
757 (*this)[Indices::waterSwitchIdx] = 0.0; // water saturation
758 changed = true;
759 }
760 break;
761 }
763 {
764 // Gas phase not present. The hydrocarbon gas phase
765 // appears as soon as more of the gas component is present in the water phase
766 // than what saturated water can hold.
767 const Scalar& pw = this->pressure_();
769 const Scalar rswSat =
770 FluidSystem::waterPvt().saturatedGasDissolutionFactor(pvtRegionIdx_,
771 T,
772 pw,
773 saltConcentration);
774
775 const Scalar rsw = (*this)[Indices::waterSwitchIdx];
776 const Scalar rswMax = problem.maxGasDissolutionFactor(/*timeIdx=*/0, globalDofIdx);
777 if (rsw > min(rswSat, rswMax)) {
778 // the gas phase appears, i.e., switch the primary variables to WaterMeaning::Sw
780 (*this)[Indices::waterSwitchIdx] = 1.0; // hydrocarbon water saturation
782 std::array<Scalar, numPhases> pC{};
783 const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
784 computeCapillaryPressures_(pC, /*so=*/ 0.0, /*sg=*/ 0.0, /*sw=*/ 1.0, matParams);
785 const Scalar pg = pw + pcFactor_ * (pC[gasPhaseIdx] - pC[waterPhaseIdx]);
786 this->setScaledPressure_(pg);
787 changed = true;
788 }
789 break;
790 }
792 break;
793 default:
794 throw std::logic_error("No valid primary variable selected for water");
795 }
796
797 // if gas phase disappeares: Sg (gas saturation) -> Rs (fraction of gas in oil phase)
798 // if oil phase disappeares: Sg (gas saturation) -> Rv (fraction of oil in gas phase)
799 // Po (oil pressure ) -> Pg (gas pressure)
800
801 // if gas phase appears: Rs (fraction of gas in oil phase) -> Sg (gas saturation)
802 // if oil phase appears: Rv (fraction of oil in gas phase) -> Sg (gas saturation)
803 // Pg (gas pressure ) -> Po (oil pressure)
804 switch (primaryVarsMeaningGas()) {
805 case GasMeaning::Sg:
806 {
807 const Scalar s = 1.0 - sw - solventSaturation_();
808 if (sg < -eps && s > 0.0 && FluidSystem::enableDissolvedGas()) {
809 const Scalar po = this->pressure_();
811 const Scalar soMax = std::max(s, problem.maxOilSaturation(globalDofIdx));
812 const Scalar rsMax = problem.maxGasDissolutionFactor(/*timeIdx=*/0, globalDofIdx);
813 const Scalar rsSat =
814 enableExtbo
815 ? ExtboModule::rs(pvtRegionIndex(), po, zFraction_())
816 : FluidSystem::oilPvt().saturatedGasDissolutionFactor(pvtRegionIdx_,
817 T,
818 po,
819 s,
820 soMax);
821 (*this)[Indices::compositionSwitchIdx] = std::min(rsMax, rsSat);
822 changed = true;
823 }
824 const Scalar so = 1.0 - sw - solventSaturation_() - sg;
825 if (so < -eps && sg > 0.0 && FluidSystem::enableVaporizedOil()) {
826 // the oil phase disappeared and some hydrocarbon gas phase is still
827 // present, i.e., switch the primary variables to GasMeaning::Rv.
828 // we only have the oil pressure readily available, but we need the gas
829 // pressure, i.e. we must determine capillary pressure
830 const Scalar po = this->pressure_();
831 std::array<Scalar, numPhases> pC{};
832 const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
833 computeCapillaryPressures_(pC, /*so=*/0.0, sg + solventSaturation_(), sw, matParams);
834 const Scalar pg = po + pcFactor_ * (pC[gasPhaseIdx] - pC[oilPhaseIdx]);
835
836 // we start at the GasMeaning::Rv value that corresponds to that of oil-saturated
837 // hydrocarbon gas
839 this->setScaledPressure_(pg);
840 const Scalar soMax = problem.maxOilSaturation(globalDofIdx);
841 const Scalar rvMax = problem.maxOilVaporizationFactor(/*timeIdx=*/0, globalDofIdx);
842 const Scalar rvSat =
843 enableExtbo
844 ? ExtboModule::rv(pvtRegionIndex(), pg, zFraction_())
845 : FluidSystem::gasPvt().saturatedOilVaporizationFactor(pvtRegionIdx_,
846 T,
847 pg,
848 Scalar(0),
849 soMax);
851 (*this)[Indices::compositionSwitchIdx] = std::min(rvMax, rvSat);
852 changed = true;
853 }
854 break;
855 }
856 case GasMeaning::Rs:
857 {
858 // Gas phase not present. The hydrocarbon gas phase
859 // appears as soon as more of the gas component is present in the oil phase
860 // than what saturated oil can hold.
861 const Scalar po = this->pressure_();
862 const Scalar so = 1.0 - sw - solventSaturation_();
863 const Scalar soMax = std::max(so, problem.maxOilSaturation(globalDofIdx));
864 const Scalar rsMax = problem.maxGasDissolutionFactor(/*timeIdx=*/0, globalDofIdx);
865 const Scalar rsSat =
866 enableExtbo
867 ? ExtboModule::rs(pvtRegionIndex(), po, zFraction_())
868 : FluidSystem::oilPvt().saturatedGasDissolutionFactor(pvtRegionIdx_,
869 T,
870 po,
871 so,
872 soMax);
873
874 const Scalar rs = (*this)[Indices::compositionSwitchIdx];
875 if (rs > std::min(rsMax, rsSat * (Scalar{1.0} + eps))) {
876 // the gas phase appears, i.e., switch the primary variables to GasMeaning::Sg
878 (*this)[Indices::compositionSwitchIdx] = 0.0; // hydrocarbon gas saturation
879 changed = true;
880 }
881 break;
882 }
883 case GasMeaning::Rv:
884 {
885 // The oil phase appears as
886 // soon as more of the oil component is present in the hydrocarbon gas phase
887 // than what saturated gas contains. Note that we use the blackoil specific
888 // low-level PVT objects here for performance reasons.
889 const Scalar pg = this->pressure_();
890 const Scalar soMax = problem.maxOilSaturation(globalDofIdx);
891 const Scalar rvMax = problem.maxOilVaporizationFactor(/*timeIdx=*/0, globalDofIdx);
892 const Scalar rvSat =
893 enableExtbo
894 ? ExtboModule::rv(pvtRegionIndex(), pg, zFraction_())
895 : FluidSystem::gasPvt().saturatedOilVaporizationFactor(pvtRegionIdx_,
896 T,
897 pg,
898 /*so=*/Scalar(0.0),
899 soMax);
900
901 const Scalar rv = (*this)[Indices::compositionSwitchIdx];
902 if (rv > std::min(rvMax, rvSat * (Scalar{1.0} + eps))) {
903 // switch to phase equilibrium mode because the oil phase appears. here
904 // we also need the capillary pressures to calculate the oil phase
905 // pressure using the gas phase pressure
906 const Scalar sg2 = 1.0 - sw - solventSaturation_();
907 std::array<Scalar, numPhases> pC{};
908 const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
909 computeCapillaryPressures_(pC,
910 /*so=*/0.0,
911 /*sg=*/sg2 + solventSaturation_(),
912 sw,
913 matParams);
914 const Scalar po = pg + pcFactor_ * (pC[oilPhaseIdx] - pC[gasPhaseIdx]);
915
918 this->setScaledPressure_(po);
919 (*this)[Indices::compositionSwitchIdx] = sg2; // hydrocarbon gas saturation
920 changed = true;
921 }
922 break;
923 }
925 break;
926 default:
927 throw std::logic_error("No valid primary variable selected for water");
928 }
929 return changed;
930 }
931
933 {
936 {
937 return false;
938 }
939 Scalar sw = 0.0;
941 sw = (*this)[Indices::waterSwitchIdx];
942 }
943 Scalar sg = 0.0;
945 sg = (*this)[Indices::compositionSwitchIdx];
946 }
947
948 Scalar ssol = 0.0;
950 ssol =(*this) [Indices::solventSaturationIdx];
951 }
952
953 Scalar so = 1.0 - sw - sg - ssol;
954 sw = std::min(std::max(sw, Scalar{0.0}), Scalar{1.0});
955 so = std::min(std::max(so, Scalar{0.0}), Scalar{1.0});
956 sg = std::min(std::max(sg, Scalar{0.0}), Scalar{1.0});
957 ssol = std::min(std::max(ssol, Scalar{0.0}), Scalar{1.0});
958 const Scalar st = sw + so + sg + ssol;
959 sw = sw / st;
960 sg = sg / st;
961 ssol = ssol / st;
962 assert(st > 0.5);
964 (*this)[Indices::waterSwitchIdx] = sw;
965 }
967 (*this)[Indices::compositionSwitchIdx] = sg;
968 }
970 (*this) [Indices::solventSaturationIdx] = ssol;
971 }
972
973 return (st != 1);
974 }
975
977
978 using ParentType::operator=;
979
987 void checkDefined() const
988 {
989#ifndef NDEBUG
990 // check the "real" primary variables
991 for (unsigned i = 0; i < this->size(); ++i) {
992 Valgrind::CheckDefined((*this)[i]);
993 }
994
995 // check the "pseudo" primary variables
996 Valgrind::CheckDefined(primaryVarsMeaningWater_);
997 Valgrind::CheckDefined(primaryVarsMeaningGas_);
998 Valgrind::CheckDefined(primaryVarsMeaningPressure_);
999 Valgrind::CheckDefined(primaryVarsMeaningBrine_);
1000 Valgrind::CheckDefined(primaryVarsMeaningSolvent_);
1001
1002 Valgrind::CheckDefined(pvtRegionIdx_);
1003#endif // NDEBUG
1004 }
1005
1006 template<class Serializer>
1007 void serializeOp(Serializer& serializer)
1008 {
1009 using FV = Dune::FieldVector<Scalar, getPropValue<TypeTag, Properties::NumEq>()>;
1010 serializer(static_cast<FV&>(*this));
1011 serializer(primaryVarsMeaningWater_);
1012 serializer(primaryVarsMeaningPressure_);
1013 serializer(primaryVarsMeaningGas_);
1014 serializer(primaryVarsMeaningBrine_);
1015 serializer(primaryVarsMeaningSolvent_);
1016 serializer(pvtRegionIdx_);
1017 }
1018
1020 {
1021 return
1022 static_cast<const FvBasePrimaryVariables<TypeTag>&>(*this) == rhs
1023 && this->primaryVarsMeaningWater_ == rhs.primaryVarsMeaningWater_
1024 && this->primaryVarsMeaningPressure_ == rhs.primaryVarsMeaningPressure_
1025 && this->primaryVarsMeaningGas_ == rhs.primaryVarsMeaningGas_
1026 && this->primaryVarsMeaningBrine_ == rhs.primaryVarsMeaningBrine_
1027 && this->primaryVarsMeaningSolvent_ == rhs.primaryVarsMeaningSolvent_
1028 && this->pvtRegionIdx_ == rhs.pvtRegionIdx_;
1029 }
1030
1031private:
1032 Implementation& asImp_()
1033 { return *static_cast<Implementation*>(this); }
1034
1035 const Implementation& asImp_() const
1036 { return *static_cast<const Implementation*>(this); }
1037
1038 Scalar solventSaturation_() const
1039 {
1040 if constexpr (enableSolvent) {
1042 return (*this)[Indices::solventSaturationIdx];
1043 }
1044 }
1045 return 0.0;
1046 }
1047
1048 Scalar zFraction_() const
1049 {
1050 if constexpr (enableExtbo) {
1051 return (*this)[Indices::zFractionIdx];
1052 }
1053 else {
1054 return 0.0;
1055 }
1056 }
1057
1058 Scalar polymerConcentration_() const
1059 {
1060 if constexpr (enablePolymer) {
1061 return (*this)[Indices::polymerConcentrationIdx];
1062 }
1063 else {
1064 return 0.0;
1065 }
1066 }
1067
1068 Scalar foamConcentration_() const
1069 {
1070 if constexpr (enableFoam) {
1071 return (*this)[Indices::foamConcentrationIdx];
1072 }
1073 else {
1074 return 0.0;
1075 }
1076 }
1077
1078 Scalar saltConcentration_() const
1079 {
1080 if constexpr (enableBrine) {
1081 return (*this)[Indices::saltConcentrationIdx];
1082 }
1083 else {
1084 return 0.0;
1085 }
1086 }
1087
1088 Scalar temperature_(const Problem& problem, [[maybe_unused]] unsigned globalDofIdx) const
1089 {
1090 if constexpr (enableEnergy) {
1091 return (*this)[Indices::temperatureIdx];
1092 }
1093 else if constexpr (enableTemperature) {
1094 return problem.temperature(globalDofIdx, /*timeIdx*/ 0);
1095 }
1096 else {
1097 return FluidSystem::reservoirTemperature();
1098 }
1099 }
1100
1101 Scalar microbialConcentration_() const
1102 {
1103 if constexpr (enableMICP) {
1104 return (*this)[Indices::microbialConcentrationIdx];
1105 }
1106 else {
1107 return 0.0;
1108 }
1109 }
1110
1111 Scalar oxygenConcentration_() const
1112 {
1113 if constexpr (enableMICP) {
1114 return (*this)[Indices::oxygenConcentrationIdx];
1115 }
1116 else {
1117 return 0.0;
1118 }
1119 }
1120
1121 Scalar ureaConcentration_() const
1122 {
1123 if constexpr (enableMICP) {
1124 return (*this)[Indices::ureaConcentrationIdx];
1125 }
1126 else {
1127 return 0.0;
1128 }
1129 }
1130
1131 Scalar biofilmConcentration_() const
1132 {
1133 if constexpr (enableMICP) {
1134 return (*this)[Indices::biofilmConcentrationIdx];
1135 }
1136 else {
1137 return 0.0;
1138 }
1139 }
1140
1141 Scalar calciteConcentration_() const
1142 {
1143 if constexpr (enableMICP) {
1144 return (*this)[Indices::calciteConcentrationIdx];
1145 }
1146 else {
1147 return 0.0;
1148 }
1149 }
1150
1151 template <class Container>
1152 void computeCapillaryPressures_(Container& result,
1153 Scalar so,
1154 Scalar sg,
1155 Scalar sw,
1156 const MaterialLawParams& matParams) const
1157 {
1158 using SatOnlyFluidState = SimpleModularFluidState<Scalar,
1159 numPhases,
1160 numComponents,
1161 FluidSystem,
1162 /*storePressure=*/false,
1163 /*storeTemperature=*/false,
1164 /*storeComposition=*/false,
1165 /*storeFugacity=*/false,
1166 /*storeSaturation=*/true,
1167 /*storeDensity=*/false,
1168 /*storeViscosity=*/false,
1169 /*storeEnthalpy=*/false>;
1170 SatOnlyFluidState fluidState;
1171 fluidState.setSaturation(waterPhaseIdx, sw);
1172 fluidState.setSaturation(oilPhaseIdx, so);
1173 fluidState.setSaturation(gasPhaseIdx, sg);
1174
1175 MaterialLaw::capillaryPressures(result, matParams, fluidState);
1176 }
1177
1178 Scalar pressure_() const
1179 { return (*this)[Indices::pressureSwitchIdx] * this->pressureScale_; }
1180
1181 void setScaledPressure_(Scalar pressure)
1182 { (*this)[Indices::pressureSwitchIdx] = pressure / (this->pressureScale_); }
1183
1184 WaterMeaning primaryVarsMeaningWater_{WaterMeaning::Disabled};
1185 PressureMeaning primaryVarsMeaningPressure_{PressureMeaning::Po};
1186 GasMeaning primaryVarsMeaningGas_{GasMeaning::Disabled};
1187 BrineMeaning primaryVarsMeaningBrine_{BrineMeaning::Disabled};
1188 SolventMeaning primaryVarsMeaningSolvent_{SolventMeaning::Disabled};
1189 unsigned short pvtRegionIdx_;
1190 Scalar pcFactor_;
1191 static inline Scalar pressureScale_ = 1.0;
1192};
1193
1194} // namespace Opm
1195
1196#endif
Contains the classes required to extend the black-oil model by brine.
Contains the classes required to extend the black-oil model by energy.
Contains the classes required to extend the black-oil model by solvent component. For details,...
Contains the classes required to extend the black-oil model to include the effects of foam.
Contains the classes required to extend the black-oil model by MICP.
Contains the classes required to extend the black-oil model by polymer.
Declares the properties required by the black oil model.
Contains the classes required to extend the black-oil model by solvents.
Contains the high level supplements required to extend the black oil model by brine.
Definition: blackoilbrinemodules.hh:55
static Scalar saltSol(unsigned regionIdx)
Definition: blackoilbrinemodules.hh:322
static const TabulatedFunction & pcfactTable(unsigned satnumRegionIdx)
Definition: blackoilbrinemodules.hh:276
static bool hasPcfactTables()
Definition: blackoilbrinemodules.hh:312
Contains the high level supplements required to extend the black oil model by energy.
Definition: blackoilenergymodules.hh:58
static void assignPrimaryVars(PrimaryVariables &priVars, const FluidState &fluidState)
Assign the energy specific primary variables to a PrimaryVariables object.
Definition: blackoilenergymodules.hh:263
Contains the high level supplements required to extend the black oil model.
Definition: blackoilextbomodules.hh:62
static Value rs(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:354
static Value rv(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:358
Contains the high level supplements required to extend the black oil model to include the effects of ...
Definition: blackoilfoammodules.hh:58
Contains the high level supplements required to extend the black oil model by MICP.
Definition: blackoilmicpmodules.hh:54
Contains the high level supplements required to extend the black oil model by polymer.
Definition: blackoilpolymermodules.hh:64
Represents the primary variables used by the black-oil model.
Definition: blackoilprimaryvariables.hh:72
bool operator==(const BlackOilPrimaryVariables &rhs) const
Definition: blackoilprimaryvariables.hh:1019
WaterMeaning
Definition: blackoilprimaryvariables.hh:135
unsigned pvtRegionIndex() const
Return the index of the region which should be used for PVT properties.
Definition: blackoilprimaryvariables.hh:241
BlackOilPrimaryVariables & operator=(const BlackOilPrimaryVariables &other)=default
SolventMeaning
Definition: blackoilprimaryvariables.hh:161
static void registerParameters()
Definition: blackoilprimaryvariables.hh:200
GasMeaning primaryVarsMeaningGas() const
Return the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:276
PressureMeaning primaryVarsMeaningPressure() const
Return the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:262
void serializeOp(Serializer &serializer)
Definition: blackoilprimaryvariables.hh:1007
static void init()
Definition: blackoilprimaryvariables.hh:194
void setPrimaryVarsMeaningSolvent(SolventMeaning newMeaning)
Set the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:303
BlackOilPrimaryVariables()
Definition: blackoilprimaryvariables.hh:167
static BlackOilPrimaryVariables serializationTestObject()
Definition: blackoilprimaryvariables.hh:178
SolventMeaning primaryVarsMeaningSolvent() const
Definition: blackoilprimaryvariables.hh:296
bool chopAndNormalizeSaturations()
Definition: blackoilprimaryvariables.hh:932
bool adaptPrimaryVariables(const Problem &problem, unsigned globalDofIdx, Scalar swMaximum, Scalar thresholdWaterFilledCell, Scalar eps=0.0)
Adapt the interpretation of the switching variables to be physically meaningful.
Definition: blackoilprimaryvariables.hh:564
void setPrimaryVarsMeaningPressure(PressureMeaning newMeaning)
Set the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:269
WaterMeaning primaryVarsMeaningWater() const
Return the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:248
void setPrimaryVarsMeaningWater(WaterMeaning newMeaning)
Set the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:255
void assignNaive(const FluidState &fluidState)
Directly retrieve the primary variables from an arbitrary fluid state.
Definition: blackoilprimaryvariables.hh:393
Evaluation makeEvaluation(unsigned varIdx, unsigned timeIdx, LinearizationType linearizationType=LinearizationType()) const
Definition: blackoilprimaryvariables.hh:210
void assignMassConservative(const FluidState &fluidState, const MaterialLawParams &matParams, bool isInEquilibrium=false)
< Import base class assignment operators.
Definition: blackoilprimaryvariables.hh:310
BrineMeaning
Definition: blackoilprimaryvariables.hh:155
void setPrimaryVarsMeaningBrine(BrineMeaning newMeaning)
Set the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:293
BlackOilPrimaryVariables(const BlackOilPrimaryVariables &value)=default
Copy constructor.
BrineMeaning primaryVarsMeaningBrine() const
Definition: blackoilprimaryvariables.hh:286
void setPressureScale(Scalar val)
Definition: blackoilprimaryvariables.hh:206
void setPrimaryVarsMeaningGas(GasMeaning newMeaning)
Set the interpretation which should be applied to the switching primary variables.
Definition: blackoilprimaryvariables.hh:283
PressureMeaning
Definition: blackoilprimaryvariables.hh:142
void setPvtRegionIndex(unsigned value)
Set the index of the region which should be used for PVT properties.
Definition: blackoilprimaryvariables.hh:235
void checkDefined() const
< Import base class assignment operators.
Definition: blackoilprimaryvariables.hh:987
GasMeaning
Definition: blackoilprimaryvariables.hh:148
Contains the high level supplements required to extend the black oil model by solvents.
Definition: blackoilsolventmodules.hh:66
static bool isSolubleInWater()
Definition: blackoilsolventmodules.hh:508
static Value solubilityLimit(unsigned pvtIdx, const Value &temperature, const Value &pressure, const Value &saltConcentration)
Definition: blackoilsolventmodules.hh:490
Represents the primary variables used by the a model.
Definition: fvbaseprimaryvariables.hh:53
SimpleModularFluidState< double, 3, 3, FluidSystemSimple, false, false, false, false, true, false, false, false > SatOnlyFluidState
Definition: EquilibrationHelpers_impl.hpp:53
Definition: blackoilnewtonmethodparams.hpp:31
Definition: blackoilboundaryratevector.hh:39
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: linearizationtype.hh:34
Definition: blackoilprimaryvariables.hh:59
static constexpr Scalar value
Definition: blackoilprimaryvariables.hh:59