12 #ifndef __WELLGROUP_HEADER__
13 #define __WELLGROUP_HEADER__
31 WellGroup(
const string& gname) :name(gname) {};
84 void InputParam(
const ParamWell& paramWell);
86 void Setup(
const Grid& myGrid,
const Bulk& myBulk);
88 void SetupWell(
const Grid& myGrid,
const Bulk& myBulk);
90 void SetupWellGroup(
const Bulk& myBulk);
92 void SetupMixture(
const Bulk& myBulk);
94 void SetupWellBulk(
Bulk& myBulk)
const;
96 void ApplyControl(
const USI& i);
98 void InitBHP(
const Bulk& myBulk);
100 void PrepareWell(
const Bulk& myBulk);
102 void CalTrans(
const Bulk& myBulk);
104 void CalFlux(
const Bulk& myBulk);
106 void CalProdWeight(
const Bulk& myBulk);
108 void CaldG(
const Bulk& myBulk);
112 void CalReInjFluid(
const Bulk& myBulk);
115 void UpdateLastBHP() {
for (
auto& w : wells) w.lBHP = w.BHP; }
120 for (
auto& w : wells) w.ldG = w.dG;
124 for (
auto& w : wells) w.dG = w.ldG;
133 USI GetIndex(
const string& name)
const;
137 USI GetWellPerfNum()
const;
139 USI GetMaxWellPerNum()
const;
140 void CalMaxBHPChange();
141 OCP_DBL GetdBHPmax()
const {
return dPmax; }
184 if (wells[w].WellState())
192 void ShowWellStatus(
const Bulk& myBulk) {
for (
USI w = 0; w < numWell; w++) wells[w].ShowPerfStatus(myBulk); }
193 bool GetWellChange()
const {
return wellChange; }
199 vector<WellGroup> wellGroup;
202 vector<SolventINJ> solvents;
205 vector<Mixture*> flashCal;
226 void CalCFL(
const Bulk& myBulk,
const OCP_DBL& dt)
const;
233 void GetSolIMPEC(
const vector<OCP_DBL>& u,
const OCP_USI& bId);
244 void GetSolFIM(
const vector<OCP_DBL>& u,
const OCP_USI& bId,
const USI& len);
245 void GetSol01FIM(
const vector<OCP_DBL>& u,
const OCP_USI& bId,
const USI& len,
250 void ShowRes(
const vector<OCP_DBL>& res,
const Bulk& myBulk)
const;
273 void GetSolAIMt(
const vector<OCP_DBL>& u,
const OCP_USI& bId,
const USI& len);
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
unsigned int OCP_USI
Long unsigned integer.
ParamWell class declaration.
OCP_DBL GetWGIR(const USI &w) const
Return gas injection rate of the wth well.
OCP_DBL GetWGIT(const USI &w) const
Return total gas injection of the wth well.
void UpdateLastDg()
Reset dG to ldG for each well.
OCP_DBL GetFWPT() const
Return total water production in field.
OCP_DBL GetFWIR() const
Return water injection rate in field.
OCP_DBL GetFGPT() const
Return total gas production in field.
OCP_DBL GetWWIR(const USI &w) const
Return water injection rate of the wth well.
OCP_DBL GetWWPR(const USI &w) const
Return water production rate of the wth well.
OCP_DBL GetWWIT(const USI &w) const
Return total water injection of the wth well.
OCP_DBL GetWGPR(const USI &w) const
Return gas production rate of the wth well.
string GetWellName(const USI &i) const
Return the name of specified well.
OCP_DBL GetFWPR() const
Return water production rate in field.
OCP_DBL GetWBHP(const USI &w) const
Return the BHP of wth well.
OCP_DBL GetFWIT() const
Return total water injection in field.
OCP_DBL GetFGIT() const
Return gas water injection in field.
OCP_DBL GetWOPT(const USI &w) const
Return total oil production of the wth well.
OCP_DBL GetFOPT() const
Return total oil production in field.
OCP_DBL GetWGPT(const USI &w) const
Return total gas production of the wth well.
OCP_DBL GetWWPT(const USI &w) const
Return total water production of the wth well.
USI GetWellPerfNum(const USI &i) const
Return the num of perforations of well i.
OCP_DBL GetWellDg(const USI &w, const USI &p) const
Return the pth dG of wth well.
OCP_DBL GetWOPR(const USI &w) const
Return oil production rate of the wth well.
OCP_DBL GetFGPR() const
Return gas production rate in field.
USI GetWellNum() const
Return the num of wells.
OCP_DBL GetFGIR() const
Return gas injection rate in field.
OCP_DBL GetFOPR() const
Return oil production rate in field.
Physical information of each active reservoir bulk.
Collect more detailed information of each time step.
Basic information of computational grid, including the rock properties.
Linear solvers for discrete systems.