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

Public Member Functions

OCP_DBL GetErrorPEC () override
 
void OutMixtureIters () const override
 
 MixtureComp (const ParamReservoir &rs_param, const USI &i)
 
 MixtureComp (const ComponentParam &param, const USI &i)
 
void InitPTZ (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin)
 
void InitPTN (const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin)
 
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 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 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 CalFlash ()
 
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
 
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
 
void CallId ()
 
void AllocateEoS ()
 
void SolEoS (OCP_DBL &ZjT, const OCP_DBL &AjT, const OCP_DBL &BjT) const
 
void CalAiBi ()
 
void CalAjBj (OCP_DBL &AjT, OCP_DBL &BjT, const vector< OCP_DBL > &xj) const
 
void CalAjBj (OCP_DBL &AjT, OCP_DBL &BjT, const OCP_DBL *xj) const
 
USI CubicRoot (const OCP_DBL &a, const OCP_DBL &b, const OCP_DBL &c, const OCP_BOOL &NTflag=OCP_FALSE) const
 Result is stored in Ztmp.
 
void PrintZtmp ()
 test
 
void AllocatePhase ()
 
void CalFugPhi (vector< OCP_DBL > &phiT, vector< OCP_DBL > &fugT, const vector< OCP_DBL > &xj)
 
void CalFugPhi (OCP_DBL *phiT, OCP_DBL *fugT, const OCP_DBL *xj)
 
void CalFugPhi (OCP_DBL *fugT, const OCP_DBL *xj)
 
void CalFugPhiAll ()
 
void CalMW ()
 
void CalVfXiRho ()
 
void CalSaturation ()
 
USI FindMWmax ()
 
void x2n ()
 x[j][i] -> n[j][i]
 
void PrintX ()
 
void AllocateMethod ()
 
void PhaseEquilibrium ()
 
void CalKwilson ()
 
OCP_BOOL PhaseStable ()
 
OCP_BOOL StableSSM (const USI &Id)
 strict SSM
 
OCP_BOOL StableSSM01 (const USI &Id)
 relaxed SSM
 
OCP_BOOL StableNR (const USI &Id)
 
void CalFugXSTA ()
 Calculate d ln(Fug) / dx for Y.
 
void AssembleJmatSTA ()
 
OCP_BOOL CheckSplit ()
 
void PhaseSplit ()
 
void SplitSSM (const OCP_BOOL &flag)
 
void SplitSSM2 (const OCP_BOOL &flag)
 
void SplitSSM3 (const OCP_BOOL &flag)
 
void RachfordRice2 ()
 Used when NP = 2.
 
void RachfordRice2P ()
 Used when NP = 2, improved Rachford-Rice2.
 
void RachfordRice3 ()
 Used when NP > 2.
 
void UpdateXRR ()
 Update X according to RR.
 
void SplitBFGS ()
 Use BFGS to calculate phase splitting.
 
void SplitNR ()
 Use NR to calculate phase splitting.
 
void CalResSP ()
 
void CalFugNAll (const OCP_BOOL &Znflag=OCP_TRUE)
 
void PrintFugN ()
 
void AssembleJmatSP ()
 
OCP_DBL CalStepNRsp ()
 
void AllocateOthers ()
 
void IdentifyPhase ()
 
void CopyPhase ()
 Copy the basic properties from MixtureComp to Mixture.
 
void CalViscosity ()
 
void CalViscoLBC ()
 
void CalViscoHZYT ()
 
void CalFugXAll ()
 
void CalFugPAll (const OCP_BOOL &Zpflag=OCP_TRUE)
 
void CalVjpVfpVfx_partial ()
 
void CalXiPNX_partial ()
 
void CalRhoPX_partial ()
 
void CalMuPX_partial ()
 
void CalMuPXLBC_partial ()
 
void CalXiRhoMuPN_pfullx ()
 
void CaldXsdXpAPI04 ()
 
void CaldXsdXp04 ()
 
void CalRhoPNX_full ()
 
void CalXiPNX_full01 ()
 
void CalRhoPNX_full01 ()
 
void CalMuPX_full01 ()
 
void CalMuPXLBC_full01 ()
 
void CalVfiVfp_full01 ()
 
void AssembleMatVfiVfp_full01 ()
 
void AssembleRhsVfiVfp_full01 ()
 
void CaldXsdXp01 ()
 
void CaldXsdXpAPI01 ()
 
void CalXiPNX_full02 ()
 
void CalVfiVfp_full02 ()
 
void AssembleMatVfiVfp_full02 ()
 
void AssembleRhsVfiVfp_full02 ()
 
void CaldXsdXpAPI02 ()
 
void CaldXsdXpAPI02p ()
 
void CalVjpVfpVfn_partial ()
 
void CalXiPn_partial ()
 
void CalRhoPn_partial ()
 
void CalMuPn_partial ()
 
void CalMuPnLBC_partial ()
 
void CalXiRhoMuPN_pfullxn (const OCP_BOOL &xflag=OCP_TRUE)
 
void CaldXsdXpAPI03 ()
 
void CaldXsdXp03 ()
 
void CalVfiVfp_full03 ()
 
void CalKeyDerx ()
 
void CalKeyDern ()
 
void SetupOptionalFeatures (OptionalFeatures &optFeatures, const OCP_USI &numBulk) 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
 

Protected Member Functions

void AllocateSkip ()
 Allocate memory for variables used in skipping stability analysis.
 
void CalPhiNSkip ()
 Calculate d ln phi[i][j] / d n[k][j].
 
void AssembleSkipMatSTA ()
 Assemble matrix to Calculated eigen value used for skipping.
 
void CalSkipForNextStep ()
 Calculate skip info for next step.
 
void CalFtypeIMPEC ()
 Calculate Flash type for IMPEC.
 
void CalFtypeFIM (const OCP_DBL *Sjin)
 Calculate Flash type for FIM.
 
void InputMiscibleParam (const ComponentParam &param, const USI &tarId)
 
void CalSurfaceTension ()
 
- Protected Member Functions inherited from Mixture
void SetBulkId (const OCP_USI &n)
 

Protected Attributes

SkipStaAnalyskipSta
 Skip analysis Term pointing to OptionalFeature.
 
USI ftype {0}
 
OCP_BOOL flagSkip
 If ture, then skipping could be try,.
 
vector< OCP_DBLphiN
 d ln phi[i][j] / d n[k][j]
 
vector< OCP_SINskipMatSTA
 
vector< OCP_SINeigenSkip
 eigen values of matrix for skipping Skip Stability Analysis.
 
vector< OCP_SINeigenWork
 work space for computing eigenvalues with ssyevd_
 
MisciblemisTerm
 Miscible term pointing to OptionalFeature.
 
OCP_BOOL ifUseMiscible
 
OCP_DBL surTen
 Surface tension between hydrocarbons phases.
 
vector< OCP_DBLparachor
 Parachor params of hydrocarbon components.
 
- 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 125 of file MixtureComp.hpp.

Member Function Documentation

◆ FlashFIMn()

void MixtureComp::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 
)
overridevirtual

Becareful if NP > 2 (temp)

Implements Mixture.

Definition at line 575 of file MixtureComp.cpp.

584 {
585  SetBulkId(bId);
586  inputNP = 0;
587  for (USI j = 0; j < numPhase; j++) {
588  if (phaseExistin[j] == 1) inputNP++;
589  }
590  inputNP--;
591 
592  if (inputNP == 1 || OCP_TRUE) {
593  // Hydroncarbon phase, if lNp = 0, then strict stability analysis will be used
594  lNP = lastNP > 0 ? lastNP - 1 : 0;
595  if (lNP == 2) {
596  for (USI i = 0; i < NC; i++) {
597  lKs[i] = xijin[i] / xijin[i + numCom];
598  }
599  }
600  InitPTN(Pin, Tin + CONV5, Niin);
601  CalFtypeFIM(Sjin);
602  CalFlash();
603  } else {
605  NP = inputNP;
606  InitPTN(Pin, Tin + CONV5, Niin);
607  CalAiBi();
608  for (USI j = 0; j < NP; j++) {
609  phaseExist[j] = phaseExistin[j];
610  S[j] = Sjin[j];
611  nu[j] = njin[j];
612  nj[j] = njin[j];
613  Dcopy(NC, &x[j][0], &xijin[j * numCom]);
614  Dcopy(NC, &xij[j * numCom], &xijin[j * numCom]);
615  }
616  CalFugPhiAll();
617  S[numPhase - 1] = Sjin[numPhase - 1];
618  phaseLabel[0] = OIL;
619  phaseLabel[1] = GAS;
620  CalMW();
621  CalVfXiRho();
622  CalViscosity();
623  CopyPhase();
624  CalSurfaceTension();
625  }
626 
627  CalVjpVfpVfn_partial();
628 
629  // Water Properties
630  USI Wpid = numPhase - 1;
631  USI Wcid = numCom - 1;
632  phaseExist[Wpid] = OCP_TRUE;
633  xij[Wpid * numCom + Wcid] = 1.0;
634  nj[Wpid] = Ni[Wcid];
635  Nt = Nh + Ni[Wcid];
636  PVTW.Eval_All(0, P, data, cdata);
637  OCP_DBL Pw0 = data[0];
638  OCP_DBL bw0 = data[1];
639  OCP_DBL cbw = data[2];
640  OCP_DBL bw = bw0 * (1 - cbw * (P - Pw0));
641  OCP_DBL bwp = -cbw * bw0;
642  mu[Wpid] = data[3];
643  xi[Wpid] = 1 / (CONV1 * bw);
644  rho[Wpid] = std_RhoW / bw;
645  muP[Wpid] = cdata[3];
646  xiP[Wpid] = -bwp / (bw * bw * CONV1);
647  rhoP[Wpid] = CONV1 * xiP[Wpid] * std_RhoW;
648  vj[Wpid] = CONV1 * Ni[Wcid] * bw;
649  vfi[Wcid] = CONV1 * bw;
650  const OCP_DBL vwp = CONV1 * Ni[Wcid] * bwp;
651  vf += vj[Wpid];
652  vfP += vwp;
653  vji[numPhase - 1][numCom - 1] = vfi[Wcid];
654  vjp[numPhase - 1] = vwp;
655 
656  CalSaturation();
657 
658  // calculate diff
659  if (inputNP == NP && NP == 2 && OCP_FALSE) {
660  cout << scientific << setprecision(3);
661  cout << "--------- " << NP << " --------- " << inputNP << endl;
662  for (USI j = 0; j < NP; j++) {
663  USI j1 = phaseLabel[j];
664  cout << setw(10) << S[j1] - Sjin[j1] << " " << setw(10)
665  << (nj[j1] - njin[j1]) / njin[j1] << " ";
666  for (USI i = 0; i < NC; i++) {
667  cout << setw(10) << xij[j1 * numCom + i] - xijin[j1 * numCom + i]
668  << " ";
669  }
670  cout << endl;
671  }
672  cout << S[2] - Sjin[2] << endl;
673  }
674 
675  CaldXsdXpAPI03();
676  CalXiPn_partial();
677  CalRhoPn_partial();
678  CalMuPn_partial();
679  CalVfiVfp_full03();
680 
681  // Calculate pSderExist and pVnumCom
682  fill(pSderExist.begin(), pSderExist.end(), OCP_FALSE);
683  fill(pVnumCom.begin(), pVnumCom.end(), 0.0);
684  if (phaseExist[0]) {
685  pSderExist[0] = OCP_TRUE;
686  pVnumCom[0] = NC;
687  }
688  if (phaseExist[1]) {
689  pSderExist[1] = OCP_TRUE;
690  pVnumCom[1] = NC;
691  }
692  pSderExist[2] = OCP_TRUE;
693 
695 }
void Dcopy(const int &N, double *dst, const double *src)
Calculate the minimal eigenvalue for symmetric matrix with mkl lapack.
Definition: DenseMat.cpp:36
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:23
const USI GAS
Fluid type = gas.
Definition: OCPConst.hpp:92
double OCP_DBL
Double precision.
Definition: OCPConst.hpp:27
const OCP_DBL CONV1
1 bbl = CONV1 ft3
Definition: OCPConst.hpp:63
const USI OIL
Fluid type = oil.
Definition: OCPConst.hpp:91
const OCP_DBL CONV5
0 F = CONV5 R
Definition: OCPConst.hpp:67
void CopyPhase()
Copy the basic properties from MixtureComp to Mixture.
void CalFtypeFIM(const OCP_DBL *Sjin)
Calculate Flash type for FIM.
void CalSkipForNextStep()
Calculate skip info for next step.
vector< OCP_DBL > rhoP
d rho / dP: numphase
Definition: Mixture.hpp:265
USI numCom
num of components.
Definition: Mixture.hpp:242
vector< OCP_DBL > rho
mass density of phase: numPhase
Definition: Mixture.hpp:254
vector< OCP_DBL > mu
viscosity of phase: numPhase
Definition: Mixture.hpp:256
vector< OCP_BOOL > pSderExist
Existence of derivative of phase saturation.
Definition: Mixture.hpp:286
USI numPhase
num of phases.
Definition: Mixture.hpp:241
vector< OCP_DBL > vj
volume of phase: numPhase;
Definition: Mixture.hpp:251
OCP_DBL vfP
Definition: Mixture.hpp:259
vector< OCP_DBL > S
saturation of phase: numPhase
Definition: Mixture.hpp:250
vector< OCP_DBL > xij
Nij / nj: numPhase*numCom.
Definition: Mixture.hpp:253
OCP_DBL Nt
Total moles of Components.
Definition: Mixture.hpp:247
vector< OCP_DBL > nj
mole number of phase j
Definition: Mixture.hpp:252
vector< OCP_DBL > Ni
moles of component: numCom
Definition: Mixture.hpp:248
vector< OCP_DBL > vfi
Definition: Mixture.hpp:262
vector< OCP_BOOL > phaseExist
existence of phase: numPhase
Definition: Mixture.hpp:249
vector< OCP_DBL > xiP
d xi / dP: numphase
Definition: Mixture.hpp:268
OCP_DBL vf
volume of total fluids.
Definition: Mixture.hpp:246
vector< USI > pVnumCom
num of variable components in the phase
Definition: Mixture.hpp:287
vector< OCP_DBL > muP
d mu / dP: numPhase
Definition: Mixture.hpp:271
vector< OCP_DBL > xi
molar density of phase: numPhase
Definition: Mixture.hpp:255
USI Eval_All(const USI &j, const OCP_DBL &val, vector< OCP_DBL > &outdata, vector< OCP_DBL > &slope)
Careful: the memory outdata and slope have not be allocated before.
Definition: OCPTable.cpp:47

References Mixture::numPhase.

◆ SetupWellOpt()

void MixtureComp::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 770 of file MixtureComp.cpp.

774 {
775  const USI wellType = opt.WellType();
776  if (wellType == INJ) {
777  const string fluidName = opt.InjFluidType();
778  vector<OCP_DBL> tmpZi(numCom, 0);
779  if (fluidName == "WAT") {
780  tmpZi.back() = 1;
781  opt.SetInjProdPhase(WATER);
782  } else {
783  // inj phase is gas
784  opt.SetInjProdPhase(GAS);
785  const USI len = sols.size();
786  for (USI i = 0; i < len; i++) {
787  if (fluidName == sols[i].name) {
788  tmpZi = sols[i].data;
789  tmpZi.resize(numCom);
790  // Convert volume units Mscf/stb to molar units lbmoles for
791  // injfluid Use flash in Bulk in surface condition
792  OCP_DBL tmp = 1000 * XiPhase(Psurf, Tsurf, &tmpZi[0], GAS);
793  opt.SetInjFactor(tmp);
794  break;
795  }
796  if (i == len - 1) {
797  OCP_ABORT("Wrong FluidType!");
798  }
799  }
800  }
801  opt.SetInjZi(tmpZi);
802  } else if (wellType == PROD) {
803  vector<OCP_DBL> tmpWght(numPhase, 0);
804  switch (opt.OptMode()) {
805  case BHP_MODE:
806  break;
807  case ORATE_MODE:
808  tmpWght[0] = 1;
809  break;
810  case GRATE_MODE:
811  tmpWght[1] = 1;
812  break;
813  case WRATE_MODE:
814  tmpWght[2] = 1;
815  break;
816  case LRATE_MODE:
817  tmpWght[0] = 1;
818  tmpWght[2] = 1;
819  break;
820  default:
821  OCP_ABORT("WRONG optMode");
822  break;
823  }
824  opt.SetProdPhaseWeight(tmpWght);
825  } else {
826  OCP_ABORT("Wrong Well Type!");
827  }
828 }
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
const USI GRATE_MODE
Well option = fixed gas rate.
Definition: OCPConst.hpp:132
#define OCP_ABORT(msg)
Abort if critical error happens.
Definition: UtilError.hpp:47
OCP_DBL XiPhase(const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin, const USI &tarPhase) override
return mass density of phase

References BHP_MODE, GAS, GRATE_MODE, INJ, LRATE_MODE, Mixture::numCom, Mixture::numPhase, OCP_ABORT, ORATE_MODE, PROD, WATER, WRATE_MODE, and XiPhase().

Member Data Documentation

◆ ftype

USI MixtureComp::ftype {0}
protected

Decide the start point of flash

Definition at line 578 of file MixtureComp.hpp.

◆ ifUseMiscible

OCP_BOOL MixtureComp::ifUseMiscible
protected

Miscible treatment of hydrocarbon phases for compositional Model

Definition at line 600 of file MixtureComp.hpp.

◆ skipMatSTA

vector<OCP_SIN> MixtureComp::skipMatSTA
protected

matrix for skipping Stability Analysis

Definition at line 583 of file MixtureComp.hpp.


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