For the user-manual entry in the main OneFLOW documentation, see OneFLOW Workbench User Guide. This README remains the detailed module-level reference for current UI behavior and service tests. The architecture overview is Workbench Architecture. Case parameter file ownership, runtime database limitations, and the proposed schema-backed editor are documented in Case Parameter Design.
Run Development Cases runs selected native C++ OneFLOW cases through OneFLOW.exe r <case-directory>; Python reference cases runs selected catalogued Python reference cases through their declared scripts. When both are checked, the two execution kinds run in one batch. When only one is checked, only that kind runs. Each kind retains its own selection.
The Implementation / Code tab includes an in-workbench source browser. Select a declared implementation path in the left list to preview a read-only excerpt (80 lines per page) with source line numbers and its repository-relative path. Use Next 80 lines and Previous 80 lines to inspect longer files; Open source files... remains available for the complete file in the configured external editor. Preview paths are resolved under the repository root and files are never modified by this view. The current first slice is file-level navigation; symbol-level declaration/definition mapping is a later extension.
Case contracts also expose direct artifact navigation: Open case directory... opens the declared case folder, while Open suite and references... opens the suite manifest, residual baseline, and retained analytical reference files. These actions resolve repository-relative paths and do not run the case.
The home page's Contract Workbench... button opens the cross-domain contract navigator. Boundary Conditions... is also a direct first-class home-screen entry, separate from Mesh Validation. Current Contract Workbench domain entries are:
- Boundary Conditions browses physical boundary semantics and Gmsh/CGNS/OneFLOW mapping contracts. See
docs/source/boundary_condition_architecture.rstfor the detailed model and limitations. - Parameter browses source-backed parameter definition contracts,
including runtime consumers, implementation paths, related Formula &
Knowledge IDs, and declared verification evidence. The first contracts cover
time_integral,rk_stage, andmach_ref; this is a curated first slice, not an exhaustive parameter inventory. - Formula & Knowledge opens the existing Verification Curves browser, retaining its formula, principle, references, documentation, code sketch, and theory-curve views.
- Geometry opens the existing Geometry Contract explorer. Fixture execution remains explicitly distinct from native C++ GoogleTest execution.
- Case browses typed CFD Case contracts through the shared catalog, showing suite membership, solver and physical setup, input files, output manifests, residual policy, analytical references (including Blasius skin-friction and velocity profiles), and evidence limitations.
- Runtime browses lifecycle and resource-ownership contracts using the shared Overview, Principle, Architecture, Implementation/Code, Documentation, and Verification views.
The Case and Runtime browsers are read-only views of
tools/verification/contract_catalog.py; they do not launch CFD or tests.
Evidence statuses are displayed as declared by the catalog and are never
promoted to PASS by the UI. Workflow and Performance entry points will be added
when their typed contracts have concrete repository evidence. The root
gui/ directory is outside this Workbench integration.
Geometry Library is the single entry point for registered geometry assets.
Selecting the built-in unit sphere, 6:1 prolate spheroid or internal-flow
cylinder opens its corresponding parameter editor and deterministic STL
generator. The standalone Generate STL Geometry navigation item has been
removed. Definition parameters (such as radius and semi-axes) are distinct
from representation parameters (such as surface subdivisions). Generated
STL files and .geometry.json sidecars are written under
~/.oneflow/mesh-generation/generated_stl/<geometry-id>/ (or ONEFLOW_HOME).
The sidecar binds the stable asset ID and definition hash to generator source
and STL checksums.
Geometry Library can also register non-STL files: STEP/STP, IGES/IGS, BREP,
OBJ, PLY, XYZ, PTS, PCD and OneFLOW .implicit.json. These files are copied
to ~/.oneflow/geometry-library/assets/ with a content-derived ID and SHA-256.
This initial path is metadata-only: files are not parsed, previewed or meshed,
and their dimensionality remains unknown until a format adapter inspects them.
The selected source filename is retained, but upstream authoring provenance
is not invented. Mesh-to-CFD Validation displays source STL and derived MSH
checksums and shows historical cube source provenance as unknown.
See docs/source/geometry_asset_architecture.rst and
docs/source/stl_geometry_generation.rst.
A workspace is stored as a readable JSON document with the .ofw extension (schema version 2). Version-1 files without artifact fields load and migrate on save. Its schema records a workspace ID and name, an execution mode (single_case, sequential_cases, independent_cases, or dependency_workflow), and an ordered list of case IDs and paths. Paths are stored relative to the workspace file when possible. Dependency workflows record depends_on case IDs; validation rejects unknown dependencies and cycles. The independent mode rejects declared dependencies, while sequential mode uses the case list order.
The workspace editor creates, loads, validates, edits, and runs these definitions. Save and Run... saves the .ofw file and opens an unsaved draft in Saved Workflows; execution uses the existing runner and run-history repository. Single-case, sequential, and independent modes map to one OneFLOW multi-directory process with the declared case order. Dependency mode maps IDs, directories, and edges to the existing graph runner, which stages cases and blocks dependents after failures. Dependency case rows accept outputs and inputs JSON bindings using the same fields as Saved Workflows graph definitions. Output IDs must be unique; an input must reference an output from a direct dependency. Artifact and parameter-file paths are relative to their case directory. The adapter preserves these bindings so the graph planner configures producer output settings, stages generated files, and overrides consumer settings. Version-1 definitions without inputs or outputs migrate on save; artifact fields require schema version 2.
From the repository root, using Python 3.10 or newer:
python -m pip install -r tools/requirements-gui.txt
python -m tools.oneflow_guiChoose Debug or Release in the Configuration... dialog, opened from the button below Project; build and unit-test tasks, including Development Tests build actions, use that configuration. The executable field stays as a single compact line. Existing executables are
detected in this order: repository Debug build, repository Release build,
C:/dev/OneFLOW/bin/OneFLOW.exe, then conventional Windows installation
folders under ProgramFiles, ProgramFiles(x86), and LOCALAPPDATA.
The first detected path is selected automatically; use the dropdown to switch
between detected copies, type a path directly, or use Browse... for an
unlisted location. No full-disk search is performed.
From Open Project, choose any existing project directory and then choose the executable and execution location. This path does not require catalog registration. To run built-in development cases, open Tests. Select cases... shows C++ cases when only Run Development Cases is enabled, Python cases when only Python reference cases is enabled, and both kinds when both are enabled. Each kind retains its own selection. When neither is enabled, the selector defaults to native C++ cases for browsing, but no Development Cases are executed.
Catalog case execution always uses a workspace copy:
- Copy to OneFLOW default run workspace stages each case under
~/.oneflow/executions/<run-id>/<case-id>. - Copy to specified run directory stages each case under the chosen directory. Both the source repository and its built-in case data are protected from in-place execution; workspace destinations inside the source repository are rejected.
The application invokes the standard command shape:
OneFLOW.exe r <case-directory>.
Use the Tests... button below Project to run C++ Unit Tests (CTest)
and Python Unit Tests (unittest) independently, enable the optional CFD/grid
regression suite, or run the selected Development Tests cases. The shared action bar uses Build, Rebuild, Run, Stop, and Close. The Debug/Release selection is made in Configuration and passed into the Tests dialog. Regression runs invoke test/test.py and an existing manifest from test/suites/; the GUI does not implement a second test engine. Use Project > Run History... to inspect Case Workbench and workflow run records and logs, edit notes, delete individual records, or clean matching history by workflow, status, and timestamp. These history operations never delete run artifacts.
Use the Mesh Layout Editor... button below Project to open the mesh layout project editor. Choosing
Single rectangle, Single rectangle with vertical midpoints, Two-block turbulent flat plate, Two-block laminar flat plate, or Two-block laminar flat plate (10 edges) copies the complete template
project once into ~/.oneflow/mesh-layout-workspace/projects; later openings
reuse that project without overwriting edits. Each project keeps its JSON,
scripts, and generated layout together, so Save specification updates the
project JSON and Compile layout writes the layout under that project's
grid directory. Set ONEFLOW_HOME to move the workspace. Use Load JSON...
to open a user project at another location; that project remains in place and
is writable as long as it is outside the OneFLOW source tree. Checked-in source
files are never writable through the editor. The editor supports the single-rectangle, single-rectangle-with-vertical-midpoints, two-block turbulent flat-plate, standard two-block laminar flat-plate, and ten-edge two-block laminar flat-plate templates. The vertical-midpoint rectangle preserves four topological side positions while compiling six atomic line segments; the midpoint nodes are part of the template topology. The ten-edge laminar template splits the three vertical topological sides at y=0.02, with 41 points (40 uniform intervals) in each lower segment. The editor exposes geometry, segment point counts, spacing, and boundary types, and previews the layout as SVG. Boundary
selectors show concise names by default; hover for details or enable
Show boundary codes to show legacy numeric codes. The flat-plate preview
labels every edge with its edge name, boundary condition, and point count.
Reset flat-plate boundaries restores the standard two-block defaults.
The home screen also offers Geometry Contracts... for table-level interface dual-map / split scenarios (tools/geometry_workbench, stub backend today). This is separate from running GoogleTest.
The Workbench presents Tests as the entry point for unit tests, CFD/grid regression, and Development Tests. Development Tests are opt-in, and the case selector defaults to all catalog cases. task_types.py identifies which tasks use a user workspace; Unit Tests run from the source build tree. Test commands carry a task type, and workers publish Qt-independent TaskRunResult values with status, exit code when available, execution directory, and a concise message. Results are retained in run history alongside detailed case outcomes. The Run mode preference selects the initial draft when Saved Workflows... opens: multi-case creates a multi-directory draft, and dependency workflow creates a case-graph draft. It does not run the workflow automatically. Launch single projects through Open Project.... The multi-case workspace editor loads, edits, validates, and saves .ofw definitions; it does not launch runs. Use the workflow editor to create, edit, save, delete, and launch named workflow definitions.
Multi-directory mode preserves the existing behavior: each directory is
entered on a separate line, and one OneFLOW process receives
OneFLOW.exe r <directory-1> <directory-2> .... The Dependency graph mode
accepts a JSON array of case objects or a complete saved workflow definition.
It stages each case in an isolated run workspace, runs dependencies in order,
checks declared output files, and passes artifact paths to consumer settings.
The graph base directory contains the configured relative case directories.
Workflow definitions and run history are stored under
~/.oneflow/workflow-data (the user's home directory); on Windows this resolves
under the user's profile directory. Set ONEFLOW_HOME to use a different data
root. The existing workflow-data location is retained, so current definitions
and history remain available. Settings, logs, and execution workspaces have
separate paths under this root. Deleting a definition does not delete its
history. The GUI displays recent run status and messages.
The long-term product direction is documented in both Chinese and English. These memos describe the intended engineering-workbench boundaries and roadmap; they do not imply that all listed capabilities are implemented yet.
models.py: immutable case and result models plus the run-state enum.case_repository.py: catalog loading and shared validation.executable_discovery.py: ordered lookup of conventional executable paths.runner.py: workspace isolation, process launch, output streaming, and cancellation; it has no Qt dependency.workflow_dependencies.py: Qt-independent validation and topological ordering of case dependencies; derives independent, producer, consumer, and chained roles from graph edges.workflow_plan.py: converts a case graph into a dependency-ordered plan and binds named producer artifacts to consumer settings. Each output can declare its producerparameter_fileandsetting, allowing the workflow to configure the actual output path as well as the consumer input. Artifact paths are relative to the producer case, sogrid/...,results/..., and other nested directories use the same contract.workflow_graph_runner.py: stages every case under a run-specific workspace, executes cases in dependency order through an injected callback, resolves declared artifact inputs against staged producer outputs, blocks consumers with missing inputs or unsuccessful dependencies, and lets independent cases continue.workspace_workflow_adapter.py: converts.ofwdefinitions into an unsaved Saved Workflows draft while keeping path resolution and execution-mode mapping independent of Qt.script_file_discovery.py: discovers real parameter-declaration files, distinguishes filename-only manifests from parameter-stylecontrol.txt, and reports missing, duplicate, unlisted, and auxiliary script files.parameter_document.py: lossless, Qt-independent parser/writer for scalar declarations in legacy case parameter files; preserves source bytes, comments, and line endings.parameter_model.py: combines multiple parameter documents into one logical CFD/Grid model, retaining source-file provenance, shared keys, semantic groups, and last-declaration-wins diagnostics.workflow_runtime_overrides.py: applies string settings to a parameter file in a run-specific case copy, preserving existing declaration comments.workflow_case_runtime.py: copies one case into the workflow run directory, creates configured output directories, applies producer output settings, and applies declared artifact bindings to staged consumer parameter files. The graph runner uses this service and is called by the project runner, background project runner, and Saved Workflows dialog. The dialog shares graph execution but owns its own worker and run-history updates.examples/rae2822_multicase.json: example dependency contract for a workspace whose base directory containsrae2822gridandrae2822_roe_sa. It configures the producer to writeresults/rae2822_2d.ofland binds the solver to that exact artifact. SelectD:\\OneFLOWWorkspace\\workdir2026\\multicasesas the base directory for the user's local workspace.tools.oneflow_gui.test_parameter_model: shared, CFD, and Grid grouping across files, duplicate-key semantics, conservative unknown-key handling, and directory-discovered classification coverage for laminar/turbulent flat plates, RAE2822, M6 wing, and grid conversion cases.test_workflow_case_runtime.py: tests staged grid binding and preservation of source case files.test_workflow_runtime_overrides.py: tests existing setting replacement, missingsourceGridCaseDirinjection, quoting, and invalid setting names.test_workflow_graph_runner.py: tests isolated staging, staged producer-consumer artifact handoff, execution order, independent branches, failure propagation, cancellation, and missing output files.test_workspace_workflow_adapter.py: tests conversion of all four.ofwmodes, path resolution, order preservation, and dependency-edge preservation.test_workflow_dependencies.py: tests for dependency roles, ordering, missing references, and cycles.test_workflow_plan.py: tests for producer-consumer artifact binding, bothgridandresultspaths, and invalid dependency/path declarations.workflow_execution.py: shell-free construction of one-process, multi-directory command arguments, preserving the user-specified order.home_window.py: Workbench activity selector with a Tests entry, configuration, project actions, and background-task management. The Tests dialog provides optional case selection for Development Tests.task_types.py: shared task categories, explicit execution-location policy, canonical run statuses, and the immutable Qt-independentTaskRunResultcontract (task type, final status, return code, execution directory, and message).test_task_types.py: tests task classification, execution-location policy, and normalization of GUI-facing status labels to persisted states.workflow_repository.py: normalizes legacy run-status labels when loading history while continuing to persist canonical lowercase states.main_window.py: Case Workbench widgets, execution-location selection, and the sequential case queue worker.mesh_layout_dialog.py: template-based geometry, mesh-count, spacing, and boundary editor with SVG preview.tools/mesh_layout/editor_document.py: Qt-independent JSON loading, validation, compilation, and saving shared by the editor.workflow_dialog.py: workflow editor, single-process multi-directory and dependency-graph execution, and persisted run-history presentation.test_services.py: standard-library tests for the non-UI services.test_workflow_execution.py: tests for argument order, spaces, and invalid input.workflow_repository.py: versioned workflow-definition and run-history persistence, independent of Qt.user_data_paths.py: centralized cross-platform user data paths with the optionalONEFLOW_HOMEoverride; the default is derived from the current user home directory.application_settings.pyandconfiguration_dialog.py: persist the source root, executable, run mode, and build configuration in the per-usersettings.json. These settings are grouped in the Workbench Configuration dialog and include reset-to-defaults support.settings_dialog.pyis a legacy source-root-only dialog and is no longer used by the Workbench home screen.test_user_data_paths.py: tests default paths, overrides, and side-effect-free path resolution.test_workflow_repository.py: persistence tests for version checks, CRUD behavior, and history retention.
The GUI is an optional tool and is not a runtime dependency of OneFLOW. Core
case discovery and process execution remain separable from the GUI framework.
The shared TaskRunResult model establishes a common outcome contract without
merging the case queue and test-command workers; each runner retains its own
execution and cancellation semantics.
The Repository Test Inventory is a read-only source browser. It scans C++
GoogleTest declarations under tests/ and Python unittest declarations under
tools/, tests/, and the standalone gui/python/tkinter/ test area. It
displays source locations and explicitly linked Geometry scenario
input/expected metadata. A registry audit compares discovered Python test
modules with the explicit execution commands. Qt widget tests and optional
Matplotlib rendering tests remain explicitly excluded until a dedicated
headless/visualization test environment is configured. Discovery does not
execute tests and does not populate a pass/fail result.
The Tests dialog exposes two independent unit-test selections:
C++ Unit Tests (CTest) and Python Unit Tests (unittest). CTest runs
native tests registered by the configured CMake build tree; Python tests run
the explicit Python command registry using the selected interpreter. Either
group can be run without the other. Selecting CTest requires an existing
build/CTestTestfile.cmake; if it is missing, the GUI asks the user to
configure the build tree rather than silently skipping CTest. The inventory is intentionally broader than this
execution registry: a discovered Python test is not automatically safe to
run without considering its arguments, working directory, and dependencies.
After each command batch, the Tests dialog reports command totals (passed, failed, and not run). It also parses framework summaries to report individual Python unittest and CTest case counts, including passed, failed, and skipped Python tests where available. On failure, the final report includes the failed command and the captured traceback or CTest failed-test listing; the full streamed log remains available above it. Execution stops at the first failed command, and the not-run count makes that early stop explicit.
The following Contract Workbench modules are included in the GUI Python unit suite:
tools.verification.test_curve_catalog: numerical catalog formulas, implementation API references, and source/document/data paths.tools.verification.test_contract_catalog: shared Numerical/Geometry adapters, stable IDs, evidence semantics, and repository-reference checks.tools.oneflow_gui.test_test_inventory: C++/Python test discovery, explicit scenario linkage, and the rule that discovery never fabricates execution results.tools.oneflow_gui.test_project_window: project parameter-file listing, runtime-file de-duplication, and configured source-editor launch behavior.
The architecture and rationale are documented in OneFLOW Testing Architecture.
From the repository root:
python -m unittest tools.oneflow_gui.test_task_types
python -m unittest tools.oneflow_gui.test_services
python -m unittest tools.oneflow_gui.test_user_data_paths
python -m unittest tools.oneflow_gui.test_application_settings
python -m unittest tools.oneflow_gui.test_workspace_workflow_adapter
python -m unittest tools.oneflow_gui.test_workspace_repository
python -m unittest tools.oneflow_gui.test_workspace_dialog
python -m unittest tools.oneflow_gui.test_project_window
python -m unittest tools.oneflow_gui.test_workflow_repository
python -m unittest tools.oneflow_gui.test_workflow_execution
python -m unittest tools.oneflow_gui.test_workflow_dependencies
python -m unittest tools.oneflow_gui.test_workflow_plan
python -m unittest tools.oneflow_gui.test_workflow_graph_runner
python -m unittest tools.oneflow_gui.test_workflow_runtime_overrides
python -m unittest tools.oneflow_gui.test_workflow_case_runtime
python tools/test_mesh_cases.pyThe first version reports process exit status and logs. It does not yet claim that a successful process exit proves mesh geometry is valid; result validators will be integrated as a separate workflow stage.
The Workbench keeps user-managed data under %USERPROFILE%\.oneflow by default
(for example, C:\Users\eric\.oneflow). Set ONEFLOW_HOME to use another
root. The source checkout remains separate from this directory.
settings.json: Workbench preferences.projects/: default destination for newly created projects.workspaces/: saved multi-case.ofwworkspace definitions.workflow-data/definitions/: saved workflow definitions.workflow-data/runs/: workflow run history.workflow-data/executions/: isolated project/workflow run copies and generated results.grid-development/cases/: fixed grid Development Tests staging directory, refreshed with selected source cases at the start of each run batch; no per-run directory is created and source cases remain untouched. The separatemesh-validation/root stores end-to-end Mesh-to-CFD validation runs.mesh-layout-workspace/: mesh layout projects, specifications, and outputs.cfd-regression/: staged CFD regression inputs.background-tasks/: persistent background task records.logs/: application logs.test-runs/logs/: captured stdout/stderr from GUI-launched Python unittest commands; append-only verification records remain underverification/execution-records.jsonl.
The Workbench does not move or overwrite existing source projects automatically;
choose an existing project directory to open it, or create a new project under
.oneflow/projects.
New Project... includes Laminar flat-plate boundary layer. It creates a user-owned copy of test/cfd/plateuns2dslau2 under the selected project parent (by default ~/.oneflow/projects). The copy retains the case's script/ parameters, grid/ mesh and boundary data, results/ analytical reference files, and visual/ settings. No solver or mesh parameter is rewritten during creation. The autotest/ directory is intentionally omitted because it contains automated regression outputs rather than required case inputs. The original source case remains unchanged. The created project contains .oneflow-project.json metadata and a short README identifying its template source. The case's simutask = "Solve" is classified as a CFD/flow project by project discovery.
When the laminar template is selected, the suggested project name is LaminarFlatPlate. If that destination already exists, the dialog asks for explicit confirmation before replacement. Replacement removes the complete existing project directory and copies a fresh template; generated results and other user changes in the old directory are permanently discarded. Declining the confirmation leaves the existing project untouched.
The Project Window builds a read-only Shared / CFD / Grid / Other tree from real parameter-declaration files discovered under the Case script/ directory. A filename-only control.txt is compared with the actual parameter files for missing, duplicate, unlisted, and order differences; it does not control the read list or precedence. All real parameter files are loaded in deterministic filename order. Auxiliary text files without assignments (for example, solver.txt) are reported but remain outside parameter ingestion. If control.txt contains parameter declarations, it is loaded as an ordinary parameter file; if it is absent, discovered parameter files are loaded in deterministic filename order. The same real-file ordering applies when a filename-only manifest is present. The tree preserves declaration order and source paths. Each domain is subdivided into semantic groups; the Applies to column independently reports Both, Solve, Grid, or Unknown. A selected task is not used as evidence to force an unknown key into CFD or Grid. control.txt is hidden only when it is a filename-only manifest; parameter-style control.txt declarations are shown like declarations from cfd.txt. The last declaration is effective; earlier declarations remain visible as overridden child rows. Double-clicking a declaration opens its original parameter file in the configured source editor.
A curated runtime-consumer child is shown for keys whose C++ read sites have been checked in parameter_consumer_catalog.py. The audited slice covers maxSteps, time_integral, rk_stage, mach_ref, vismodel, ptTol, nmg, cflst, cfled, ncfl, timestepModel, global_dt, nFieldSave, nVisualSave, nResSave, nForceSave, inflow_intensity, and inflow_viscosity. The time-integration records link four solver-control readers to TimeIntegral::Init, the stage coefficient loop, and the specialized resident Euler backend capability gate. The CFL records link the ramp inputs to Iteration::Init, the physical/dual-time iteration index, and the linear ramp policy. The time-step strategy record distinguishes local, global, and hybrid dispatch; global_dt is traced to Ctrl::pdt and its strategy-specific use. Turbulence inflow settings link to TurbCom::InitInflow, where the two-equation branch derives its inlet turbulence state. Output cadence links cover the iteration predicates and representative solver scheduling sites. currTime is runtime state, not a parameter declaration. Both time_integral and rk_stage expose the Formula & Knowledge entry ID time_integral_rk_stage_weight in the Project Window. Other keys are marked Not audited; absence from this index does not mean unused. Read-site evidence is not a claim of universal applicability or numerical validation.
Run the focused tests with:
python -m unittest tools.oneflow_gui.test_parameter_model
python -m unittest tools.oneflow_gui.test_parameter_consumer_catalog
python -m unittest tools.oneflow_gui.test_project_windowThe Parameter Contract browser now includes a dedicated Examples tab alongside Formula and Implementation / Code. All six current parameter contracts have structured worked examples: maxSteps and maxTime stop conditions, time_integral dispatch, the four-stage rk_stage schedule, CFL ramp indexing in physical-time and dual-time modes, and mach_ref reference-state scaling. Each example separates input, calculation, result, and limitations; arithmetic examples are not presented as solver execution or numerical-accuracy evidence.
The Formula & Knowledge browser now keeps Implementation separate from
Code sketch: Implementation lists the production source paths, pure APIs,
and canonical documentation path; Code sketch remains explicitly illustrative.
The Examples tab contains worked input/calculation/result/limitation records
for representative SA, SST, and multi-stage time-integration entries. Entries
without a reviewed example say so explicitly rather than showing a fabricated
sample. The multi-stage example documents the current 1/(s+1) coefficient
schedule and does not claim a complete Butcher tableau or formal order.
The Contract Workbench Parameter browser groups parameter definitions using validated contract metadata and supports case-insensitive search across IDs, titles, descriptions, references, and source/documentation paths. Group labels are domain concepts; they do not imply complete parameter coverage. Add Laminar and Turbulence groups when their source-backed parameter contracts are registered, rather than classifying unreviewed parameters speculatively.
Parameter contracts can also carry typed mathematical knowledge. The
Reference Mach number entry distinguishes local Mach, free-stream/reference
Mach, ideal-gas sound speed, and the exact OneFLOW const_cp initialization
expression. The Formula & Symbols view lists term meanings, alternate textbook
notations, OneFLOW variable mappings, references, assumptions, and caveats.
It exposes copyable LaTeX source and an optional rendered preview using the
existing Formula & Knowledge renderer.
The Tests page opens Mesh-to-CFD Validation as a separate workbench. Select multiple STL-to-Gmsh Cases, choose a CFD consumer template, and set the short solver smoke-test iteration count. Each selected mesh Case is validated independently through its conversion chain and CFD consumer.
Validation workspaces are stable and Case-scoped below
$ONEFLOW_HOME/mesh-validation/ (or ~/.oneflow/mesh-validation/ when
ONEFLOW_HOME is not set). For example, the square C++ STL Case uses
stl_to_gmsh/2d/square/single_quad/cpp/. Each workflow stage has its own named directory
under that Case root: stl_to_gmsh/, gmsh_to_cgns/,
cgns_to_oneflow/ and oneflow_cfd_solve/. The Case root itself contains
only the workflow report; stage inputs, scripts, results and logs stay inside
their respective stage directories. Re-running a Case clears and recreates
only that Case's directory; sibling Case results are preserved.
The home-screen Boundary Conditions entry opens a dedicated Boundary Conditions Workbench, separate from Mesh Validation and the Contract Workbench browser. Contract Workbench retains its Boundary Conditions contract domain for cross-domain governance. The dedicated GUI reads the versioned semantic catalog under tools/verification/boundary_conditions/registry.json and presents formulations, parameters, mappings, implementation status, verification and references. The initial catalog covers CFL3D Version 5.0 boundary types 1002, 1003, 2002, 2003 and 2004. This is a read-only research catalog, not a claim that all referenced solver treatments exist in OneFLOW.
The Run Development Cases selector uses the shared grid/case_catalog.json
metadata and presents a compact hierarchy: spatial dimension (2D / 3D /
Unclassified), Case family, then individual Case. Native C++ and Python
reference implementations remain separate runnable entries but share the same
dimension and family. A dimension is read from explicit catalog metadata
first, then from the Case's mesh layout or typed runtime profile; directory
conventions such as grid/mesh-layout/2d are a fallback. Unknown dimensions
remain under Unclassified rather than being guessed.
Mesh-to-CFD Validation uses the same dimension-first navigation for its STL-to-Gmsh producer Cases. It keeps the CFD consumer and smoke-test controls outside the Case tree, so 2D and 3D producer selection does not create duplicate controls or an overly wide list. 3D topology Cases retain the conversion handoff and may run a short dimension-adjusted solver smoke test; this does not establish 2D flat-plate physics or numerical accuracy.
The home screen exposes Mesh Generation... as the single entry to mesh activities. The hub routes to:
- Mesh Projects: choose a catalog-declared template, import an STL from the
repository Grid database or disk, open a OneFLOW project, or import a prepared
directory containing
input/model.stl(or exactly one STL file). - Mesh Layout Editor: the existing structured-layout editor, retained without changing its layout compiler or project data contract.
- STL to Gmsh: a 3-D closed-STL volume-mesh interface backed by
grid/stl_to_gmsh/generate_volume_mesh.py. Select the STL and output path, choose Coarse / Medium / Fine or custom minimum and maximum sizes, optionally select a Gmsh executable, and set the surface/volume Physical Group names. - Mesh Knowledge: opens the existing Mesh domain in Contract Workbench, including principles, format contracts, implementation links and evidence.
A template is enabled by the mesh_project_template flag on a 3-D Python
STL-to-Gmsh Case Catalog entry. The current templates are Unit Sphere, 6:1
Prolate Spheroid and Internal-flow Cylinder. Template files are copied into a
user-owned project; checked-in Cases remain read-only. Imported prepared
directories are also copied, with their relative structure preserved under
source_project/.
Each project is stored below
UserDataPaths.discover().mesh_generation / <project-name> and has a
project.json manifest, a private STL input, a results/ directory and an
independent validation/ workspace. The STL page displays the selected project
and its geometry path. Mesh size, Physical Group names and output path can be
edited and saved with Save Project Settings without launching Gmsh; running
the mesher also saves the settings. Generated MSH files can be passed directly
to Mesh-to-CFD Validation without regenerating the mesh, and validation outputs
stay inside that project's validation/ directory.
The STL page shows the complete platform-specific command before execution and
supports copying it. Execution uses QProcess with an argument list (not shell
interpolation), displays merged process output, and reports the exit code. The
command is reproducible outside the GUI. The default standalone output is under
the user data mesh-generation directory, not in the source tree.
The Unit Sphere, 6:1 Prolate Spheroid and Internal-flow Cylinder templates
preselect their checked-in STL fixtures as starting geometry; the presets do
not manufacture or silently substitute geometry. The sphere and spheroid have
Native C++ Development Cases and independent Python reference Cases. The
cylinder currently has a Python reference Case using its region-aware analytic
OpenCASCADE handoff, plus a dedicated existing-mesh entry in the 3-D
Mesh-to-CFD Validation tree. Its standard 48 x 16 STL and companion manifest
are shared with the Geometry Library and are stored under
grid/stl_to_gmsh/3d/cylinder_internal_flow/. Custom cylinder variants can
still be generated into the user workspace. The spheroid's wall-only Physical
Group makes its downstream run a mesh-handoff/runtime smoke test, not an
external-flow accuracy benchmark.
The current volume mesher requires a closed, connected, consistently oriented, genus-zero shell. Its generated mesh is the volume enclosed by that shell, not an exterior-flow domain. Mesh-size values are target characteristic lengths, not exact edge lengths or fixed element counts. Disconnected shells, non-zero genus surfaces and self-intersecting STL inputs are outside this contract.
STL inspection/repair, general mesh-quality visualization and additional meshing backends remain separate incremental capabilities rather than placeholder buttons.
Python Workbench code must use the shared helpers in
tools.oneflow_gui.path_utils when filesystem path identity or containment
matters:
normalize_path(path)expands the user directory and resolves an absolute path, including existing symlink components. It also supports paths that do not exist yet.paths_equal(left, right)compares existing paths by filesystem identity (including Windows 8.3 aliases and symlinks). For missing descendants, the nearest existing ancestors are compared by identity and the remaining path components by platform-aware spelling.is_path_within(path, root)checks containment after path resolution, so symlinks cannot silently escape a protected workspace.relative_path_within(path, root)returns the relative path only when the target is inside the root, including when Windows path aliases are involved.
Do not compare path strings, or raw Path objects, to determine filesystem
identity. Do not replace containment checks with equality checks: workspace
and project boundaries must use is_path_within. Keep relative artifact
paths as relative paths until they are resolved against their owning Case or
project directory.
Run the shared path regression suite with:
python -m unittest tools.oneflow_gui.test_path_utilsThe test suite covers normalized and missing paths, Windows case folding, Windows 8.3 short-path aliases when the filesystem provides them, symlink identity, and symlink-based workspace escape prevention. Platform-specific cases are skipped only when the operating system or filesystem does not support the feature being tested.