EquilibrationHelpers.hpp
1 /*
2  Copyright 2014 SINTEF ICT, Applied Mathematics.
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 3 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 
20 #ifndef OPM_EQUILIBRATIONHELPERS_HEADER_INCLUDED
21 #define OPM_EQUILIBRATIONHELPERS_HEADER_INCLUDED
22 
23 #include <opm/core/props/BlackoilPropertiesInterface.hpp>
24 #include <opm/core/props/BlackoilPhases.hpp>
25 #include <opm/core/utility/linearInterpolation.hpp>
26 #include <opm/core/utility/RegionMapping.hpp>
27 #include <opm/core/utility/RootFinders.hpp>
28 
29 #include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
30 
31 #include <memory>
32 
33 
34 /*
35 ---- synopsis of EquilibrationHelpers.hpp ----
36 
37 namespace Opm
38 {
39  namespace EQUIL {
40 
41  template <class Props>
42  class DensityCalculator;
43 
44  template <>
45  class DensityCalculator< BlackoilPropertiesInterface >;
46 
47  namespace Miscibility {
48  class RsFunction;
49  class NoMixing;
50  class RsVD;
51  class RsSatAtContact;
52  }
53 
54  template <class DensCalc>
55  class EquilReg;
56 
57 
58  struct PcEq;
59 
60  inline double satFromPc(const BlackoilPropertiesInterface& props,
61  const int phase,
62  const int cell,
63  const double target_pc,
64  const bool increasing = false);
65  struct PcEqSum
66  inline double satFromSumOfPcs(const BlackoilPropertiesInterface& props,
67  const int phase1,
68  const int phase2,
69  const int cell,
70  const double target_pc);
71  } // namespace Equil
72 } // namespace Opm
73 
74 ---- end of synopsis of EquilibrationHelpers.hpp ----
75 */
76 
77 
78 namespace Opm
79 {
87  namespace EQUIL {
88 
89 
90  template <class Props>
92 
100  template <>
102  public:
113  const int c)
114  : props_(props)
115  , c_(1, c)
116  {
117  }
118 
131  std::vector<double>
132  operator()(const double p,
133  const double T,
134  const std::vector<double>& z) const
135  {
136  const int np = props_.numPhases();
137  std::vector<double> A(np * np, 0);
138 
139  assert (z.size() == std::vector<double>::size_type(np));
140 
141  double* dAdp = 0;
142  props_.matrix(1, &p, &T, &z[0], &c_[0], &A[0], dAdp);
143 
144  std::vector<double> rho(np, 0.0);
145  props_.density(1, &A[0], &c_[0], &rho[0]);
146 
147  return rho;
148  }
149 
150  private:
151  const BlackoilPropertiesInterface& props_;
152  const std::vector<int> c_;
153  };
154 
155 
160  namespace Miscibility {
161 
166  {
167  public:
183  virtual double operator()(const double depth,
184  const double press,
185  const double temp,
186  const double sat = 0.0) const = 0;
187  };
188 
189 
193  class NoMixing : public RsFunction {
194  public:
211  double
212  operator()(const double /* depth */,
213  const double /* press */,
214  const double /* temp */,
215  const double /* sat */ = 0.0) const
216  {
217  return 0.0;
218  }
219  };
220 
221 
227  class RsVD : public RsFunction {
228  public:
238  const int cell,
239  const std::vector<double>& depth,
240  const std::vector<double>& rs)
241  : props_(props)
242  , cell_(cell)
243  , depth_(depth)
244  , rs_(rs)
245  {
246  auto pu = props_.phaseUsage();
247  std::fill(z_, z_ + BlackoilPhases::MaxNumPhases, 0.0);
248  z_[pu.phase_pos[BlackoilPhases::Vapour]] = 1e100;
249  z_[pu.phase_pos[BlackoilPhases::Liquid]] = 1.0;
250  }
251 
267  double
268  operator()(const double depth,
269  const double press,
270  const double temp,
271  const double sat_gas = 0.0) const
272  {
273  if (sat_gas > 0.0) {
274  return satRs(press, temp);
275  } else {
276  return std::min(satRs(press, temp), linearInterpolationNoExtrapolation(depth_, rs_, depth));
277  }
278  }
279 
280  private:
281  const BlackoilPropertiesInterface& props_;
282  const int cell_;
283  std::vector<double> depth_;
284  std::vector<double> rs_;
285  double z_[BlackoilPhases::MaxNumPhases];
286  mutable double A_[BlackoilPhases::MaxNumPhases * BlackoilPhases::MaxNumPhases];
287 
288  double satRs(const double press, const double temp) const
289  {
290  props_.matrix(1, &press, &temp, z_, &cell_, A_, 0);
291  // Rs/Bo is in the gas row and oil column of A_.
292  // 1/Bo is in the oil row and column.
293  // Recall also that it is stored in column-major order.
294  const int opos = props_.phaseUsage().phase_pos[BlackoilPhases::Liquid];
295  const int gpos = props_.phaseUsage().phase_pos[BlackoilPhases::Vapour];
296  const int np = props_.numPhases();
297  return A_[np*opos + gpos] / A_[np*opos + opos];
298  }
299  };
300 
301 
307  class RvVD : public RsFunction {
308  public:
318  const int cell,
319  const std::vector<double>& depth,
320  const std::vector<double>& rv)
321  : props_(props)
322  , cell_(cell)
323  , depth_(depth)
324  , rv_(rv)
325  {
326  auto pu = props_.phaseUsage();
327  std::fill(z_, z_ + BlackoilPhases::MaxNumPhases, 0.0);
328  z_[pu.phase_pos[BlackoilPhases::Vapour]] = 1.0;
329  z_[pu.phase_pos[BlackoilPhases::Liquid]] = 1e100;
330  }
331 
347  double
348  operator()(const double depth,
349  const double press,
350  const double temp,
351  const double sat_oil = 0.0 ) const
352  {
353  if (std::abs(sat_oil) > 1e-16) {
354  return satRv(press, temp);
355  } else {
356  return std::min(satRv(press, temp), linearInterpolationNoExtrapolation(depth_, rv_, depth));
357  }
358  }
359 
360  private:
361  const BlackoilPropertiesInterface& props_;
362  const int cell_;
363  std::vector<double> depth_;
364  std::vector<double> rv_;
365  double z_[BlackoilPhases::MaxNumPhases];
366  mutable double A_[BlackoilPhases::MaxNumPhases * BlackoilPhases::MaxNumPhases];
367 
368  double satRv(const double press, const double temp) const
369  {
370  props_.matrix(1, &press, &temp, z_, &cell_, A_, 0);
371  // Rv/Bg is in the oil row and gas column of A_.
372  // 1/Bg is in the gas row and column.
373  // Recall also that it is stored in column-major order.
374  const int opos = props_.phaseUsage().phase_pos[BlackoilPhases::Liquid];
375  const int gpos = props_.phaseUsage().phase_pos[BlackoilPhases::Vapour];
376  const int np = props_.numPhases();
377  return A_[np*gpos + opos] / A_[np*gpos + gpos];
378  }
379  };
380 
381 
396  class RsSatAtContact : public RsFunction {
397  public:
406  RsSatAtContact(const BlackoilPropertiesInterface& props, const int cell, const double p_contact, const double T_contact)
407  : props_(props), cell_(cell)
408  {
409  auto pu = props_.phaseUsage();
410  std::fill(z_, z_ + BlackoilPhases::MaxNumPhases, 0.0);
411  z_[pu.phase_pos[BlackoilPhases::Vapour]] = 1e100;
412  z_[pu.phase_pos[BlackoilPhases::Liquid]] = 1.0;
413  rs_sat_contact_ = satRs(p_contact, T_contact);
414  }
415 
431  double
432  operator()(const double /* depth */,
433  const double press,
434  const double temp,
435  const double sat_gas = 0.0) const
436  {
437  if (sat_gas > 0.0) {
438  return satRs(press, temp);
439  } else {
440  return std::min(satRs(press, temp), rs_sat_contact_);
441  }
442  }
443 
444  private:
445  const BlackoilPropertiesInterface& props_;
446  const int cell_;
447  double z_[BlackoilPhases::MaxNumPhases];
448  double rs_sat_contact_;
449  mutable double A_[BlackoilPhases::MaxNumPhases * BlackoilPhases::MaxNumPhases];
450 
451  double satRs(const double press, const double temp) const
452  {
453  props_.matrix(1, &press, &temp, z_, &cell_, A_, 0);
454  // Rs/Bo is in the gas row and oil column of A_.
455  // 1/Bo is in the oil row and column.
456  // Recall also that it is stored in column-major order.
457  const int opos = props_.phaseUsage().phase_pos[BlackoilPhases::Liquid];
458  const int gpos = props_.phaseUsage().phase_pos[BlackoilPhases::Vapour];
459  const int np = props_.numPhases();
460  return A_[np*opos + gpos] / A_[np*opos + opos];
461  }
462  };
463 
464 
479  class RvSatAtContact : public RsFunction {
480  public:
489  RvSatAtContact(const BlackoilPropertiesInterface& props, const int cell, const double p_contact, const double T_contact)
490  : props_(props), cell_(cell)
491  {
492  auto pu = props_.phaseUsage();
493  std::fill(z_, z_ + BlackoilPhases::MaxNumPhases, 0.0);
494  z_[pu.phase_pos[BlackoilPhases::Vapour]] = 1.0;
495  z_[pu.phase_pos[BlackoilPhases::Liquid]] = 1e100;
496  rv_sat_contact_ = satRv(p_contact, T_contact);
497  }
498 
514  double
515  operator()(const double /*depth*/,
516  const double press,
517  const double temp,
518  const double sat_oil = 0.0) const
519  {
520  if (sat_oil > 0.0) {
521  return satRv(press, temp);
522  } else {
523  return std::min(satRv(press, temp), rv_sat_contact_);
524  }
525  }
526 
527  private:
528  const BlackoilPropertiesInterface& props_;
529  const int cell_;
530  double z_[BlackoilPhases::MaxNumPhases];
531  double rv_sat_contact_;
532  mutable double A_[BlackoilPhases::MaxNumPhases * BlackoilPhases::MaxNumPhases];
533 
534  double satRv(const double press, const double temp) const
535  {
536  props_.matrix(1, &press, &temp, z_, &cell_, A_, 0);
537  // Rv/Bg is in the oil row and gas column of A_.
538  // 1/Bg is in the gas row and column.
539  // Recall also that it is stored in column-major order.
540  const int opos = props_.phaseUsage().phase_pos[BlackoilPhases::Liquid];
541  const int gpos = props_.phaseUsage().phase_pos[BlackoilPhases::Vapour];
542  const int np = props_.numPhases();
543  return A_[np*gpos + opos] / A_[np*gpos + gpos];
544  }
545  };
546 
547  } // namespace Miscibility
548 
568  template <class DensCalc>
569  class EquilReg {
570  public:
580  EquilReg(const EquilRecord& rec,
581  const DensCalc& density,
582  std::shared_ptr<Miscibility::RsFunction> rs,
583  std::shared_ptr<Miscibility::RsFunction> rv,
584  const PhaseUsage& pu)
585  : rec_ (rec)
586  , density_(density)
587  , rs_ (rs)
588  , rv_ (rv)
589  , pu_ (pu)
590  {
591  }
592 
596  typedef DensCalc CalcDensity;
597 
602 
607 
611  double datum() const { return this->rec_.datumDepth(); }
612 
616  double pressure() const { return this->rec_.datumDepthPressure(); }
617 
621  double zwoc() const { return this->rec_.waterOilContactDepth(); }
622 
628  double pcow_woc() const { return this->rec_.waterOilContactCapillaryPressure(); }
629 
633  double zgoc() const { return this->rec_.gasOilContactDepth(); }
634 
640  double pcgo_goc() const { return this->rec_.gasOilContactCapillaryPressure(); }
641 
645  const CalcDensity&
646  densityCalculator() const { return this->density_; }
647 
652  const CalcDissolution&
653  dissolutionCalculator() const { return *this->rs_; }
654 
659  const CalcEvaporation&
660  evaporationCalculator() const { return *this->rv_; }
661 
665  const PhaseUsage&
666  phaseUsage() const { return this->pu_; }
667 
668  private:
669  EquilRecord rec_;
670  DensCalc density_;
671  std::shared_ptr<Miscibility::RsFunction> rs_;
672  std::shared_ptr<Miscibility::RsFunction> rv_;
673  PhaseUsage pu_;
674  };
675 
676 
677 
681  struct PcEq
682  {
683  PcEq(const BlackoilPropertiesInterface& props,
684  const int phase,
685  const int cell,
686  const double target_pc)
687  : props_(props),
688  phase_(phase),
689  cell_(cell),
690  target_pc_(target_pc)
691  {
692  std::fill(s_, s_ + BlackoilPhases::MaxNumPhases, 0.0);
693  std::fill(pc_, pc_ + BlackoilPhases::MaxNumPhases, 0.0);
694  }
695  double operator()(double s) const
696  {
697  s_[phase_] = s;
698  props_.capPress(1, s_, &cell_, pc_, 0);
699  return pc_[phase_] - target_pc_;
700  }
701  private:
702  const BlackoilPropertiesInterface& props_;
703  const int phase_;
704  const int cell_;
705  const int target_pc_;
706  mutable double s_[BlackoilPhases::MaxNumPhases];
707  mutable double pc_[BlackoilPhases::MaxNumPhases];
708  };
709 
710 
711 
714  inline double satFromPc(const BlackoilPropertiesInterface& props,
715  const int phase,
716  const int cell,
717  const double target_pc,
718  const bool increasing = false)
719  {
720  // Find minimum and maximum saturations.
721  double sminarr[BlackoilPhases::MaxNumPhases];
722  double smaxarr[BlackoilPhases::MaxNumPhases];
723  props.satRange(1, &cell, sminarr, smaxarr);
724  const double s0 = increasing ? smaxarr[phase] : sminarr[phase];
725  const double s1 = increasing ? sminarr[phase] : smaxarr[phase];
726 
727  // Create the equation f(s) = pc(s) - target_pc
728  const PcEq f(props, phase, cell, target_pc);
729  const double f0 = f(s0);
730  const double f1 = f(s1);
731 
732  if (f0 <= 0.0) {
733  return s0;
734  } else if (f1 > 0.0) {
735  return s1;
736  } else {
737  const int max_iter = 60;
738  const double tol = 1e-6;
739  int iter_used = -1;
740  typedef RegulaFalsi<ThrowOnError> ScalarSolver;
741  const double sol = ScalarSolver::solve(f, std::min(s0, s1), std::max(s0, s1), max_iter, tol, iter_used);
742  return sol;
743  }
744  }
745 
746 
750  struct PcEqSum
751  {
753  const int phase1,
754  const int phase2,
755  const int cell,
756  const double target_pc)
757  : props_(props),
758  phase1_(phase1),
759  phase2_(phase2),
760  cell_(cell),
761  target_pc_(target_pc)
762  {
763  std::fill(s_, s_ + BlackoilPhases::MaxNumPhases, 0.0);
764  std::fill(pc_, pc_ + BlackoilPhases::MaxNumPhases, 0.0);
765  }
766  double operator()(double s) const
767  {
768  s_[phase1_] = s;
769  s_[phase2_] = 1.0 - s;
770  props_.capPress(1, s_, &cell_, pc_, 0);
771  return pc_[phase1_] + pc_[phase2_] - target_pc_;
772  }
773  private:
774  const BlackoilPropertiesInterface& props_;
775  const int phase1_;
776  const int phase2_;
777  const int cell_;
778  const int target_pc_;
779  mutable double s_[BlackoilPhases::MaxNumPhases];
780  mutable double pc_[BlackoilPhases::MaxNumPhases];
781  };
782 
783 
784 
785 
789  inline double satFromSumOfPcs(const BlackoilPropertiesInterface& props,
790  const int phase1,
791  const int phase2,
792  const int cell,
793  const double target_pc)
794  {
795  // Find minimum and maximum saturations.
796  double sminarr[BlackoilPhases::MaxNumPhases];
797  double smaxarr[BlackoilPhases::MaxNumPhases];
798  props.satRange(1, &cell, sminarr, smaxarr);
799  const double smin = sminarr[phase1];
800  const double smax = smaxarr[phase1];
801 
802  // Create the equation f(s) = pc1(s) + pc2(1-s) - target_pc
803  const PcEqSum f(props, phase1, phase2, cell, target_pc);
804  const double f0 = f(smin);
805  const double f1 = f(smax);
806  if (f0 <= 0.0) {
807  return smin;
808  } else if (f1 > 0.0) {
809  return smax;
810  } else {
811  const int max_iter = 30;
812  const double tol = 1e-6;
813  int iter_used = -1;
814  typedef RegulaFalsi<ThrowOnError> ScalarSolver;
815  const double sol = ScalarSolver::solve(f, smin, smax, max_iter, tol, iter_used);
816  return sol;
817  }
818  }
819 
821  inline double satFromDepth(const BlackoilPropertiesInterface& props,
822  const double cellDepth,
823  const double contactDepth,
824  const int phase,
825  const int cell,
826  const bool increasing = false)
827  {
828  // Find minimum and maximum saturations.
829  double sminarr[BlackoilPhases::MaxNumPhases];
830  double smaxarr[BlackoilPhases::MaxNumPhases];
831  props.satRange(1, &cell, sminarr, smaxarr);
832  const double s0 = increasing ? smaxarr[phase] : sminarr[phase];
833  const double s1 = increasing ? sminarr[phase] : smaxarr[phase];
834 
835  if (cellDepth < contactDepth){
836  return s0;
837  } else {
838  return s1;
839  }
840 
841  }
842 
844  inline bool isConstPc(const BlackoilPropertiesInterface& props,
845  const int phase,
846  const int cell)
847  {
848  // Find minimum and maximum saturations.
849  double sminarr[BlackoilPhases::MaxNumPhases];
850  double smaxarr[BlackoilPhases::MaxNumPhases];
851  props.satRange(1, &cell, sminarr, smaxarr);
852 
853  // Create the equation f(s) = pc(s);
854  const PcEq f(props, phase, cell, 0);
855  const double f0 = f(sminarr[phase]);
856  const double f1 = f(smaxarr[phase]);
857  return std::abs(f0 - f1) < std::numeric_limits<double>::epsilon();
858  }
859 
860  } // namespace Equil
861 } // namespace Opm
862 
863 
864 #endif // OPM_EQUILIBRATIONHELPERS_HEADER_INCLUDED
double operator()(const double, const double press, const double temp, const double sat_oil=0.0) const
Function call.
Definition: EquilibrationHelpers.hpp:515
std::vector< double > operator()(const double p, const double T, const std::vector< double > &z) const
Compute phase densities of all phases at phase point given by (pressure, surface volume) tuple...
Definition: EquilibrationHelpers.hpp:132
Definition: RootFinders.hpp:103
const CalcEvaporation & evaporationCalculator() const
Retrieve vapourised oil-gas ratio calculator of current region.
Definition: EquilibrationHelpers.hpp:660
virtual void capPress(const int n, const double *s, const int *cells, double *pc, double *dpcds) const =0
double satFromPc(const BlackoilPropertiesInterface &props, const int phase, const int cell, const double target_pc, const bool increasing=false)
Compute saturation of some phase corresponding to a given capillary pressure.
Definition: EquilibrationHelpers.hpp:714
Aggregate information base of an equilibration region.
Definition: EquilibrationHelpers.hpp:569
virtual void satRange(const int n, const int *cells, double *smin, double *smax) const =0
Obtain the range of allowable saturation values.
Definition: EquilibrationHelpers.hpp:91
const CalcDissolution & dissolutionCalculator() const
Retrieve dissolved gas-oil ratio calculator of current region.
Definition: EquilibrationHelpers.hpp:653
virtual double operator()(const double depth, const double press, const double temp, const double sat=0.0) const =0
Function call operator.
double operator()(const double depth, const double press, const double temp, const double sat_gas=0.0) const
Function call.
Definition: EquilibrationHelpers.hpp:268
Class that implements "vaporized oil-gas ratio" (Rv) as function of depth and pressure as follows: ...
Definition: EquilibrationHelpers.hpp:479
Definition: AnisotropicEikonal.cpp:446
DensityCalculator(const BlackoilPropertiesInterface &props, const int c)
Constructor.
Definition: EquilibrationHelpers.hpp:112
double pressure() const
Pressure at datum depth in current region.
Definition: EquilibrationHelpers.hpp:616
double pcow_woc() const
water-oil capillary pressure at water-oil contact.
Definition: EquilibrationHelpers.hpp:628
double satFromDepth(const BlackoilPropertiesInterface &props, const double cellDepth, const double contactDepth, const int phase, const int cell, const bool increasing=false)
Compute saturation from depth. Used for constant capillary pressure function.
Definition: EquilibrationHelpers.hpp:821
Functor for inverting a sum of capillary pressure functions.
Definition: EquilibrationHelpers.hpp:750
RsSatAtContact(const BlackoilPropertiesInterface &props, const int cell, const double p_contact, const double T_contact)
Constructor.
Definition: EquilibrationHelpers.hpp:406
virtual void matrix(const int n, const double *p, const double *T, const double *z, const int *cells, double *A, double *dAdp) const =0
const CalcDensity & densityCalculator() const
Retrieve phase density calculator of current region.
Definition: EquilibrationHelpers.hpp:646
const PhaseUsage & phaseUsage() const
Retrieve active fluid phase summary.
Definition: EquilibrationHelpers.hpp:666
Functor for inverting capillary pressure function.
Definition: EquilibrationHelpers.hpp:681
Miscibility::RsFunction CalcEvaporation
Type of vapourised oil-gas ratio calculator.
Definition: EquilibrationHelpers.hpp:606
Abstract base class for blackoil fluid and reservoir properties.
Definition: BlackoilPropertiesInterface.hpp:37
RvSatAtContact(const BlackoilPropertiesInterface &props, const int cell, const double p_contact, const double T_contact)
Constructor.
Definition: EquilibrationHelpers.hpp:489
RsVD(const BlackoilPropertiesInterface &props, const int cell, const std::vector< double > &depth, const std::vector< double > &rs)
Constructor.
Definition: EquilibrationHelpers.hpp:237
double operator()(const double, const double press, const double temp, const double sat_gas=0.0) const
Function call.
Definition: EquilibrationHelpers.hpp:432
Definition: BlackoilPhases.hpp:36
double datum() const
Datum depth in current region.
Definition: EquilibrationHelpers.hpp:611
double zwoc() const
Depth of water-oil contact.
Definition: EquilibrationHelpers.hpp:621
bool isConstPc(const BlackoilPropertiesInterface &props, const int phase, const int cell)
Return true if capillary pressure function is constant.
Definition: EquilibrationHelpers.hpp:844
double operator()(const double, const double, const double, const double=0.0) const
Function call.
Definition: EquilibrationHelpers.hpp:212
Miscibility::RsFunction CalcDissolution
Type of dissolved gas-oil ratio calculator.
Definition: EquilibrationHelpers.hpp:601
virtual int numPhases() const =0
double operator()(const double depth, const double press, const double temp, const double sat_oil=0.0) const
Function call.
Definition: EquilibrationHelpers.hpp:348
RvVD(const BlackoilPropertiesInterface &props, const int cell, const std::vector< double > &depth, const std::vector< double > &rv)
Constructor.
Definition: EquilibrationHelpers.hpp:317
Base class for phase mixing functions.
Definition: EquilibrationHelpers.hpp:165
double pcgo_goc() const
Gas-oil capillary pressure at gas-oil contact.
Definition: EquilibrationHelpers.hpp:640
Type that implements "vaporized oil-gas ratio" tabulated as a function of depth policy.
Definition: EquilibrationHelpers.hpp:307
Type that implements "dissolved gas-oil ratio" tabulated as a function of depth policy.
Definition: EquilibrationHelpers.hpp:227
virtual PhaseUsage phaseUsage() const =0
double zgoc() const
Depth of gas-oil contact.
Definition: EquilibrationHelpers.hpp:633
Type that implements "no phase mixing" policy.
Definition: EquilibrationHelpers.hpp:193
Class that implements "dissolved gas-oil ratio" (Rs) as function of depth and pressure as follows: ...
Definition: EquilibrationHelpers.hpp:396
double satFromSumOfPcs(const BlackoilPropertiesInterface &props, const int phase1, const int phase2, const int cell, const double target_pc)
Compute saturation of some phase corresponding to a given capillary pressure, where the capillary pre...
Definition: EquilibrationHelpers.hpp:789
DensCalc CalcDensity
Type of density calculator.
Definition: EquilibrationHelpers.hpp:596
EquilReg(const EquilRecord &rec, const DensCalc &density, std::shared_ptr< Miscibility::RsFunction > rs, std::shared_ptr< Miscibility::RsFunction > rv, const PhaseUsage &pu)
Constructor.
Definition: EquilibrationHelpers.hpp:580