III.3 Full Solution
This is a good point to recap the methodology involved in CFD. To solve a fluid flow problem
we need to
- Build up a mathematical model of the problem
- This will certainly involve the NSE, and may involve additional modelling of
other effects such as turbulence, combustion. . .
- Discretise the equations on a mesh
- This converts the PDE’s of the mathematical model to difference equations
which the computer can manipulate
- Solve the discretised equations
- At a basic level, this involves inverting matrix equations produced from the
discretisation of the original PDE’s. However the NSE are nonlinear and
strongly coupled, and we must use sophisticated solution algorithms such as
PISO and SIMPLE, depending on the type of problem being investigated.
- Analyse the results
- We need to check that the results we get make sense physically, and we may
need to process the data to extract the information we are interested in.
Thankfully a lot of this work has been done, and commercial codes are available which
implement all of these stages, for example Fluent. From the perspective of using a commercial
code, the following steps are necessary :
- Define the geometry
- This may be done interactively by the user, or CAD descriptions may be
imported
- Generate the mesh
- Automatic mesh generators are included in many CFD codes, which also have
commands for doing this manually
- Switch on physical models
- Additional physical models such as for combustion are often included as
options which need to be specified
- Specify physical constants
- Properties of the fluid such as density and viscosity need to be set!
- Define initial/boundary conditions
- Specify numerical parameters
- Options relating to the numerical scheme, such as timestep (for PISO) and
underrelaxation factors (for SIMPLE) need to be specified.
- Run the solver
- (. . . and go for a beer - these things often take a long time to run)
- Postprocess results
- Much information can be derived from presenting the resulting data
graphically, plotting velocities as vectors and other quantities as contour plots.
More sophisticated visualisation techniques are also available (flow ribbons,
isosurfaces). Quantitative results can also be extracted, such as the drag on
surfaces from the near-wall flow. This information can be used to check the
correctness of the solution, as well as hopefully answering the questions being
asked about the flow.