---
title: "solidDisplacementFoam: stress and deflection with Reynolds"
url: "https://tryreynolds.com/docs/solvers/soliddisplacementfoam"
description: "Small-strain linear elasticity with thermal stress in OpenFOAM: the one switch that turns temperature on, the trap in the temperature field, the template that writes a whole case with an exact answer, and how close the solver came to it."
---

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

OpenFOAM solvers

# solidDisplacementFoam

Small-strain linear elasticity with thermal stress in OpenFOAM: the one switch that turns temperature on, the trap in the temperature field, the template that writes a whole case with an exact answer, and how close the solver came to it.

`solidDisplacementFoam` is OpenFOAM's linear-elastic solver: a displacement field in a solid, with optional heat conduction and thermal stress. It answers the question that follows most thermal runs, which is what the heat did to the metal.

|   |   |
|---|---|
| Equations | Segregated small-strain elasticity, and optional transient conduction |
| Constitutive law | `sigma = 2 mu symm(grad D) + lambda I tr(grad D) - I 3 K alpha T` |
| Plane states | Plane stress or plane strain, one switch |
| Template | [`templates/thermal_stress.py`](https://tryreynolds.com/docs/toolbox/templates.md), a complete case with an exact answer |
| Grader | `benchmarks/thermal_stress/grade.py`, and a check at image build |
| Runs on | Hosted, Docker, native OpenFOAM |

## What it solves

Displacement `D` in a linear elastic solid, marched through a time loop so that thermal diffusion can be transient. With `d2dt2Schemes steadyState` the loop is the heat relaxing while the stress stays quasi-static; it is not the bar ringing.

## When to choose it

| Choose it for | Use instead |
|---|---|
| A thermal stress, a pressure vessel, a bracket, a constrained part that is heated | [`solidEquilibriumDisplacementFoam`](https://tryreynolds.com/docs/solvers/solidequilibriumdisplacementfoam.md) for a steady deflection with no time loop |
| Small strains, linear material | Not supported: plasticity, large rotation, contact, composites with a real constitutive law |
| A load from a fluid, one way: take the pressure from a CFD run and apply it | A structure that deforms and changes the flow. There is no two-way coupling here |

## Ask for it

> A steel bar held between two rigid walls is heated 100 K on one face. What is the stress, under both plane stress and plane strain, and does the ratio come out at 1/(1 minus nu)?

> Take the wall temperatures from this conjugate run and give me the thermal stress in the casting.

## Run it yourself

```bash
mkdir bar && cd bar
cp /work/.toolbox/templates/thermal_stress.py .
python3 thermal_stress.py                     # gmsh mesh, retype, checkMesh, both exact answers printed
solidDisplacementFoam
postProcess -func "components(sigma)" -noZero
postProcess -func singleGraph -noZero         # the profile the grader reads
```

Edit `BAR_HEIGHT_M` and `DELTA_T_K` at the top. The template takes no options and does not launch the solver. It is a 0.04 by 0.02 m bar, 20 cells across, steel (E 2.0e11 Pa, nu 0.3, alpha 1.1e-5 /K, k 60.5 W/m/K), with an `endTime` of 100 s against a 2.28 s conduction time.

| File | Contents |
|---|---|
| `0/D` | `fixedValue (0 0 0)` on the hot face, `tractionDisplacement` with zero traction on the free face, `symmetryPlane` at the ends, `empty` front and back |
| `0/T` | A temperature **rise** above the stress-free state |
| `constant/mechanicalProperties` | `rho`, `nu`, `E`, `planeStress` |
| `constant/thermalProperties` | `C`, `k`, `alpha`, `thermalStress yes` |
| `system/fvSolution` | `D` and `T` on GAMG to 1e-10, and `stressAnalysis` with `compactNormalStress yes`, `nCorrectors 3`, `D 1e-09` |
| `system/fvSchemes` | `leastSquares` gradients, `laplacian(DD,D)` and `laplacian(DT,T)` corrected |

## The trap

`T` is a rise, not an absolute temperature. The thermal term uses it raw, and there is no reference temperature to subtract. An ambient 300 in `0/T` asks for the stress of a 300 K rise from absolute zero, about -660 MPa on steel. The distribution's own tutorial has exactly that field and gets away with it because its `thermalStress` is `no`.

## Checks

| Check | How |
|---|---|
| Stress against a closed form | `sigma_xx = -E alpha T` in plane stress, `-E alpha T / (1 - nu)` in plane strain |
| The ratio of the two states | Exactly `1/(1 - nu)`, 1.428571 at nu 0.3. It needs no reference data, and it catches a wrong `nu` that the plane-stress number cannot see |
| Components that must be zero | `sigma_yy` and `sigma_xy` everywhere |
| `max sigmaEq` | Equals the hot-face stress, so one line in the log carries the answer |
| Mesh | The answer does not depend on the mesh, so whatever difference remains is the mesh. `blockMesh` reproduces it to 0.00% |

## When it goes wrong

| What you see | Cause |
|---|---|
| No thermal stress at all | `thermalStress` is `no` |
| Hundreds of MPa in an unloaded part | An absolute temperature in `0/T` |
| A stop on the first step | `compactNormalStress` and `nCorrectors` are required entries in `stressAnalysis` |
| A staircase in the sampled profile | A `uniform` sample returns each cell's value about five times. The template samples `midPoint` |
| Stress that rises with the number of cells | A singular corner. Report the stress away from it |

## Evidence

Graded on every pull request, in the workspace image:

| Quantity | Exact | Measured |
|---|---|---|
| `sigma_xx` against `-E alpha T` at the solver's own `T`, plane stress | 0 error | RMS 0.094%, max 0.300% of 220 MPa |
| Hot face, plane stress and plane strain | -220.0000 and -314.2857 MPa | -220.2858 and -314.6932 MPa, +0.130% each |
| Ratio of the two states | 1.428571 | 1.429471, +0.063% |
| `max sigmaEq`, uniform mesh | exact | 0.00% |

[One bar, two idealisations](https://tryreynolds.com/studies/constrained-bar-thermal-stress.md) is the published run.

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