CFD Tutorial no. 7 — CFD calculation convergence
Reading a calculation while it runs

This CFD calculation convergence tutorial teaches you to read residuals, forces and divergence signals live.

Start with tutorial no. 1

CFD calculation convergence: tutorial on reading a run in progress

CFD Tutorial no. 7 of 20. The steps described here are those of the HELICIEL CFD Tool window, opened from Heliciel: they assume the PRO CFD/BEM extension is active. The preset values quoted are those of the catalogue supplied with the software; the numerical results depend on your geometry and your operating point, and are to be read in the software.

A calculation that stops is not a calculation that has converged. This is the most useful distinction in all of CFD practice, and the one that separates a publishable result from a meaningless number. This CFD calculation convergence tutorial teaches you to make it, live, in Heliciel PRO CFD/BEM's Logs tab.

  1. The two criteria, and why you need both
  2. Reading the residuals
  3. Reading force stabilisation
  4. Setting up the parallel run
  5. Clean stop and resume
  6. Recognising a divergence

1: The two criteria, and why you need both

CFD calculation convergence is judged on two independent criteria, and Heliciel tracks both of them.

The first is the residual : at each iteration, the solver measures by how much its solution still fails to satisfy the equations. A residual that drops several orders of magnitude indicates that the system is being solved.

The second is force stabilisation : you look at the quantity the engineer cares about — thrust, torque, lift — and check that it no longer moves.

Why two ? Because they fail differently. A calculation can show low residuals with forces that are still slowly drifting : the solution is locally consistent but the overall flow is not established. Conversely, stable forces with high residuals often signal a numerical stall, not convergence. Neither one is sufficient on its own.

Logs tab during a calculation with the equation residuals decreasing
The Logs tab while solving: the residual of each equation, iteration after iteration

2: Reading the residuals

The target residual is not entered by hand : it is part of what the solver preset brings, along with the algorithm, the schemes and the relaxations. In the OpenFOAM Solver frame of the Parameters tab, you are only asked for one thing — the preset — and the list offered depends on the type of case open :

Type of case openPreset offeredWhat it handles
Propeller, rotor, turbinePropeller (Phase 1 MRF → Phase 2 Sliding)
the only one
The whole rotor chain : Phase 1 in steady state with the rotating zone frozen, then Phase 2 with the mesh actually rotating. No other choice to make.
Wing, airfoil, objectStableDifficult geometries, calculations that spin out of control
Standard (Wing)The default, and the right choice in the vast majority of cases
AggressiveFast convergence when the mesh is sound
PreciseHigher accuracy requirement, longer run

A propeller therefore offers only one solver preset. This is not a poverty of the interface, it is the result of a sort : the combinations that hold up on a rotor have been tried, and only one was kept. The real decision lies elsewhere — in the mesh preset, eight levels for a free rotor, four for a closed duct — and the estimate displayed right next to it gives you, for each of them, the expected cell count and meshing time, drawn from cases already run on this machine. Choosing in CFD, here, means trading off accuracy against duration ; the rest is already done.

What to look at is not the absolute value but the slope. Residuals dropping steadily from 1e-1 towards 1e-5 are healthy. Residuals stuck on a plateau at 1e-2 for hundreds of iterations say that something is stalling — most often mesh quality.

3: Reading force stabilisation

The force monitor compares the average force over two sliding time windows, and considers convergence reached when the relative variation drops below a threshold of the order of a percent. It writes its verdict plainly in the logs, with the variation obtained and the target aimed for.

For a rotor, this monitor reads the forces on the blades alone, hub excluded, and also compares them to the project's BEM reference. This double reading is valuable : a force that stabilises far from the BEM value is stabilising on an artefact.

In unsteady Phase 2, the notion changes nature. Forces oscillate at the blade-passing frequency and have no reason to become constant : the result is the average over the last revolution, and convergence means this average no longer drifts from one revolution to the next.

force stabilisation curve with the two sliding windows compared
Force stabilisation: two sliding windows compared, and the threshold below which the calculation stops

4: Setting up the parallel run

Process frame of the Parameters tab. The number of processes splits the domain into that many sub-domains, computed in parallel and then stitched back together.

The recommendation is constant : use the number of physical cores on the machine, not the number of logical cores. Hyperthreading adds nothing to a calculation bound by memory bandwidth, and it often makes the result slower.

The Hardware diagnostic button of the Guide tab surveys what the machine has and flags what is missing from the chain — it is the first place to look when a parallel mesh refuses to start.

Finally, note that meshing itself is also parallelised : the domain is split before the snapping step onto the geometry, then reconstructed afterwards. This is why a case folder temporarily contains per-processor subfolders.

5: Clean stop and resume

When convergence is detected, the solver does not stop abruptly : it finishes its iteration, writes the fields, and stops. This is what keeps the case rereadable.

The Stop button in the toolbar requests the same clean stop by hand. Use it without hesitation when the logs show that the calculation is going nowhere : nothing is lost, the case keeps its last written state.

To resume : File > Open a CFD case, point to the folder, and relaunch. Heliciel detects the case type, the mesh state, and for a rotor the phase reached. An interrupted calculation restarts from its last save, not from the beginning.

clean stop message in the logs with fields written and phase marker
The clean stop: the solver writes its fields before handing back control, and the case stays rereadable

6: Recognising a divergence

The signals that should make you stop a calculation without waiting :

The remedy, on a propeller, fits in one line : step up one notch of mesh preset. It is counter-intuitive — you make the calculation heavier to stabilise it — but a better-resolved surface always beats a throttled solver, and it is in any case the only lever the interface leaves you, since the solver preset is unique for a rotor. On a wing or an object, first try the Stable solver preset, designed for geometries that resist ; if that is not enough, step up the mesh.

CFD test bench status bar with memory processor and elapsed time during a calculation
The status bar during a calculation: memory, processor and time — the three figures to watch

The full set of twenty CFD tutorials

« Previous: Comparing BEM and CFD  |  Next: Turbulence models »

  1. First CFD propeller simulation
  2. Reading the OpenFOAM case folder
  3. Choosing the mesh preset
  4. The MRF zone and Phase 1
  5. Phase 2 with sliding mesh
  6. Comparing BEM and CFD
  7. Reading the convergence of a run (you are here)
  8. Turbulence models
  9. Boundary layer and y+
  10. Reading a pressure map
  11. Where the forces come from
  12. Checking an airfoil polar
  13. Marine propeller and cavitation
  14. Wind turbine and tidal turbine
  15. Fan in a closed duct
  16. Aircraft propeller, cruise and static thrust
  17. The optimisation loop
  18. Calibrating on a reference
  19. From the hull to the propeller
  20. The deliverable calculation file

This series accompanies the Heliciel design tutorials, which cover the BEM part: blade design, rotation speed choice, performance curves. CFD comes after them, to verify and to see.