Flow compositional#7049
Conversation
|
jenkins build this please |
There was a problem hiding this comment.
Pull request overview
This PR generalizes Flow’s fully implicit simulator path so compositional variants can share more of the standard Flow infrastructure, while renaming/refactoring the black-oil nonlinear model into a more generic nonlinear-system structure.
Changes:
- Renames/refactors
SimulatorFullyImplicitBlackoil/BlackoilModelconcepts into genericSimulatorFullyImplicitand nonlinear-system classes. - Adds compositional Flow executable variants and comparison/regression test wiring.
- Extends compositional output/well-model glue and parameter hiding behavior to fit the shared Flow driver.
Reviewed changes
Copilot reviewed 76 out of 76 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Adds compositional Flow/FlowExp executable test targets. |
CMakeLists_files.cmake |
Updates source/header registration for renamed and new simulator files. |
compareECLFiles.cmake |
Adds reference simulator arguments for comparison helpers. |
comparisonTests.cmake |
Adds compositional Flow vs FlowExp comparison tests. |
regressionTests.cmake |
Switches compositional regression to new Flow compositional variant with reference simulator. |
flow/flow_blackoil.cpp |
Updates simulator include. |
flow/flow_blackoil_legacyassembly.cpp |
Updates simulator include. |
flow/flow_blackoil_nohyst.cpp |
Updates simulator include. |
flow/flow_blackoil_temp.cpp |
Updates simulator include. |
flow/flow_biofilm.cpp |
Updates simulator include. |
flow/flow_brine.cpp |
Updates simulator include. |
flow/flow_brine_precsalt_vapwat.cpp |
Updates simulator include. |
flow/flow_brine_saltprecipitation.cpp |
Updates simulator include. |
flow/flow_energy.cpp |
Updates simulator include. |
flow/flow_extbo.cpp |
Updates simulator include. |
flow/flow_foam.cpp |
Updates simulator include. |
flow/flow_gasoil.cpp |
Updates simulator include. |
flow/flow_gasoil_energy.cpp |
Updates simulator include. |
flow/flow_gasoildiffuse.cpp |
Updates simulator include. |
flow/flow_gaswater.cpp |
Updates simulator include. |
flow/flow_gaswater_brine.cpp |
Updates simulator include. |
flow/flow_gaswater_dissolution.cpp |
Updates simulator include. |
flow/flow_gaswater_dissolution_diffuse.cpp |
Updates simulator include. |
flow/flow_gaswater_energy.cpp |
Updates simulator include. |
flow/flow_gaswater_saltprec_energy.cpp |
Updates simulator include. |
flow/flow_gaswater_saltprec_vapwat.cpp |
Updates simulator include. |
flow/flow_gaswater_solvent.cpp |
Updates simulator include. |
flow/flow_micp.cpp |
Updates simulator include. |
flow/flow_oilwater.cpp |
Updates simulator include. |
flow/flow_oilwater_brine.cpp |
Updates simulator include. |
flow/flow_oilwater_polymer.cpp |
Updates simulator include. |
flow/flow_oilwater_polymer_injectivity.cpp |
Updates simulator include. |
flow/flow_polymer.cpp |
Updates simulator include. |
flow/flow_solvent.cpp |
Updates simulator include. |
flow/flow_solvent_foam.cpp |
Updates simulator include. |
flowexperimental/comp/flow_comp.cpp |
Adds dynamic compositional Flow entry point. |
flowexperimental/comp/flow_comp.hpp |
Adds Flow compositional type tag/properties and Newton method. |
flowexperimental/comp/flow_comp2_2p.cpp |
Adds fixed 2-component two-phase Flow compositional executable. |
flowexperimental/comp/flow_comp3_2p.cpp |
Adds fixed 3-component two-phase Flow compositional executable. |
flowexperimental/comp/flowexp_comp2_2p_main.cpp |
Adds fixed FlowExp compositional main. |
flowexperimental/comp/flowexp_comp3_2p_main.cpp |
Adds fixed FlowExp compositional main. |
flowexperimental/comp/wells/CompWellModel.hpp |
Adds Flow-driver compatibility methods/state to compositional well model. |
flowexperimental/comp/wells/CompWellModel_impl.hpp |
Captures report-step well/group events. |
flowexperimental/comp/wells/CompWell_impl.hpp |
Adds well-control diagnostic logging. |
opm/models/utils/parametersystem.cpp |
Adds HideIfRegistered_. |
opm/models/utils/parametersystem.hpp |
Exposes HideIfRegistered. |
opm/simulators/flow/BlackoilModelNldd.hpp |
Updates model type references and convergence helper use. |
opm/simulators/flow/BlackoilModelParameters.hpp |
Updates comment terminology. |
opm/simulators/flow/BlackoilModelTPSA.hpp |
Updates inheritance to renamed nonlinear system. |
opm/simulators/flow/FlowGenericProblem.cpp |
Adds compositional fluid-system instantiations. |
opm/simulators/flow/FlowMain.hpp |
Switches FlowMain to generic fully implicit simulator. |
opm/simulators/flow/FlowProblemBlackoilProperties.hpp |
Updates black-oil nonlinear-system property. |
opm/simulators/flow/FlowProblemComp.hpp |
Adds report/final-output hooks needed by generic driver. |
opm/simulators/flow/FlowProblemCompProperties.hpp |
Wires compositional problem to new nonlinear system. |
opm/simulators/flow/FlowUtils.cpp |
Hides optional VTK/well parameters only if registered. |
opm/simulators/flow/NonlinearSystem.hpp |
Adds shared nonlinear-system base helpers. |
opm/simulators/flow/NonlinearSystemBlackOilReservoir.hpp |
Renames/refactors black-oil model class onto shared base. |
opm/simulators/flow/NonlinearSystemBlackOilReservoir_impl.hpp |
Moves shared nonlinear logic to base and updates renamed class implementation. |
opm/simulators/flow/NonlinearSystemCompositional.hpp |
Adds compositional nonlinear-system interface. |
opm/simulators/flow/NonlinearSystemCompositional_impl.hpp |
Adds compositional nonlinear-system implementation. |
opm/simulators/flow/OutputCompositionalModule.hpp |
Adds parameter registration and FIP/RESV log output hooks. |
opm/simulators/flow/SimulatorFullyImplicit.cpp |
Switches implementation include to generic simulator header. |
opm/simulators/flow/SimulatorFullyImplicit.hpp |
Adds generic fully implicit simulator header. |
opm/simulators/flow/SimulatorFullyImplicit_impl.hpp |
Adds generic fully implicit simulator implementation. |
opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp |
Renames class in legacy black-oil header. |
opm/simulators/flow/SimulatorFullyImplicitBlackoil_impl.hpp |
Renames implementation symbols in legacy black-oil impl header. |
opm/simulators/flow/rescoup/ReservoirCouplingMaster.cpp |
Updates renamed simulator reference in comment. |
opm/simulators/timestepping/AdaptiveTimeStepping.hpp |
Updates renamed simulator references in comments. |
opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp |
Updates renamed simulator references in comments. |
opm/simulators/timestepping/ConvergenceReport.hpp |
Updates renamed convergence comment reference. |
opm/simulators/utils/ComponentName.cpp |
Extends component naming to compositional fluid systems. |
opm/simulators/wells/rescoup/RescoupProxy.hpp |
Updates renamed owner comment. |
tests/rescoup/test_chopstep.cpp |
Updates nonlinear-system include. |
tests/run-comparison.sh |
Supports comparing two simulator executables/output directories. |
tests/run-regressionTest.sh |
Supports reference simulator directory override. |
tests/test_wellmodel.cpp |
Updates nonlinear-system include. |
Comments suppressed due to low confidence (1)
flowexperimental/comp/wells/CompWellModel.hpp:137
- This stub is now used by the generic adaptive time-stepping failure path, which asks the well model to shut failing wells before retrying a substep. Always returning
falsedisables that recovery path for compositional wells, so well convergence failures that black-oil can recover from by shutting a well will instead keep chopping/failing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const std::map<std::string, double>& wellOpenTimes() const { return well_open_times_; } | ||
| const std::map<std::string, double>& wellCloseTimes() const { return well_close_times_; } |
There was a problem hiding this comment.
For now this is not relevant I think.
| status = other.status; | ||
| bhp = other.bhp; | ||
| surface_phase_rates = other.surface_phase_rates; | ||
| phase_fractions = other.phase_fractions; | ||
| reservoir_phase_rates = other.reservoir_phase_rates; | ||
| total_molar_fractions = other.total_molar_fractions; | ||
| phase_molar_fractions = other.phase_molar_fractions; | ||
| injection_cmode = other.injection_cmode; | ||
| production_cmode = other.production_cmode; |
|
@copilot apply changes based on the comments in this thread |
|
One could probably remove even more code. But some of the changes will will change reference. So better to uniform the code when fixes is applied to the main code i.e. blackoil. |
| status = other.status; | ||
| bhp = other.bhp; | ||
| surface_phase_rates = other.surface_phase_rates; | ||
| phase_fractions = other.phase_fractions; | ||
| reservoir_phase_rates = other.reservoir_phase_rates; | ||
| total_molar_fractions = other.total_molar_fractions; | ||
| phase_molar_fractions = other.phase_molar_fractions; | ||
| injection_cmode = other.injection_cmode; | ||
| production_cmode = other.production_cmode; |
|
@hnil , I am looking into the PR now and it needs to be rebased. |
|
jenkins build this failure_report please |
1 similar comment
|
jenkins build this failure_report please |
|
Converted to draft. Need to be fixed after rebase and review comments. |
|
yeah, the same compilation error showed up in my rebased PR from this PR when compiling the |
|
jenkins build this opm-common=5178 please |
|
Move this for review again. More tests on making flowexp and flow equal is in #7088 which is draft. |
|
rebased and removed tests agains old solver (which had to fail) |
|
jenkins build this please |
|
jenkins build this opm-common=5178 please |
|
Comment: flow_comp flowexp_comp both fails bad with no input. This is a separate question and not related to this pullrequest. |
|
Comment: It is no test here since it will fail with given reference and trying to get flow flowexp to run equal made to much changes se #7088 |
|
jenkins build this opm-common=5178 please |
|
#7062 this version compiles on Jenkins, but there are three regression failures. Will have a look later today or tomorrow. https://ci.opm-project.org/job/opm-simulators-PR-builder/9992/ |
-- added flow_comp variants
-- compilation of flow_comp -- removed test
This is work on making a compositional simulator more similar to flow.
The pullrequest also do:
since now the SimulatorFullyImplicitBlackoil + BlackoilModel.hpp is simulator an nonlinear system for more general systems.