12 #ifndef __FLOWUNIT_HEADER__
13 #define __FLOWUNIT_HEADER__
30 virtual void SetupOptionalFeatures(
const Grid& myGrid,
43 virtual const vector<OCP_DBL>&
GetScm()
const = 0;
59 OCP_DBL GetSwco()
const {
return Swco; };
76 void SetupOptionalFeatures(
const Grid& myGrid,
97 const vector<OCP_DBL>&
GetScm()
const override
99 OCP_ABORT(
"Not Completed in this Condition!");
112 void SetupOptionalFeatures(
const Grid& myGrid,
138 const vector<OCP_DBL>&
GetScm()
const override
140 OCP_ABORT(
"Not Completed in this Condition!");
156 void SetupOptionalFeatures(
const Grid& myGrid,
178 const vector<OCP_DBL>&
GetScm()
const override
180 OCP_ABORT(
"Not Completed in this Condition!");
205 const vector<OCP_DBL>&
GetScm()
const override {
return Scm; }
222 void SetupOptionalFeatures(
const Grid& myGrid,
269 void Generate_SWPCWG();
293 void SetupOptionalFeatures(
const Grid& myGrid,
298 scaleTerm->
Setup(myGrid);
341 void SetupOptionalFeatures(
const Grid& myGrid,
383 void Generate_SWPCWG();
Definition of build-in datatypes and consts.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
unsigned int OCP_USI
Long unsigned integer.
OCPTable class declaration.
OptionalFeatures class declaration.
ParamReservoir class declaration.
#define OCP_ABORT(msg)
Abort if critical error happens.
OCP_DBL Fk
The relative permeability interpolation parameter.
void CalKrPcDeriv(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, OCP_DBL *dkrdS, OCP_DBL *dPcjdS, const OCP_USI &bId) override
Calculate derivatives of relative permeability and capillary pressure.
OCP_DBL Fp
The capillary pressure interpolation parameter.
OCP_DBL surTen
Surface tension.
void CalKrPc(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, const OCP_USI &bId) override
Calculate relative permeability and capillary pressure.
OCP_DBL GetPcowBySw(const OCP_DBL &sw) override
Pcow = Po - Pw.
OCP_DBL GetSwByPcgw(const OCP_DBL &pcgw) override
Pcgw = Pg - Pw.
OCPTable SGOF
saturation table about gas and oil.
virtual void CalKrPcDeriv(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, OCP_DBL *dkrdS, OCP_DBL *dPcjdS, const OCP_USI &bId) override
Calculate derivatives of relative permeability and capillary pressure.
virtual void CalKrPc(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, const OCP_USI &bId) override
Calculate relative permeability and capillary pressure.
OCP_DBL GetPcgoBySg(const OCP_DBL &sg) override
Pcgo = Pg - Po.
OCPTable SWOF
saturation table about water and oil.
OCP_DBL GetPcgoBySg(const OCP_DBL &sg) override
Pcgo = Pg - Po.
OCP_DBL GetSwByPcgw(const OCP_DBL &pcgw) override
Pcgw = Pg - Pw.
void CalKrPc(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, const OCP_USI &bId) override
Calculate relative permeability and capillary pressure.
OCPTable SOF3
saturation table about oil.
OCPTable SWFN
saturation table about water.
void CalKrPcDeriv(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, OCP_DBL *dkrdS, OCP_DBL *dPcjdS, const OCP_USI &bId) override
Calculate derivatives of relative permeability and capillary pressure.
OCPTable SGFN
saturation table about gas.
OCP_DBL GetPcowBySw(const OCP_DBL &sw) override
Pcow = Po - Pw.
OCP_DBL kroMax
oil relative permeability in the presence of connate water only, used in stone2
vector< OCP_DBL > Scm
critical saturation when phase becomes mobile / immobile
const vector< OCP_DBL > & GetScm() const override
Return the value of Scm.
OCPTable SGOF
saturation table about gas and oil.
void CalKrPcDeriv(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, OCP_DBL *dkrdS, OCP_DBL *dPcjdS, const OCP_USI &bId) override
Calculate derivatives of relative permeability and capillary pressure.
OCP_DBL GetSwByPcgw(const OCP_DBL &pcgw) override
Pcgw = Pg - Pw.
OCP_DBL GetPcgoBySg(const OCP_DBL &sg) override
Pcgo = Pg - Po.
void CalKrPc(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, const OCP_USI &bId) override
Calculate relative permeability and capillary pressure.
const vector< OCP_DBL > & GetScm() const override
Return the value of Scm.
OCP_DBL GetPcowBySw(const OCP_DBL &sw) override
Pcow = Po - Pw.
OCP_DBL GetSwByPcgw(const OCP_DBL &pcgw) override
Pcgw = Pg - Pw.
OCPTable SWOF
saturation table about water and oil.
OCP_DBL GetPcgoBySg(const OCP_DBL &sg) override
Pcgo = Pg - Po.
void CalKrPcDeriv(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, OCP_DBL *dkrdS, OCP_DBL *dPcjdS, const OCP_USI &bId) override
Calculate derivatives of relative permeability and capillary pressure.
OCP_DBL GetPcowBySw(const OCP_DBL &sw) override
Pcow = Po - Pw.
const vector< OCP_DBL > & GetScm() const override
Return the value of Scm.
void CalKrPc(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, const OCP_USI &bId) override
Calculate relative permeability and capillary pressure.
void CalKrPcDeriv(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, OCP_DBL *dkrdS, OCP_DBL *dPcjdS, const OCP_USI &bId) override
Calculate derivatives of relative permeability and capillary pressure.
const vector< OCP_DBL > & GetScm() const override
Return the value of Scm.
OCP_DBL GetSwByPcgw(const OCP_DBL &pcgw) override
Pcgw = Pg - Pw.
OCP_DBL GetPcgoBySg(const OCP_DBL &sg) override
Pcgo = Pg - Po.
OCP_DBL GetPcowBySw(const OCP_DBL &sw) override
Pcow = Po - Pw.
void CalKrPc(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, const OCP_USI &bId) override
Calculate relative permeability and capillary pressure.
virtual void CalKrPcDeriv(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, OCP_DBL *dkrdS, OCP_DBL *dPcjdS, const OCP_USI &bId)=0
Calculate derivatives of relative permeability and capillary pressure.
virtual OCP_DBL GetSwByPcgw(const OCP_DBL &pcgw)=0
Pcgw = Pg - Pw.
vector< OCP_DBL > data
container to store the values of interpolation.
FlowUnit()=default
Default constructor.
virtual OCP_DBL GetPcgoBySg(const OCP_DBL &sg)=0
Pcgo = Pg - Po.
vector< OCP_DBL > cdata
container to store the slopes of interpolation.
virtual const vector< OCP_DBL > & GetScm() const =0
Return the value of Scm.
virtual OCP_DBL GetPcowBySw(const OCP_DBL &sw)=0
Pcow = Po - Pw.
virtual void CalKrPc(const OCP_DBL *S_in, OCP_DBL *kr_out, OCP_DBL *pc_out, const OCP_USI &bId)=0
Calculate relative permeability and capillary pressure.
OCP_DBL Eval_Inv(const USI &j, const OCP_DBL &val, const USI &destj)
vector< OCP_DBL > & GetCol(const USI &j)
return the jth column in table to modify or use.
OCP_DBL Eval(const USI &j, const OCP_DBL &val, const USI &destj)
ScalePcow scalePcow
Scale water-oil capillary pressure term.
Miscible miscible
Miscible term for Compositional Model.
void Setup(const Grid &myGrid)
Setup ScalePcow term.