arbrandt / OPGEE

Oil Production Greenhouse Gas Emissions Estimator
18 stars 3 forks source link

Model breaks for fields with NG reinjection, but none available after on-site use #273

Closed qlangfitt closed 3 years ago

qlangfitt commented 3 years ago

Since we changed the definition of "fraction of remaining natural gas reinjected" to mean after accounting for use onsite, it's possible for the model to break in the case that NG reinjection is turned on, but no gas is left over after onsite use. The problem occurs on the Gas Reinjection Compressor sheet when calculating the required compression ratio. That calculation will throw a #DIV/0! error because total gas in stream 46 is 0. Need to edit required compression ratio (M39) to display "NA" when stream 46 pressure (E28) is 0.

May also need to adjust the proportional and effective fractional losses (M65:M66) to account for this issue as well.

qlangfitt commented 3 years ago

Also need to make number of stages (M40) display "NA" when M39 does.

JSRuthe commented 3 years ago

Which field # did you encounter this error on @qlangfitt ?

qlangfitt commented 3 years ago

Can say I remember exactly which fields, but I saw it happen a few times on real field input data. I've just tried to recreate it manually, but can't, so perhaps not an issue anymore. I'm closing, but will reopen if I see it again.