Sei sulla pagina 1di 7

Exam January 2006

Section A - CFD

SOLUTIONS

Solution 1

a) (i) Governing Equations

The governing equations of fluid flow represent mathematical statements of the


conservation laws of physics.
1. The mass of a fluid is conserved.
2. The rate of change of momentum equals the sum of the forces on a fluid
particle (Newtons second law).
3. The rate of change of energy is equal to the sum of the rate of heat addition to
and the rate of work done on a fluid particle (first law of thermodynamics)

[5 marks]

(ii) Mass Conservation


div( u) 0 [2 marks]
t

Momentum Conservation

( u ) ( p xx ) yx zx
div ( uu) S Mx
t x y z [3 marks]

(iii) Mass Conservation


Rate of increase of mass in fluid element (term one) is equal to the net rate of flow of
mass into fluid element (term two) (assuming no mass source).
is fluid density, t is time and u is velocity.
[5 marks]

Momentum Conservation
Newtons second law states that the rate of change of momentum of a fluid particle
equals the sum of the forces on the particle.

Set the rate of change of momentum of the fluid particle equal to the total force on the
element due to surface stresses plus the rate of increase of momentum due to sources.
The body forces can be described by a source term, SM , of momentum per unit
volume per unit time. p denotes pressure and denotes the viscous stresses.
[10 marks]
b)

(i) The inclusion of more terms in the Taylor series improves the accuracy of the
value for y(x0 + x). From a practical point of view it is important to have an estimate
of the error incurred by truncating the series after a given number of terms. Truncating
the series after the nth term yields an error in y(x0 + x) that is less than.

y n 1 x n 1
max

( n 1)!

y n 1
Where max
is the largest absolute value of the n+1 derivative in the interval
x
Unfortunately we do not know this value and we can only say that the magnitude of
the error varies as xn+1. We estimate that the error is of the order of xn+1 and
designate it as (xn+1)

[4 marks]

In order to identify the values let us say that x0 corresponds to i and the point x0 + x
corresponds to i+1.

We can write the Taylor series as:

yi 1 yi yix (x 2 )

We can now solve for the derivative of y at i, namely:


yi 1 yi
yi (x )
x
[6 marks]
b)
(ii) By using the forward difference representation for the derivative we can write:

yi 1 yi
f ( xi , yi ) OR yi 1 yi x f ( xi , yi )
x
This is the explicit formulation.
The value for yi+1 can be determined directly from the values for x and y at location i,
that is (xi and yi).
We can proceed with the numerical solution by starting with the initial conditions and
use the above equation step by step until the desired range of x is covered. This
approach is known as Eulers Method.
[10 marks]

The backward difference scheme combined with the forward difference scheme above
may be used to formulate a central difference scheme.
If the backward formulation of the derivative is used, the finite difference equation
becomes
yi yi 1
f ( xi , yi ) OR yi f ( xi , yi ) x yi 1
x

From course notes:


Applying the Taylor series for the expansion of the function y from x0 to x0 + x and
from x0 to x0 x gives;
x 2 x 3 x 4
yi 1 yi yix yi yi yiiv ....
2! 3! 4!
and
x 2 x 3 x 4
yi 1 yi yix yi yi yiiv ....
2! 3! 4!
[5 marks]

Subtracting the second equation from the first, and then solving for yi gives:

x 3

yi 1 yi 1 2 yi x yi ....
3
y yi 1 x 2 y yi 1
yi i 1 yi OR yi i 1 ( x 2 )
2x 3 2 x
[5 marks]

The accuracy of the finite difference formulation can be improved by using central
differencing instead of forward or backward differencing. This finite difference
representation is second-order accurate. It is equivalent to fitting a parabola through
the three points yi-1, yi and yi+1 and taking the slope of the parabola at location i.
[5 marks]

[TOTAL 50 MARKS]
Solution 2

Finite Volume Method


a) (i) The explanation should include the idea of flow across a face and the
progression from volume to volume.
Mass flow through a volume

v
v y
y

u
u u x
x
y
v

[5marks]

The finite volume method can in some ways be thought of as a combination of the
finite difference and finite element methods.
If we consider a simple finite volume, or cell, where the centroid of the cell is point P
is the reference point at which we wish to find a numerical analogue of the partial
differential equation.

Face w Face e

Centroid W Centroid P Centroid E


Directions in the domain about the reference point are denoted by the points of a
compass and so the neighbouring volumes are said to have their centroids at W(est)
and E(ast). One boundary is midway between the points W and P at the face w, the
other boundary midway between P and E at the face e.
It can be shown that for some function

U uE uP U u P uW
and
x e xE xP x w xP xW

[5 marks]

(ii) The flow problem may contain a wide variety of features (vortices, boundary
layers, regions of rapid velocity / pressure change, separation regions, etc.) which
need to be modelled by the CFD simulation.
We must be aware of regions where these features may occur so that we can adjust the
mesh accordingly.
If the flow varies rapidly in space, a fine grid of points will be needed to describe the
variation accurately.
This is a consequence of the numerical discretisation techniques, which assume that
the variables vary in some simple way (e.g. linearly) between points or within an
element or volume.
[5 marks]

In some cases a mesh can be modified in such a way as to produce a more realistic
CFD solution.
Some adapt the original mesh to obtain a better fit on the geometry of the flow
problem, this can speed up computational solution of the flow.
Others solve using the original grid then modify the mesh in light of these initial
results, this requires considerable experience.
The two mesh modification strategies are:
Mesh enrichment additional points are placed in the domain at locations where they
are needed.
Mesh adaptation the mesh points are moved so that the density of points is increased
where required.

Clean up CAD geometry and for body fitted grids check that the surface grid
conforms to the CAD geometry.
When using periodic boundary conditions ensure high precision of the interface.
Avoid highly skewed cells, in particular for hexahedral cells or prisms the included
angles between the grid lines should be optimised in such a way that the angles are
approximately 90 degrees. Angles with less than 40 or more than 140 degrees often
show a deterioration in the results or lead to numerical instabilities, especially in the
case of transient simulations.
The angle between the grid lines and the boundary of the computational domain (the
wall or the inlet- and outlet-boundaries) should be close to 90 degrees. This
requirement is stronger than the requirement for the angles in the flow field far away
from the domain boundaries.
Avoid the use of tetrahedral elements in boundary layers.
Away from boundaries, ensure that the aspect ratio (the ratio of the sides of the
elements) is not too large. This aspect ratio should be typically not larger than 20.
Near walls this restriction may be relaxed and indeed can be beneficial.
The code requirements of mesh stretching or expansion ratios (rates of change of cell
size for adjacent cells) should be observed. The change in mesh spacing should be
continuous and mesh size discontinuities be avoided, particularly in regions of high
gradients.
The mesh should be finer in critical regions with high flow gradients, such as regions
with high shear, and where there are significant changes in geometry or where
suggested by error estimators. Make use of local refinement of the mesh in these
regions, in accordance with the selected turbulence wall modelling. The location of a
refinement interface should be away from high flow gradients.
Check the assumption of regions of high flow gradients assumed for the grid with the
result of the computation and rearrange grid points if found to be necessary.
A nalyse the suitability of the mesh by a grid dependency study (this could be local)
where you use at least three different grid resolutions. If this is not feasible try to
compare different order of spatial discretisations on the same mesh
Use the global topology of the mesh to help satisfy the above guidelines.

[10 marks]

b)

(i) A typical discussion on Errors and Uncertainties would include the following:

Typical known errors are the round-off errors in a digital computer and the
convergence error in an iterative numerical scheme. In these cases, the CFD analyst
has a reasonable chance of estimating the likely magnitude of the error.
Unacknowledged errors include mistakes and blunders, either in the input data or in
the implementation of the code itself, and there are no methods to estimate their
magnitude.
Uncertainties arise because of incomplete knowledge of a physical characteristic, such
as the turbulence structure at the inlet to a flow domain or because there is uncertainty
in the validity of a particular flow model being used.
An error is something that can be removed with appropriate care, effort and
resources, whereas an uncertainty cannot be removed as it is rooted in lack of
knowledge.

Sources of errors and uncertainties in results from simulations can be divided into two
distinct sources -- modeling and numerical.
Modeling errors and uncertainties are due to assumptions and approximations in the
mathematical representation of the physical problem (such as geometry, mathematical
equation, coordinate transformation, boundary conditions, turbulence models, etc.)
and incorporation of previous data (such as fluid properties) into the model.
In addition to the source of errors and uncertainty that are introduced by the numerical
model, the CFD engineer can also introduce errors and uncertainties. The process of
performing a CFD calculation is itself complex and requires the engineer to perform a
number of different activities. These typically include:
definition of the problem;
selection of the solution strategy;
development of the computational model;
analysis and interpretation of the results.
All of these steps are potentially error prone or subject to some degree of uncertainty.

There is no universally excepted means of identifying or classifying errors, however


we can adopt the following classification based on seven different sources of error and
uncertainty:
1. Model error and uncertainties;
2. Discretisation or numerical error;
3. Iteration or convergence error;
4. Round-off error;
5. Application uncertainties;
6. User errors;
7. Code errors.

[15 marks]

(ii) Guidelines on checking results:


Dont be seduced into believing that the solution is correct just because it has
converged and produced high-quality colour plots (or even seductive video
presentations) of the CFD simulations. Make sure that an elementary interpretation of
the flow-field explains the fluid behaviour and that the trends of the flow analysis can
be reconciled with a simple view of the flow.
Check conserved variables, including an overall force/momentum balance.
Check that velocities, forces, pressures, etc. have believable values.
Check whether fluid variables such as velocity and pressure are smoothly distributed
over the body and vary rapidly only where expected. Discontinuities may be the result
of poor panel definition or insufficient mesh.
Perform some simple hand calculations to check orders of magnitudes of variables.
Run simple versions of the problem (e.g. with reduced geometry) to get an idea for the
numbers involved.
Make sure that the mean values of engineering parameters derived from the
simulation are computed consistently (e.g. mass-average values, area-average values,
time- average values). Calculation of local and mean engineering parameters with
external postprocessing software may be inconsistent with the solution method of the
code used.
Check that any test data used for comparison with the simulations is also computed in
the same way as the data from the simulation.

[10 marks]

[TOTAL 50 MARKS]

Potrebbero piacerti anche