8.10 Building 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 finish with, here is some advice on building CFD simulations.

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

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

PICT\relax \special {t4ht=

The process is iterative, beginning with a prototype simulation. The prototype should be as simple as possible in order to reach the first 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 efficiently. They run in a few minutes on a mesh of eqn cells, which is a good initial size for the prototype. Steady-state solutions (Chapter 5 ) run particularly quickly.

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

If the flow 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 first, e.g. upwind (Chapter 3 ).

The initial simulations may simply establish a basic flow, 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 fields, boundary conditions, discretisation schemes, etc.

Beyond that, the simulation may venture into more complex areas of CFD modelling, including multiphase flows, conjugate heat transfer, compressible flows, 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