OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
PhasePermeability.hpp
Go to the documentation of this file.
1 
12 #ifndef __PHASEPERMEABILITY_HEADER__
13 #define __PHASEPERMEABILITY_HEADER__
14 
15 #include "Grid.hpp"
16 #include "OCPConst.hpp"
17 #include "ParamReservoir.hpp"
18 
19 #include <vector>
20 
21 using namespace std;
22 
24 // Miscible For Compositional Model
26 
27 class Miscible
28 {
29 
30 public:
32  void InputParam(const Miscstr& misterm);
34  void Setup(const OCP_USI& numBulk);
36  OCP_BOOL IfUseMiscible() const { return ifUseMiscible; }
38  void AssignValue(const OCP_USI& n, const OCP_DBL& v) { surTen[n] = v; }
40  OCP_BOOL CalFkFp(const OCP_USI& n, OCP_DBL& fk, OCP_DBL& fp);
42  void ResetTolastTimeStep() { surTen = lsurTen; }
44  void UpdateLastTimeStep() { lsurTen = surTen; }
46  OCP_DBL GetSurTen(const OCP_USI& n) const { return surTen[n]; }
48  OCP_DBL GetFk(const OCP_USI& n) const { return Fk[n]; }
50  OCP_DBL GetFp(const OCP_USI& n) const { return Fp[n]; }
51 
52 protected:
53  OCP_BOOL ifSetup{OCP_FALSE};
55  OCP_BOOL ifUseMiscible{OCP_FALSE};
57  // is greater than or equal to this value
61  vector<OCP_DBL> surTen;
62  vector<OCP_DBL> Fk;
63  vector<OCP_DBL> Fp;
64 
65  // Last time step
66  vector<OCP_DBL> lsurTen;
67 };
68 
70 // Scale The Water-Oil Capillary Pressure Curves (From SWATINIT)
72 
73 class ScalePcow
74 {
75  // For Output
76  friend class Out4RPT;
77 
78 public:
80  void Setup(const Grid& myGrid);
82  OCP_BOOL IfScale() const { return ifScale; }
84  void AssignScaleValue(const OCP_USI& n, const OCP_DBL& v) { scaleVal[n] = v; }
85  OCP_DBL GetSwInit(const OCP_USI& n) const { return swatInit[n]; }
87  OCP_DBL GetScaleVal(const OCP_USI& n) const { return scaleVal[n]; }
88 
89 protected:
90  OCP_BOOL ifSetup{OCP_FALSE};
91  OCP_BOOL ifScale{OCP_FALSE};
92  vector<OCP_DBL>
94  vector<OCP_DBL> swatInit;
95 };
96 
97 #endif /* end if __PHASEPERMEABILITY_HEADER__ */
98 
99 /*----------------------------------------------------------------------------*/
100 /* Brief Change History of This File */
101 /*----------------------------------------------------------------------------*/
102 /* Author Date Actions */
103 /*----------------------------------------------------------------------------*/
104 /* Shizhe Li Dec/26/2022 Create file */
105 /*----------------------------------------------------------------------------*/
Grid class declaration.
Definition of build-in datatypes and consts.
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:27
unsigned int OCP_USI
Long unsigned integer.
Definition: OCPConst.hpp:25
unsigned int OCP_BOOL
OCP_BOOL in OCP.
Definition: OCPConst.hpp:29
ParamReservoir class declaration.
Definition: Grid.hpp:89
OCP_DBL GetSurTen(const OCP_USI &n) const
Return surTen.
OCP_DBL surTenRef
The reference surface tension - flow is immiscible when the surface tension.
OCP_DBL GetFp(const OCP_USI &n) const
Return Fp.
vector< OCP_DBL > Fp
The capillary pressure interpolation parameter.
OCP_BOOL IfUseMiscible() const
Return ifUseMiscible.
void ResetTolastTimeStep()
Reset Miscible term to last time step.
OCP_DBL GetFk(const OCP_USI &n) const
Return Fk.
vector< OCP_DBL > surTen
Surface tensions between hydrocarbon phases.
vector< OCP_DBL > lsurTen
last surTen.
void UpdateLastTimeStep()
Update Miscible term at last time step.
void AssignValue(const OCP_USI &n, const OCP_DBL &v)
Assign value to surTen.
OCP_DBL Fkexp
Exponent set used to calculate Fk.
OCP_DBL surTenPc
Maximum surface tension for capillary pressure / surTenRef.
vector< OCP_DBL > Fk
The relative permeability interpolation parameter.
Collect more detailed information of each time step.
Definition: OCPOutput.hpp:211
OCP_DBL GetScaleVal(const OCP_USI &n) const
Return scaleVal.
OCP_BOOL IfScale() const
Return ifScale.
void AssignScaleValue(const OCP_USI &n, const OCP_DBL &v)
Assign value to scaleVal.
vector< OCP_DBL > scaleVal
Scale values for Pcow, it will be calculated from swatInit.
vector< OCP_DBL > swatInit
Initial water distribution.