---
title: "Tutorial: describe a shape and get a checked OpenFOAM mesh with the cad tool"
url: "https://tryreynolds.com/docs/tutorials/cad-to-mesh"
description: "Describe a geometry in words or point at a CAD file, let the meshing agent build, measure and revise it, and read the finish conditions that decide whether you have a mesh or only a message."
---

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

Workflows

# From CAD words to a mesh

Describe a geometry in words or point at a CAD file, let the meshing agent build, measure and revise it, and read the finish conditions that decide whether you have a mesh or only a message.

The `cad` tool takes a shape in words, or a STEP or IGES file on the workspace, and returns an OpenFOAM mesh. You will write a request that can be measured, read what comes back, and refuse one that is not a mesh.

**You will learn** what to put in a geometry request, the conditions a finished mesh has to meet, and how to ask for an independent look.

**You need** a session. Allow ten minutes; the tool runs a second agent on the same instance.

## The idea

You describe, the meshing agent builds, renders, measures and revises. It picks the mesher: `blockMesh`, gmsh, `snappyHexMesh` or cfMesh. Saying it is done does not end it. The finish is a check on disk:

- there is a `constant/polyMesh`,
- `checkMesh` passes,
- every boundary patch has a name somebody chose,
- there is a script that rebuilds it from empty.

It returns the picture, the patch table with each patch's area and normal, `checkMesh`'s verdict, the script, and where the case is. **A mesh only.** Fields, boundary conditions and the solve stay with the main agent.

## Steps

### Write a request that can be measured

Give sizes with units, which end is the inlet, whether it is a plane case or a volume, and the properties that have to be right. This is a prompt from the repository's own acceptance set:

```
Use the cad tool. A plane (2D) U-bend duct in water. The passage is 10 mm wide throughout. Both legs run horizontally, 120 mm long, and are joined by a 180 degree bend whose centreline radius is 15 mm. The inlet is the open end of the lower leg and the outlet is the open end of the upper leg. Mesh it for an incompressible solve.
```

Its measurable properties are the passage width at the inlet, mid-leg and crown, both leg lengths, the centreline radius, the included angle, and that the mesh is exactly one cell thick with both sides typed `empty`.

### Ask for the measurements, not the message

```
Report the passage width at the inlet, at mid-leg and at the crown, both leg lengths, the bend's centreline radius and included angle, the number of cells through the thickness, and the patch table. Each measured off the mesh, not quoted from the request.
```

### Point it at a file

```bash
openreynolds push part.step
```

```
Use the cad tool on part.step. Take the fluid volume inside it, cap the openings, remove fillets too small for the cell size, and mesh it. Name the inlet, the outlet and the walls separately. Tell me the unit the file declares.
```

Give it a drawing or a coordinate table as an input instead when the file is material to work from and not the part itself.

### Get a second opinion

```
Run mesh_review on that mesh: is it the shape I asked for?
```

A fresh model that did not build it looks at several views and fails it only for something that would change the CFD answer. It does not run `checkMesh` and changes nothing.

### Look for yourself

```bash
python3 /work/.toolbox/mesh_look.py .
python3 /work/.toolbox/layer_report.py .
python3 /work/.toolbox/mesh_quality.py .
```

`mesh_look.py` is one picture with a colour per patch and the measured table. `layer_report.py` says how much of each wall carries a prism layer, read off the mesh. A mesher that reports layers and then loses them can exit 0.

## Read the result

A finished mesh has a **patch table with areas**. Check the inlet area against your sizes: a 10 mm passage has an area of 0.01 m times the depth. A mesh can be perfect and the wrong shape, so compare three numbers before looking at quality.

A **refusal is a result**. A STEP with no declared unit is refused, and the main agent asks you. It does not guess, because the factor of 1000 gives a plausible mesh, a converged solve and completely wrong forces.

The repository's acceptance runs include ones that stopped at their step limit with no mesh, and their record says so. Read the verdict on disk, not the prose.

![A mesh from a published study: a staggered tube bundle, with graded refinement wrapping every cylinder.](https://tryreynolds.com/assets/bundle-mesh-BfR8Qn6L.png)

A mesh from a published study: a staggered tube bundle, with graded refinement wrapping every cylinder.

## Check it

- **Measured properties** against the request.
- **`checkMesh`** verdict, and the worst cells by location with `mesh_quality.py`.
- **The script.** Ask for it to be rerun from an empty directory.

## Try next

1. Ask for a sphere of 40 mm in an open flow domain with prism layers, and then ask for achieved layer coverage.
2. Ask for two cell zones, for a heat source and a sink.
3. Give it an impossible specification and read how it declines.

## When it goes wrong

### It came back without a mesh

The message names what is missing: no `polyMesh`, no boundary faces, no build script. Give it a smaller request, or fix the geometry first with [import and clean](https://tryreynolds.com/docs/tutorials/import-step-stl.md).

### The layers are not there

Reported layers and present layers differ. Read `layer_report.py`. For a difficult wall, ask for cfMesh, whose layer stage extrudes a sheet and cannot remove faces afterwards.

### The shape is close but not the one I asked for

Say what is wrong with a number, such as the bend radius. A vague correction gives a vague revision.

## Next

[Import and clean a STEP or STL](https://tryreynolds.com/docs/tutorials/import-step-stl.md).

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