arbrandt / OPGEE

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

NG reinjection definitions #324

Open qlangfitt opened 3 years ago

qlangfitt commented 3 years ago

In Issue #216, we debated the meaning of "fraction of remaining gas reinjected." We settled that the plumbing of OPGEE should be adjusted to treat this as the fraction of gas that's remaining after on-site uses, rather the old treatment which was before on-site uses. I think that makes more sense when using the smart defaults and uncertainty parameters, and it removes the need for the VBA logic surrounding a -1 input (now a +1 input will do the same thing without VBA).

However, we noted at the time that this change means the user cannot develop the input by dividing volume of injected gas by volume of produced gas. This is a key flaw as it seems that the only good way to develop that input for fractions other than 0 or 1 is to use that approach. Here, I’m strongly proposing to add a simple new functionality to allow a user to input the data in the old format, if desired and signaled.

My recommendation is to add a second location where a stream intended for reinjection can be drawn off, at Gas Partition A (before on-site use), which bypasses the fuel gas consumed sheet and goes directly to the Gas Partition B to be routed into the injection stream. OPGEE would use this alternate pathway if the user input a negative value rather a positive one (e.g., negative of the fraction of old definition reinjection). This is pretty easy to implement because it's basically just a matter of telling the existing gas reinjection stream to do its normal thing when a value between 0 and 1 are input, and to route this alternate stream instead in if a negative value is input. From there, it feeds into the existing architecture such that nothing else downstream needs to change.

image

Making a change like this might be easiest to just to do from scratch, but if it helps, I've outlined the steps I used below to test this out (successfully):

image

qlangfitt commented 3 years ago

Here's a file with this implemented as an example. Don't just upload this file though because I've made some testing customizations to it outside of this issue.

OPGEE with adjusted NG reinjection treatment.zip