---
title: "rhoSimpleFoam: steady compressible flow with Reynolds"
url: "https://tryreynolds.com/docs/solvers/rhosimplefoam"
description: "The steady, pressure-based compressible solver: its Mach range, the transonic switch, the thermophysical properties and boundary conditions the toolbox writes, the scheme choices that decide whether a shock survives, and the failure modes with no log line."
---

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

OpenFOAM solvers

# rhoSimpleFoam

The steady, pressure-based compressible solver: its Mach range, the transonic switch, the thermophysical properties and boundary conditions the toolbox writes, the scheme choices that decide whether a shock survives, and the failure modes with no log line.

`rhoSimpleFoam` is the compressible twin of [`simpleFoam`](https://tryreynolds.com/docs/solvers/simplefoam.md): steady, pressure-based, SIMPLE on a pressure equation that carries density. It is the cheapest compressible solver and the right first run wherever there is no strong shock to place.

|   |   |
|---|---|
| Equations | Steady compressible RANS with energy, perfect gas |
| Pressure | Absolute static pressure, Pa |
| Mach range | About 0.3 up to the point where a shock is the answer |
| Transonic switch | `transonic yes` from Mach 0.7, set by the writer |
| Case writer | [`compressible.py --solver rhoSimpleFoam`](https://tryreynolds.com/docs/toolbox/case-writing.md) |
| Turbulence | Laminar, `SpalartAllmaras` (default), `kOmegaSST`, `kEpsilon` |
| Runs on | Hosted, Docker, native OpenFOAM |

## What it solves

```
div(rho U) = 0
div(rho U U) = -grad(p) + div(tau)
div(rho U h) + div(rho U K) = div(alphaEff grad h) + ...
p = rho R T
```

The energy variable is enthalpy, `sensibleEnthalpy`. A pressure equation is formed from continuity and momentum. Below Mach 0.7 it is the subsonic form; with `transonic yes` it carries `div(phid,p)`, the compressible flux of pressure.

## When to choose it

- Ducts, passages, heat exchangers, subsonic and mildly transonic external flow.
- A nozzle running below the point where a shock forms.
- The loads and a starting field, knowing that the shock will be smeared.

| The question | Use instead |
|---|---|
| Where is the shock, how strong, where does the lambda structure merge | [HiSA](https://tryreynolds.com/docs/solvers/hisa.md), or [`rhoCentralFoam`](https://tryreynolds.com/docs/solvers/rhocentralfoam.md) for a transient |
| Mach 1 and above | A density-based solver. A pressure equation has no characteristic running upstream to carry it |
| Mach below 0.3 | [`simpleFoam`](https://tryreynolds.com/docs/solvers/simplefoam.md), which answers the same question more cheaply |

The reason is a measurement. On a 1.79 million cell ONERA M6 wing a pressure-based run converged with drag flat to six figures over 3,228 iterations and produced no shock at any of seven span stations, lift 22% low and drag 50% high. The mesh was not the problem. The schemes were, and refining does not move a front that is eight or ten cells wide because the scheme made it so.

## Ask for it

> Compressible flow through this passage at Mach 0.45, steady. Report total-pressure loss on a flux-weighted mean.

> Run this transonic aerofoil with rhoSimpleFoam for the loads only, and say plainly that you are not claiming a shock position.

## Run it yourself

```bash
python3 /work/.toolbox/compressible.py /work/case --mach 0.45 --t 288.15 --p 101325 \
    --solver rhoSimpleFoam --study steady --body wing
rhoSimpleFoam
```

| Option | Meaning |
|---|---|
| `--mach` or `--speed` | One or the other; the second follows from the speed of sound at `--t` |
| `--p`, `--t` | Static pressure in Pa absolute and static temperature in K |
| `--mu` | Refit the Sutherland coefficient so the law reproduces this viscosity |
| `--turbulence` | `auto` is laminar below Re 2300 and `SpalartAllmaras` above |
| `--farfield` | Patches that stand for unbounded fluid, crossed both ways, so neither inlet nor outlet |
| `--aref`, `--lref` | Reference area and length. On a 3D body there is no default area, and only `forces` in newtons is written without one |
| `--up` | Which axis lift is measured towards |

Name the solver. With `--solver auto` the script prefers HiSA wherever it is installed, at any Mach number, so `rhoSimpleFoam` is chosen on its own only on a machine without HiSA, below Mach 1 and for a steady study.

## Boundary conditions

| Patch | U | p | T |
|---|---|---|---|
| Subsonic inlet | `fixedValue` | `zeroGradient` | `fixedValue` |
| Supersonic inlet | `fixedValue` | `fixedValue` | `fixedValue` |
| Subsonic outlet | `inletOutlet` | `waveTransmissive` with `fieldInf` and `lInf` | `inletOutlet` |
| Supersonic outlet | `zeroGradient` | `zeroGradient` | `zeroGradient` |
| Far field | `freestreamVelocity` | `freestreamPressure` | free stream |
| Wall | `noSlip` | `zeroGradient` | adiabatic, `zeroGradient` |

A `fixedValue` pressure at a subsonic outlet is a reflecting wall for pressure waves: an arriving shock comes back as an expansion. Every wall is adiabatic, and no flag for an isothermal one is offered, because nothing has run one. `alphat` carries `compressible::alphatWallFunction` with `Prt 0.85`.

## Thermophysical model

`hePsiThermo`, `pureMixture`, `perfectGas`, `sutherland` transport, `hConst`. Molar mass 28.9644 kg/kmol, `gamma` 1.4 with Cp computed from it, Sutherland `As` 1.458e-6 and `Ts` 110.4 K. `hConst` is a sound choice below about 1000 K; `janaf` is the honest one above. The speed of sound, the density, the viscosity and the Reynolds number are read back out of the file that was written.

## Settings that matter

```
div(phi,U)   bounded Gauss limitedLinearV 1;
div(phid,p)  bounded Gauss limitedLinear 1;
div(phi,h)   bounded Gauss limitedLinear 1;
gradSchemes  default Gauss linear;          // unlimited, on purpose
SIMPLE       transonic yes (M >= 0.7), residualControl p 1e-4, U 1e-5, h 1e-5
relaxation   p 0.3, rho 0.05, U 0.7, h 0.7
```

- A fully limited `grad(U)` reverts to first order at every extremum, and a shock is one. A coefficient nearer 0.33 keeps the limiter once the start-up is past.
- Upgrading `div(phi,U)` while `div(phid,p)` stays `Gauss upwind` leaves the term that carries the compression at first order.
- Density is relaxed hard and pressure softly. An under-relaxed density keeps a transonic start from going negative.

## Checks

| Check | How |
|---|---|
| Is the solver the right class for the answer | `preflight.py --resolve shock` reads the solver and the schemes in about a second |
| Mass conserves between stations | `balance.py`. A steady compressible solve that does not conserve mass has not solved the equations |
| Stagnation conditions are consistent | `nozzle.py --mach M` for the exact relations |
| Forces are in newtons | `forceCoeffs` with `rho rho`, not `rho rhoInf` |

## Parallel running

Median cost 3.6 microseconds per iteration per cell held by a rank (15 runs, 4 cases). Memory has one measurement behind it: about 1,700 bytes per cell on a 1.7 million cell `rhoSimpleFoam` run at two ranks.

## When it goes wrong

| What you see | Cause |
|---|---|
| Converged, smooth, and no shock | Smearing scheme. A density-based solver is the remedy, not a finer mesh |
| Flat residuals under heavy under-relaxation, and mass flow in differs from mass flow out | The solution is frozen, not converged. [A nozzle](https://tryreynolds.com/studies/converging-diverging-nozzle.md) run this way was out by a factor of three and was discarded for a [`rhoPimpleFoam`](https://tryreynolds.com/docs/solvers/rhopimplefoam.md) march that conserves |
| Nothing at all in the log, and a transonic case on the subsonic equation | `transonic no`. The writer sets it from the Mach number |
| Zero or negative density | A gauge pressure of 0 written as an absolute one. 0 Pa absolute is a vacuum and `perfectGas` divides by it |
| Coefficients out by exactly 1.2 or by rho | The incompressible `rhoInf` form carried over |
| Stops at construction | The energy variable does not match the solver |

## Evidence

There is no graded `rhoSimpleFoam` case in continuous integration. [The ONERA M6](https://tryreynolds.com/studies/onera-m6-transonic.md) study is the record of where it stops and [HiSA](https://tryreynolds.com/docs/solvers/hisa.md) takes over, [where the incompressible assumption fails](https://tryreynolds.com/studies/where-incompressible-fails.md) is the Mach arithmetic, and [`nozzle.py`](https://tryreynolds.com/docs/solvers/nozzle.md) is the exact reference a duct case is held to. Compressible cases graded against experiments are on [validation](https://tryreynolds.com/validation/index.md).

## Compared with experiments

| Case | Quantity | Difference |
|---|---|---|
| [Subsonic round jet at acoustic Mach 0.5](https://tryreynolds.com/validation/bridges-wernet-jet.md)Bridges & Wernet (2011) | Centreline velocity, x/D = 1 to 25 | 5.4% rms |
| [Thermal entrance of a pipe, turbulent air](https://tryreynolds.com/validation/boelter-pipe-thermal-entrance.md)Boelter & Iversen (1948) | Local conductance, Re 48,800, 17 sections | 6.1% rms |

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