29#ifndef OPM_EQUILIBRATION_HELPERS_HPP
30#define OPM_EQUILIBRATION_HELPERS_HPP
32#include <opm/material/common/Tabulated1DFunction.hpp>
34#include <opm/input/eclipse/EclipseState/InitConfig/Equil.hpp>
94namespace Miscibility {
123 const Scalar sat = 0.0)
const = 0;
130template<
class Scalar>
154 const Scalar = 0.0)
const override
166template <
class Flu
idSystem>
170 using Scalar =
typename FluidSystem::Scalar;
178 RsVD(
const int pvtRegionIdx,
179 const std::vector<Scalar>& depth,
180 const std::vector<Scalar>& rs);
200 const Scalar
satGas = 0.0)
const override;
205 const int pvtRegionIdx_;
206 RsVsDepthFunc rsVsDepth_;
208 Scalar satRs(
const Scalar press,
const Scalar
temp)
const;
217template <
class Flu
idSystem>
221 using Scalar =
typename FluidSystem::Scalar;
229 PBVD(
const int pvtRegionIdx,
230 const std::vector<Scalar>& depth,
231 const std::vector<Scalar>&
pbub);
250 const Scalar
satGas = 0.0)
const override;
255 const int pvtRegionIdx_;
256 PbubVsDepthFunc pbubVsDepth_;
258 Scalar satRs(
const Scalar press,
const Scalar
temp)
const;
267template <
class Flu
idSystem>
270 using Scalar =
typename FluidSystem::Scalar;
279 PDVD(
const int pvtRegionIdx,
280 const std::vector<Scalar>& depth,
281 const std::vector<Scalar>&
pdew);
300 const Scalar
satOil = 0.0)
const override;
305 const int pvtRegionIdx_;
306 PdewVsDepthFunc pdewVsDepth_;
308 Scalar satRv(
const Scalar press,
const Scalar
temp)
const;
317template <
class Flu
idSystem>
320 using Scalar =
typename FluidSystem::Scalar;
329 RvVD(
const int pvtRegionIdx,
330 const std::vector<Scalar>& depth,
331 const std::vector<Scalar>& rv);
351 const Scalar
satOil = 0.0)
const override;
356 const int pvtRegionIdx_;
357 RvVsDepthFunc rvVsDepth_;
359 Scalar satRv(
const Scalar press,
const Scalar
temp)
const;
368template <
class Flu
idSystem>
371 using Scalar =
typename FluidSystem::Scalar;
380 RvwVD(
const int pvtRegionIdx,
381 const std::vector<Scalar>& depth,
382 const std::vector<Scalar>& rvw);
402 const Scalar
satWat = 0.0)
const override;
407 const int pvtRegionIdx_;
408 RvwVsDepthFunc rvwVsDepth_;
410 Scalar satRvw(
const Scalar press,
const Scalar
temp)
const;
428template <
class Flu
idSystem>
431 using Scalar =
typename FluidSystem::Scalar;
462 const Scalar
satGas = 0.0)
const override;
465 const int pvtRegionIdx_;
466 Scalar rsSatContact_;
468 Scalar satRs(
const Scalar press,
const Scalar
temp)
const;
486template <
class Flu
idSystem>
489 using Scalar =
typename FluidSystem::Scalar;
520 const Scalar
satOil = 0.0)
const override;
523 const int pvtRegionIdx_;
524 Scalar rvSatContact_;
526 Scalar satRv(
const Scalar press,
const Scalar
temp)
const;
543template <
class Flu
idSystem>
546 using Scalar =
typename FluidSystem::Scalar;
577 const Scalar
satWat = 0.0)
const override;
580 const int pvtRegionIdx_;
581 Scalar rvwSatContact_;
583 Scalar satRvw(
const Scalar press,
const Scalar
temp)
const;
607template<
class Scalar>
626 const TabulatedFunction& tempVdTable,
627 const TabulatedFunction& saltVdTable,
649 Scalar
datum()
const;
707 const TabulatedFunction& saltVdTable()
const;
708 const TabulatedFunction& tempVdTable()
const;
717 std::shared_ptr<Miscibility::RsFunction<Scalar>> rs_;
718 std::shared_ptr<Miscibility::RsFunction<Scalar>> rv_;
719 std::shared_ptr<Miscibility::RsFunction<Scalar>> rvw_;
720 const TabulatedFunction& tempVdTable_;
721 const TabulatedFunction& saltVdTable_;
730template <
class Flu
idSystem,
class MaterialLawManager>
733 using Scalar =
typename FluidSystem::Scalar;
734 PcEq(
const MaterialLawManager& materialLawManager,
739 Scalar operator()(Scalar s)
const;
742 const MaterialLawManager& materialLawManager_;
745 const Scalar targetPc_;
748template <
class Flu
idSystem,
class MaterialLawManager>
749typename FluidSystem::Scalar
750minSaturations(
const MaterialLawManager& materialLawManager,
751 const int phase,
const int cell);
753template <
class Flu
idSystem,
class MaterialLawManager>
754typename FluidSystem::Scalar
755maxSaturations(
const MaterialLawManager& materialLawManager,
756 const int phase,
const int cell);
760template <
class Flu
idSystem,
class MaterialLawManager>
761typename FluidSystem::Scalar
762satFromPc(
const MaterialLawManager& materialLawManager,
765 const typename FluidSystem::Scalar
targetPc,
771template <
class Flu
idSystem,
class MaterialLawManager>
774 using Scalar =
typename FluidSystem::Scalar;
775 PcEqSum(
const MaterialLawManager& materialLawManager,
781 Scalar operator()(Scalar s)
const;
784 const MaterialLawManager& materialLawManager_;
788 const Scalar targetPc_;
794template <
class Flu
idSystem,
class MaterialLawManager>
795typename FluidSystem::Scalar
800 const typename FluidSystem::Scalar
targetPc);
803template <
class Flu
idSystem,
class MaterialLawManager>
804typename FluidSystem::Scalar
805satFromDepth(
const MaterialLawManager& materialLawManager,
806 const typename FluidSystem::Scalar
cellDepth,
813template <
class Flu
idSystem,
class MaterialLawManager>
814bool isConstPc(
const MaterialLawManager& materialLawManager,
Aggregate information base of an equilibration region.
Definition EquilibrationHelpers.hpp:609
Scalar datum() const
Datum depth in current region.
Definition EquilibrationHelpers_impl.hpp:373
int pvtIdx() const
Retrieve pvtIdx of the region.
Definition EquilibrationHelpers_impl.hpp:450
Scalar pcgoGoc() const
Gas-oil capillary pressure at gas-oil contact.
Definition EquilibrationHelpers_impl.hpp:403
int equilibrationAccuracy() const
Accuracy/strategy for initial fluid-in-place calculation.
Definition EquilibrationHelpers_impl.hpp:409
const CalcEvaporation & evaporationCalculator() const
Retrieve vapourised oil-gas ratio calculator of current region.
Definition EquilibrationHelpers_impl.hpp:423
Scalar zgoc() const
Depth of gas-oil contact.
Definition EquilibrationHelpers_impl.hpp:397
Scalar pressure() const
Pressure at datum depth in current region.
Definition EquilibrationHelpers_impl.hpp:379
Scalar pcowWoc() const
water-oil capillary pressure at water-oil contact.
Definition EquilibrationHelpers_impl.hpp:391
Scalar zwoc() const
Depth of water-oil contact.
Definition EquilibrationHelpers_impl.hpp:385
const CalcDissolution & dissolutionCalculator() const
Retrieve dissolved gas-oil ratio calculator of current region.
Definition EquilibrationHelpers_impl.hpp:416
const CalcWaterEvaporation & waterEvaporationCalculator() const
Retrieve vapourised water-gas ratio calculator of current region.
Definition EquilibrationHelpers_impl.hpp:430
Type that implements "no phase mixing" policy.
Definition EquilibrationHelpers.hpp:132
Scalar operator()(const Scalar, const Scalar, const Scalar, const Scalar=0.0) const override
Function call.
Definition EquilibrationHelpers.hpp:151
Type that implements "dissolved gas-oil ratio" tabulated as a function of depth policy.
Definition EquilibrationHelpers.hpp:219
Scalar operator()(const Scalar depth, const Scalar cellPress, const Scalar temp, const Scalar satGas=0.0) const override
Function call.
Definition EquilibrationHelpers_impl.hpp:107
Type that implements "vaporized oil-gas ratio" tabulated as a function of depth policy.
Definition EquilibrationHelpers.hpp:269
Scalar operator()(const Scalar depth, const Scalar cellPress, const Scalar temp, const Scalar satOil=0.0) const override
Function call.
Definition EquilibrationHelpers_impl.hpp:144
Base class for phase mixing functions.
Definition EquilibrationHelpers.hpp:101
virtual Scalar operator()(const Scalar depth, const Scalar press, const Scalar temp, const Scalar sat=0.0) const =0
Function call operator.
Type that implements "dissolved gas-oil ratio" tabulated as a function of depth policy.
Definition EquilibrationHelpers.hpp:168
Scalar operator()(const Scalar depth, const Scalar press, const Scalar temp, const Scalar satGas=0.0) const override
Function call.
Definition EquilibrationHelpers_impl.hpp:69
Type that implements "vaporized oil-gas ratio" tabulated as a function of depth policy.
Definition EquilibrationHelpers.hpp:319
Scalar operator()(const Scalar depth, const Scalar press, const Scalar temp, const Scalar satOil=0.0) const override
Function call.
Definition EquilibrationHelpers_impl.hpp:181
Type that implements "vaporized water-gas ratio" tabulated as a function of depth policy.
Definition EquilibrationHelpers.hpp:370
Scalar operator()(const Scalar depth, const Scalar press, const Scalar temp, const Scalar satWat=0.0) const override
Function call.
Definition EquilibrationHelpers_impl.hpp:224
FluidSystem::Scalar satFromDepth(const MaterialLawManager &materialLawManager, const typename FluidSystem::Scalar cellDepth, const typename FluidSystem::Scalar contactDepth, const int phase, const int cell, const bool increasing=false)
Compute saturation from depth. Used for constant capillary pressure function.
Definition EquilibrationHelpers_impl.hpp:650
FluidSystem::Scalar satFromPc(const MaterialLawManager &materialLawManager, const int phase, const int cell, const typename FluidSystem::Scalar targetPc, const bool increasing=false)
Compute saturation of some phase corresponding to a given capillary pressure.
Definition EquilibrationHelpers_impl.hpp:586
bool isConstPc(const MaterialLawManager &materialLawManager, const int phase, const int cell)
Return true if capillary pressure function is constant.
Definition EquilibrationHelpers_impl.hpp:670
FluidSystem::Scalar satFromSumOfPcs(const MaterialLawManager &materialLawManager, const int phase1, const int phase2, const int cell, const typename FluidSystem::Scalar targetPc)
Compute saturation of some phase corresponding to a given capillary pressure, where the capillary pre...
Definition EquilibrationHelpers_impl.hpp:619
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
Functor for inverting a sum of capillary pressure functions.
Definition EquilibrationHelpers.hpp:773
Functor for inverting capillary pressure function.
Definition EquilibrationHelpers.hpp:732