Skip to content

Conversation

bska
Copy link
Member

@bska bska commented Nov 17, 2023

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
Copy link
Member Author

bska commented Nov 17, 2023

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
Copy link
Member Author

bska commented Nov 17, 2023

jenkins build this please

@bska bska force-pushed the low-pressure-gas-table-padding branch 2 times, most recently from 678035b to b0772f0 Compare November 21, 2023 13:07
@bska
Copy link
Member Author

bska commented Nov 21, 2023

jenkins build this please

@bska bska force-pushed the low-pressure-gas-table-padding branch from b0772f0 to 0615b69 Compare November 22, 2023 12:18
@bska
Copy link
Member Author

bska commented Nov 22, 2023

jenkins build this please

@bska bska force-pushed the low-pressure-gas-table-padding branch 9 times, most recently from 8bcb7d7 to 99e8833 Compare November 28, 2023 10:42
@bska
Copy link
Member Author

bska commented Nov 28, 2023

jenkins build this please

@bska bska force-pushed the low-pressure-gas-table-padding branch 10 times, most recently from 1647b1d to bca7723 Compare December 7, 2023 08:18
@bska bska force-pushed the low-pressure-gas-table-padding branch 3 times, most recently from b4fb4f9 to 2194a00 Compare December 12, 2023 09:03
@bska bska force-pushed the low-pressure-gas-table-padding branch 2 times, most recently from dc4c66a to 5d5e5ad Compare February 12, 2025 10:18
@bska
Copy link
Member Author

bska commented Feb 12, 2025

build this failure_report

I have reviewed the regression failures and they're mostly all of the expected form; the contents of the .INIT file's TAB vector changes due to low-pressure table padding. There are some smaller changes to certain XGRP elements–relative changes in the order of 5.0e-5 at most–which I have not drilled into. Other than that, the main difference is that this PR as a side effect appears to make the dew-point calculation more robust. At least we're getting more non-zero values in the PDEW per-cell result array in the restart file now than we used to. That said, the dew-point calculation should probably be revisited regardless of this work.

I recommend updating the reference solutions and merging this, but we should maybe/probably wait for the benchmark results before doing so?

@bska bska force-pushed the low-pressure-gas-table-padding branch 4 times, most recently from c270b21 to 181117a Compare February 13, 2025 11:47
@bska
Copy link
Member Author

bska commented Feb 13, 2025

benchmark please

I issued that request nearly 48 hours ago now. Is there a high system load on the benchmark runner, @blattms, or did I make a mistake somewhere?

@akva2
Copy link
Member

akva2 commented Feb 13, 2025

last time i triggered it took 50h.

@bska
Copy link
Member Author

bska commented Feb 13, 2025

last time i triggered it took 50h.

Okay. If that's the case now too then we'll have the response around 8pm CET today.

@bska bska force-pushed the low-pressure-gas-table-padding branch 2 times, most recently from db45441 to abe7097 Compare February 14, 2025 11:54
@bska
Copy link
Member Author

bska commented Feb 14, 2025

last time i triggered it took 50h.

Okay. If that's the case now too then we'll have the response around 8pm CET today.

Still no results. I'm tempted to just update the reference solutions now and merge this. Any objections, @akva2, @atgeirr, @steink?

@akva2
Copy link
Member

akva2 commented Feb 14, 2025

no objections.

@bska
Copy link
Member Author

bska commented Feb 14, 2025

jenkins build this update_data please

jenkins4opm pushed a commit to jenkins4opm/opm-tests that referenced this pull request Feb 14, 2025
Reason: PR OPM/opm-common#3779

opm-common     = 835d3aaca52e9f4f067dab4ca11b9423f32cb6de
opm-grid       = 6651530966139f91cc97d2952f658b97186f7faa
opm-simulators = 835d3aaca52e9f4f067dab4ca11b9423f32cb6de

### Changed Tests ###

  * network_balance_01
  * network_standard
  * network_01_reroute
  * network_01_reroute_std
  * gasoil_precsalt
  * jfunc_01
  * pinch_nopinch_1x1x10
  * numerical_aquifer_3d_2aqu
  * numerical_aquifer_3d_1aqu
  * aquflux_01
  * spe3
  * msw_2d_h
  * msw_3d_hfa
  * polymer_simple2D
  * wecon_wtest
  * base_model2
  * base_model2_welpi
  * base_model2_let
  * 0a1_grpctl_stw_model2
  * 0a1_grpctl_msw_model2
  * 0a2_grpctl_stw_model2
  * 0a2_grpctl_msw_model2
  * 0a3_grpctl_stw_model2
  * 0a3_grpctl_msw_model2
  * 0a4_grpctl_stw_model2
  * 0a4_grpctl_msw_model2
  * multregt_model2
  * udq_actionx
  * udq_wconprod
  * actionx_m1
  * pinch_multz_all
  * pinch_multzm_all
  * pinch_multz_all_barrier
  * pinch_multzm_all_barrier
  * waghyst1
  * waghyst2
  * gpmaint11
  * pinch_t1a_gap
  * pinch_t1a_nogap
  * pinch_t1a_nopinch
  * pinch_t1a1_nogap
  * pinch_t2a1_gap
  * pinch_t2a_nopinch
  * pinch_t2a_gap
  * pinch_t1b_nopinch
  * pinch_t1b1_gap
  * pinch_t1b2_gap
  * pinch_t1b3_gap
  * pinch_t1b4_gap
  * pinch_t1b5_gap
  * pinch_t1b6_gap
  * pinch_t1b7_gap
  * pinch_t1c_nopinch
  * pinch_t1c1_nogap
  * pinch_t1c1_gap
  * pinch_t1c2_gap
  * pinch_t1c2_nogap
  * pinch_t1c3_gap
  * pinch_t1c3_nogap
  * pinch_t1d_nopinch
  * pinch_t1d1_gap
  * pinch_t1d1_nogap
  * equalreg_multy_01
  * equalreg_multy_02
  * equalreg_multy_03
  * equalreg_multy_04
  * equalreg_multy_05
  * equalreg_multy_06
  * actionx_well_templ_01
  * actionx_well_templ_02
  * actionx_well_templ_03
  * actionx_well_templ_04
  * actionx_well_templ_05
  * actionx_well_templ_06
  * WCYCLE-0
  * WCYCLE-1
  * WCYCLE-2
  * WCYCLE-3
  * WCYCLE-4
  * WCYCLE-5
  * WCYCLE-6
  * WCYCLE-7
  * WCYCLE-8
  * udq_uadd
  * udq_undefined
  * udq_in_actionx
  * reg_smry_in_fld_udq
  * group_udq
  * udq_undefined_2
  * cskin-01
  * cskin-02
  * cskin-03
  * cskin-04
  * cskin-05
  * ppcwmax
  * udq_pyaction
  * multxyz_model2
  * multflt_model2
  * multflt_sched_model2
  * multpvv_model2
  * swatinit_model2
  * endscale_model2
  * hysteresis_model2
  * multiply_tranxyz_model2
  * editnnc_model2
  * fbhpdef_model2
  * 9_1a_grpctl_stw_model2
  * 9_1a_grpctl_msw_model2
  * 9_1b_grpctl_stw_model2
  * 9_1b_grpctl_msw_model2
  * 9_2a_grpctl_stw_model2
  * 9_2a_grpctl_msw_model2
  * 9_2b_grpctl_stw_model2
  * 9_2b_grpctl_msw_model2
  * 9_3a_grpctl_stw_model2
  * 9_3a_grpctl_msw_model2
  * 9_3b_grpctl_stw_model2
  * 9_3b_grpctl_msw_model2
  * 9_3c_grpctl_stw_model2
  * 9_3c_grpctl_msw_model2
  * 9_3d_grpctl_stw_model2
  * 9_3d_grpctl_msw_model2
  * 9_3e_grpctl_stw_model2
  * 9_3e_grpctl_msw_model2
  * 9_4a_grpctl_stw_model2
  * 9_4a_grpctl_msw_model2
  * 9_4b_grpctl_stw_model2
  * 9_4b_grpctl_msw_model2
  * 9_4c_grpctl_stw_model2
  * 9_4c_grpctl_msw_model2
  * 9_4d_grpctl_stw_model2
  * 9_4d_grpctl_msw_model2
  * model4_udq_group
  * model4_gefac
  * wsegaicd
  * wsegvalv_2d_vert
  * nnc
  * nonnc
  * norne_reperf
  * compl_smry
  * 3d_tran_operator
  * actionx_gconprod
  * actionx_wefac
  * base_wt_tracer
  * base_wt_tracer(restart)
  * min_bhp_1
  * min_bhp_2
  * min_bhp_3
  * min_thp_1
  * max_gor_1
  * min_gasrate_1
  * min_qoil_1
  * max_watercut_1
  * max_watercut_2
  * max_watercut_3
  * max_watercut_4
  * max_wgr_1
  * rxft_smry
  * actionx_wpimult
  * wvfpexp_02
  * krnum_02x
  * krnum_02y
  * krnum_02z
  * krnum_03x
  * krnum_03y
  * krnum_03z
  * 01_wgrupcon
  * 02_wgrupcon
  * 01_vappars
  * 01_multflt
  * 02_multflt
  * 03_multflt
  * 01_multregt
  * 05_multxyz
  * 06_multxyz
  * 07_multxyz
  * 08_multxyz
  * 11_multxyz
  * norne_init
@bska
Copy link
Member Author

bska commented Feb 14, 2025

jenkins build this opm-tests=1292 please

bska added 2 commits February 14, 2025 15:30
This commit adds a new member function,

    X emptyStructuralCopy() const

to the DeckKeyword and DeckItem classes.  This member function will
form a "structural" copy of "*this", thus preserving aspects such as
the currently active "Dimensions", but removing all data values.
This is in preparation of adding low-pressure table expansion for
the gas PVT tables (i.e., keywords 'PVDG' and 'PVTG').
This commit adds logic to extend gas property tables entered using
the PVDG or PVTG 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 PLim corresponding to a maximum FVF value
in the range [1, 2].  In this case we create new input tables and
redo the property table initialisation with this extended input table.
@bska bska force-pushed the low-pressure-gas-table-padding branch from abe7097 to f35bc83 Compare February 14, 2025 14:31
@bska
Copy link
Member Author

bska commented Feb 14, 2025

jenkins build this opm-tests=1292 please

bska added a commit to OPM/opm-tests that referenced this pull request Feb 14, 2025
@bska
Copy link
Member Author

bska commented Feb 14, 2025

PR approved, build check is green, and the new reference solutions have been installed on the CI system. I'll merge this into the master branch now to enable the feature.

@bska bska merged commit b2a2235 into OPM:master Feb 14, 2025
1 check passed
@bska bska deleted the low-pressure-gas-table-padding branch February 14, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants