EquilibrationHelpers_impl.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 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 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*/
23
24#include <opm/common/TimingMacros.hpp>
25
26#include <opm/common/utility/numeric/RootFinders.hpp>
27
28#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
29#include <opm/material/fluidstates/SimpleModularFluidState.hpp>
30#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
31
33
34#include <fmt/format.h>
35
36namespace Opm {
37namespace EQUIL {
38
39using FluidSystemSimple = BlackOilFluidSystem<double>;
40
41// Adjust oil pressure according to gas saturation and cap pressure
42using SatOnlyFluidState = SimpleModularFluidState<double,
43 /*numPhases=*/3,
44 /*numComponents=*/3,
46 /*storePressure=*/false,
47 /*storeTemperature=*/false,
48 /*storeComposition=*/false,
49 /*storeFugacity=*/false,
50 /*storeSaturation=*/true,
51 /*storeDensity=*/false,
52 /*storeViscosity=*/false,
53 /*storeEnthalpy=*/false>;
54
55namespace Miscibility {
56
57template<class FluidSystem>
58RsVD<FluidSystem>::RsVD(const int pvtRegionIdx,
59 const std::vector<double>& depth,
60 const std::vector<double>& rs)
61 : pvtRegionIdx_(pvtRegionIdx)
62 , rsVsDepth_(depth, rs)
63{
64}
65
66template<class FluidSystem>
68operator()(const double depth,
69 const double press,
70 const double temp,
71 const double satGas) const
72{
73 const auto sat_rs = satRs(press, temp);
74 if (satGas > std::sqrt(std::numeric_limits<double>::epsilon())) {
75 return sat_rs;
76 }
77 else {
78 if (rsVsDepth_.xMin() > depth)
79 return std::min(sat_rs, rsVsDepth_.valueAt(0));
80 else if (rsVsDepth_.xMax() < depth)
81 return std::min(sat_rs, rsVsDepth_.valueAt(rsVsDepth_.numSamples() - 1));
82 return std::min(sat_rs, rsVsDepth_.eval(depth, /*extrapolate=*/false));
83 }
84}
85
86template<class FluidSystem>
87double RsVD<FluidSystem>::satRs(const double press, const double temp) const
88{
89 return FluidSystem::oilPvt().saturatedGasDissolutionFactor(pvtRegionIdx_, temp, press);
90}
91
92template<class FluidSystem>
93PBVD<FluidSystem>::PBVD(const int pvtRegionIdx,
94 const std::vector<double>& depth,
95 const std::vector<double>& pbub)
96 : pvtRegionIdx_(pvtRegionIdx)
97 , pbubVsDepth_(depth, pbub)
98{
99}
100
101template<class FluidSystem>
103operator()(const double depth,
104 const double cellPress,
105 const double temp,
106 const double satGas) const
107{
108 double press = cellPress;
109 if (satGas <= 0.0) {
110 if (pbubVsDepth_.xMin() > depth)
111 press = pbubVsDepth_.valueAt(0);
112 else if (pbubVsDepth_.xMax() < depth)
113 press = pbubVsDepth_.valueAt(pbubVsDepth_.numSamples() - 1);
114 else
115 press = pbubVsDepth_.eval(depth, /*extrapolate=*/false);
116 }
117 return satRs(std::min(press, cellPress), temp);
118}
119
120template<class FluidSystem>
122satRs(const double press, const double temp) const
123{
124 return FluidSystem::oilPvt().saturatedGasDissolutionFactor(pvtRegionIdx_, temp, press);
125}
126
127template<class FluidSystem>
128PDVD<FluidSystem>::PDVD(const int pvtRegionIdx,
129 const std::vector<double>& depth,
130 const std::vector<double>& pdew)
131 : pvtRegionIdx_(pvtRegionIdx)
132 , pdewVsDepth_(depth, pdew)
133{
134}
135
136template<class FluidSystem>
138operator()(const double depth,
139 const double cellPress,
140 const double temp,
141 const double satOil) const
142{
143 double press = cellPress;
144 if (satOil <= 0.0) {
145 if (pdewVsDepth_.xMin() > depth)
146 press = pdewVsDepth_.valueAt(0);
147 else if (pdewVsDepth_.xMax() < depth)
148 press = pdewVsDepth_.valueAt(pdewVsDepth_.numSamples() - 1);
149 else
150 press = pdewVsDepth_.eval(depth, /*extrapolate=*/false);
151 }
152 return satRv(std::min(press, cellPress), temp);
153}
154
155template<class FluidSystem>
157satRv(const double press, const double temp) const
158{
159 return FluidSystem::gasPvt().saturatedOilVaporizationFactor(pvtRegionIdx_, temp, press);
160}
161
162
163template<class FluidSystem>
164RvVD<FluidSystem>::RvVD(const int pvtRegionIdx,
165 const std::vector<double>& depth,
166 const std::vector<double>& rv)
167 : pvtRegionIdx_(pvtRegionIdx)
168 , rvVsDepth_(depth, rv)
169{
170}
171
172template<class FluidSystem>
174operator()(const double depth,
175 const double press,
176 const double temp,
177 const double satOil) const
178{
179 if (satOil < - std::sqrt(std::numeric_limits<double>::epsilon())) {
180 throw std::logic_error {
181 "Must not pass negative oil saturation"
182 };
183 }
184 const auto sat_rv = satRv(press, temp);
185 if (satOil > std::sqrt(std::numeric_limits<double>::epsilon())) {
186 return sat_rv;
187 }
188 else {
189 if (rvVsDepth_.xMin() > depth)
190 return std::min(sat_rv, rvVsDepth_.valueAt(0));
191 else if (rvVsDepth_.xMax() < depth)
192 return std::min(sat_rv, rvVsDepth_.valueAt(rvVsDepth_.numSamples() - 1));
193 return std::min(sat_rv, rvVsDepth_.eval(depth, /*extrapolate=*/false));
194 }
195}
196
197template<class FluidSystem>
199satRv(const double press, const double temp) const
200{
201 return FluidSystem::gasPvt().saturatedOilVaporizationFactor(pvtRegionIdx_, temp, press);
202}
203
204
205template<class FluidSystem>
206RvwVD<FluidSystem>::RvwVD(const int pvtRegionIdx,
207 const std::vector<double>& depth,
208 const std::vector<double>& rvw)
209 : pvtRegionIdx_(pvtRegionIdx)
210 , rvwVsDepth_(depth, rvw)
211{
212}
213
214template<class FluidSystem>
216operator()(const double depth,
217 const double press,
218 const double temp,
219 const double satWat) const
220{
221 if (satWat < - std::sqrt(std::numeric_limits<double>::epsilon())) {
222 throw std::logic_error {
223 "Must not pass negative water saturation"
224 };
225 }
226
227 const auto sat_rvw = satRvw(press, temp);
228 if (satWat > std::sqrt(std::numeric_limits<double>::epsilon())) {
229 return sat_rvw; //saturated Rvw
230 }
231 else {
232 if (rvwVsDepth_.xMin() > depth)
233 return std::min(sat_rvw,rvwVsDepth_.valueAt(0));
234 else if (rvwVsDepth_.xMax() < depth)
235 return std::min(sat_rvw, rvwVsDepth_.valueAt(rvwVsDepth_.numSamples() - 1));
236 return std::min(sat_rvw, rvwVsDepth_.eval(depth, /*extrapolate=*/false));
237 }
238}
239
240template<class FluidSystem>
242satRvw(const double press, const double temp) const
243{
244 return FluidSystem::gasPvt().saturatedWaterVaporizationFactor(pvtRegionIdx_, temp, press);
245}
246
247
248template<class FluidSystem>
250RsSatAtContact(const int pvtRegionIdx, const double pContact, const double T_contact)
251 : pvtRegionIdx_(pvtRegionIdx)
252{
253 rsSatContact_ = satRs(pContact, T_contact);
254}
255
256template<class FluidSystem>
258operator()(const double /* depth */,
259 const double press,
260 const double temp,
261 const double satGas) const
262{
263 if (satGas > std::sqrt(std::numeric_limits<double>::epsilon())) {
264 return satRs(press, temp);
265 }
266 else {
267 return std::min(satRs(press, temp), rsSatContact_);
268 }
269}
270
271template<class FluidSystem>
273satRs(const double press, const double temp) const
274{
275 return FluidSystem::oilPvt().saturatedGasDissolutionFactor(pvtRegionIdx_, temp, press);
276}
277
278template<class FluidSystem>
280RvSatAtContact(const int pvtRegionIdx, const double pContact, const double T_contact)
281 : pvtRegionIdx_(pvtRegionIdx)
282{
283 rvSatContact_ = satRv(pContact, T_contact);
284}
285
286template<class FluidSystem>
288operator()(const double /*depth*/,
289 const double press,
290 const double temp,
291 const double satOil) const
292{
293 if (satOil > std::sqrt(std::numeric_limits<double>::epsilon())) {
294 return satRv(press, temp);
295 }
296 else {
297 return std::min(satRv(press, temp), rvSatContact_);
298 }
299}
300
301template<class FluidSystem>
303satRv(const double press, const double temp) const
304{
305 return FluidSystem::gasPvt().saturatedOilVaporizationFactor(pvtRegionIdx_, temp, press);;
306}
307
308template<class FluidSystem>
310RvwSatAtContact(const int pvtRegionIdx, const double pContact, const double T_contact)
311 : pvtRegionIdx_(pvtRegionIdx)
312{
313 rvwSatContact_ = satRvw(pContact, T_contact);
314}
315
316template<class FluidSystem>
318operator()(const double /*depth*/,
319 const double press,
320 const double temp,
321 const double satWat) const
322{
323 if (satWat > std::sqrt(std::numeric_limits<double>::epsilon())) {
324 return satRvw(press, temp);
325 }
326 else {
327 return std::min(satRvw(press, temp), rvwSatContact_);
328 }
329}
330
331template<class FluidSystem>
333satRvw(const double press, const double temp) const
334{
335 return FluidSystem::gasPvt().saturatedWaterVaporizationFactor(pvtRegionIdx_, temp, press);;
336}
337
338} // namespace Miscibility
339
340EquilReg::EquilReg(const EquilRecord& rec,
341 std::shared_ptr<Miscibility::RsFunction> rs,
342 std::shared_ptr<Miscibility::RsFunction> rv,
343 std::shared_ptr<Miscibility::RsFunction> rvw,
344 const TabulatedFunction& tempVdTable,
345 const TabulatedFunction& saltVdTable,
346 const int pvtIdx)
347 : rec_ (rec)
348 , rs_ (rs)
349 , rv_ (rv)
350 , rvw_ (rvw)
351 , tempVdTable_ (tempVdTable)
352 , saltVdTable_ (saltVdTable)
353 , pvtIdx_ (pvtIdx)
354{
355}
356
357double EquilReg::datum() const
358{
359 return this->rec_.datumDepth();
360}
361
362double EquilReg::pressure() const
363{
364 return this->rec_.datumDepthPressure();
365}
366
367double EquilReg::zwoc() const
368{
369 return this->rec_.waterOilContactDepth();
370}
371
372double EquilReg::pcowWoc() const
373{
374 return this->rec_.waterOilContactCapillaryPressure();
375}
376
377double EquilReg::zgoc() const
378{
379 return this->rec_.gasOilContactDepth();
380}
381
382double EquilReg::pcgoGoc() const
383{
384 return this->rec_.gasOilContactCapillaryPressure();
385}
386
388{
389 return this->rec_.initializationTargetAccuracy();
390}
391
394{
395 return *this->rs_;
396}
397
400{
401 return *this->rv_;
402}
403
406{
407 return *this->rvw_;
408}
409
410const EquilReg::TabulatedFunction&
412{
413 return saltVdTable_;
414}
415
416const EquilReg::TabulatedFunction&
418{
419 return tempVdTable_;
420}
421
423{
424 return this->pvtIdx_;
425}
426
427template<class FluidSystem, class MaterialLawManager>
429PcEq(const MaterialLawManager& materialLawManager,
430 const int phase,
431 const int cell,
432 const double targetPc)
433 : materialLawManager_(materialLawManager),
434 phase_(phase),
435 cell_(cell),
436 targetPc_(targetPc)
437{
438}
439
440template<class FluidSystem, class MaterialLawManager>
442operator()(double s) const
443{
444 const auto& matParams = materialLawManager_.materialLawParams(cell_);
445 SatOnlyFluidState fluidState;
446 fluidState.setSaturation(FluidSystem::waterPhaseIdx, 0.0);
447 fluidState.setSaturation(FluidSystem::oilPhaseIdx, 0.0);
448 fluidState.setSaturation(FluidSystem::gasPhaseIdx, 0.0);
449 fluidState.setSaturation(phase_, s);
450
451 // This code should only be called for water or gas phase
452 assert(phase_ != FluidSystem::oilPhaseIdx);
453 // The capillaryPressure code only uses the wetting phase saturation
454 if (phase_ == FluidSystem::gasPhaseIdx) {
455 fluidState.setSaturation(FluidSystem::waterPhaseIdx, 1.0 - s);
456 fluidState.setSaturation(FluidSystem::oilPhaseIdx, 1.0 - s);
457 }
458 std::array<double, FluidSystem::numPhases> pc{0.0};
459 using MaterialLaw = typename MaterialLawManager::MaterialLaw;
460 MaterialLaw::capillaryPressures(pc, matParams, fluidState);
461 double sign = (phase_ == FluidSystem::waterPhaseIdx)? -1.0 : 1.0;
462 double pcPhase = pc[FluidSystem::oilPhaseIdx] + sign * pc[phase_];
463 return pcPhase - targetPc_;
464}
465
466template<class FluidSystem, class MaterialLawManager>
468PcEqSum(const MaterialLawManager& materialLawManager,
469 const int phase1,
470 const int phase2,
471 const int cell,
472 const double targetPc)
473 : materialLawManager_(materialLawManager),
474 phase1_(phase1),
475 phase2_(phase2),
476 cell_(cell),
477 targetPc_(targetPc)
478{
479}
480
481template<class FluidSystem, class MaterialLawManager>
483operator()(double s) const
484{
485 const auto& matParams = materialLawManager_.materialLawParams(cell_);
486 SatOnlyFluidState fluidState;
487 fluidState.setSaturation(FluidSystem::waterPhaseIdx, 0.0);
488 fluidState.setSaturation(FluidSystem::oilPhaseIdx, 0.0);
489 fluidState.setSaturation(FluidSystem::gasPhaseIdx, 0.0);
490 fluidState.setSaturation(phase1_, s);
491 fluidState.setSaturation(phase2_, 1.0 - s);
492
493 std::array<double, FluidSystem::numPhases> pc {0.0};
494
495 using MaterialLaw = typename MaterialLawManager::MaterialLaw;
496 MaterialLaw::capillaryPressures(pc, matParams, fluidState);
497 double sign1 = (phase1_ == FluidSystem::waterPhaseIdx)? -1.0 : 1.0;
498 double pc1 = pc[FluidSystem::oilPhaseIdx] + sign1 * pc[phase1_];
499 double sign2 = (phase2_ == FluidSystem::waterPhaseIdx)? -1.0 : 1.0;
500 double pc2 = pc[FluidSystem::oilPhaseIdx] + sign2 * pc[phase2_];
501 return pc1 + pc2 - targetPc_;
502}
503
504template <class FluidSystem, class MaterialLawManager>
505double minSaturations(const MaterialLawManager& materialLawManager,
506 const int phase, const int cell)
507{
508 const auto& scaledDrainageInfo =
509 materialLawManager.oilWaterScaledEpsInfoDrainage(cell);
510
511 // Find minimum and maximum saturations.
512 switch(phase) {
513 case FluidSystem::waterPhaseIdx:
514 return scaledDrainageInfo.Swl;
515
516 case FluidSystem::gasPhaseIdx:
517 return scaledDrainageInfo.Sgl;
518
519 case FluidSystem::oilPhaseIdx:
520 throw std::runtime_error("Min saturation not implemented for oil phase.");
521
522 default:
523 throw std::runtime_error("Unknown phaseIdx .");
524 }
525 return -1.0;
526}
527
528template <class FluidSystem, class MaterialLawManager>
529double maxSaturations(const MaterialLawManager& materialLawManager,
530 const int phase, const int cell)
531{
532 const auto& scaledDrainageInfo =
533 materialLawManager.oilWaterScaledEpsInfoDrainage(cell);
534
535 // Find minimum and maximum saturations.
536 switch(phase) {
537 case FluidSystem::waterPhaseIdx:
538 return scaledDrainageInfo.Swu;
539
540 case FluidSystem::gasPhaseIdx:
541 return scaledDrainageInfo.Sgu;
542
543 case FluidSystem::oilPhaseIdx:
544 throw std::runtime_error("Max saturation not implemented for oil phase.");
545
546 default:
547 throw std::runtime_error("Unknown phaseIdx .");
548 }
549 return -1.0;
550}
551
552template <class FluidSystem, class MaterialLawManager>
553double satFromPc(const MaterialLawManager& materialLawManager,
554 const int phase,
555 const int cell,
556 const double targetPc,
557 const bool increasing)
558{
559 // Find minimum and maximum saturations.
560 double s0 = increasing ? maxSaturations<FluidSystem>(materialLawManager, phase, cell) : minSaturations<FluidSystem>(materialLawManager, phase, cell);
561 double s1 = increasing ? minSaturations<FluidSystem>(materialLawManager, phase, cell) : maxSaturations<FluidSystem>(materialLawManager, phase, cell);
562
563 // Create the equation f(s) = pc(s) - targetPc
564 const PcEq<FluidSystem, MaterialLawManager> f(materialLawManager, phase, cell, targetPc);
565 double f0 = f(s0);
566 double f1 = f(s1);
567 if (!std::isfinite(f0 + f1))
568 throw std::logic_error(fmt::format("The capillary pressure values {} and {} are not finite", f0, f1));
569
570 if (f0 <= 0.0)
571 return s0;
572 else if (f1 >= 0.0)
573 return s1;
574
575 const double tol = 1e-10;
576 // should at least converge in 2 times bisection but some safety here:
577 const int maxIter = -2*static_cast<int>(std::log2(tol)) + 10;
578 int usedIterations = -1;
579 const double root = RegulaFalsiBisection<ThrowOnError>::solve(f, s0, s1, maxIter, tol, usedIterations);
580 return root;
581}
582
583template<class FluidSystem, class MaterialLawManager>
584double satFromSumOfPcs(const MaterialLawManager& materialLawManager,
585 const int phase1,
586 const int phase2,
587 const int cell,
588 const double targetPc)
589{
590 // Find minimum and maximum saturations.
591 double s0 = minSaturations<FluidSystem>(materialLawManager, phase1, cell);
592 double s1 = maxSaturations<FluidSystem>(materialLawManager, phase1, cell);
593
594 // Create the equation f(s) = pc1(s) + pc2(1-s) - targetPc
595 const PcEqSum<FluidSystem, MaterialLawManager> f(materialLawManager, phase1, phase2, cell, targetPc);
596 double f0 = f(s0);
597 double f1 = f(s1);
598 if (f0 <= 0.0)
599 return s0;
600 else if (f1 >= 0.0)
601 return s1;
602
603 assert(f0 > 0.0 && f1 < 0.0);
604 const double tol = 1e-10;
605 // should at least converge in 2 times bisection but some safety here:
606 const int maxIter = -2*static_cast<int>(std::log2(tol)) + 10;
607 int usedIterations = -1;
608 const double root = RegulaFalsiBisection<ThrowOnError>::solve(f, s0, s1, maxIter, tol, usedIterations);
609 return root;
610}
611
612template<class FluidSystem, class MaterialLawManager>
613double satFromDepth(const MaterialLawManager& materialLawManager,
614 const double cellDepth,
615 const double contactDepth,
616 const int phase,
617 const int cell,
618 const bool increasing)
619{
620 const double s0 = increasing ? maxSaturations<FluidSystem>(materialLawManager, phase, cell) : minSaturations<FluidSystem>(materialLawManager, phase, cell);
621 const double s1 = increasing ? minSaturations<FluidSystem>(materialLawManager, phase, cell) : maxSaturations<FluidSystem>(materialLawManager, phase, cell);
622
623 if (cellDepth < contactDepth) {
624 return s0;
625 }
626 else {
627 return s1;
628 }
629}
630
631template<class FluidSystem, class MaterialLawManager>
632bool isConstPc(const MaterialLawManager& materialLawManager,
633 const int phase,
634 const int cell)
635{
636 // Create the equation f(s) = pc(s);
637 const PcEq<FluidSystem, MaterialLawManager> f(materialLawManager, phase, cell, 0);
638 const double f0 = f(minSaturations<FluidSystem>(materialLawManager, phase, cell));
639 const double f1 = f(maxSaturations<FluidSystem>(materialLawManager, phase, cell));
640 return std::abs(f0 - f1) < std::numeric_limits<double>::epsilon();
641}
642
643}
644}
Auxiliary routines that to solve the ODEs that emerge from the hydrostatic equilibrium problem.
const CalcDissolution & dissolutionCalculator() const
Definition: EquilibrationHelpers_impl.hpp:393
double datum() const
Definition: EquilibrationHelpers_impl.hpp:357
double pcgoGoc() const
Definition: EquilibrationHelpers_impl.hpp:382
int equilibrationAccuracy() const
Definition: EquilibrationHelpers_impl.hpp:387
double zgoc() const
Definition: EquilibrationHelpers_impl.hpp:377
const CalcWaterEvaporation & waterEvaporationCalculator() const
Definition: EquilibrationHelpers_impl.hpp:405
const TabulatedFunction & tempVdTable() const
Definition: EquilibrationHelpers_impl.hpp:417
const CalcEvaporation & evaporationCalculator() const
Definition: EquilibrationHelpers_impl.hpp:399
double pcowWoc() const
Definition: EquilibrationHelpers_impl.hpp:372
double zwoc() const
Definition: EquilibrationHelpers_impl.hpp:367
double pressure() const
Definition: EquilibrationHelpers_impl.hpp:362
int pvtIdx() const
Definition: EquilibrationHelpers_impl.hpp:422
EquilReg(const EquilRecord &rec, std::shared_ptr< Miscibility::RsFunction > rs, std::shared_ptr< Miscibility::RsFunction > rv, std::shared_ptr< Miscibility::RsFunction > rvw, const TabulatedFunction &tempVdTable, const TabulatedFunction &saltVdTable, const int pvtIdx)
Definition: EquilibrationHelpers_impl.hpp:340
const TabulatedFunction & saltVdTable() const
Definition: EquilibrationHelpers_impl.hpp:411
Definition: EquilibrationHelpers.hpp:220
double operator()(const double depth, const double cellPress, const double temp, const double satGas=0.0) const
Definition: EquilibrationHelpers_impl.hpp:103
PBVD(const int pvtRegionIdx, const std::vector< double > &depth, const std::vector< double > &pbub)
Definition: EquilibrationHelpers_impl.hpp:93
Definition: EquilibrationHelpers.hpp:271
PDVD(const int pvtRegionIdx, const std::vector< double > &depth, const std::vector< double > &pdew)
Definition: EquilibrationHelpers_impl.hpp:128
double operator()(const double depth, const double cellPress, const double temp, const double satOil=0.0) const
Definition: EquilibrationHelpers_impl.hpp:138
Definition: EquilibrationHelpers.hpp:100
Definition: EquilibrationHelpers.hpp:431
RsSatAtContact(const int pvtRegionIdx, const double pContact, const double T_contact)
Definition: EquilibrationHelpers_impl.hpp:250
double operator()(const double, const double press, const double temp, const double satGas=0.0) const
Definition: EquilibrationHelpers_impl.hpp:258
Definition: EquilibrationHelpers.hpp:168
RsVD(const int pvtRegionIdx, const std::vector< double > &depth, const std::vector< double > &rs)
Definition: EquilibrationHelpers_impl.hpp:58
double operator()(const double depth, const double press, const double temp, const double satGas=0.0) const
Definition: EquilibrationHelpers_impl.hpp:68
Definition: EquilibrationHelpers.hpp:486
RvSatAtContact(const int pvtRegionIdx, const double pContact, const double T_contact)
Definition: EquilibrationHelpers_impl.hpp:280
double operator()(const double, const double press, const double temp, const double satOil=0.0) const
Definition: EquilibrationHelpers_impl.hpp:288
Definition: EquilibrationHelpers.hpp:322
double operator()(const double depth, const double press, const double temp, const double satOil=0.0) const
Definition: EquilibrationHelpers_impl.hpp:174
RvVD(const int pvtRegionIdx, const std::vector< double > &depth, const std::vector< double > &rv)
Definition: EquilibrationHelpers_impl.hpp:164
Definition: EquilibrationHelpers.hpp:540
RvwSatAtContact(const int pvtRegionIdx, const double pContact, const double T_contact)
Definition: EquilibrationHelpers_impl.hpp:310
double operator()(const double, const double press, const double temp, const double satWat=0.0) const
Definition: EquilibrationHelpers_impl.hpp:318
Definition: EquilibrationHelpers.hpp:372
double operator()(const double depth, const double press, const double temp, const double satWat=0.0) const
Definition: EquilibrationHelpers_impl.hpp:216
RvwVD(const int pvtRegionIdx, const std::vector< double > &depth, const std::vector< double > &rvw)
Definition: EquilibrationHelpers_impl.hpp:206
BlackOilFluidSystem< double > FluidSystemSimple
Definition: EquilibrationHelpers_impl.hpp:39
double satFromDepth(const MaterialLawManager &materialLawManager, 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_impl.hpp:613
double satFromSumOfPcs(const MaterialLawManager &materialLawManager, const int phase1, const int phase2, const int cell, const double targetPc)
Definition: EquilibrationHelpers_impl.hpp:584
double satFromPc(const MaterialLawManager &materialLawManager, const int phase, const int cell, const double targetPc, const bool increasing=false)
Definition: EquilibrationHelpers_impl.hpp:553
SimpleModularFluidState< double, 3, 3, FluidSystemSimple, false, false, false, false, true, false, false, false > SatOnlyFluidState
Definition: EquilibrationHelpers_impl.hpp:53
bool isConstPc(const MaterialLawManager &materialLawManager, const int phase, const int cell)
Return true if capillary pressure function is constant.
Definition: EquilibrationHelpers_impl.hpp:632
double maxSaturations(const MaterialLawManager &materialLawManager, const int phase, const int cell)
Definition: EquilibrationHelpers_impl.hpp:529
double minSaturations(const MaterialLawManager &materialLawManager, const int phase, const int cell)
Definition: EquilibrationHelpers_impl.hpp:505
Definition: BlackoilPhases.hpp:27
Definition: EquilibrationHelpers.hpp:723
double operator()(double s) const
Definition: EquilibrationHelpers_impl.hpp:442
PcEq(const MaterialLawManager &materialLawManager, const int phase, const int cell, const double targetPc)
Definition: EquilibrationHelpers_impl.hpp:429
Definition: EquilibrationHelpers.hpp:760
PcEqSum(const MaterialLawManager &materialLawManager, const int phase1, const int phase2, const int cell, const double targetPc)
Definition: EquilibrationHelpers_impl.hpp:468
double operator()(double s) const
Definition: EquilibrationHelpers_impl.hpp:483