---
title: "Scripts that choose a solver and check a case: advise, ladder, preflight, hisa_env, adjoint_env"
url: "https://tryreynolds.com/docs/toolbox/choosing"
description: "Reference for the scripts the agent consults before a run: advise lists solvers, ranks and memory; ladder offers reduced cases with known answers; preflight checks the case; hisa_env and adjoint_env say what is installed."
---

**[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/choosing. It lives at https://tryreynolds.com/docs/toolbox/choosing.md, and
[tryreynolds.com/llms.txt](https://tryreynolds.com/llms.txt) indexes every one of them.

Toolbox

# Toolbox: choosing and checking

Reference for the scripts the agent consults before a run: advise lists solvers, ranks and memory; ladder offers reduced cases with known answers; preflight checks the case; hisa_env and adjoint_env say what is installed.

Scripts for the moment before a run. They change nothing in the case and launch no production solve. [Choosing a solver](https://tryreynolds.com/docs/choosing-a-solver.md) explains how the agent uses them.

## advise.py

Which solver, how many ranks, and whether this machine can finish it. It takes the class `ladder.py` reads from the case, lists the candidate solvers for it with the condition that makes each one right, and looks for each on this machine. Then it prints cells per rank up to the cores there are, seconds per iteration as a measured 10th to 90th percentile band for the solver, and the memory the mesh wants.

| Option | Default | What it does |
|---|---|---|
| `case` | required | The case directory. |
| `--mach MACH` |  | The Mach number, which is not in the case files. |
| `--cores CORES` |  | Cores on the machine the solver will run on (`nproc` there). |
| `--memory-gb MEMORY_GB` |  | Memory on that machine, in GiB, where this cannot read it. |
| `--json` |  | The same report as JSON. |

```bash
python3 /work/.toolbox/advise.py . --mach 0.1 --cores 8 --memory-gb 16
```

```
# the case
  reads as: internal flow
  because: one way in and one way out (inlet -> outlet); everything that is not an inlet or an outlet is a wall
# solvers in this image for that
  simpleFoam               [not found here]
      is:   steady, incompressible, pressure-based (SIMPLE)
      when: a steady answer is the question and M < 0.3 -- case_gen.SOLVERS writes it
  ...
# ranks, and what an iteration costs at that load
  cells: 1,000 (the built mesh)
    -np 1           1,000 cells each    0.00251 to 0.00591  s/iteration   0.000698 to 0.00164 h
    -np 4             250 cells each   0.000628 to 0.00148  s/iteration   0.000174 to 0.000411 h
```

That run was on a laptop with no OpenFOAM, which is why the solver reads `not found here`: a solver that is absent reports itself as absent. The timing band comes from 101 solver log segments in 50 case directories, all on hosted containers of 4 to 16 cores. No speedup curve is claimed. Memory per cell rests on one measured run and is printed as such. **Needs** numpy (through `preflight.py` and `cells_estimate.py`). **Exit code** 0.

## ladder.py

A short sequence of reduced cases for the case in front of it, each adding one piece of physics, each with an answer that does not come from another solve: Archimedes, the ITTC-57 line, Kelvin's 19.47 degrees, Hagen-Poiseuille, the divergence theorem.

| Option | Default | What it does |
|---|---|---|
| `case` |  | The case directory. |
| `--rung RUNG` |  | Print one rung in full, with the dictionary edits that would produce it. |
| `--json` |  | The ladder as JSON. |
| `--out OUT` |  | Also write the report here. |
| `--record N` |  | Write rung N's outcome to the study manifest on the volume. |
| `--status {pass,fail,skipped}` |  | What happened on the recorded rung. |
| `--value VALUE` |  | The measured number, kept next to the known answer it was set against. |
| `--note NOTE` |  | Anything worth carrying with the record. |
| `--list-classes` |  | Name the case classes that have a ladder here, and stop. |

```bash
python3 /work/.toolbox/ladder.py .
python3 /work/.toolbox/ladder.py . --rung 2
python3 /work/.toolbox/ladder.py . --record 1 --status pass --value 1.4863
python3 /work/.toolbox/ladder.py --list-classes
```

| Class | Rungs |
|---|---|
| `free-surface-marine` | 6 |
| `rotating-machinery` | 5 |
| `external-aerodynamics` | 4 |
| `internal-flow` | 4 |
| `conjugate-heat-transfer` | 4 |
| `generic` | 2 |

Each rung prints what it adds, what to check, the known answer and its source, the tolerance with a reason, and what it costs:

```
1. straight duct, fully developed, laminar
   adds       nothing but the cross-section: a straight length of the same hydraulic diameter, at a Reynolds number low enough to be laminar
   check      the velocity profile across the duct, and the ratio of centreline speed to bulk mean speed
   cost       minutes. A blockMesh duct, a few thousand cells, and a steady solve.
   evidence   -
```

`--record` writes the outcome into the study manifest, where `report.py` and `progress_report.py` read it back, in this session or a later one. Nothing is enforced and no rung is owed. **Needs** numpy (through `preflight.py`). **Exit code** 0.

## preflight.py

The cheap questions asked before an expensive run. Each finding has a status, what was measured, what it means, and a repair you may or may not want.

| Check | What it looks at |
|---|---|
| `method` | With `--resolve`, whether the solver, schemes and mesh type can show a shock, an interface or motion. |
| `geometry` | Surface files: scale, closure, the millimetre trap. |
| `patches` | Every mesh patch against every field, in both directions. |
| `empty` | One cell thick and typed `empty` in the mesh and in every field. |
| `reynolds` | Speed, length and viscosity against the Reynolds number intended. |
| `cells` | Predicted cell count from the dictionaries. |
| `checkmesh` | The conventional thresholds on a kept `checkMesh` log. |
| `probe` | One solver step on a copy of the case. |
| `courant` | The time step against the mesh and the speed. |
| `residuals` | The shape of the residuals in a log. |
| `units` | Force objects against the pressure field's own dimensions. |
| `disk` | The write cadence against the space there is. |
| `change_me` | `CHANGE_ME` placeholders left from a template. |

| Option | Default | What it does |
|---|---|---|
| `case` |  | The case directory. |
| `--checks CHECKS` |  | Comma-separated: method, geometry, patches, empty, reynolds, cells, checkmesh, probe, courant, residuals, units, disk, change_me. |
| `--list-checks` |  | Name the checks and stop. |
| `--json` |  | Findings as JSON. |
| `--out OUT` |  | Also write the report here. |
| `--re RE` |  | The Reynolds number intended. |
| `--u U` |  | Reference velocity, m/s. |
| `--l L` |  | Characteristic length, m. |
| `--resolve RESOLVE` |  | The feature the run has to show (shock, interface, motion); checked against the solver, the schemes and the mesh type before anything is meshed. |
| `--log LOG` |  | The solver log to read residuals from. |
| `--no-probe` |  | Skip the one-step solver probe. |

```bash
python3 /work/.toolbox/preflight.py . --re 10 --u 1 --l 0.04
python3 /work/.toolbox/preflight.py . --resolve shock
```

```
ok 5  skipped 7
OK      patches
  measured  4 patches (inlet, outlet, walls, frontAndBack) all covered by 2 fields
OK      reynolds
  measured  U = 1 m/s (from --u), L = 0.04 m, nu = 0.004 m2/s -> Re = 10, stated Re = 10 (ratio 1)
SKIPPED checkmesh
  measured  no log.checkMesh in the case directory
  repair    run checkMesh and keep the output: checkMesh > log.checkMesh 2>&1
```

A check that could not be made is `skipped`, never `ok`. **Needs** numpy; OpenFOAM for `probe`. **Exit code** 1 when any finding fails, 0 otherwise, 2 on bad arguments.

## hisa_env.py

Where [HiSA](https://tryreynolds.com/docs/solvers/hisa.md) is on this instance: baked into the image, built onto a volume by an older instance, or absent. It link-checks the binary, since one that is present and whose libraries do not resolve looks exactly like a solver crash. For a volume build it prints the export lines and the `mpirun -x` forwarding, and it prints the path to the ONERA M6 case HiSA ships.

| Option | Default | What it does |
|---|---|---|
| `--user-dir USER_DIR` | `/work/OpenFOAM/user-v2512` | OpenFOAM user directory the build landed in. |
| `--source SOURCE` | `/work/hisa/hisa` | HiSA source tree, which carries the examples. |
| `--json` |  | The same facts as JSON. |
| `--exports` |  | Only the export lines, for `eval $(...)`. |

```bash
python3 /work/.toolbox/hisa_env.py
eval "$(python3 /work/.toolbox/hisa_env.py --exports)"
```

Where it is absent it says so and names the alternative:

```
# hisa: not available
  rhoCentralFoam is in the image and captures shocks too, at an explicit timestep set by the smallest cell
```

**Needs** the standard library. **Exit code** 0.

## adjoint_env.py

Whether [adjointOptimisationFoam](https://tryreynolds.com/docs/solvers/adjointoptimisationfoam.md) is on this instance, and which of the installed tutorial cases are complete. For each case it reads the optimisation manager, the sensitivity type, the objectives and the adjoint turbulence model, and marks which are `singleRun` (a sensitivity map) rather than an optimisation loop. It copies a case out on request and writes none of its own.

| Option | Default | What it does |
|---|---|---|
| `--json` |  | The same facts as JSON. |
| `--case CASE` |  | One tutorial case, by the tail of its path (e.g. naca0012/laminar/drag): its dictionary set in full. |
| `--copy COPY` |  | Copy the --case here to edit (its mesh lives in the tutorials' shared resources/ and is not copied). |
| `--finite-difference` |  | Print how to check a sensitivity against a finite difference, which nothing here has done. |

```bash
python3 /work/.toolbox/adjoint_env.py
python3 /work/.toolbox/adjoint_env.py --case naca0012/laminar/drag --copy ./adjoint
python3 /work/.toolbox/adjoint_env.py --finite-difference
```

Nothing in the toolbox has checked a sensitivity from this solver against a finite difference, and the output says so each time. **Needs** the standard library. **Exit code** 0; 1 when a copy fails, 2 for `--copy` with no `--case`.

## 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.
