paraview-sim
You are connected to ParaView via sim-cli.
ParaView is an open-source data visualization and analysis application
built on VTK, developed by Kitware / Sandia / LANL / LLNL. It is sim's
heavyweight post-processor for large-scale parallel visualization.
- Read 30+ file formats natively (.vtu, .vtk, .case, .foam, .cgns, .pvd, .exo, .stl, .xdmf)
- Apply filters: Clip, Slice, Contour, Threshold, StreamTracer, Calculator, IntegrateVariables
- Render PNG screenshots headlessly via OSMesa/EGL
- Extract quantitative metrics for acceptance validation
- Parallel processing via pvbatch + MPI
Scripts are Python using paraview.simple API. Executed via
sim run script.py --solver paraview (one-shot via pvpython).
Identity
| Field |
Value |
| Solver |
ParaView (Kitware) |
| Execution mode |
One-shot batch (pvpython / pvbatch) |
| Session type |
None (Phase 1) |
| SDK |
paraview.simple (bundled with ParaView binary or conda) |
| Script language |
Python |
| Input formats |
.vtu, .vtk, .vtp, .vti, .vts, .pvd, .case, .foam, .cgns, .exo, .stl, .xdmf, .csv |
| Output |
JSON on stdout (last line), PNG screenshots, exported data files |
Scope
In scope:
- Loading simulation results from any supported format
- Applying visualization filters (Clip, Slice, Contour, Threshold, StreamTracer)
- Computing derived quantities (Calculator, IntegrateVariables, PlotOverLine)
- Batch rendering screenshots (SaveScreenshot)
- Exporting filtered/transformed data (SaveData)
- Color mapping and transfer function configuration
Out of scope:
- Running solvers (ParaView is post-processing only)
- Interactive GUI sessions (use pvpython/pvbatch batch mode)
- Mesh generation (use Gmsh, ICEM, or solver-native meshers)
- pyvista operations (use pyvista-sim skill instead for lightweight VTK work)
Hard constraints
ParaView is NOT pip-installable. Install via conda install conda-forge::paraview
or download the binary from paraview.org. The pvpython executable must be on PATH
or at a known install location.
Use paraview.simple module exclusively. All scripts must use the high-level
paraview.simple API, not raw VTK calls. This ensures compatibility across versions.
Always call UpdatePipeline() after reader/filter creation before accessing data.
Without it, the pipeline is lazy and data arrays may be empty.
Headless rendering requires OSMesa or EGL. On servers without a display, ParaView
must be built with OSMesa (software) or EGL (GPU) support. The conda-forge build
includes OSMesa by default.
Never use Interact() in batch scripts. It blocks indefinitely waiting for
user input. Use Render() + SaveScreenshot() instead.
JSON result on last stdout line. All snippets must print(json.dumps({...}))
as the final output for driver.parse_output() to extract.
ParaView's Python is isolated. pvpython ships its own Python interpreter.
Don't assume pip packages are available. Use only stdlib + paraview + numpy (bundled).
File index
base/ — always relevant
| Path |
Content |
base/reference/paraview_simple_api.md |
Core paraview.simple API: readers, sources, filters, rendering, writers |
base/reference/file_formats.md |
Supported file formats and their readers |
base/reference/rendering.md |
Headless rendering setup, camera control, color maps, screenshots |
base/reference/mcp_patterns.md |
Patterns from paraview_mcp (LLNL) for common operations |
base/snippets/01_smoke_test.py |
Minimal sphere render + JSON output |
base/snippets/02_load_and_stats.py |
Load data file, report array names and bounds |
base/snippets/03_contour_render.py |
Create iso-surface contour and render PNG |
base/snippets/04_slice_export.py |
Slice plane + export CSV data |
base/snippets/05_integrate_variables.py |
IntegrateVariables for surface/volume quantities |
base/known_issues.md |
Discovered failure modes and workarounds |
base/workflows/
| Path |
Content |
base/workflows/wavelet_filters/README.md |
Wavelet → 5 filters E2E evidence (2026-04-16, PV 5.4.1 Linux) |
base/workflows/wavelet_filters/e2e_summary.json |
7/8 pass (rendering needs OSMesa) |
sdk/ — version-specific notes
| Path |
Content |
sdk/5_13/notes.md |
Python venv support, new readers, API changes |
sdk/5_4/notes.md |
Python 2.7, Threshold/SaveScreenshot API differences |
Required protocol
Step 0 — Version check
sim check paraview
Confirm ParaView is installed and version is known.
Step 1 — Input validation (Category A/B/C)
| Input |
Category |
Action |
| Data file path |
A |
Must be provided by user |
| Variable to visualize |
A |
Must ask — do not guess field names |
| Acceptance criteria |
A |
Must ask — "outlet pressure within 5%" etc. |
| Color map |
B |
Default viridis, disclose |
| Screenshot resolution |
B |
Default 1920x1080, disclose |
| Camera position |
B |
Default ResetCamera(), disclose |
Step 2 — Load data
from paraview.simple import *
reader = OpenDataFile("path/to/data.vtu")
UpdatePipeline()
Verify: reader is not None, data arrays exist.
Step 3 — Apply filters and compute
Build the visualization pipeline. Always UpdatePipeline() after each filter.
Step 4 — Render and export
SaveScreenshot("output.png", magnification=2)
Step 5 — Acceptance validation
Check computed quantities against user-specified criteria.
exit_code == 0 alone is NOT sufficient.
Layered content
sdk/5_13/ — ParaView 5.13 specific notes (Python venv, new readers)
solver/5_13/ — Version-specific rendering quirks
1---2name: paraview-sim3description: Use when post-processing and visualizing large-scale CFD/FEA simulation results via ParaView's paraview.simple Python API — loading .vtu/.vtk/.case/.foam/.cgns data, applying filters (Clip/Slice/Contour/Threshold/StreamTracer), batch rendering PNG screenshots via pvpython/pvbatch, and extracting quantitative metrics (IntegrateVariables, PlotOverLine, Calculator).4---56# paraview-sim78You are connected to **ParaView** via sim-cli.910ParaView is an open-source data visualization and analysis application11built on VTK, developed by Kitware / Sandia / LANL / LLNL. It is sim's12**heavyweight post-processor** for large-scale parallel visualization.1314- Read 30+ file formats natively (.vtu, .vtk, .case, .foam, .cgns, .pvd, .exo, .stl, .xdmf)15- Apply filters: Clip, Slice, Contour, Threshold, StreamTracer, Calculator, IntegrateVariables16- Render PNG screenshots headlessly via OSMesa/EGL17- Extract quantitative metrics for acceptance validation18- Parallel processing via pvbatch + MPI1920Scripts are Python using `paraview.simple` API. Executed via21`sim run script.py --solver paraview` (one-shot via pvpython).2223---2425## Identity2627| Field | Value |28|---|---|29| Solver | ParaView (Kitware) |30| Execution mode | One-shot batch (`pvpython` / `pvbatch`) |31| Session type | None (Phase 1) |32| SDK | `paraview.simple` (bundled with ParaView binary or conda) |33| Script language | Python |34| Input formats | `.vtu`, `.vtk`, `.vtp`, `.vti`, `.vts`, `.pvd`, `.case`, `.foam`, `.cgns`, `.exo`, `.stl`, `.xdmf`, `.csv` |35| Output | JSON on stdout (last line), PNG screenshots, exported data files |3637---3839## Scope4041**In scope:**42- Loading simulation results from any supported format43- Applying visualization filters (Clip, Slice, Contour, Threshold, StreamTracer)44- Computing derived quantities (Calculator, IntegrateVariables, PlotOverLine)45- Batch rendering screenshots (SaveScreenshot)46- Exporting filtered/transformed data (SaveData)47- Color mapping and transfer function configuration4849**Out of scope:**50- Running solvers (ParaView is post-processing only)51- Interactive GUI sessions (use pvpython/pvbatch batch mode)52- Mesh generation (use Gmsh, ICEM, or solver-native meshers)53- pyvista operations (use pyvista-sim skill instead for lightweight VTK work)5455---5657## Hard constraints58591. **ParaView is NOT pip-installable.** Install via `conda install conda-forge::paraview`60 or download the binary from paraview.org. The `pvpython` executable must be on PATH61 or at a known install location.62632. **Use `paraview.simple` module exclusively.** All scripts must use the high-level64 `paraview.simple` API, not raw VTK calls. This ensures compatibility across versions.65663. **Always call `UpdatePipeline()` after reader/filter creation** before accessing data.67 Without it, the pipeline is lazy and data arrays may be empty.68694. **Headless rendering requires OSMesa or EGL.** On servers without a display, ParaView70 must be built with OSMesa (software) or EGL (GPU) support. The conda-forge build71 includes OSMesa by default.72735. **Never use `Interact()` in batch scripts.** It blocks indefinitely waiting for74 user input. Use `Render()` + `SaveScreenshot()` instead.75766. **JSON result on last stdout line.** All snippets must `print(json.dumps({...}))`77 as the final output for `driver.parse_output()` to extract.78797. **ParaView's Python is isolated.** pvpython ships its own Python interpreter.80 Don't assume pip packages are available. Use only stdlib + paraview + numpy (bundled).8182---8384## File index8586### base/ — always relevant8788| Path | Content |89|---|---|90| `base/reference/paraview_simple_api.md` | Core `paraview.simple` API: readers, sources, filters, rendering, writers |91| `base/reference/file_formats.md` | Supported file formats and their readers |92| `base/reference/rendering.md` | Headless rendering setup, camera control, color maps, screenshots |93| `base/reference/mcp_patterns.md` | Patterns from paraview_mcp (LLNL) for common operations |94| `base/snippets/01_smoke_test.py` | Minimal sphere render + JSON output |95| `base/snippets/02_load_and_stats.py` | Load data file, report array names and bounds |96| `base/snippets/03_contour_render.py` | Create iso-surface contour and render PNG |97| `base/snippets/04_slice_export.py` | Slice plane + export CSV data |98| `base/snippets/05_integrate_variables.py` | IntegrateVariables for surface/volume quantities |99| `base/known_issues.md` | Discovered failure modes and workarounds |100101### base/workflows/102103| Path | Content |104|---|---|105| `base/workflows/wavelet_filters/README.md` | Wavelet → 5 filters E2E evidence (2026-04-16, PV 5.4.1 Linux) |106| `base/workflows/wavelet_filters/e2e_summary.json` | 7/8 pass (rendering needs OSMesa) |107108### sdk/ — version-specific notes109110| Path | Content |111|---|---|112| `sdk/5_13/notes.md` | Python venv support, new readers, API changes |113| `sdk/5_4/notes.md` | Python 2.7, Threshold/SaveScreenshot API differences |114115---116117## Required protocol118119### Step 0 — Version check120121```bash122sim check paraview123```124125Confirm ParaView is installed and version is known.126127### Step 1 — Input validation (Category A/B/C)128129| Input | Category | Action |130|---|---|---|131| Data file path | A | Must be provided by user |132| Variable to visualize | A | Must ask — do not guess field names |133| Acceptance criteria | A | Must ask — "outlet pressure within 5%" etc. |134| Color map | B | Default `viridis`, disclose |135| Screenshot resolution | B | Default `1920x1080`, disclose |136| Camera position | B | Default `ResetCamera()`, disclose |137138### Step 2 — Load data139140```python141from paraview.simple import *142reader = OpenDataFile("path/to/data.vtu")143UpdatePipeline()144```145146Verify: `reader` is not None, data arrays exist.147148### Step 3 — Apply filters and compute149150Build the visualization pipeline. Always `UpdatePipeline()` after each filter.151152### Step 4 — Render and export153154```python155SaveScreenshot("output.png", magnification=2)156```157158### Step 5 — Acceptance validation159160Check computed quantities against user-specified criteria.161`exit_code == 0` alone is NOT sufficient.162163---164165## Layered content166167- `sdk/5_13/` — ParaView 5.13 specific notes (Python venv, new readers)168- `solver/5_13/` — Version-specific rendering quirks