opm-common
opm-common copied to clipboard
Add Conditional Low-Pressure Padding of Gas Property Tables
This PR adds logic to extend gas property tables entered using the PVDG or PVTG keywords to low pressure values if needed. When we compute well production potentials (e.g., summary vectors WxPP) and the well's bottom-hole pressure limit is defaulted we end up using pressures in the order of one atmosphere (1 atm) and this, in turn, may generate negative formation volume factors (mass densities) and/or phase viscosities. The problem is most pronounced for producing wells in history matching mode (keyword WCONHIST), but we should have guards in place to avoid negative densities regardless.
If needed we extend the tables down to 1 barsa and also insert a "limiting" pressure value $p_{\mathrm{lim}}$ corresponding to a maximum FVF value in the range $[1, 10\cdot B_0]$. In this case we create new input tables and redo the property table initialisation with this extended input table.
To this end, we add a way of creating empty DeckItem
and DeckKeyword
objects which preserve the structural elements of their live counterparts. This, in turn, enables programmatic creation of full DeckItem
/DeckKeyword
objects by first inserting the padding values and then copying the original table values into those objects.
I am creating this PR in draft mode because it needs quite a lot of testing before we consider enabling this in the mainline simulator.
jenkins build this please
jenkins build this please
jenkins build this please
jenkins build this please
@akva2 : Thanks a lot for starting to look at this, but please be advised that it's not ready for review yet. We're still gathering evidence for whether or not we want to do this at all and, if so, if this is the correct approach to take.
sure i get that, but i figured the cosmetic stuff is still warranted. in fact the two first commits could probably be extracted and done now.