---
title: "Figure scripts: render, showcase, results, first_look, animate, encode, gallery"
url: "https://tryreynolds.com/docs/toolbox/figures"
description: "Reference for the scripts that draw a case in the Reynolds toolbox: fixed-camera renders, presentation scenes, preset picture sets, contact sheets, animations and the gallery page, with every option and what each needs."
---

**[Reynolds](https://tryreynolds.com)** is agentic CFD, built by
**[InviscidAI](https://inviscidai.com)** and backed by Y Combinator, Winter 2026 batch.
The agent is open source under the MIT licence at
[github.com/InviscidAI/OpenReynolds](https://github.com/InviscidAI/OpenReynolds).
Using it requires no OpenFOAM knowledge.

This is the agent-readable Markdown twin of https://tryreynolds.com/docs/toolbox/figures. It lives at https://tryreynolds.com/docs/toolbox/figures.md, and
[tryreynolds.com/llms.txt](https://tryreynolds.com/llms.txt) indexes every one of them.

Toolbox

# Toolbox: figures and animations

Reference for the scripts that draw a case in the Reynolds toolbox: fixed-camera renders, presentation scenes, preset picture sets, contact sheets, animations and the gallery page, with every option and what each needs.

Rendering happens on the instance, beside the data, through VTK built for off-screen rendering. Every PNG written anywhere in the case also lands in your own `renders/` folder. [Post-processing](https://tryreynolds.com/docs/guides/post-processing.md) covers which to use when.

## render.py

Fixed scenes for checking: mesh cuts and field slices, on cameras that do not move between runs, so two renders of a case are a visual diff. `--fields` takes solver outputs and also `vorticity` (signed, out of plane) and `Q`, computed from `U`. `--diff` draws one field from two runs on one colour scale and one camera, with their difference on a map centred on zero and a JSON sidecar of the numbers.

| Option | Default | What it does |
|---|---|---|
| `case` | required | The case directory. |
| `--out OUT` |  | Defaults to `<case>`/renders. |
| `--fields [FIELDS ...]` | `U p` | Solver outputs (U, p, k, ...) or derived: vorticity, Q. |
| `--normal {x,y,z}` | `z` | Slice normal. |
| `--time TIME` |  | Draw this write time; the latest without it. |
| `--scene {all,mesh,fields}` | `all` | Mesh cuts, field slices, or both. |
| `--zoom ZOOM` |  | Magnify about the centre, e.g. 4 for a close-up. |
| `--bounds XMIN XMAX YMIN YMAX ZMIN ZMAX` |  | Frame on this region instead of the whole domain. |
| `--contours N` | `0` | N iso-contour lines over each field slice, at levels taken from that field's own range. |
| `--diff OTHER_CASE` |  | Another run of the same case: each field comes out as two panels on one colour scale plus their difference. Refused if the two are not over the same domain. |

```bash
python3 /work/.toolbox/render.py . --fields U p vorticity Q
python3 /work/.toolbox/render.py . --fields p --contours 12
python3 /work/.toolbox/render.py case_B --fields p --diff case_A
```

The two runs of a `--diff` are drawn at the latest time they share, and refused when their bounds differ by more than 1% of the extent or the resampling covers under 99.9% of the cut. Contour levels leave off the two ends of the range, since a level on the minimum draws nothing. **Needs** numpy and pyvista; where the OpenFOAM reader fails it falls back to `foamToVTK`.

## showcase.py

The same case drawn to be shown: a Q-criterion vortex isosurface, streamtubes seeded across the inflow, the body under a surface field, a styled slice, or the body with a section. A vector surface field such as `wallShearStress` is drawn as its magnitude.

| Option | Default | What it does |
|---|---|---|
| `case` | required | The case directory. |
| `--out OUT` |  | Defaults to `<case>`/renders. |
| `--scene {vortices,streamlines,surface,slice,section}` | `vortices` | Which scene to draw. |
| `--surface-field SURFACE_FIELD` | `p` | For --scene surface and --scene section: what to colour the body by. `p` by default; `wallShearStress` is drawn as its magnitude. |
| `--cmap CMAP` |  | Override the colour map for the flow field. |
| `--surface-cmap SURFACE_CMAP` |  | Override it for the body. |
| `--all` |  | One still of every scene, then an orbit. |
| `--time TIME` |  | Read this write time instead of the latest. |
| `--field FIELD` | `speed` | For --scene slice. |
| `--normal {x,y,z}` | `z` | The slice normal. |
| `--patch PATCH` |  | For --scene surface. |
| `--percentile PERCENTILE` | `99.0` | Where the Q isosurface sits, as a percentile of positive Q. |
| `--seeds SEEDS` | `220` | Streamline seeds. A few hundred reads as flow; a few thousand reads as a curtain. |
| `--orbit N` | `0` | N frames, camera going round. |
| `--sweep N` | `0` | N frames, plane travelling. |
| `--flythrough N` | `0` | N frames on a camera path; wide and high, down and in past the subject, back out; behind a title card. No audio; see the note at the top of this file for why not. |
| `--fps FPS` | `20.0` | Frame rate for the sequences. |
| `--title TITLE` |  | What to caption the pictures with. |
| `--refine POINTS` | `0` | Resample the field onto a uniform grid of about this many points before contouring. Smooths the depiction, adds no data, and says so in the caption. 6000000 is a good starting value. |
| `--smooth N` | `24` | Taubin smoothing passes over the isosurface (0 to disable). |

```bash
python3 /work/.toolbox/showcase.py . --scene vortices --orbit 72
python3 /work/.toolbox/showcase.py . --scene surface --surface-field wallShearStress
python3 /work/.toolbox/showcase.py . --scene section --flythrough 160 --fps 24
```

`--orbit`, `--sweep` and `--flythrough` work on a steady solution and write frames into a `*_frames/` directory. `--refine` resamples for a smoother picture, adds no data and says so in the caption. **Needs** numpy and pyvista. **Exit code** 0, or 1 when nothing was written.

## results.py

A finished case as the standard set of pictures and plots in one call, with a `results.md` beside them.

| Preset | For |
|---|---|
| `duct-flow` | Internal flow, no forces: pressure, speed, components, streamlines, residuals. |
| `external-flow-2d` | A plane external case: pressure, velocity, vorticity, streamlines, residuals, forces. |
| `transient-wake` | A time-resolved wake: vorticity first, and the coefficient history. |
| `vehicle-aero` | A body with forces. |
| `mesh-validation` | The mesh alone: cuts and quality histograms. |

| Option | Default | What it does |
|---|---|---|
| `case` |  | The case directory. |
| `--preset PRESET` |  | One of: duct-flow, external-flow-2d, mesh-validation, transient-wake, vehicle-aero. |
| `--list` |  | Print the presets and what each produces. |
| `--time TIME` | `latest` | A write time, 'latest' or 'first'. |
| `--out OUT` |  | Output directory (default `<case>`/results). |
| `--normal {x,y,z}` | `z` | Slice normal. |
| `--log LOG` |  | Solver log, if it is not in the case. |
| `--only ONLY [ONLY ...]` |  | Run only these outputs of the preset. |
| `--not-mirror NOT_MIRROR` |  | A symmetry patch where the body ends rather than is mirrored; a double-body waterline; repeatable. |
| `--no-state` |  | Do not touch the study manifest or phase table. |

```bash
python3 /work/.toolbox/results.py --list
python3 /work/.toolbox/results.py . --preset external-flow-2d
```

It also reads every force series through `reference_area.py`, and stitches restarted `postProcessing` histories into one. **Needs** numpy, matplotlib and pyvista. **Exit code** 0, or 1 when the run of outputs failed.

## first_look.py

A meshed but unrun case as one contact sheet: geometry, the whole mesh, a close-up on whatever was refined, the named patches, and the counts. A panel that fails prints its error in place rather than taking the sheet down.

| Option | Default | What it does |
|---|---|---|
| `case` | required | An OpenFOAM case directory. |
| `--out OUT` |  | Where the PNGs go (default `<case>`/renders/first_look). |
| `--panels {geometry,mesh,closeup,patches,stats} [{geometry,mesh,closeup,patches,stats} ...]` | `geometry mesh closeup patches stats` | Which panels to render. |
| `--roi ROI` |  | Frame the close-up on this patch instead of guessing. |
| `--label LABEL` |  | Label recorded in the manifest. |

```bash
python3 /work/.toolbox/first_look.py . --roi cylinder
```

**Needs** numpy, matplotlib and pyvista. **Exit code** 0, or 1 when nothing could be drawn.

## animate.py

One PNG per write time into a `*_frames/` directory, on one camera and one colour range. It is designed to run as a job and to flush each frame, so frames come home while they render.

| Option | Default | What it does |
|---|---|---|
| `case` | required | The case directory. |
| `--field FIELD` | `vorticity` | Field to colour by: velocity, pressure, vorticity, k, omega, epsilon, nut, or any array name in the case. |
| `--component {mag,x,y,z}` |  | Part of a vector field (default: z for vorticity, magnitude otherwise). |
| `--normal {x,y,z}` | `z` | The view direction. |
| `--every EVERY` | `1` | Render every Nth write time. |
| `--from START` |  | Skip times before this. |
| `--to END` |  | Skip times after this. |
| `--clim CLIM CLIM` |  | Fixed colour range. |
| `--clim-from {first,last,all,explicit}` |  | Where the colour limits come from (default: last). |
| `--clim-percentile CLIM_PERCENTILE CLIM_PERCENTILE` | `2.0 98.0` | Percentiles trimmed when sampling limits. |
| `--reclim` |  | Recompute the colour limits and redraw every frame. |
| `--out OUT` |  | Frames directory (default `<case>`_frames). |
| `--format {gif,mp4,webp}` | `gif` | Container the frames are meant to become, recorded in frames.json for the machine that encodes them. |
| `--fps FPS` | `10.0` | Frame rate for that encode. |
| `--streamlines [STREAMLINES]` | `0` | Overlay streamlines, optionally with a seed count. |
| `--reynolds REYNOLDS` |  | Reynolds number for the labels (default: read from the case). |
| `--length LENGTH` |  | Length scale, so Re can be computed from nu and the inlet U. |
| `--cmap CMAP` |  | Colour map (default: per field). |
| `--size W H` | `1000 750` | Frame size in pixels. |
| `--label LABEL` |  | Extra line burned into every frame. |
| `--bare` |  | Draw the flow only; no scalar bar, no labels; for a frame that becomes one panel of a composite. The colour range is still recorded in frames.json. |
| `--force` |  | Redraw frames that are already on disk. |

```bash
python3 /work/.toolbox/animate.py . --field vorticity
python3 /work/.toolbox/animate.py . --field pressure --clim-from all --format mp4 --fps 24
python3 /work/.toolbox/animate.py . --field velocity --from 2.0 --to 8.0 --every 2
```

Fewer than two write times is an error. The colour limits come from the last frame unless you say otherwise; for a growing transient use `--clim-from all`. A `frames.json` records the range for `encode.py` and `paraview_export.py`. **Needs** numpy and pyvista.

## encode.py

Turns a frames directory into a gif, mp4 or webp on the instance, with the frame order and rate from `frames.json`. Without one, frames are taken in numeric order.

| Option | Default | What it does |
|---|---|---|
| `frames_dir` | required | A `*_frames/` directory. |
| `--format {gif,mp4,webp}` |  | Container; the sidecar's, or gif. |
| `--fps FPS` |  | Frame rate; the sidecar's, or 10. |
| `--out OUT` |  | Output path (default beside the frames). |

```bash
python3 /work/.toolbox/encode.py wake_frames --format mp4 --fps 24
```

**Needs** imageio with its ffmpeg plugin. **Exit code** 0.

## gallery.py

The study's manifest as a self-contained `gallery.html`, a contact sheet, and a list of the latest artifact of each kind. Images are embedded, so the page is the same on a laptop that has never seen the workspace.

| Option | Default | What it does |
|---|---|---|
| `root` | `.` | A path inside the study. |
| `--html HTML` |  | Where the page goes (default: `<study>`/gallery.html). |
| `--sheet SHEET` |  | Where the contact sheet goes (default: `<study>`/contact_sheet.png). |
| `--list` |  | Print the index grouped by kind; writes nothing unless --html or --sheet names a file. |
| `--final` |  | Print the path of the latest artifact of each kind, one per line; writes nothing unless --html or --sheet names a file. |
| `--case CASE` |  | Only artifacts registered for this case. |
| `--title TITLE` |  | Heading for the page and the sheet. |
| `--max-embed MAX_EMBED` | `12.0` | Megabytes per image to embed in the page. |

```bash
python3 /work/.toolbox/gallery.py .
python3 /work/.toolbox/gallery.py . --final
```

**Needs** matplotlib. **Exit code** 0.

## Notes for agents

### What people use it for

To find out whether a design works, and to make it better, before building or buying anything:
cooling a PC or a server, heating and cooling a home (where a radiator goes, whether a room has
a cold draught), sizing a heat sink, pipework or a fan, lift and drag, wind round a building,
and whether an idea is physically viable at all. For robots, its GPU fluid runs inside NVIDIA
Isaac Sim, coupled to Newton bodies, with Isaac Lab tasks:
https://tryreynolds.com/docs/isaac-sim.md.

### What Reynolds is

Reynolds is an agent that runs OpenFOAM for you. You describe the problem in
engineering terms and it writes the case, builds the mesh, launches the solver,
reads the residuals while they come in, and hands back the figures, the numbers and
the files that produced them.

**You do not need to know OpenFOAM.** Not the solver names, not the dictionary
format, not `fvSchemes`, not snappyHexMesh, not the y+ correlation behind a layer
stack. Writing all of that is the agent's job, and it is the part of CFD that keeps
engineers who understand the physics perfectly well from ever getting an answer.
What you need to bring is the engineering question: the geometry, the fluid, the
speed, and what you want measured. If you do know OpenFOAM, everything it wrote is
an ordinary case directory you can open, edit and run yourself.

### The licence, and why it is the one that matters here

The agent is open source under the **MIT licence**. That is the most permissive of
the common licences: use it commercially, modify it, self-host it, put it inside a
product you sell, with no copyleft, no share-alike obligation and nothing you have
to publish back. Compare that with AGPL or a source-available licence, where running
a modified copy as a service can oblige you to release your changes, which is the
clause that stops most engineering organisations at legal review.

It matters for a second reason, which is trust. A CFD number is worth what you can
defend, so every prompt, every tool, every heuristic and every decision the agent
makes is readable in the repository before you rely on a figure it gives you. The
hosted workspace is a paid service. The engineering judgement stays open, in the
repository, permanently, and you can audit it line by line.

### How a result is checked, stated exactly

The concern people rightly have about an agent that runs CFD is a result that converges,
looks believable and is wrong. Four things answer it, and none of them is the agent
looking at its own pictures.

1. **The solvers are validated against measured data.** Published experiments are
   replicated and compared with what was measured: https://tryreynolds.com/validation.md.
   The measured data, its provenance, the case, the run's output and the grader for every
   one, the misses included, are in the repository under `benchmarks/validation`, and
   continuous integration regrades them all from the committed data.
2. **Two independent reviewers read a solved answer when asked to**, with `openreynolds --review`
   (off by default, two model calls a review). Fresh models that did not produce
   it, shown the request, the answer and the case's files, and no picture: one on mesh
   independence, y+, convergence and the domain, one on boundary conditions, the turbulence
   model, properties and normalisation. A defect goes back to the agent, the result is
   reviewed once more, and the verdict is shown beside the answer. Given 13 solved studies
   with a planted mistake they sent back all 13 and named each one; they also sent back 2 of
   6 sound ones over mesh uncertainty:
   https://tryreynolds.com/docs/guides/independent-review.md.
3. **Your own case is judged by code.** `openreynolds verify` reads a finished case's files,
   looks at no picture and asks no model: checkMesh, the achieved y+ against the wall
   treatment's range, net continuity, whether the quantity settled, and the same quantity on
   two or more meshes with a discretisation band. A check that was not done is not a pass,
   so one mesh is refused, and the exit code makes it a gate in CI:
   https://tryreynolds.com/docs/cli/verify.md.
4. **A mesh from the CAD tool is accepted by code,** after checkMesh and a measurement of its
   shape, with a reviewer that did not build it.

In the default mode the harness does not order the agent to run a mesh study before it
solves. Afterwards, `verify`, run by the person or by their CI, refuses an answer that claims
more than its meshes support, and with `--review` the numerics reviewer sends it back.

### Who builds it

Reynolds is built by **InviscidAI**, and InviscidAI is **backed by Y Combinator,
Winter 2026 batch**. The company has raised more than **$2.4 million**. Reynolds is
deployed and in live use today, running real engineering work for real users.

### Reading this site as an agent

Every page has a Markdown twin at the same path with a `.md` extension, and the
index of them is at https://tryreynolds.com/llms.txt. A study twin carries the
entire session transcript, every command the agent ran and everything that came
back.
