OpenCAEPoro
v0.5.0
A simulator for multicomponent porous media flow
|
#include <Well.hpp>
Public Member Functions | |
void | InputPerfo (const WellParam &well) |
Input the param of perforations. | |
void | Setup (const Grid &gd, const Bulk &bk, const vector< SolventINJ > &sols) |
Setup the well after Grid and Bulk finish setup. | |
void | InitBHP (const Bulk &myBulk) |
Initialize the Well BHP. | |
void | CalWI_Peaceman (const Bulk &myBulk) |
Calculate Well Index with Peaceman model. | |
void | CalTrans (const Bulk &myBulk) |
Calculate transmissibility for each phase in perforations. | |
void | CalFlux (const Bulk &myBulk, const OCP_BOOL ReCalXi=OCP_FALSE) |
Calculate the flux for each perforations. | |
OCP_DBL | CalInjRateMaxBHP (const Bulk &myBulk) |
calculate flow rate of moles of phases for injection well with maxBHP. More... | |
OCP_DBL | CalProdRateMinBHP (const Bulk &myBulk) |
calculate flow rate of moles of phases for production well with minBHP. More... | |
void | CalInjQj (const Bulk &myBulk, const OCP_DBL &dt) |
void | CalProdQj (const Bulk &myBulk, const OCP_DBL &dt) |
void | CaldG (const Bulk &myBulk) |
Calculate pressure difference between well and perforations. More... | |
void | CalInjdG (const Bulk &myBulk) |
Calculate pressure difference between well and perforations for Injection. | |
void | CalProddG (const Bulk &myBulk) |
Calculate pressure difference between well and perforations for Production. | |
void | CalProddG01 (const Bulk &myBulk) |
Calculate pressure difference between well and perforations for Production. | |
void | CalProddG02 (const Bulk &myBulk) |
Calculate pressure difference between well and perforations for Production. | |
void | CalProdWeight (const Bulk &myBulk) const |
Calculate the production weight. | |
void | CalReInjFluid (const Bulk &myBulk, vector< OCP_DBL > &myZi) |
Calculate the contribution of production well to reinjection defaulted. | |
void | CorrectBHP () |
Correct BHP if opt mode is BHPMode. | |
void | CheckOptMode (const Bulk &myBulk) |
Check if well operation mode would be changed. More... | |
OCP_INT | CheckP (const Bulk &myBulk) |
Check if abnormal Pressure occurs. | |
OCP_INT | CheckCrossFlow (const Bulk &myBulk) |
Check if cross flow happens. | |
void | CalPerfP () |
Update pressure in Perforation after well pressure updates. | |
void | ShowPerfStatus (const Bulk &myBulk) const |
Display operation mode of well and state of perforations. | |
USI | PerfNum () const |
void | SetBHP (const OCP_DBL &p) |
OCP_DBL | BHP () const |
OCP_DBL | DG (const USI &p) const |
OCP_DBL | ProdWeight (const USI &i) const |
USI | OptMode () const |
OCP_BOOL | IsOpen () const |
Return the state of the well, Open or Close. | |
USI | WellType () const |
Return the type of well, Inj or Prod. | |
vector< OCP_DBL > | InjZi () const |
OCP_DBL | InjZi (const USI &i) const |
OCP_DBL | MaxRate () const |
OCP_DBL | MaxBHP () const |
OCP_DBL | MinBHP () const |
OCP_DBL | InjTemp () const |
OCP_BOOL | PerfState (const USI &p) const |
USI | PerfLocation (const USI &p) const |
OCP_DBL | PerfWI (const USI &p) const |
OCP_DBL | PerfMultiplier (const USI &p) const |
OCP_DBL | PerfTransInj (const USI &p) const |
OCP_DBL | PerfXi (const USI &p) const |
OCP_DBL | PerfTransj (const USI &p, const USI &j) const |
OCP_DBL | PerfQi_lbmol (const USI &p, const USI &i) const |
OCP_DBL | PerfProdQj_ft3 (const USI &p, const USI &j) const |
OCP_DBL | PerfInjQt_ft3 (const USI &p) const |
OCP_DBL | Qi_lbmol (const USI &i) const |
OCP_BOOL | IfUseUnweight () const |
void | AssembleMatReinjection_IMPEC (const Bulk &myBulk, LinearSystem &myLS, const OCP_DBL &dt, const vector< Well > &allWell, const vector< USI > &injId) const |
void | AssembleMatReinjection_FIM (const Bulk &myBulk, LinearSystem &myLS, const OCP_DBL &dt, const vector< Well > &allWell, const vector< USI > &injId) const |
void | SetPolyhedronWell (const Grid &myGrid, OCPpolyhedron &mypol) |
Protected Attributes | |
string | name |
well name | |
string | group |
group well belongs to, it should be moved to opt if necessary!!! | |
USI | I |
I-index of the well header. | |
USI | J |
J-index of the well header. | |
OCP_DBL | depth |
reference depth of well. | |
WellOpt | opt |
well control parameters, contains current control parameters. | |
vector< WellOpt > | optSet |
USI | numPerf |
num of perforations belonging to this well. | |
vector< Perforation > | perf |
information of perforation belonging to this well. | |
vector< Mixture * > | flashCal |
from bulks's flashCal | |
OCP_DBL | numPhase |
num of phases | |
OCP_DBL | numCom |
num of components | |
OCP_DBL | Psurf {PRESSURE_STD} |
Well surface Pressure, psia. | |
OCP_DBL | Tsurf {TEMPERATURE_STD} |
Well surface Temperature, F. | |
USI | wOId |
OCP_DBL | bhp |
Well pressure in reference depth. | |
vector< OCP_DBL > | dG |
difference of pressure between well and perforation: numPerf. | |
OCP_DBL | lbhp |
Last BHP. | |
vector< OCP_DBL > | ldG |
Last dG. | |
vector< OCP_DBL > | qi_lbmol |
flow rate of moles of component inflowing/outflowing | |
vector< OCP_DBL > | prodRate |
flow rate of volume of phase outflowing | |
vector< OCP_DBL > | prodWeight |
maybe only a num is needed | |
OCP_DBL | WOPR {0} |
well oil production rate. | |
OCP_DBL | WOPT {0} |
well total oil production. | |
OCP_DBL | WGPR {0} |
well gas production rate. | |
OCP_DBL | WGPT {0} |
well total gas production. | |
OCP_DBL | WWPR {0} |
well water production rate. | |
OCP_DBL | WWPT {0} |
well total water production. | |
OCP_DBL | WGIR {0} |
well gas injection rate. | |
OCP_DBL | WGIT {0} |
well total gas injection. | |
OCP_DBL | WWIR {0} |
well water injection rate. | |
OCP_DBL | WWIT {0} |
well total water injection. | |
OCP_BOOL | ifUseUnweight {OCP_FALSE} |
Friends | |
class | AllWells |
class | Out4RPT |
class | MyMetisTest |
Well class defines well, and any operations referred to wells are in it. Well connects to the bulks by perforations, which serve as source and sink. Due to practical difficulties in production, a good treatment for well is important, excellent treatment will make the flow rate in well more stable.
void Well::AssembleMatReinjection_FIM | ( | const Bulk & | myBulk, |
LinearSystem & | myLS, | ||
const OCP_DBL & | dt, | ||
const vector< Well > & | allWell, | ||
const vector< USI > & | injId | ||
) | const |
Assemble matrix for Reinjection Well, used in production well when injection well is under RATE control
Definition at line 1145 of file Well.cpp.
References bhp, BHP_MODE, CONV1, DaABpbC(), Daxpy(), dG, Bulk::dKr_dS, Bulk::dPcj_dS, Bulk::dSec_dPri, IsOpen(), Bulk::mu, Bulk::muP, Bulk::mux, LinearSystem::NewOffDiag(), Bulk::numBulk, numCom, numPerf, numPhase, opt, perf, Bulk::phaseExist, Bulk::Pj, wOId, Bulk::xi, Bulk::xij, Bulk::xiP, and Bulk::xix.
void Well::AssembleMatReinjection_IMPEC | ( | const Bulk & | myBulk, |
LinearSystem & | myLS, | ||
const OCP_DBL & | dt, | ||
const vector< Well > & | allWell, | ||
const vector< USI > & | injId | ||
) | const |
Assemble matrix for Reinjection Well, used in production well when injection well is under RATE control
Definition at line 1096 of file Well.cpp.
References LinearSystem::AddRhs(), BHP_MODE, dG, IsOpen(), LinearSystem::NewOffDiag(), Bulk::numBulk, numPerf, numPhase, opt, Bulk::Pc, perf, Bulk::phaseExist, wOId, and Bulk::xi.
void Well::CaldG | ( | const Bulk & | myBulk | ) |
Calculate pressure difference between well and perforations.
It calculates pressure difference between perforations iteratively. This function can be used in both black oil model and compositional model. stability of this method shoule be tested.
Definition at line 357 of file Well.cpp.
References CalInjdG(), CalProddG01(), INJ, OCP_FUNCNAME, and opt.
Calculate flow rate of moles of phases for injection well with calculated qi_lbmol.
Definition at line 322 of file Well.cpp.
References numCom, OCP_FUNCNAME, opt, qi_lbmol, WGIR, WGIT, WWIR, and WWIT.
calculate flow rate of moles of phases for injection well with maxBHP.
Pressure in injection well equals maximum ones in injection well, which is input by users. this function is used to check if operation mode of well shoubld be swtched.
Definition at line 263 of file Well.cpp.
References dG, Bulk::flashCal, numPerf, OCP_FUNCNAME, opt, Bulk::P, perf, and Bulk::PVTNUM.
Calculate flow rate of moles of phases for production well with calculated qi_lbmol.
Definition at line 340 of file Well.cpp.
References flashCal, Bulk::gas, Bulk::oil, prodRate, Psurf, qi_lbmol, Tsurf, Bulk::water, WGPR, WGPT, WOPR, WOPT, WWPR, and WWPT.
calculate flow rate of moles of phases for production well with minBHP.
Pressure in production well equals minial ones in production well, which is input by users. this function is used to check if operation mode of well shoubld be swtched.
Definition at line 288 of file Well.cpp.
References dG, flashCal, numCom, numPerf, numPhase, OCP_FUNCNAME, opt, perf, Bulk::phaseExist, Bulk::Pj, Psurf, Tsurf, Bulk::xi, and Bulk::xij.
void Well::CheckOptMode | ( | const Bulk & | myBulk | ) |
Check if well operation mode would be changed.
Constant well pressure would be applied if flow rate is too large. Constant flow rate would be applied if well pressure is outranged.
Definition at line 893 of file Well.cpp.
References bhp, BHP_MODE, CalInjRateMaxBHP(), CalProdRateMinBHP(), GAS, INJ, OCP_FUNCNAME, opt, RATE_MODE, WATER, WGIR, and WWIR.
|
protected |
|
protected |