Title: Computational Fluid Dynamics 5 Lecture 2
1Computational Fluid Dynamics 5Lecture 2
- Professor William J Easson
- School of Engineering and Electronics
- The University of Edinburgh
2Last weeks examples
- Create new working directory
- Create a simple geometry in GAMBIT and mesh
- Solve for laminar flow in the channel
- Present the output in a variety of formats
- Model 1 is incompressible, laminar flow through a
channel - Reynolds numbers must be ltlt Recrit Velocities ltlt
speed of sound if gas - low velocity and/or channel width
- YOU must calculate appropriate numbers
- Garbage in garbage out
3Last weeks examples (cont)
- The main objective of the exercise with the flow
between planes is to familiarise you with the
software - Further numerical experiments before next week
- 3D Laminar flow through a circular pipe
- How does the point of fully developed flow vary
with velocity? - 2D Laminar jet into chamber
- What is the rate of expansion of the jet?
- Attempt some of the GAMBIT tutorials
4Laminar Jet
- How fast does the jet spread?
- How large should the domain be?
- Is a special grid required?
5Discretising equations
6Components of the N-S equations
- Need to know
- values of each variable (eg u) at each point
- values of the first derivative
- values of cross-derivatives
- values of second derivatives
- ..and more
7Forward approximation to value of the 1st
derivative of u in space
u
x
i-1
i1
i
dx
8Rearward approximation to value of the 1st
derivative of u in space
u
x
i-1
i1
i
dx
9Central approximation to value of the 1st
derivative of u in space
u
x
i-1
i1
i
dx
10Approximations to values of the 1st derivative of
u in space
u
forward
rearward
central
x
i-1
i1
i
dx
111st 2nd Order Finite Difference
1st order forward difference
1st order rearward difference
2nd order central difference
12Discretising equations(Anderson)
The value of the variable, u, at the grid point
i1,j can be approximated by a Taylor expansion
131st 2nd Order Finite Difference
From the previous equation, we can find
expressions for the derivatives
1st order forward difference
2nd order central difference
2nd order central difference
14Practical consequences of discretisation
- Errors arise from spacing of grid needs to be
small enough to represent the key aspects of the
flow - Errors arise from the order of the equations
- 1st order should generally not be used
- Only 2nd order solutions are acceptable for
journal publication
15Testing solution
- Start with a coarse grid
- Solve the problem
- Double the grid density
- Compare with the first solution
- If the values have not changed significantly, it
is likely that the solution is grid-independent - If the values have changed significantly,
continue until they stop changing
16Week 2 - example
- Flow over a backward-facing step
- Flow expands and leaves a recirculating vortex
behind the step - Solve to 2nd order and maintain laminar flow
- How long does the domain have to be to ensure
that the solution is valid - Upstream?
- Downstream?