frank1010111/pywaterflood

Is the constraint on \sum_{j}^{Nprod} fij<=1$ implemented?

Opened this issue · 3 comments

Is your feature request related to a problem? Please describe.
I have tested the library, and I noticed that $$\sum^{N_{prod}}_{j=1} fij\leq1$$ for a fixed injector $i$ is not fulfilled. This is the constrain given by Eq. 19 in Holanda et al. 2018. I have tried every option for constraints in CRM(constraints=..) and the issue remains. Not sure if I have missed/did something wrong and the constraint is already implemented.

Describe the solution you'd like
It would very helpful to have such constraint implemented. Make the solution more realistic, since in the real oil field, injection losses occur.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Thank you for your suggested improvement. You are right, this is not currently implemented:

elif self.constraints == "sum-to-one injector":
msg = "sum-to-one injector is not implemented"
raise NotImplementedError(msg)

The python constrained optimization options provided by scipy.optimize tend to be very slow when handling a large number of dimensions. I will check on the state of the art for any faster optimizers.

Thanks for the reply. Any hint how to implement this constraint (even so the implementation be slow)?

Oh yes, I have done it before in this branch: https://github.com/frank1010111/pywaterflood/tree/jax which is a few years stale. I would have to think about how to refresh the branch given how much the code has changed in the interim.