12 #ifndef __MIXTURETHERMAL_HEADER__
13 #define __MIXTURETHERMAL_HEADER__
55 const OCP_USI& numBulk)
override{};
59 OCP_ABORT(
"Should not be used in Thermal mode!");
62 void OutMixtureIters()
const override{};
79 void InitFlashFIM(
const OCP_DBL& Pin,
86 void InitFlashFIMn(
const OCP_DBL& Pin,
108 void FlashFIMn(
const OCP_DBL& Pin,
114 const USI* phaseExistin,
116 const OCP_USI& bId)
override{};
122 const USI& tarPhase)
override;
129 const USI& tarPhase)
override;
135 const vector<OCP_DBL>& prodPhase,
136 vector<OCP_DBL>& prodWeight)
override;
141 vector<OCP_DBL>& prodRate)
override;
144 const vector<SolventINJ>& sols,
146 const OCP_DBL& Tsurf)
override;
Mixture class declaration.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
unsigned int OCP_USI
Long unsigned integer.
const OCP_DBL TEMPERATURE_STD
Standard temperature: F.
unsigned int OCP_BOOL
OCP_BOOL in OCP.
const OCP_DBL PRESSURE_STD
14.6959 psia = 1 atm
OCPTable class declaration.
#define OCP_ABORT(msg)
Abort if critical error happens.
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 SetupWellOpt(WellOpt &wellopt, const vector< SolventINJ > &sols, const OCP_DBL &Psurf, const OCP_DBL &Tsurf) 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.
vector< OCP_DBL > MWp
Molecular Weight of phase.
vector< OCP_DBL > MWc
Molecular Weight of components.
vector< OCP_DBL > ev
Coefficients in the vaporization enthalpy calculations.
vector< OCP_DBL > ct1
The first thermal expansion coefficient, 1/F.
OCPTable visc
Viscosity-versus-temperature dependence.
OCP_DBL Tref
Reference temperature.
vector< OCP_DBL > ct2
The second thermal expansion coefficient, 1/F.
vector< OCP_DBL > bvg
Coefficients Bk in gas viscosity correlation formulae.
vector< OCP_DBL > Tcrit
Critical temperature of hydrocarbon components.
vector< OCP_DBL > avisc
Coefficients in water and oil viscosity correlation formulae.
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.
vector< OCP_DBL > avg
Coefficients Ak in gas viscosity correlation formulae.
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.
OCP_BOOL gas_based
Calculated enthalpy of fluid based gas.
OCP_DBL Pref
Reference pressure.
vector< OCP_DBL > hvr
Coefficients in the vaporization enthalpy calculations.
OCP_DBL XiPhase(const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin, const USI &tarPhase) override
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
flash calculation with saturation of phases.
vector< OCP_DBL > cp
Component compressibility, 1/psi.
OCP_BOOL useViscTab
If use viscosity to calculate viscosity.
vector< OCP_DBL > bvisc
Coefficients in water and oil viscosity correlation formulae.
vector< OCP_DBL > hvapr
Coefficients in the component gas enthalpy calculations, Btu/lbmol.
OCP_BOOL liquid_based
Calculated enthalpy of fluid based liquid.
void Flash(const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Niin) override
flash calculation with saturation of phases.
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.
vector< OCP_DBL > rhoP
d rho / dP: numphase
vector< OCP_DBL > muT
d mu j / dT: numPhase
USI numCom
num of components.
vector< OCP_DBL > dXsdXp
derivatives of second variables wrt. primary variables
vector< OCP_DBL > rho
mass density of phase: numPhase
vector< OCP_DBL > mu
viscosity of phase: numPhase
vector< OCP_DBL > Ufi
dUf / dNi
USI numPhase
num of phases.
vector< OCP_DBL > xix
d xi[j] / d x[i][j]: numphase * numCom
vector< OCP_DBL > vj
volume of phase: numPhase;
vector< OCP_DBL > rhox
d rho[j] / d x[i][j]: numphase * numCom
vector< OCP_DBL > Hx
d Hj / d xij
vector< OCP_DBL > S
saturation of phase: numPhase
vector< OCP_DBL > xij
Nij / nj: numPhase*numCom.
vector< OCP_DBL > H
Enthalpy.
vector< OCP_DBL > xiT
d xi j / dT: numPhase
vector< OCP_DBL > nj
mole number of phase j
vector< OCP_DBL > Ni
moles of component: numCom
vector< OCP_DBL > HT
d Hj / d T
vector< OCP_BOOL > phaseExist
existence of phase: numPhase
vector< OCP_DBL > rhoT
d rho j / dT: numPhase
vector< OCP_DBL > xiP
d xi / dP: numphase
vector< OCP_DBL > muP
d mu / dP: numPhase
vector< OCP_DBL > mux
d mu[j] / d x[i][j]: numphase * numCom
vector< OCP_DBL > xi
molar density of phase: numPhase