cuda 12.0 (default in ubuntu 24.04) cannot build fmt.
furthermore, cuda 12.0 only supports up to g++-12 as host compiler,
meaning there is no std::format either. so workaround where possible
by using stringstreams
the test_primary_variables_gpu pulls in too much generic code
so disable it.
i'm not entirely sure if 12.1 is enough for our code to compile
but at least this fixes build issues on a common configuration
Implement the RSCONST keyword, which models oil/water systems with dead
oil and constant dissolved gas ratio (RS). This assumes RS is uniform
and pressure remains above the bubble point, enabling faster simulation
through simplified equation formulations.
- Add PVT calculations for RSCONST dead oil properties
- Update equilibration state initialization for RSCONST conditions
- Modify well model and state tracking for new phase behavior
- Add unit tests for well state validation
- TPSA-Flow coupling done at the nonlinear solver step level:
- -- Lagged coupling -> TPSA lags behind one time step
- -- Fixed-stress -> Iterate until Flow and TPSA converge
- Generic TPSA solver using Newton with associated linearizer.
- Linear elasticity equations implemented
- Specialized version of ISTL linear solver for TPSA
- Output to restart files and VTK
Reject invalid GCONINJE configurations where multiple RESV/VREP
injection phases conflict, either within the same group or along
an ancestor-descendant path in the group hierarchy. Disconnected
branches with different top-up phases remain allowed.
The validation runs once per time step from setCmodeGroup() when
processing the FIELD group, before injection controls and guide
rates are propagated.
Also add a defensive NETV guide rate check in GuideRateHandler
that rejects NETV usage when the group's top-up phase does not
match the guide rate phase.
Companion PR: opm-common change to exclude REIN from
Group::topup_phase(), so it only reflects RESV and VREP modes.
function is unused for bz == 1 (since we do not use cpr in that case),
but compiler doesn't know that so it will warn about oob deref in
getQuasiImpesWeights
Move getAutoChokeGroupProductionTargetRate() from
WellGroupControls (static method) to GroupStateHelper
(member method). The method has no well dependency and
manually reimplements chain iteration already available
as applyReductionsAndFractions_().
The moved implementation delegates to
applyReductionsAndFractions_() with do_addback=false
and the actual getLocalReductionLevel_() value, replacing
the manual reduction loop.
Make getLocalReductionLevel_() private again (reverting
the visibility change from the previous commit), since
its only external caller was the now-removed static
method in WellGroupControls.
Remove unused FractionCalculator.hpp include from
WellGroupControls.cpp and WellGroupControls.hpp include
from BlackoilWellModelNetwork_impl.hpp and the test file.
Add local_reduction_level gating to the autochoke target
loop in getAutoChokeGroupProductionTargetRate(), preventing
double-counting of reductions at intermediate groups with
group-controlled-wells count of zero.
Remove getGuideRate() from GroupStateHelper: the group path
is dead code (only caller was isAutoChokeGroupUnderperforming_
which now uses guide_rate_ directly), and the well path is
inlined into FractionCalculator::guideRate().
Improve isAutoChokeGroupUnderperforming_() to compute the
control group guide rate as the sum of its FLD children's
guide rates (matching how targets are distributed), and
accumulate efficiency factors from the autochoke group up
to the control group. This makes the formula correct for
the common case where the control group is the immediate
parent with no reductions.
Rename getLocalReductionLevel_ to getLocalReductionLevel
and make it public, as it is now called from
WellGroupControls.cpp.
Update test to verify the corrected target rate and remove
references to the now-fixed double-counting issue.
Add two test cases for getAutoChokeGroupProductionTargetRate():
- TestAutoChokeGroupProductionTargetRate: normal case with
MANI (autochoke, FLD) under intermediate group PLAT that
has a guide rate. Verifies the autochoke reduction loop
produces the same result as applyReductionsAndFractions_()
when both are applicable.
- TestAutoChokeGroupTargetRateDoubleCountingBug: uses a
NETWORK DATA file with NODEPROP (as_choke=YES) and lower
well rates to naturally trigger underperformance detection
(GCW=0). Documents the double-counting bug where missing
local_reduction_level gating causes reductions to be
subtracted at both FIELD and PLAT, producing a clamped-
to-zero target instead of the correct value.
Also adds GROUP_HIGHER_CONSTRAINTS_NETWORK.DATA with
BRANPROP/NODEPROP keywords and parameterizes the test
fixture with mani2_control, data_file, and well rates.
for reason unknown, cmake sometimes choose to pad/escape test names with a
=[ ... ]= in the CTestTestFile. Due to changes lately, this has somehow
triggered. Since we rely on extrating information
from this file, update_data and failure_report triggers broke.
this makes the re's more resilient by allowing the existence of the separators
Update GCONSUMP.DATA and GCONSUMP_COMPLEX.DATA to be valid input for
full simulation runs while preserving their unit test functionality:
- Fix EQUIL datum depth to match gas-oil contact (7020 → 7000)
- Fix PVTO bubble point relationship (Rs/Pbub must be monotonic)
- Extend PVDG pressure range to cover reservoir pressure (→ 300 bar)
- Adjust SGOF Sg_max to avoid floating-point SOGCR precision issue
The GCONSUMP efficiency factor calculation was incorrectly applying group
efficiency factors to the groups themselves, rather than following the
the pattern used elsewhere in the code base:
- Groups are NOT affected by their own efficiency factors
- Parent groups apply child efficiency factors when accumulating contributions
Changes:
- Fix GroupState::update_gconsump() to implement correct efficiency pattern
- Add test suite with simple and complex hierarchy scenarios
This commit extends the test_group_higher_constraints test suite with:
1. Extended hierarchy: Added MANI-2 group (with WELL-B) under PLAT to
create realistic group competition scenarios where fractions < 1.0.
The new hierarchy is:
FIELD -> PLAT -> MANI -> WELL-A, WELL-A2
-> MANI-2 -> WELL-B
-> PLAT-2 -> WELL-C
2. New tests for getWellGroupTargetProducer():
- TestWellGroupTargetProducerIndividualControl: WELL-A under ORAT
- TestWellGroupTargetProducerGrupControl: WELL-A under GRUP
- TestWellGroupTargetProducerWithSiblingIndividualControl: WELL-A
under GRUP with sibling WELL-A2 under ORAT (demonstrates case
where reduction != addback)
3. Updated existing tests:
- TestGroupHigherConstraintsWithGuideRate: scale now 0.922 (was 1.39)
- TestGroupHigherConstraintsProdWithoutGuideRate: scale now 0.901
Certain example models don't have meaningful dynamic results, but
we'd still like to be able to automatically update the static result
files like EGRID and INIT. This commit adds such support under the
assumption that those test cases have names that match the pattern
*compareECLInitFiles*
While here, also adapt the existing Norne-based INIT file test to
use this file update mechanism instead of its original special case
treatment.
If the reference file does not exist, then this is typically a new
file type or a new case. If the updated file does not exist, then
this is typically because the case no longer generates that
particular file type. If neither the reference nor the update
exists, then that is typically an error that should have been caught
earlier. We nevertheless emit a line into 'data_diff' in this case.