---
title: "Time stepping: Courant numbers, adjustable steps and what sets the cost"
url: "https://tryreynolds.com/docs/guides/time-stepping"
description: "The time step each kind of case is written with, the Courant limits for convection, acoustics and an interface, the diffusion number that kills a fine mesh, and what actually sets the wall clock of a transient run."
---

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

Guides

# Time stepping and Courant

The time step each kind of case is written with, the Courant limits for convection, acoustics and an interface, the diffusion number that kills a fine mesh, and what actually sets the wall clock of a transient run.

A time step is three limits at once: convection, waves, and whatever is special about the physics. This guide is what each generated case writes, the bounds worth holding, and where the wall clock goes.

## What the tools write

| Writer | Step | Limit |
|---|---|---|
| `case_gen.py --study transient` | `deltaT = Courant x shortest cell / U` | `adjustTimeStep yes`, `maxCo 0.9`, `maxDeltaT` 5 times the first step |
| the same with `--delta-t` | exactly what you asked | `adjustTimeStep no`, and the resulting Courant number is written as a comment |
| `compressible.py --study transient` | `deltaT = Courant x shortest cell / (U + a)` | `maxCo 0.5`, `maxDeltaT` 5 times the first step |
| `compressible.py` for HiSA | pseudo-time iterations, `deltaT 1` | local pseudo-time stepping |
| `free_surface.py` | 0.001 s | `maxCo 0.5`, `maxAlphaCo 0.5`, `maxDeltaT 0.01` |
| `viv_cylinder.py` | 200 steps per expected shedding cycle | `adjustTimeStep no` |
| `rotating.py` | iterations, not seconds | steady |

`--courant` overrides the target. A fixed step is `--delta-t`, and the case says so rather than quietly letting the solver change it.

## The three limits

| Limit | Formula | Bound | Who cares |
|---|---|---|---|
| Convective | `U dt / h` | about 1 for an accurate transient, 0.9 written by default | every transient solver |
| Acoustic | `(U + a) dt / h` | 0.5 written by default | [rhoCentralFoam](https://tryreynolds.com/docs/solvers/rhocentralfoam.md), any explicit density-based solver |
| Interface | `U dt / h` over interface cells only | 0.5 with `MULESCorr yes`, near 0.1 without | [interFoam](https://tryreynolds.com/docs/solvers/interfoam.md) |
| Diffusion | `nu dt / dr^2` | watch it on low-Reynolds viscous cases | [pimpleFoam](https://tryreynolds.com/docs/solvers/pimplefoam.md) |
| Magnetic | `dt c_A / dy` | not the governing quantity on its own | [mhdFoam](https://tryreynolds.com/docs/solvers/mhdfoam.md) |

**The acoustic limit is the one that surprises people.** At Mach 0.84 it is 2.2 times tighter than the convective step, and at Mach 0.1 it is 11 times tighter. An incompressible step handed to an explicit density-based solver diverges in the first few steps and reads like a bad mesh. It is also why implicit or explicit is a cost question: on one wing the explicit step came from a 165 micrometre prism layer rather than a 4.7 mm shock cell, about 92,000 steps against 6,000 implicit ones.

**The interface limit is separate.** In a two-phase case the air is thin and fast and sets `maxCo`, while the surface moves at the speed of the water. A surface advanced most of a cell per step smears across five or ten cells. `maxAlphaCo` is computed only over interface cells, and `MULESCorr yes` is what makes 0.5 tolerable.

**The diffusion number kills a fine viscous mesh.** On a low-Reynolds annulus, `nu dt / dr^2` of 3.1 was stable and 6.25 diverged, with a Courant number that looked fine. `nCorrectors 4` carried it to 11.5 for about 20% more per step. Holding the Courant number under refinement doubles the diffusion number at every level.

## What sets the cost of a transient run

Measured on a 2D cylinder at Re 100:

| Lever | Effect |
|---|---|
| Cores | tracks cells per rank, not rank count: at 33.6k cells, 4 ranks ran 2.9 times, 8 ran 3.6 times, 16 ran 4.6 times. Below about two thousand cells a rank, the halo costs more than it saves |
| `endTime` | mostly spent waiting for symmetry to break. From an unperturbed start, lift was 1.3e-4 at t = 35. Starting with a 5% transverse component saturated by t = 55 with the same Strouhal number |
| Write frequency | `writeInterval 0.1` to `endTime 250` is 2,500 write times |
| Raising `maxCo` | not a lever. At one outer corrector, `maxCo 5` diverged; extra correctors bought stability and were slower |

Start the bluff-body case with a small asymmetry:

```cpp
internalField   uniform (1 0.05 0);
```

## Writing and restarting

| Entry | Written value | Note |
|---|---|---|
| `startFrom` | `latestTime`, so an interrupted solve resumes | `startTime` instead, with a note, when the directory already holds an older run's times |
| `writeControl` | `adjustableRunTime` with an adjustable step | writes land on round times |
| `writeInterval` | `endTime / writes`, 50 writes by default | also the amount of work an interruption can destroy |
| `purgeWrite` | 3 for steady, 0 for transient | a transient series may be the deliverable |
| `writeFormat` | `binary` with 6 digits from `case_gen.py`, `ascii` from the templates |  |
| file handler | `collated` | one file per rank group rather than per field per rank |

Interruptions happen; `writeInterval` sets how much each costs. A run launched as a loop restarts itself:

```bash
until mpirun -np 4 interFoam -parallel >> log.run 2>&1; do sleep 5; done
```

`scratch.py resume` names the newest time that is whole, checking every file for the end divider OpenFOAM writes last.

## Frequency resolution

A sampling rate sets a Nyquist limit, and a record length sets a resolution. For a force written every step of size `dt` over a duration `T`:

- nothing above `1/(2 dt)` is in the record
- the lowest resolvable frequency is `1/T`
- `spectra.py` wants at least 2 cycles of the frequency it reports and 16 samples

```bash
python3 /work/.toolbox/spectra.py . --column Cl --length 0.1 --speed 1 --strouhal 0.164
```

`--strouhal` checks the frequency you expect against the Nyquist limit first, so a record that could not have held the shedding says so. See [convergence](https://tryreynolds.com/docs/guides/convergence.md).

## Ask the agent

```
Run this transient at a Courant number of 0.7 and give me the Strouhal number with the
number of cycles in the window.
```

```
Tell me the cell that sets my time step, where it is, and what it would cost to move it.
```

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