Issue 042 – April 17, 2021

Solvers, Smoothers & Schemes

Hey there,

It’s Robin from CFD Engine & it’s all about solution strategies this week – the solvers, smoothers & schemes that make your simulations tick. I’m not recommending anything in here (other than some good reading) rather, I want to know…

“What are the choices you make to ensure your cases run smoothly?”

This is motivated partly by nostalgia, partly by lost hours watching residuals (don’t tell me you don’t do it) & partly by nosing around in fvSchemes & fvSolution (I hadn’t realised the number of permutations there are, even for simple cases like mine) 🤯

How exotic is your simulation strategy? And can you remember how it got that way? Are there bits that’ve been in there so long, you’ve forgotten whether you actually still need them?

I’d love to hear about it, but first a bit of background & context…

The olden days

Whilst setting up a new project I accidentally disappeared down the rabbit hole that is the choice of solvers, smoothers & schemes available in current OpenFOAM releases – it runs deep, approach with caution.

That, in turn, took me back to the olden days when I was a junior CFD button-presser, using Fluent.

We used to run 500 iterations with first-order schemes & then we switched it up a notch for the remainder of the run. That was about as complicated as it got – which was complicated enough seeing as it was done with journal files which were fragile to say the least.

I also vaguely recall some office folklore that meant we always initialised cases twice – “because they ran better” – although I may have got that back to front 🤔

I’m sure there was more going on, I just wasn’t party to it.

Nowadays

Fast forward to the present & here’s what my typical solution “strategy” looks like (for steady-state, low-speed, turbulent, external aerodynamics):

  • I try for the lowest non-orthogonality I can manage, given complex input geometry (≤ 60) – if checkMesh flags it I try to fix it;
  • I use potentialFoam -writephi to initialise the flow field;
  • I favour second-order schemes from the start, with first-order for turbulence quantities if they struggle;
  • I use relTol (relative tolerance) to limit the number of linear solver iterations – favouring faster iterations over “deeper” convergence per iteration;
  • I typically use GAMG & smoothSolver solvers with GaussSiedel smoothers;
  • I don’t change the schemes, solvers or smoothers during a simulation;
  • I use the SIMPLEC method, with the usual tight (0.9) under-relaxers;
  • I don’t use residual control, preferring forces as my key convergence metrics – they usually lag behind residual convergence in my cases anyway;

And that’s about the size of it – pretty vanilla – but I’m interested to hear about yours, especially if it’s a bit more tricksy.

How do you do it?

I’m not short of ideas to test, so I’m not looking for ideas to improve my “strategy” – but I’m keen to hear what works for you.

Do you change schemes or solvers during a run? Do you tweak under-relaxers while solving? Do you do a soft start, ramping up the physics (or numerics) as the flow field establishes? Do you interpolate results from another run as your starting point?

What do you solve & what are your go-to solution strategies? How complex does it get out there in CFD-land?

Conversely, if you’re interested in this kind of stuff, but wondering where to start, here’s a great primer, specifically for OpenFOAM – FVM Crash Introduction by Wolf Dynamics. Don’t let the equations scare you at the start, it gets really practical later on – check it out, you’ll like it.

Until next week, stay safe,

Signed Robin K