12 #ifndef __RESERVOIR_HEADER__
13 #define __RESERVOIR_HEADER__
72 OCP_INT CheckP(
const bool& bulkCheck =
true,
const bool& wellCheck =
true);
86 void GetNTQT(
const OCP_DBL& dt);
147 void CalFlashDerivFIM_n();
161 void GetSolutionFIM_n(
const vector<OCP_DBL>& u,
const OCP_DBL& dPmax,
163 void GetSolution01FIM(
const vector<OCP_DBL>& u);
176 void PrintSolFIM(
const string& outfile)
const;
177 void ShowRes(
const vector<OCP_DBL>& res)
const;
189 void SetupFIMBulk(
const bool& NRflag =
false) { conn.SetupFIMBulk(bulk, NRflag); }
190 void AddFIMBulk() { conn.AddFIMBulk(bulk); }
191 void SetupFIMBulkBoundAIMs() { conn.SetupFIMBulkBoundAIMs(bulk); }
212 void GetSolutionAIMs(
const vector<OCP_DBL>& u,
const OCP_DBL& dPmax,
226 void CalFlashAIMc01();
232 void GetSolutionAIMc(
const vector<OCP_DBL>& u,
const OCP_DBL& dPmax,
235 void UpdatePj() { bulk.UpdatePj(); }
AllWells class declaration.
BulkConn class declaration.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
unsigned int OCP_USI
Long unsigned integer.
ParamRead class declaration.
void SetupWellBulk(Bulk &myBulk) const
Setup bulks which are penetrated by wells.
USI GetWellNum() const
Return the num of wells.
Properties and operations on connections between bulks (active grids).
Physical information of each active reservoir bulk.
OCP_DBL GetNRdPmax()
Return NRdPmax.
OCP_DBL GetNRdSmaxP()
Return NRdSmaxP.
OCP_DBL CalNRdSmax(OCP_USI &index)
Calculate some auxiliary variable, for example, dSmax.
OCP_USI GetBulkNum() const
Return the number of bulks.
USI GetComNum() const
Return the number of components.
Collect important information of each time step for fast review.
Collect more detailed information of each time step.
Basic information of computational grid, including the rock properties.
Linear solvers for discrete systems.
All control parameters except for well controlers.
perform AIM in space, that is, some grids will be implicit, others will be explicit at the same time ...
perform AIM in time, that is, local FIM will be performed after global IMPEC performs
OCP_FIM is FIM (Fully Implicit Method).
OCP_IMPEC is IMPEC (implict pressure explict saturation) method.
Pre-processing unit for OpenCAEPoro for reading params from input files.
bool CheckVe(const OCP_DBL &Vlim) const
Check error between Fluids and Pores.
void AllocateMatIMPEC(LinearSystem &myLS) const
Allocate Maxmimum memory for internal Matirx for IMPEC.
void InitFIM()
Initialize the properties of Reservoir for FIM.
void ResetWellIMPEC()
Reset Well for IMPEC.
void AssembleMatAIMs(LinearSystem &myLS, vector< OCP_DBL > &res, const OCP_DBL &dt) const
Assemble Matrix for AIMs.
void AssembleMatFIM(LinearSystem &myLS, const OCP_DBL &dt) const
Assemble Matrix for FIM.
void AllocateAuxAIMt()
Allocate memory for auxiliary variables used for AIMt.
void UpdateLastStepFIM()
Update value of last step for FIM.
void AllocateAuxFIM()
Allocate memory for auxiliary variables used for FIM.
void ResetVal01IMPEC()
Reset Capillary Pressure, Flux for IMPEC.
void CalKrPc()
Calculate Relative Permeability and Capillary for each Bulk.
void Setup()
Setup static information for reservoir with input params.
void UpdateLastStepAIM()
Update value of last step for IMPEC.
void CalFlashIMPEC()
Calculate Flash For IMPEC.
void MassConseveIMPEC(const OCP_DBL &dt)
Calculate Ni according to Flux.
void GetSolutionFIM(const vector< OCP_DBL > &u, const OCP_DBL &dPmax, const OCP_DBL &dSmax)
void CalFlashDerivAIM(const bool &IfAIMs)
Calculate Flash for local FIM, some derivatives are needed.
OCP_DBL GetNRdSmax(OCP_USI &index)
Return NRdSmax.
void GetSolutionIMPEC(const vector< OCP_DBL > &u)
Return the Solution to Reservoir Pressure for IMPEC.
bool CheckNi()
Check if abnormal Pressure occurs.
OCP_DBL GetNRdSmaxP()
Return NRdSmaxP.
void InputParam(ParamRead ¶m)
void CalVpore()
Calculate pore of Bulks.
void PrepareWell()
Calculate Well Properties at the beginning of each time step.
void AllocateAuxIMPEC()
Allocate memory for auxiliary variables used for IMPEC.
void InitIMPEC()
Initialize the properties of Reservoir for IMPEC.
OCP_USI GetMaxFIMBulk() const
Return MaxNUMFIMBulk.
USI GetWellNum() const
Return the num of Well.
void CalKrPcDerivAIM(const bool &IfAIMs)
Calculate Relative Permeability and Capillary and some derivatives for each Bulk.
void GetSolutionAIMt(const vector< OCP_DBL > &u, const OCP_DBL &dPmax, const OCP_DBL &dSmax)
void UpdateLastStepIMPEC()
Update value of last step for IMPEC.
OCP_DBL GetNRdPmax()
Return NRdPmax.
void CalMaxChange()
Calculate Maximum Change of some reference variables for IMPEC.
void AllocateMatFIM(LinearSystem &myLS) const
Allocate Maxmimum memory for internal Matirx for FIM.
OCP_INT CheckP(const bool &bulkCheck=true, const bool &wellCheck=true)
Check if abnormal Pressure occurs.
void AssembleMatAIMc(LinearSystem &myLS, const OCP_DBL &dt) const
Assemble Matrix for AIMc.
void ResetFIM(const bool &flag)
Reset FIM.
USI GetComNum() const
Return the num of Components.
void CalFlashDerivAIMc()
Calculate Flash for local FIM, some derivatives are needed.
void CalConnFluxIMPEC()
Calculate flux between bulks.
void ApplyControl(const USI &i)
Apply the control of ith critical time point.
void CalWellTrans()
Calculate Trans of Wells.
void AllocateMatAIMt(LinearSystem &myLS) const
Allocate Maxmimum memory for internal Matirx for local FIM.
void AllocateAuxAIMc()
Allocate memory for auxiliary variables used for FIM.
void AssembleMatIMPEC(LinearSystem &myLS, const OCP_DBL &dt) const
Assemble Matrix for IMPEC.
void AssembleMatAIMt(LinearSystem &myLS, const OCP_DBL &dt) const
Assemble Matrix for AIMt -— local FIM here.
void SetupFIMBulk(const bool &NRflag=false)
Setup FIMBulk.
void AllocateAuxAIMs()
Allocate memory for auxiliary variables used for AIMs.
void CalIPRT(const OCP_DBL &dt)
Calculate num of Injection, Production.
OCP_DBL CalCFL(const OCP_DBL &dt)
Calcluate the CFL number, including bulks and wells for IMPEC.
OCP_DBL GetNRdNmax()
Return NRdNmax.
void ResetVal02IMPEC()
Reset Capillary Pressure, Moles of Componnets, Flux for IMPEC.
void CalKrPcDerivAIMc()
Calculate Relative Permeability and Capillary and some derivatives for each Bulk.
void CalKrPcDerivFIM()
Calculate Relative Permeability and Capillary and some derivatives for each Bulk.
void CalFlashDerivFIM()
Calculate Flash for FIM, some derivatives are needed.
void CalFLuxIMPEC()
Calculate flux between bulks, bulks and wells.
OCP_USI GetBulkNum() const
Return the num of Bulk.
void CalResAIMs(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for AIMs, it's also RHS of Linear System.
void CalResAIMc(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for FIM, it's also RHS of Linear System.
void CalWellFlux()
Calculate Flux between Bulk and Wells.
void CalResFIM(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for FIM, it's also RHS of Linear System.
void CalResAIMt(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for local FIM, it's also RHS of Linear System.
Solver class for overall solution methods.
The Summary class manages the output in the summary file.