Added compositional variant in flow#7145
Conversation
|
I will rebase this as son as the restructuring is merged. |
The upstream PR #7143 was merged into the master branch. Please feel free to rebase this work at your convenience. |
The standard-flow main pulls in OPMRST (HDF5) save/load state through SimulatorFullyImplicit, which requires the whole model and problem to be serializable. Provide serializeOp for FlashPrimaryVariables (plain FieldVector contents) and empty implementations for EmptyModel and CompWellModel, where restart support is not implemented yet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9e4b77b to
4374de7
Compare
|
jenkins build this please |
|
This should be rebased now. |
|
jenkins build this please |
The new standard-flow compositional simulators are the first users of the Opm::Main entry point that exercise dune-fem code paths on builds configured with dune-fem. dune-fem requires an explicit MPIManager::initialize() at startup (as done by the start.hh runner used by flowexp) and otherwise aborts with "InvalidStateException: MPIManager has not been initialized". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remove trailing whitespace, add missing end-of-file newlines and add the standard license header to the new ComponentName files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removed hpp files form source
There was a problem hiding this comment.
Pull request overview
This PR introduces an additional compositional solver/variant built on the existing flow nonlinear solver and time-stepping infrastructure, along with build/test plumbing to compile and validate new compositional executables and variants.
Changes:
- Adds a new compositional nonlinear system implementation (
NonlinearSystemCompositional) and wires it into the compositional flow problem properties. - Extends build configuration to produce additional compositional executables (including component-count-specific binaries) and broadens template instantiations needed for these variants.
- Updates regression/comparison test macros to support distinguishing the simulator-under-test from the reference simulator, and adds new run tests for new compositional binaries.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| regressionTests.cmake | Updates a compositional regression test entry to support dev/reference simulator separation. |
| opm/simulators/utils/ComponentName.hpp | Makes ComponentName header-only by including a new implementation header. |
| opm/simulators/utils/ComponentName.cpp | Removes the former explicit-instantiation translation unit. |
| opm/simulators/utils/ComponentName_impl.hpp | New template implementation for ComponentName constructor (more generic via requires). |
| opm/simulators/flow/OutputCompositionalModule.hpp | Extends compositional output module parameter registration and adds FIP/RESV log + CSV output helpers. |
| opm/simulators/flow/NonlinearSystemCompositional.hpp | New compositional nonlinear system interface (Flow-side solver integration). |
| opm/simulators/flow/NonlinearSystemCompositional_impl.hpp | New compositional nonlinear system implementation (Newton iteration, residual metrics, linear solve). |
| opm/simulators/flow/NonlinearSolver.cpp | Extends explicit instantiations to support larger equation block sizes (up to 11). |
| opm/simulators/flow/Main.cpp | Ensures Dune::Fem::MPIManager is initialized when using dune-fem. |
| opm/simulators/flow/FlowUtils.cpp | Switches VTK parameter hiding to HideIfRegistered to avoid errors when parameters are not registered. |
| opm/simulators/flow/FlowProblemCompProperties.hpp | Wires the compositional problem tag to use NonlinearSystemCompositional. |
| opm/simulators/flow/FlowProblemComp.hpp | Adds report propagation + output finalization hooks to the compositional problem. |
| opm/simulators/flow/FlowGenericProblem.cpp | Adds explicit instantiations of FlowGenericProblem for GenericOilGasWaterFluidSystem (2..10 comps, water on/off). |
| opm/models/utils/parametersystem.hpp | Adds public HideIfRegistered() API. |
| opm/models/utils/parametersystem.cpp | Implements HideIfRegistered_() in the parameter system registry. |
| opm/models/ptflash/flashprimaryvariables.hh | Adds serializeOp() for FlashPrimaryVariables restart/serialization support. |
| flowexperimental/comp/wells/SingleCompWellState.hpp | Adds API to copy runtime state between well state instances. |
| flowexperimental/comp/wells/SingleCompWellState_impl.hpp | Implements copyRuntimeStateFrom() for dynamic well variables. |
| flowexperimental/comp/wells/CompWellState.hpp | Adds convenience helpers (has, copyDynamicStateFrom). |
| flowexperimental/comp/wells/CompWellState_impl.hpp | Copies runtime state from a previous well state when initializing a report step. |
| flowexperimental/comp/wells/CompWellModel.hpp | Extends compositional well model interface for timestep recovery and reporting/state tracking. |
| flowexperimental/comp/wells/CompWellModel_impl.hpp | Implements accepted-state persistence across timesteps and adds forced well shutdown support. |
| flowexperimental/comp/wells/CompWell_impl.hpp | Adds additional debug/info logging for well control checks (fmt-based). |
| flowexperimental/comp/flowexp_comp3_2p_main.cpp | New main for a 3-component, 2-phase experimental compositional binary. |
| flowexperimental/comp/flowexp_comp2_2p_main.cpp | New main for a 2-component, 2-phase experimental compositional binary. |
| flowexperimental/comp/flow_comp3_2p.cpp | New main that dispatches the “flow_comp” path for 3 components, 2-phase. |
| flowexperimental/comp/flow_comp2_2p.cpp | New main that dispatches the “flow_comp” path for 2 components, 2-phase. |
| flowexperimental/comp/flow_comp.hpp | New compositional flow type-tag/property setup for flow_comp dispatch. |
| flowexperimental/comp/flow_comp.cpp | New runtime dispatch executable selecting a compiled component-count variant based on deck RUNSPEC. |
| flowexperimental/comp/EmptyModel.hpp | Adds no-op serializeOp() for restart compatibility. |
| compareECLFiles.cmake | Adds REFERENCE_SIMULATOR support for compare tests and new run tests for added compositional binaries. |
| CMakeLists.txt | Adds new compositional executables to the build. |
| CMakeLists_files.cmake | Removes ComponentName.cpp from sources and adds new public headers for NonlinearSystemCompositional. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
jenkins build this please |
|
jenkins build this please |
|
I only have one comment there and I think we should try to get it in soon. There will be continuous efforts to improve the |
|
jenkins build this failure_report please |
|
jenkins build this please |
Added compositinal solver based on the flow nonlinear solver and timestepping.