OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
Public Member Functions | List of all members
BOMixture_OW Class Reference
Inheritance diagram for BOMixture_OW:
BOMixture Mixture

Public Member Functions

 BOMixture_OW (const ParamReservoir &rs_param, const USI &i)
 
void Flash (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin) override
 flash calculation with saturation of phases.
 
void InitFlashIMPEC (const OCP_DBL &Pin, const OCP_DBL &Pbbin, const OCP_DBL &Tin, const OCP_DBL *Sjin, const OCP_DBL &Vpore, const OCP_DBL *Ziin, const OCP_USI &bId) override
 
void InitFlashFIM (const OCP_DBL &Pin, const OCP_DBL &Pbbin, const OCP_DBL &Tin, const OCP_DBL *Sjin, const OCP_DBL &Vpore, const OCP_DBL *Ziin, const OCP_USI &bId) override
 
void FlashIMPEC (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin, const USI &lastNP, const OCP_DBL *xijin, const OCP_USI &bId) override
 Flash calculation with moles of components.
 
void FlashFIM (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin, const OCP_DBL *Sjin, const USI &lastNP, const OCP_DBL *xijin, const OCP_USI &bId) override
 Flash calculation with moles of components and Calculate the derivative.
 
void FlashFIMn (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin, const OCP_DBL *Sjin, const OCP_DBL *xijin, const OCP_DBL *njin, const USI *phaseExistin, const USI &lastNP, const OCP_USI &bId) override
 
OCP_DBL XiPhase (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin, const USI &tarPhase) override
 return mass density of phase
 
OCP_DBL RhoPhase (const OCP_DBL &Pin, const OCP_DBL &Pbb, const OCP_DBL &Tin, const OCP_DBL *Ziin, const USI &tarPhase) override
 return mass density of phase
 
void SetupWellOpt (WellOpt &opt, const vector< SolventINJ > &sols, const OCP_DBL &Psurf, const OCP_DBL &Tsurf) override
 
- Public Member Functions inherited from BOMixture
void SetupOptionalFeatures (OptionalFeatures &optFeatures, const OCP_USI &numBulk) override
 
void BOMixtureInit (const ParamReservoir &rs_param)
 
void InitFlashFIMn (const OCP_DBL &Pin, const OCP_DBL &Pbbin, const OCP_DBL &Tin, const OCP_DBL *Sjin, const OCP_DBL &Vpore, const OCP_DBL *Ziin, const OCP_USI &bId) override
 
void CalProdWeight (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin, const vector< OCP_DBL > &prodPhase, vector< OCP_DBL > &prodWeight) override
 Calculate ProdWeight for PROD well.
 
void CalProdRate (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin, vector< OCP_DBL > &prodRate) override
 Calculate Production rate for PROD well.
 
OCP_DBL CalInjWellEnthalpy (const OCP_DBL &Tin, const OCP_DBL *Ziin) override
 
OCP_DBL GetErrorPEC () override
 
void OutMixtureIters () const override
 
- Public Member Functions inherited from Mixture
void Allocate ()
 Allocate memory for common variables for basic class.
 
USI GetMixtureType () const
 return type of mixture.
 
void CheckNi (const OCP_DBL *Ni)
 
const OCP_DBLGetNt () const
 
const OCP_DBLGetNi (const USI &i) const
 
const OCP_DBLGetVf () const
 
const OCP_BOOLGetPhaseExist (const USI &j) const
 
const OCP_DBLGetS (const USI &j) const
 
const OCP_DBLGetVj (const USI &j) const
 
const OCP_DBLGetNj (const USI &j) const
 
const OCP_DBLGetXij (const USI &j, const USI &i) const
 
const OCP_DBLGetRho (const USI &j) const
 
const OCP_DBLGetXi (const USI &j) const
 
const OCP_DBLGetMu (const USI &j) const
 
const OCP_DBLGetVfP () const
 
const OCP_DBLGetVfT () const
 
const OCP_DBLGetVfi (const USI &i) const
 
const OCP_DBLGetRhoP (const USI &j) const
 
const OCP_DBLGetRhoT (const USI &j) const
 
const OCP_DBLGetXiP (const USI &j) const
 
const OCP_DBLGetXiT (const USI &j) const
 
const OCP_DBLGetMuP (const USI &j) const
 
const OCP_DBLGetMuT (const USI &j) const
 
const OCP_DBLGetRhoX (const USI &j, const USI &i) const
 
const OCP_DBLGetXiX (const USI &j, const USI &i) const
 
const OCP_DBLGetMuX (const USI &j, const USI &i) const
 
const OCP_BOOLGetPSderExist (const USI &j) const
 
const USIGetPVnumCom (const USI &j) const
 
const vector< OCP_DBL > & GetDXsDXp () const
 
const vector< OCP_DBL > & GetRes () const
 
const OCP_DBL GetResPc () const
 
const OCP_DBL GetUf () const
 
const OCP_DBL GetUfP () const
 
const OCP_DBL GetUfT () const
 
const OCP_DBL GetUfi (const USI &i) const
 
const OCP_DBL GetH (const USI &j) const
 
const OCP_DBL GetHT (const USI &j) const
 
const OCP_DBLGetHx (const USI &j, const USI &i) const
 

Additional Inherited Members

- Protected Member Functions inherited from Mixture
void SetBulkId (const OCP_USI &n)
 
- Protected Attributes inherited from BOMixture
OCP_DBL std_RhoO
 < others. More...
 
OCP_DBL std_RhoG
 The density of gas at surface conditions : lb/ft3.
 
OCP_DBL std_RhoW
 The density of water at surface conditions : lb/ft3.
 
- Protected Attributes inherited from Mixture
USI mixtureType
 
OCP_USI bulkId
 index of current bulk
 
USI numPhase
 num of phases.
 
USI numCom
 num of components.
 
OCP_DBL P
 pressure when flash calculation.
 
OCP_DBL T
 temperature when flash calculation.
 
OCP_DBL vf
 volume of total fluids.
 
OCP_DBL Nt
 Total moles of Components.
 
vector< OCP_DBLNi
 moles of component: numCom
 
vector< OCP_BOOLphaseExist
 existence of phase: numPhase
 
vector< OCP_DBLS
 saturation of phase: numPhase
 
vector< OCP_DBLvj
 volume of phase: numPhase;
 
vector< OCP_DBLnj
 mole number of phase j
 
vector< OCP_DBLxij
 Nij / nj: numPhase*numCom.
 
vector< OCP_DBLrho
 mass density of phase: numPhase
 
vector< OCP_DBLxi
 molar density of phase: numPhase
 
vector< OCP_DBLmu
 viscosity of phase: numPhase
 
OCP_DBL vfP
 
OCP_DBL vfT
 d vf / dT
 
vector< OCP_DBLvfi
 
vector< OCP_DBLrhoP
 d rho / dP: numphase
 
vector< OCP_DBLrhoT
 d rho j / dT: numPhase
 
vector< OCP_DBLrhox
 d rho[j] / d x[i][j]: numphase * numCom
 
vector< OCP_DBLxiP
 d xi / dP: numphase
 
vector< OCP_DBLxiT
 d xi j / dT: numPhase
 
vector< OCP_DBLxix
 d xi[j] / d x[i][j]: numphase * numCom
 
vector< OCP_DBLmuP
 d mu / dP: numPhase
 
vector< OCP_DBLmuT
 d mu j / dT: numPhase
 
vector< OCP_DBLmux
 d mu[j] / d x[i][j]: numphase * numCom
 
vector< OCP_DBLdXsdXp
 derivatives of second variables wrt. primary variables
 
OCP_DBL Uf
 Internal energy of fluid.
 
OCP_DBL UfP
 dUf / dP
 
OCP_DBL UfT
 dUf / dT
 
vector< OCP_DBLUfi
 dUf / dNi
 
vector< OCP_DBLH
 Enthalpy.
 
vector< OCP_DBLHT
 d Hj / d T
 
vector< OCP_DBLHx
 d Hj / d xij
 
vector< OCP_BOOLpSderExist
 Existence of derivative of phase saturation.
 
vector< USIpVnumCom
 num of variable components in the phase
 
vector< OCP_DBLres
 residual of a set of equations
 
OCP_DBL resPc
 a precalculated value
 
vector< OCP_DBLkeyDer
 d (xij*xi/mu) / dP or dNk
 

Detailed Description

Definition at line 182 of file MixtureBO.hpp.

Member Function Documentation

◆ SetupWellOpt()

void BOMixture_OW::SetupWellOpt ( WellOpt opt,
const vector< SolventINJ > &  sols,
const OCP_DBL Psurf,
const OCP_DBL Tsurf 
)
overridevirtual

Setup injZi, injProdPhase and factorINJ for INJ well Setup prodPhaseWeight for PROD well

Implements Mixture.

Definition at line 265 of file MixtureBO2_OW.cpp.

269 {
270  const USI wellType = opt.WellType();
271  if (wellType == INJ) {
272  const string fluidName = opt.InjFluidType();
273  opt.SetInjFactor(1.0);
274 
275  if (fluidName == "WAT") {
276  vector<OCP_DBL> tmpZi({0, 1});
277  opt.SetInjZi(tmpZi);
278  opt.SetInjProdPhase(WATER);
279  } else {
280  OCP_ABORT("WRONG Injecting Fluid!");
281  }
282  } else if (wellType == PROD) {
283  vector<OCP_DBL> tmpWght(2, 0);
284  switch (opt.OptMode()) {
285  case BHP_MODE:
286  break;
287  case ORATE_MODE:
288  tmpWght[0] = 1;
289  break;
290  case WRATE_MODE:
291  tmpWght[1] = 1;
292  break;
293  case LRATE_MODE:
294  tmpWght[0] = tmpWght[1] = 1;
295  break;
296  default:
297  OCP_ABORT("WRONG Opt Mode!");
298  break;
299  }
300  opt.SetProdPhaseWeight(tmpWght);
301  } else {
302  OCP_ABORT("Wrong Well Type!");
303  }
304 }
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:23
const USI LRATE_MODE
Well option = fixed fluid rate???
Definition: OCPConst.hpp:134
const USI WRATE_MODE
Well option = fixed water rate.
Definition: OCPConst.hpp:133
const USI WATER
Fluid type = water.
Definition: OCPConst.hpp:93
const USI ORATE_MODE
Well option = fixed oil rate.
Definition: OCPConst.hpp:131
const USI PROD
Well type = producer.
Definition: OCPConst.hpp:123
const USI INJ
Well type = injector.
Definition: OCPConst.hpp:122
const USI BHP_MODE
Well option = fixed bottom-hole-pressure.
Definition: OCPConst.hpp:135
#define OCP_ABORT(msg)
Abort if critical error happens.
Definition: UtilError.hpp:47

References BHP_MODE, INJ, LRATE_MODE, OCP_ABORT, ORATE_MODE, PROD, WATER, and WRATE_MODE.


The documentation for this class was generated from the following files: