Add optional verify/run simulator integration - #55
Merged
Conversation
Two new commands launch a locally installed OPM Flow binary on the open deck in an integrated terminal: - OPM Flow: Verify Deck (dry run) — parses and initializes the model without solving (flow --enable-dry-run=true), confirming the deck and its INCLUDE/PATHS files load cleanly. - OPM Flow: Run Simulation — full run. Both start in the deck's own directory so relative paths resolve. New opm-flow.simulator.* settings configure the executable path, args, and WSL. Windows users run via WSL (wsl.exe): the deck's Windows path is translated to its /mnt/<drive> mount (and \wsl$ UNC paths are unwrapped) and an optional distribution is targeted. Linux/macOS run flow natively; native Windows without WSL is steered to settings. Pure path/command-building helpers live in simulator.ts with unit tests.
Split the OPM Flow editor right-click commands into three separated, ordered groups — formatting (align, headers, comment), navigation (open PRT), and verify/run — instead of one flat list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds optional, opt-in support for verifying and running a deck with a locally installed OPM Flow binary, directly from the editor.
Commands
Both appear on the editor right-click menu and the Command Palette (restricted to
.DATAfiles):--enable-dry-run=true). The deck is fully parsed and the model is initialized (grid, properties, wells, schedule) without simulating the time steps — a fast check that the deck and everything it pulls in viaINCLUDE/PATHSloads cleanly.Both run in a reused integrated terminal, started in the deck's own directory so relative paths resolve, with live output (and
Open PRT Fileafterwards).Configuration (opt-in)
Nothing runs until
opm-flow.simulator.executablePathis set. Newopm-flow.simulator.*settings:executablePath"flow"useWslis on)useWslfalsewsl.exewslDistribution""verifyArgs["--enable-dry-run=true"]runArgs[]Cross-platform
/mnt/<drive>mount (and\wsl$UNC paths unwrapped); an optional distribution is targeted.Pure path/command-building helpers live in
simulator.tswith unit tests.Other changes
All 360 tests pass;
tscclean.