Commit Graph

48 Commits

Author SHA1 Message Date
Magne Sjaastad
5cd72f55f3 #7852 Crash on dual porosity grid model load and clicking on cell in 3D view 2021-08-03 14:35:34 +02:00
Magne Sjaastad
6ebf3aaaca #7350 PVT curves : Use PVTNUM value to get PVT curve data 2021-02-10 15:19:38 +01:00
Magne Sjaastad
7aa3a47b36 #7335 Dual poro models : Throw exception if invalid data is detected 2021-02-07 21:45:08 +01:00
Magne Sjaastad
b2fc74e73e #7335 Dual poro models : Support using matrix part of PORV
For dual porosity models, use PORV from the matrix part.

Also guard all conversion of 1-based to 0-based indexing to avoid potential undefined behaviour.
2021-02-05 15:35:33 +01:00
Magne Sjaastad
4bd76a78ad Update flow diagnostics from upstream master 2021-02-05 15:35:33 +01:00
Magne Sjaastad
18eee02bb1 #4966 tNav Crash on import : Guard null pointer access in flow diag library 2019-11-02 07:38:23 +01:00
Magne Sjaastad
5930478a90 #4914 Flow Diag : Improve robustness when reading PVT data
https://github.com/OPM/opm-flowdiagnostics-applications/pull/98
2019-10-23 13:24:47 +02:00
Bård Skaflestad
99ce43ccdb Support Creating ECLGraph from "ecl_grid_type*"
This commit introduces a new static function

  ECLGraph::load(const ecl_grid_type*, const ECLInitFileData&)

This is in order to simplify constructing the backing graph from
ResInsight's .EGRID input--especially to have consistent view of
a model's active cells irrespective of which simulator created
the result set.
2019-06-17 19:31:48 +02:00
Magne Sjaastad
1d574fd8c7 #4266 : opm-flowdiagnostics-applications : Update to f57942a8cdf57422fabf3a4423d02a3e46e0be4e 2019-05-09 10:09:06 +02:00
Magne Sjaastad
96a7f02abe #4266 : flow diagnostics: Update related to API changes 2019-05-09 08:41:02 +02:00
Bård Skaflestad
4ad130ae47 PVT Interpolants: Give More Meaningful Diagnostic if Missing
This commit refines the error message emitted if a particular
phase does not have a PVT interpolant--e.g., if the INIT file
does not provide PVT data.  Previously we would generate a
message akin to

    Region Index 0 Outside Valid Range (0 .. (size_t)-1)

which is not very helpful to users in diagnosing the issue.  The
new message does at least indicate that there is no interpolant
for the accompanying phase and also emits the (1-based) region
index for context.
2019-04-16 15:27:31 +02:00
Bård Skaflestad
8d27e0cd01 Don't Calculate Scaled Curves if EPS Data Unavailable
This commit captures the result set's availability of EPS data
in a new data member,

    bool ECLSaturationFunc::Impl::haveEPSData_

We need this piece of information to identify whether a null
'eps_' data member corresponds to missing EPS data or failure to
form the backing EPS data object.  In the first case, it is fine
to output the unscaled curves while throwing an exception in the
latter case is more appropriate.

This restores ResInsight's ability to show unscaled saturation
function curves if the backing EPS data is not output to the
result set's INIT file.
2019-04-10 17:53:50 +02:00
Bård Skaflestad
3ebb106623 Max 2P Sat-Sum: Don't Dereference Null Pointer
A simulation run might not activate all three phases.  We therefore
must guard against querying the connate saturations of the missing
phase.

Pointy hat: Bard.Skaflestad@sintef.no
Thanks to: Magne Sjåstad
2019-02-13 23:35:51 -06:00
Bård Skaflestad
6839c1cf77 ECLFluxCalc: Remove Unused 'useEPS' Constructor Parameter
Recent developments have rendered this parameter unused.  Remove
it to make API simpler.  The library now always loads arrays as
if the caller requests end-point scaling behaviour and we defer
effects of actual end-point scaling until client code queries
the flux calculator at run time.
2018-12-21 13:14:45 +01:00
Bård Skaflestad
daa6604e3d Flux Calculator: Use 'phaseSaturation' Result Set Query
This simplifies the implementation of the 'phaseProperties' member
function and, in particular, restores the original code symmetry
amongst the individual phase cases.
2018-11-14 14:40:06 +01:00
Bård Skaflestad
c15432d1b2 Saturation Functions: Add Public Query for Phase Saturations
Simplifies retrieving the phase saturation values in the context of
computing phase fluxes at cell interfaces.
2018-11-14 14:40:06 +01:00
Bård Skaflestad
5347c475be Saturation Functions: Create Helpers for Retrieving Sw and Sg
Limits the amount of magic keyword references to the result vectors
SWAT and SGAS.
2018-11-14 14:40:06 +01:00
Bård Skaflestad
f17b38c479 FluxCalc Interface: Rewrap Doxygen Documentation
Mostly to follow common style elsewhere in library.
2018-11-14 14:40:06 +01:00
Bård Skaflestad
5167299797 DeadOilConstCompr: Re-adjust Whitespace and Comments
No functional changes.
2018-11-14 14:40:06 +01:00
Bård Skaflestad
3c3dfb3dc1 Refactor Constant Compr. Index to Separate Helper
Limits the use of magic constants in the middle of the main logic.
2018-11-14 14:40:06 +01:00
Bård Skaflestad
3d5dca4693 Surface Density: Explicitly Recognise Failure Path
Use the "throw if invalid phase" approach.
2018-11-14 14:40:06 +01:00
Bård Skaflestad
4be1685604 Vertical Scaling [PCOW]: Use Value at Minimum Saturation
The oil-water capillary pressure is a non-increasing function of
water saturation so we need to ensure that we use the capillary
pressure value at the minimum tabulated water saturation.  Add
special purpose code to enforce this rule.  This adds a certain
amount of computational overhead because we now compute function
values at two saturation points instead of just one for the case of
pure vertical scaling.  Most of the time those extra function values
will just be subsequently discarded.

Note that this is a bit of hack, because it relies on the fact that
the current implementation assigns

  TableEndPoints::disp = TableEndPoints::low

in the case of two-point horizontal scaling.  We may wish to make
that rule more explicit.
2018-11-13 09:55:56 +01:00
Bård Skaflestad
be160a5c63 Vertical Scaling/Sr: Remove A Few Asserts
These were meant for consistency checking, but would occasionally
fail due to round-off error when doing arithmetic on values
converted from 'float' to 'double'.  The actual scaling procedure
does not rely on those relations as long as we ensure that 'fmax' is
the maximum function value, so add a measure of robustness here.

Note that this is at best a work-around for a deeper problem and
that a more refined solution would probably be needed here.
2018-11-13 09:55:56 +01:00
Bård Skaflestad
8603935aad Capillary Pressure: Truly Fall Back to Scaled Connate Saturations
This commit ensures that we use the scaled connate water/gas
saturations (SWL/SGL) in place of the scaled capillary pressure
saturations (SWLPC/SGLPC) when the latter are undefined (set to a
sentinel value; -1.0E+20).  We would previously fall directly back
to the connate saturations from the input table in this case and
this would lead to inconsistent curves for the scaled capillary
pressure functions.
2018-11-13 09:55:56 +01:00
Bård Skaflestad
78dfbfea6b Flux and massflux: Return Empty Vector for Inactive Phases
This commit introduces a new (private) predicate function

  ECLFluxCalc::phaseIsActive(const ECLPhaseIndex phase) const

that identifies whether or not 'phase' is active in the current
simulation model/result set.  This enables returning an empty result
vector from flux() and/or masssflux() in the case of the caller
requesting fluxes for inactive phases.  That, in turn, mirrors the
behaviour of ECLGraph::flux() on inactive phases and promotes
uniform phase treatment in calling code irrespective of using stored
or calculated flux values.
2018-11-13 09:55:56 +01:00
Bård Skaflestad
405f6426f3 Bring EPS Unit Test Up To Date WRT Changing Behaviour
A previous commit changed the reverse mapping behaviour in the case
of coincident tabulated scaled displacing saturation and maximum
phase saturation in the two-phase systems.  Bring the corresponding
unit test in line with the changed behaviour (now maps high
saturation values to scaled critical displacing saturation Sr rather
than Smax in this situation).

Pointy Hat: [at]bska
Thanks to: [at]atgeirr
2018-10-25 13:40:08 +02:00
Bård Skaflestad
d6862265b7 Remark That 3pt EPS Changes Function Shape in [Sr, Smax]
The three-point vertical scaling option will usually change the
shape of the relative permeability function in the saturation
interval between the scaled critical displacing saturation and the
maximum phase saturation.  In particular, we usually replace a
general, non-linear function with a linear approximation when
applying three-point vertical scaling.

Add a comment to that effect.
2018-10-25 13:40:08 +02:00
Bård Skaflestad
dc8931f782 Update Flow Diagnostics Application Library
Fixes incorrect horizontal and vertical end-point scaling of model's
saturation functions.

API Change: No longer supports user-selected behaviour for treating
scaled end-points with a sentinel value (-1.0E+20).  That option was
introduced due to incomplete understanding of the semantics of the
sentinel value.  Now that we understand the meaning (use actual,
unscaled end-point value from input table), we no longer need the
option.  Update the calling code in RigFlowDiagSolverInterface.cpp
accordingly.
2018-10-25 13:40:08 +02:00
Bjørn Erik Jensen
6ee84b598c #3042 OPM flowdiag apps update from repo. Commit 24ff768dc509b6c6bbd0121ef46a5932fae92961 2018-06-12 14:36:08 +02:00
Bjørn Erik Jensen
ff628fa9dd #2852 OPM flowdiag upgrade. Copy from repos 2018-05-07 14:37:32 +02:00
Jacob Støren
09cd140bba #2375 Updated opm-flowdiagnostics-applications to 5bcd6d99259a63f5cd820db541b45c4f07aec808 including fixes for Relperm and PVT curves 2018-01-24 16:37:32 +01:00
Jacob Støren
20164ec003 #2270 Updated opm-flowdiagnostics-applications to 44f7e47ecdc87ba566ab4146629de49039a73b2e to fix crash 2017-12-19 15:07:10 +01:00
sigurdp
64fe9e9a3b Upgraded opm-flowdiagnostics-applications to d76ec747cf22aa4d235f6a6c83c3a814adcf5cb2 2017-12-13 10:06:39 +01:00
sigurdp
09c09a7386 Upgraded opm-flowdiagnostics-applications to a773bcfc963705679ecc28f58048fc38936fbbc6 2017-12-11 11:15:09 +01:00
Jacob Støren
2a3f82875c Upgraded opm-flowdiagnostics-applications to cf8a5d2381776a8887d61f825b40f03b1d1cc4b0 2017-12-05 13:50:26 +01:00
Jacob Støren
2a41b4fbb8 #1994 Update opm-flowdiagnostics-applications to cd614100f3d5b8fcf1fd783e929630f11251682e 2017-11-30 00:07:35 +01:00
Jacob Støren
5efe0f705e #2174 Upgrade opm-flowdiagnostics-applications to 75b333335f6cd055d3130d460c6d87444fb7aed4
to get more of the PVT/RelPerm functionality.
2017-11-22 15:28:38 +01:00
Magne Sjaastad
39dc4c0c06 #2015 Update opm-flowdiagnostics-applications to 64d079b736cd70c7139d5e79fb0080233f47db4b 2017-10-17 08:33:07 +02:00
Jacob Støren
4d097a3149 #1988 Update flow diag libraries to handle multiple connections in same well, and have PVT Rel Perm support. 2017-10-11 18:05:53 +02:00
Jacob Støren
690d86b876 #1624 Update opm-flowdiagnostics-applications to c78f50897cea10ed56c7eadd1a1b23aa5ffbc56e that handles none-unified restart files 2017-06-20 09:07:57 +02:00
Jacob Støren
4e091641a4 #1483 Update opm-flowdiagnostics and ..-applications
to b6e59ddcd2fe, and ccaaa4dd1b55 respectively.

In order to include flowCapacityStorageCapacityCurve with max pv fraction threshold
2017-05-29 13:08:32 +02:00
Magne Sjaastad
776e0ff1c4 #1372 Fix compile error on Windows 2017-05-12 12:20:27 +02:00
Magne Sjaastad
3c07eafab2 #1372 Update flow diagnostics and flow diagnostics applications 2017-05-12 12:17:11 +02:00
Jacob Støren
938c8ff69a Update opm-flowdiagnostics-application to include handling of new Ert 2017-04-24 14:42:18 +02:00
Jacob Støren
9a11949f67 Updated opm-flowdiagnostics-applications to SHA afd3f6c454f52dcfa0a6aa96be9823176a6daa48 2017-03-31 15:13:50 +02:00
Jacob Støren
8596c3f79c #1206 Updated the opm-flowdiag libraries 2017-02-09 14:14:02 +01:00
Jacob Støren
95206315fa opm-flowdiagnostics updated to 80190c28ae0fd4a82cfe88c827559029982db83b
opm-flowdiagnostics-applications updated to 01ecb8fc22cb70d883edaad398bffc49878859c3
Which fixes error in TOF calculations.
2017-01-05 14:57:25 +01:00
Jacob Støren
2692abe7fe Renamed catalog to avoid build-server problems due to too long path 2016-12-09 16:25:43 +01:00