8.10Building a CFD simulation

The examples in this chapter aim to demonstrate the general principles of CFD described in the previous chapters. They also highlight other important aspects of CFD, e.g. mesh generation. To ﬁnish with, here is some advice on building CFD simulations.

Before doing a simulation it is important to deﬁne its purpose, including the information you want to obtain. Initial data about the problem should be gathered, including the solution domain and boundaries, ﬂow conditions, and models and properties that might be used. The ﬂow should be estimated to establish whether the ﬂow is laminar or turbulent (Chapter 6 ).

It is important to recognise that eﬀective CFD simulations are not created in one attempt. Instead, they follow a typical design process, as shown below.

The process is iterative, beginning with a prototype simulation. The prototype should be as simple as possible in order to reach the ﬁrst successful test quickly. Once achieved, the design cycle is set in motion and, thereafter, the simulation can be evaluated and improved in incremental steps, following the cycle above. Any problem can be attributed to the most recent change, which is much easier to diagnose when the change is small.

Simulations need to run quickly so that frequent, small changes can be tested eﬃciently. They run in a few minutes on a mesh of cells, which is a good initial size for the prototype. Steady-state solutions (Chapter 5 ) run particularly quickly.

Fields, e.g. , must be initialised and the boundary conditions applied (Chapter 4 ) early in the design process. The prototype can include simple conditions, e.g. ﬁxed value for , before switching to more complex conditions, e.g. a heat ﬂux for .

If the ﬂow is turbulent, robust RAS models should be deployed initially (Chapter 7 ). The prototype mesh size dictates that boundary layers are inevitably modelled using wall functions.

If a prototype simulation fails to run, numerical causes should be investigated, starting with mesh quality, e.g. non-orthogonality. Problems with discretisation schemes can be eliminated by applying the most stable schemes ﬁrst, e.g. upwind (Chapter 3 ).

The initial simulations may simply establish a basic ﬂow, solving mass and momentum conservation (Chapter 2 ) with simplifying assumptions, e.g. the incompressibility condition. The physical models should be simple, using constant properties.

The incremental changes to the simulation then incorporate additional models and equations. Often they require additional ﬁelds, boundary conditions, discretisation schemes, etc.

Beyond that, the simulation may venture into more complex areas of CFD modelling, including multiphase ﬂows, conjugate heat transfer, compressible ﬂows, reactions, particle methods and large-eddy simulation — outside the scope of this book.

However, the general principles presented in this book still apply whether a CFD simulation is simple or complex. And when simulations are more complex, they fail just as often because of a lack of adherence to these principles as for any other reason.

Notes on CFD: General Principles - 8.10 Building a CFD simulation