opm-common icon indicating copy to clipboard operation
opm-common copied to clipboard

Add Conditional Low-Pressure Padding of Gas Property Tables

Open bska opened this issue 1 year ago • 7 comments

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.

bska avatar Nov 17 '23 12:11 bska

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.

bska avatar Nov 17 '23 12:11 bska

jenkins build this please

bska avatar Nov 17 '23 12:11 bska

jenkins build this please

bska avatar Nov 21 '23 13:11 bska

jenkins build this please

bska avatar Nov 22 '23 12:11 bska

jenkins build this please

bska avatar Nov 28 '23 14:11 bska

@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.

bska avatar Feb 08 '24 11:02 bska

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.

akva2 avatar Feb 08 '24 11:02 akva2