17 if (optParam.
type ==
"INJ") {
19 }
else if (optParam.
type ==
"PROD") {
27 if (fluidType ==
"WAT" || fluidType ==
"WATER") {
32 if (optParam.
state ==
"OPEN") {
34 }
else if (optParam.
state ==
"CLOSE") {
40 if (optParam.
optMode ==
"RATE") {
42 }
else if (optParam.
optMode ==
"ORAT") {
44 }
else if (optParam.
optMode ==
"GRAT") {
46 }
else if (optParam.
optMode ==
"WRAT") {
48 }
else if (optParam.
optMode ==
"LRAT") {
50 }
else if (optParam.
optMode ==
"BHP") {
56 initOptMode = optMode;
65 if (this->type != opt.type)
return OCP_TRUE;
66 if (this->state != opt.state)
return OCP_TRUE;
67 if (this->optMode != opt.optMode)
return OCP_TRUE;
68 if (this->initOptMode != opt.initOptMode)
return OCP_TRUE;
69 if (fabs(this->maxRate - opt.maxRate) >
TINY)
return OCP_TRUE;
70 if (fabs(this->maxBHP - opt.maxBHP) >
TINY)
return OCP_TRUE;
71 if (fabs(this->minBHP - opt.minBHP) >
TINY)
return OCP_TRUE;
72 for (
USI i = 0; i < injZi.size(); i++) {
73 if (fabs(injZi[i] - opt.injZi[i]) >
TINY)
return OCP_TRUE;
75 for (
USI i = 0; i < this->prodPhaseWeight.size(); i++) {
76 if (fabs(this->prodPhaseWeight[i] - opt.prodPhaseWeight[i]) >
TINY)
79 if (this->injProdPhase != opt.injProdPhase)
return OCP_TRUE;
80 if (fabs(this->injTemp - opt.injTemp) >
TINY)
return OCP_TRUE;
const OCP_DBL TINY
Small constant.
unsigned int USI
Generic unsigned integer.
const USI LRATE_MODE
Well option = fixed fluid rate???
const USI WRATE_MODE
Well option = fixed water rate.
const OCP_BOOL OPEN
Well type = open.
const USI ORATE_MODE
Well option = fixed oil rate.
const USI RATE_MODE
Well option = fixed total rate???
const USI PROD
Well type = producer.
const USI INJ
Well type = injector.
const OCP_BOOL CLOSE
Well type = closed.
const USI BHP_MODE
Well option = fixed bottom-hole-pressure.
unsigned int OCP_BOOL
OCP_BOOL in OCP.
const USI GRATE_MODE
Well option = fixed gas rate.
#define OCP_ABORT(msg)
Abort if critical error happens.
WellOpt class declaration.
OCP_DBL maxBHP
Maximum allowable pressure in the injection well.
string type
Type of well, injection or production?
string fluidType
Type of fluid into the injection well. (injection well only)
OCP_DBL injTemp
Temperature of injected fluid.
OCP_DBL maxRate
Maximum allowable flow rate into/out the well.
string optMode
Mode of well, Rate or BHP?
OCP_DBL minBHP
Minimum allowable pressure in the production well.
string state
State of well, open or close?
WellOpt()=default
Default constructor.
OCP_BOOL operator!=(const WellOpt &Opt) const
overload inequality