Merge pull request #2476 from totto82/guideRateTypeRES
Add support for guide rate type RES
This commit is contained in:
commit
f58a314f6a
@ -57,6 +57,9 @@ double GuideRate::RateVector::eval(GuideRateModel::Target target) const
|
||||
if (target == GuideRateModel::Target::WAT)
|
||||
return this->wat_rat;
|
||||
|
||||
if (target == GuideRateModel::Target::RES)
|
||||
return this->oil_rat + this->wat_rat + this->gas_rat;
|
||||
|
||||
throw std::logic_error {
|
||||
"Don't know how to convert target type " + std::to_string(static_cast<int>(target))
|
||||
};
|
||||
|
@ -135,7 +135,7 @@ double GuideRateModel::pot(Target target, double oil_pot, double gas_pot, double
|
||||
throw std::logic_error("Not implemented - don't have a clue?");
|
||||
|
||||
case Target::RES:
|
||||
throw std::logic_error("Not implemented - don't have a clue?");
|
||||
return oil_pot + wat_pot + gas_pot;
|
||||
|
||||
default:
|
||||
throw std::logic_error("Hmmm - should not be here?");
|
||||
@ -174,7 +174,9 @@ double GuideRateModel::eval(double oil_pot, double gas_pot, double wat_pot) cons
|
||||
throw std::logic_error("Not implemented - don't have a clue?");
|
||||
|
||||
case Target::RES:
|
||||
throw std::logic_error("Not implemented - don't have a clue?");
|
||||
R1 = wat_pot / oil_pot;
|
||||
R2 = gas_pot / oil_pot;
|
||||
break;
|
||||
|
||||
default:
|
||||
throw std::logic_error("Hmmm - should not be here?");
|
||||
@ -309,6 +311,9 @@ GuideRateModel::Target GuideRateModel::convert_target(Well::GuideRateTarget well
|
||||
if (well_target == Well::GuideRateTarget::WAT)
|
||||
return Target::WAT;
|
||||
|
||||
if (well_target == Well::GuideRateTarget::RES)
|
||||
return Target::RES;
|
||||
|
||||
throw std::logic_error("Can not convert this .... ");
|
||||
}
|
||||
|
||||
@ -325,6 +330,9 @@ GuideRateModel::Target GuideRateModel::convert_target(Group::GuideRateProdTarget
|
||||
if (group_target == Group::GuideRateProdTarget::WAT)
|
||||
return Target::WAT;
|
||||
|
||||
if (group_target == Group::GuideRateProdTarget::RES)
|
||||
return Target::RES;
|
||||
|
||||
throw std::logic_error("Can not convert this .... ");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user