20 BOMixtureInit(rs_param);
43 OCP_DBL bw = bw0 * (1 - cbw * (
P - Pw0));
50 Ni[1] = Vpore *
S[1] *
xi[1];
60 Ni[0] = Vpore * (1 -
S[1]) *
xi[0];
92 OCP_DBL bw = bw0 * (1 - cbw * (
P - Pw0));
142 OCP_DBL bw = bw0 * (1 - cbw * (
P - Pw0));
163 xiP[0] = -
xi[0] * bop / bo;
193 if (Ziin[1] > 1 -
TINY) {
199 OCP_DBL bw = bw0 * (1 - cbw * (
P - Pw0));
209 if (Ziin[1] > 1 -
TINY) {
216 OCP_DBL bw = bw0 * (1 - cbw * (
P - Pw0));
239 OCP_DBL bw = (bw0 * (1 - cbw * (Pin - Pw0)));
MixtureBO class declaration.
const OCP_DBL TINY
Small constant.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
const OCP_DBL CONV1
1 bbl = CONV1 ft3
#define OCP_ABORT(msg)
Abort if critical error happens.
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.
OCP_DBL XiPhase(const OCP_DBL &Pin, const OCP_DBL &Tin, const OCP_DBL *Ziin) override
OCP_DBL GammaPhaseW(const OCP_DBL &Pin) override
return gamma of water phase, gamma equals to mass density times gravity factor.
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.
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.
OCP_DBL std_GammaO
std_RhoO * gravity factor.
OCP_DBL std_RhoW
mass density of water phase in standard condition.
OCP_DBL std_RhoO
< others.
OCP_DBL std_GammaW
std_RhoW * gravity factor.
vector< OCP_DBL > rhoP
d rho / dP: numphase
vector< USI > pEnumCom
see pEnumCom in bulk
vector< OCP_DBL > dXsdXp
the derivates of second variables wrt. primary variables
vector< OCP_DBL > rho
mass density of phase: numPhase
vector< OCP_DBL > mu
viscosity of phase: numPhase
vector< bool > phaseExist
existence of phase: numPhase
OCP_DBL P
pressure when flash calculation.
vector< OCP_DBL > v
volume of phase: numPhase;
vector< OCP_DBL > S
saturation of phase: numPhase
OCP_DBL Nt
Total moles of Components.
vector< OCP_DBL > Ni
moles of component: numCom
vector< OCP_DBL > xiP
d xi / dP: numphase
OCP_DBL vf
volume of total fluids.
vector< OCP_DBL > muP
d mu / dP: numPhase
vector< OCP_DBL > xi
molar density of phase: numPhase
USI Eval_All(const USI &j, const OCP_DBL &val, vector< OCP_DBL > &outdata, vector< OCP_DBL > &slope)
void Setup(const vector< vector< OCP_DBL >> &src)
Setup tables from existing data of table.
OCP_DBL Eval(const USI &j, const OCP_DBL &val, const USI &destj)
TableSet PVDO_T
Table set of PVDO.
TableSet PVTW_T
Table set of PVTW.
vector< vector< vector< OCP_DBL > > > data
All table with the same name.