Commit Graph
64 Commits
Author SHA1 Message Date
Kai Bao 6180c69ee0 adapting to function name change from upstream 2025-09-12 09:38:04 +02:00
Kai Bao f762d56dc4 not using Indices::canonicalToActiveComponentIndex anymore
using FluidSystem
2025-09-12 09:38:04 +02:00
Kai Bao 6eb69844b7 removing the index mapping functions from WellInterfaceIndices
modelCompIdxToFlowCompIdx and flowPhaseToModelCompIdx

using the new functions from FluidSystem
2025-09-12 09:38:04 +02:00
Kai Bao a69b1f031c modelCompIdxToFlowCompIdx rename to modelCompIdxToFlowPhaseIdx 2025-09-12 09:38:04 +02:00
Kai Bao 7d5663cd47 changing numComponents in wells to be numConservationQuantities
numComponents has been a very misleading name and something causes
confusion when coming to phase/component indices.

For example, mobility is not way to be associated with compoent.
2025-09-12 09:38:04 +02:00
Arne Morten Kvarving e5f7b3e7dd fixed: do not grab phase index unless phase is active 2025-09-04 08:51:04 +02:00
Kai Bao c8d0939d12 some cleaning up
mostly to add the end-of-file newline character back.
2025-09-02 10:19:36 +02:00
Kai Bao b3e4c4d0d0 removing BlackoilPhases and PhaseUsage
replacing it with a new PhaseUsageInfo and FluidSystem, both of which
are using the same implementation of PhaseUsageInfo, and only one set of
indices is used. Currently, it is the BlackOilDefaultFluidSystemIndices.
2025-09-02 10:19:36 +02:00
Kai Bao fce65d6cb4 putting the instantiation marco definition in a single file
to reduce the duplication
2025-05-14 14:23:39 +02:00
Atgeirr Flø Rasmussen 4453b85632 Rename BlackOilIndices->BlackOilVariableAndEquationIndices. 2025-05-08 19:58:52 +02:00
Atgeirr Flø Rasmussen 1cec083ea6 Rename BlackOilDefaultIndexTraits->BlackOilDefaultFluidSystemIndices 2025-05-08 15:03:19 +02:00
Atgeirr Flø Rasmussen 463dfcf193 Cleanup in response to review comments. 2025-05-06 13:55:45 +02:00
Atgeirr Flø Rasmussen e77484b69d Refine producer initialization.
Instead of evaluating the well at the state given by its current
state (primary variables) use the bhp limit (or 1 bar) to get the
rates that provide the correct fractions.
2025-05-05 12:56:30 +02:00
Atgeirr Flø Rasmussen 2e81e67e73 Updates to clean up. 2025-05-05 12:56:30 +02:00
Halvor M Nilsen 2f1e445cf1 compiling version for blackoil 2025-05-05 12:56:30 +02:00
Atgeirr Flø Rasmussen 06c5c17c96 Remove explicit updating of well AD vars.
Now that the AD (Evaluation) primary variables in the well classes
are always updated whenever the value primary variables are, we
no longer need to remember to explicitly update them, simplifying
the code and enabling removal of functions.

The init() function of the primary variable classes have been renamed
to setEvaluationsFromValues() and made private.
2025-02-14 09:56:54 +01:00
Atgeirr Flø Rasmussen c015df56f9 Merge pull request #5952 from hnil/consistent_primary_variables
Consistent primary variables
2025-02-13 18:24:53 +01:00
Halvor M Nilsen ec1359c915 Change primary variables to be consistent when updated from wellstate 2025-02-12 16:38:28 +01:00
Arne Morten Kvarving 22dadf5928 component indices are now int
inactive components are represented using negative values in the
index(traits) class so we should not be using unsigned values
in the fluidsystem

while at it make activeToCanonicalComponentIndex usable at compile time
2025-02-04 10:15:35 +01:00
Kai Bao 66d5a16ae1 incorporting reviewing comments for OPM/opm-simulators#5818 2025-01-13 10:00:31 +01:00
Kai Bao cf1b52e52f suppport for gas water multisegment well 2025-01-13 09:51:19 +01:00
Stein Krogstad cb22d63cfe In updateThp always compute thp when vfp is active 2024-09-26 21:06:05 +02:00
Arne Morten Kvarving db3d552fe7 MultisegmentWellPrimaryVariables: optionally instantiate for float 2024-08-19 13:37:59 +02:00
Atgeirr Flø Rasmussen 0fe76f6011 Bugfix: Avoid possible use of out-of-scope temporary.
Since std::clamp returns a reference we must be careful to not capture
the return value by reference, when there is a temporary among the input
parameters.

For the second change (adding the explicit Scalar return type to a lambda)
this is strictly speaking not necessary, as the lambda's return type is not
a reference, but that is obscure so the change is just done as to clarify.
2024-05-28 16:01:48 +02:00
Arne Morten Kvarving b151cbabac MultisegmentWellPrimaryVariables: use Scalar type 2024-05-22 14:24:22 +02:00
Arne Morten Kvarving be57843296 WellState: template Scalar type 2024-04-17 11:12:40 +02:00
Arne Morten Kvarving e2e6385918 MultisegmentWellPrimaryVariables: remove unnecessary Scalar template parameter
use the Scalar type from the FluidSystem
2024-03-08 15:13:53 +01:00
Kai Bao cd9a208757 Merge pull request #5166 from akva2/indices_drop_ebos
Drop ebos in index functions
2024-03-05 23:31:27 +01:00
Kai Bao c61f0b104c outputting segments with pressure close to lower limit
if the well does not get converged.
2024-03-02 16:28:33 +01:00
Kai Bao f7ad5cb211 not using spres_lower_limit limit non-top segments
with multi-segments, the segment pressure can be lower than the bhp, so
it is not desirable to use spres_lower_limit to limit the segment
pressure. We only use spres_lower_limit to limit the bhp, which is still
valid until we begin using bhp limit lower than 1 bar.
2024-03-02 15:19:17 +01:00
Arne Morten Kvarving c4c7d2e4f5 WellInterfaceIndices: rename ebosCompIdxToFlowCompIdx to modelCompIdxToFlowCompIdx 2024-02-07 08:08:30 +01:00
Vegard Kippe fa6697a5fa Capture reference in lambda 2023-12-01 13:30:48 +01:00
Vegard Kippe 69f82f1104 Allow using UDQ for WCONPROD item 12 (ALQ) 2023-12-01 13:21:34 +01:00
Kai Bao a525f0865f removing white spaces in the wells folder 2023-10-09 11:14:48 +02:00
Kai Bao f4a420d2f9 reducing the bhp lower limit slightly to handle 1 bar bhp limit
it turns out that 1bar is the default bhp constraint for some keywords,
   and some cases are depending on it.
2023-09-19 15:30:42 +02:00
Stein Krogstad 7981253f39 prevent negative oil fractions 2023-09-05 11:18:16 +02:00
Arne Morten Kvarving 92fa9577da consistently use std::size_t 2023-08-15 09:32:10 +02:00
Håkon Hægland 64c041d08f Account for pressure loss also in thp 2023-06-02 09:25:34 +02:00
Tor Harald Sandve 7cf3f69cf9 Add gaswater solvent
Fix some places that assumed 3p + solvent
2023-05-26 16:24:38 +02:00
Tor Harald Sandve 1592ef8bd2 solvent + foam simulator 2023-05-24 16:03:09 +02:00
Tor Harald Sandve ee39117771 Add energy + precsalt simulator 2023-05-12 10:49:17 +02:00
Kai Bao 49a327f372 we should not request alq_value for injectors
through the function { return well_.wellEcl().alq_value(); }.

It will throw a runtime_error which is not properly caught.
2023-05-11 15:23:25 +02:00
Kai Bao 9304542dbe combining wellIsStopped and wellUnderZeroRateTaget
for better readability.
2023-03-29 14:40:50 +02:00
Kai Bao b6eecf5c55 not updating the THP for zero rate controlled wells 2023-03-29 13:48:34 +02:00
Kai Bao 2c5a4398c9 make sure zero production rates are obtained for the following wells
1. stopped production wells
2. production wells under zero rate control

We guarantee the objective through enforce zero values for the WQTotal
primary variable during the initialization and update process during the
Newton solution.
2023-03-27 13:24:08 +02:00
Tor Harald Sandve 5028e0fbf1 Add gaswater energy simulator 2023-02-23 09:25:50 +01:00
Arne Morten Kvarving 351181f355 add missing WellSegments.hpp includes 2023-01-12 14:37:32 +01:00
Tor Harald Sandve 5854b8a7a1 Support gas dissolution in water (Rsw)
- adapt to interface change in waterPvt()
- add gas + water + disgasw simulator

Note
- MSW is not supported
- EQUIL initialization is not supported
2022-12-21 13:13:52 +01:00
Arne Morten Kvarving 12b15b5038 move updateUpwindingSegments to MultisegmentWellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving e1cd54b267 MultisegmentWell: move updateUpwindingSegments to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00