OpenCAEPoro  0.2.0 Sep/22/2022
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 InitFlash (const OCP_DBL &Pin, const OCP_DBL &Pbbin, const OCP_DBL &Tin, const OCP_DBL *Sjin, const OCP_DBL &Vpore, const OCP_DBL *Ziin) override
 flash calculation with saturation of phases.
 
void InitFlashDer (const OCP_DBL &Pin, const OCP_DBL &Pbbin, const OCP_DBL &Tin, const OCP_DBL *Sjin, const OCP_DBL &Vpore, const OCP_DBL *Ziin) override
 
void InitFlashDer_n (const OCP_DBL &Pin, const OCP_DBL &Pbbin, const OCP_DBL &Tin, const OCP_DBL *Sjin, const OCP_DBL &Vpore, const OCP_DBL *Ziin) override
 
void Flash (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin, const USI &ftype, const USI &lastNP, const OCP_DBL *lastKs) override
 Flash calculation with moles of components.
 
void FlashDeriv (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin, const USI &ftype, const USI &lastNP, const OCP_DBL *lastKs) override
 Flash calculation with moles of components and Calculate the derivative.
 
void FlashDeriv_n (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 &ftype, const USI *phaseExistin, const USI &lastNP, const OCP_DBL *lastKs) override
 
OCP_DBL XiPhase (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin) override
 
OCP_DBL RhoPhase (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin) override
 return mass density of phase.
 
OCP_DBL GammaPhaseO (const OCP_DBL &Pin, const OCP_DBL &Pbbin) override
 return gamma of oil phase, gamma equals to mass density times gravity factor.
 
OCP_DBL GammaPhaseW (const OCP_DBL &Pin) override
 return gamma of water phase, gamma equals to mass density times gravity factor.
 
- Public Member Functions inherited from BOMixture
void BOMixtureInit (const ParamReservoir &rs_param)
 
virtual OCP_DBL GammaPhaseG (const OCP_DBL &Pin) override
 return gamma of gas phase, gamma equals to mass density times gravity factor.
 
OCP_DBL GammaPhaseOG (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin) override
 
USI GetFtype () override
 
OCP_SIN GetMinEigenSkip () override
 
bool GetFlagSkip () override
 
OCP_DBL GetSurTen () override
 
OCP_DBL GetErrorPEC () override
 
OCP_ULL GetSSMSTAiters () override
 
OCP_ULL GetNRSTAiters () override
 
OCP_ULL GetSSMSPiters () override
 
OCP_ULL GetNRSPiters () override
 
OCP_ULL GetRRiters () override
 
OCP_ULL GetSSMSTAcounts () override
 
OCP_ULL GetNRSTAcounts () override
 
OCP_ULL GetSSMSPcounts () override
 
OCP_ULL GetNRSPcounts () override
 
OCP_ULL GetRRcounts () override
 
- Public Member Functions inherited from Mixture
void Allocate ()
 Allocate memory for common variables for basic class.
 
virtual void SetPVTW ()
 
USI GetType () const
 return type of mixture.
 
virtual bool IsEmpty_PVDG () const
 Check whether Table PVDG is empty, it will only be used in black oil model.
 
void CheckNi (const OCP_DBL *Ni)
 

Additional Inherited Members

- Protected Attributes inherited from BOMixture
OCP_DBL std_RhoO
 < others. More...
 
OCP_DBL std_GammaO
 std_RhoO * gravity factor.
 
OCP_DBL std_RhoG
 mass density of gas phase in standard condition.
 
OCP_DBL std_GammaG
 std_RhoG * gravity factor.
 
OCP_DBL std_RhoW
 mass density of water phase in standard condition.
 
OCP_DBL std_GammaW
 std_RhoW * gravity factor.
 
- Protected Attributes inherited from Mixture
USI mixtureType
 
USI numPhase
 num of phases.
 
USI numCom
 num of components.
 
OCP_DBL P
 pressure when flash calculation.
 
OCP_DBL T
 temperature when flash calculation.
 
vector< OCP_DBLNi
 moles of component: numCom
 
vector< bool > phaseExist
 existence of phase: numPhase
 
vector< OCP_DBLS
 saturation of phase: numPhase
 
vector< OCP_DBLrho
 mass density of phase: numPhase
 
vector< OCP_DBLxi
 molar density of phase: numPhase
 
vector< OCP_DBLxij
 
vector< OCP_DBLnj
 mole number of phase j
 
vector< OCP_DBLmu
 viscosity of phase: numPhase
 
vector< OCP_DBLv
 volume of phase: numPhase;
 
OCP_DBL vf
 volume of total fluids.
 
OCP_DBL Nt
 Total moles of Components.
 
vector< vector< OCP_DBL > > vji
 dvj / dNi, used in 2 hydrocarbon phase in EOS; or dvj / dnij
 
vector< OCP_DBLvjp
 dvj / dp, used in 2 hydrocarbon phase in EOS
 
OCP_DBL vfp
 
vector< OCP_DBLvfi
 
vector< OCP_DBLmuP
 d mu / dP: numPhase
 
vector< OCP_DBLxiP
 d xi / dP: numphase
 
vector< OCP_DBLrhoP
 d rho / dP: numphase
 
vector< OCP_DBLmuN
 d mu[j] / d N[i]: numphase * numCom
 
vector< OCP_DBLxiN
 d xi[j] / d N[i]: numphase * numCom
 
vector< OCP_DBLrhoN
 d rho[j] / d N[i]: numphase * numCom
 
vector< OCP_DBLmux
 d mu[j] / d x[i][j]: numphase * numCom
 
vector< OCP_DBLxix
 d xi[j] / d x[i][j]: numphase * numCom
 
vector< OCP_DBLrhox
 d rho[j] / d x[i][j]: numphase * numCom
 
vector< OCP_DBLdXsdXp
 the derivates of second variables wrt. primary variables
 
vector< USIpEnumCom
 see pEnumCom in bulk
 
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 139 of file MixtureBO.hpp.

Member Function Documentation

◆ XiPhase()

OCP_DBL BOMixture_OW::XiPhase ( const OCP_DBL Pin,
const OCP_DBL Tin,
const OCP_DBL Ziin 
)
overridevirtual

Return molar density of phase, it's used to calculate the molar density of injection fluids in injection wells.

Implements Mixture.

Definition at line 191 of file MixtureBO2_OW.cpp.

192 {
193  if (Ziin[1] > 1 - TINY) {
194  // inj fluid is water
195  PVTW.Eval_All(0, Pin, data, cdata);
196  OCP_DBL Pw0 = data[0];
197  OCP_DBL bw0 = data[1];
198  OCP_DBL cbw = data[2];
199  OCP_DBL bw = bw0 * (1 - cbw * (P - Pw0));
200  OCP_DBL xiw = 1 / (CONV1 * bw);
201  return xiw;
202  } else {
203  OCP_ABORT("Wrong Zi!");
204  }
205 }
const OCP_DBL TINY
Small constant.
Definition: OCPConst.hpp:36
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:26
const OCP_DBL CONV1
1 bbl = CONV1 ft3
Definition: OCPConst.hpp:59
#define OCP_ABORT(msg)
Abort if critical error happens.
Definition: UtilError.hpp:47
OCP_DBL P
pressure when flash calculation.
Definition: Mixture.hpp:158
USI Eval_All(const USI &j, const OCP_DBL &val, vector< OCP_DBL > &outdata, vector< OCP_DBL > &slope)
Definition: OCPTable.cpp:53

References CONV1, OCPTable::Eval_All(), OCP_ABORT, Mixture::P, and TINY.


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