12 #ifndef __OCPFLUIDMETHOD_HEADER__
13 #define __OCPFLUIDMETHOD_HEADER__
25 void InitRock(
Bulk& bk)
const;
26 void CalRock(
Bulk& bk)
const;
64 void CalFlash(
Bulk& bk);
88 void GetSolution(
Reservoir& rs,
const vector<OCP_DBL>& u);
94 void UpdateLastTimeStep(
Reservoir& rs)
const;
142 void InitFlash(
Bulk& bk)
const;
144 void CalFlash(
Bulk& bk);
Linear solver class declaration.
double OCP_DBL
Double precision.
unsigned int OCP_USI
Long unsigned integer.
unsigned int OCP_BOOL
OCP_BOOL in OCP.
OCPControl class declaration.
Reservoir class declaration.
Supply basic tools used to output files.
Elapsed wall-time and CPU-cycles declaration.
Physical information of each active reservoir bulk.
void GetSolution(Reservoir &rs, const vector< OCP_DBL > &u, const OCPControl &ctrl) const
Update P, Ni, BHP after linear system is solved.
void AssembleMatBulks(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble linear system for bulks.
void CalFlashEa(Bulk &bk)
Perform flash calculation with Ni for Explicit bulk – Update all properties.
void SolveLinearSystem(LinearSystem &ls, Reservoir &rs, OCPControl &ctrl)
Solve the linear system.
void CalFlashEp(Bulk &bk)
Perform flash calculation with Ni for Explicit bulk – Update partial properties.
void CalKrPcI(Bulk &bk)
Calculate relative permeability and capillary pressure for Implicit bulk.
void Setup(Reservoir &rs, LinearSystem &ls, const OCPControl &ctrl)
Setup AIMc.
void AssembleMat(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble Matrix.
OCP_BOOL FinishNR(Reservoir &rs, OCPControl &ctrl)
Finish a Newton-Raphson iteration.
void CalFlashI(Bulk &bk)
Perform flash calculation with Ni for Implicit bulk.
void SetFIMBulk(Reservoir &rs)
Determine which bulk are treated Implicit.
OCP_BOOL UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
void UpdateLastTimeStep(Reservoir &rs) const
Update values of last step for AIMc.
void PassFlashValueEp(Bulk &bk, const OCP_USI &n)
Pass flash value needed for Explicit bulk – Update partial properties.
void CalKrPcE(Bulk &bk)
Calculate relative permeability and capillary pressure for Explicit bulk.
void ResetToLastTimeStep(Reservoir &rs, OCPControl &ctrl)
Reset variables to last time step.
void Prepare(Reservoir &rs, const OCP_DBL &dt)
Prepare for Assembling matrix.
void InitReservoir(Reservoir &rs) const
Init.
void FinishStep(Reservoir &rs, OCPControl &ctrl) const
Finish a time step.
void AllocateReservoir(Reservoir &rs)
Allocate memory for reservoir.
IsoT_FIM is FIM (Fully Implicit Method).
void Setup(Reservoir &rs, LinearSystem &ls, const OCPControl &ctrl)
Setup FIM.
void AssembleMat(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble Matrix.
void UpdateLastTimeStep(Reservoir &rs) const
Update values of last step for FIM.
void InitReservoir(Reservoir &rs) const
Init.
OCP_BOOL FinishNR(Reservoir &rs, OCPControl &ctrl)
Finish a Newton-Raphson iteration.
void AllocateLinearSystem(LinearSystem &ls, const Reservoir &rs, const OCPControl &ctrl)
Allocate memory for linear system.
void Prepare(Reservoir &rs, const OCP_DBL &dt)
Prepare for Assembling matrix.
void FinishStep(Reservoir &rs, OCPControl &ctrl)
Finish a time step.
void PassFlashValue(Bulk &bk, const OCP_USI &n) const
Pass value needed for FIM from flash to bulk.
void SolveLinearSystem(LinearSystem &ls, Reservoir &rs, OCPControl &ctrl) const
Solve the linear system.
OCP_BOOL UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
void CalRes(Reservoir &rs, const OCP_DBL &dt, const OCP_BOOL &resetRes0) const
Calculate residual.
void CalKrPc(Bulk &bk) const
Calculate relative permeability and capillary pressure needed for FIM.
void ResetToLastTimeStep(Reservoir &rs, OCPControl &ctrl)
Reset variables to last time step.
void AllocateReservoir(Reservoir &rs)
Allocate memory for reservoir.
void AssembleMatWells(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble linear system for wells.
void AssembleMatBulksNew(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble linear system for bulks.
void FinishStep(Reservoir &rs, OCPControl &ctrl) const
Finish a time step.
void Prepare(Reservoir &rs, const OCP_DBL &dt)
Prepare for Assembling matrix.
void AssembleMatProdWellsNew(LinearSystem &ls, const Bulk &bk, const Well &wl, const OCP_DBL &dt) const
Assemble linear system for production wells.
void GetSolution(Reservoir &rs, const vector< OCP_DBL > &u, const OCPControl &ctrl) const
Update P, Ni, BHP after linear system is solved.
void AllocateReservoir(Reservoir &rs)
Allocate memory for reservoir.
void ResetToLastTimeStep(Reservoir &rs, OCPControl &ctrl)
Reset variables to last time step.
OCP_BOOL UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
void AssembleMatInjWellsNew(LinearSystem &ls, const Bulk &bk, const Well &wl, const OCP_DBL &dt) const
Assemble linear system for injection wells.
void AssembleMatWellsNew(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble linear system for wells.
void InitFlash(Bulk &bk) const
Perform Flash with Sj and calculate values needed for FIMn.
void PassFlashValue(Bulk &bk, const OCP_USI &n) const
Pass value needed for FIMn from flash to bulk.
void AssembleMat(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble Matrix.
void Setup(Reservoir &rs, LinearSystem &ls, const OCPControl &ctrl)
Setup FIM.
void InitReservoir(Reservoir &rs) const
Init.
void CalFlash(Bulk &bk)
Perform Flash with Ni and calculate values needed for FIMn.
void SolveLinearSystem(LinearSystem &ls, Reservoir &rs, OCPControl &ctrl) const
Solve the linear system.
OCP_BOOL FinishNR(Reservoir &rs, OCPControl &ctrl)
Finish a Newton-Raphson iteration.
void UpdateLastTimeStep(Reservoir &rs) const
Update values of last step for FIMn.
IsoT_IMPEC is IMPEC (implicit pressure explict saturation) method.
void Prepare(Reservoir &rs, OCPControl &ctrl)
Prepare for Assembling matrix.
void SolveLinearSystem(LinearSystem &ls, Reservoir &rs, OCPControl &ctrl)
Solve the linear system.
void AssembleMat(LinearSystem &ls, const Reservoir &rs, const OCP_DBL &dt) const
Assemble Matrix.
void InitFlash(Bulk &bk) const
Perform Flash with Sj and calculate values needed for FIM.
void Setup(Reservoir &rs, LinearSystem &ls, const OCPControl &ctrl)
Setup IMPEC.
OCP_BOOL UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
void PassFlashValue(Bulk &bk, const OCP_USI &n) const
Pass value needed for FIM from flash to bulk.
void CalKrPc(Bulk &bk) const
Calculate relative permeability and capillary pressure needed for FIM.
OCP_BOOL FinishNR(const Reservoir &rs)
Determine if NR iteration finishes.
void InitReservoir(Reservoir &rs) const
Init.
Linear solvers for discrete systems.
All control parameters except for well controllers.