Computational Fluid Dynamics assignment

profilePPPan
assg1.pdf

AMME5202 Assignment 1: Advection and Diffusion

Due: 5pm Friday, Week 7 (27/04/2016)

Submit online via Turnitin.

This assignment should take a typical student 20 hours to complete.

In this assignment we will consider the two-dimensional advection diffusion equation for a

unitless scalar σ(x,y,t),

∂tσ + ∂x(uσ) + ∂y(vσ) = κ (∂x∂xσ + ∂y∂yσ) .

You can imagine this represents any scalar quantity such as temperature. The diffusivity is

κ = 5 × 10−7 m2 · s−1 and the initial condition is a Gaussian hill given by the formula,

σ(x,y, 0) = exp ( −800 ·

( x2 + (0.25 − y)2

)) .

The domain is a unit square,

−0.5 < x < 0.5 and − 0.5 < y < 0.5.

The velocity field inside the domain is rigid body rotation about the origin, with the formula,

u = −y · ω and v = x · ω

The rotational speed is ω = 0.04 rad · s−1.

The value of sigma at the boundary should be very small since the Gaussian decays quickly

and is thus not expected to influence the solution. Use zero gradient boundary conditions

for σ at the boundaries,

∂xσ(−0.5,y,t) = 0, ∂xσ(0.5,y,t) = 0, ∂yσ(x,−0.5, t) = 0 and ∂yσ(x, 0.5, t) = 0.

The boundary values for velocity do not need to be treated in any special way, just use the

prescribed velocity in the same way as inside the domain.

You will analyse the behaviour of your solution over half a rotation, that is π radians or

π/0.04 seconds.

You should ultimately create three finite volume solvers.

Solver 1: Explicit, forward in time, first order upwind advection scheme.

Solver 2: Explicit, forward in time, second order flux integral advection scheme.

Solver 3: Implicit, second order in time Crank-Nicolson scheme, second order central

advection scheme, successive over-relaxation or other linear solver.

All solvers should use the second order central approximation for the diffusion term.

1

You will need to address the following criteria. When you test accuracy you should con-

sider the peak scalar concentration upon completion of the simulation. When you consider

stability, you should check if the solution ever becomes negative.

Stability: 5 marks

Using Solver 1 and Solver 2, explore the effect of Von-Neumann and Courant numbers

on the stability. Even though stability criteria have not been provided for the solvers used

in this assignment, you can use the values given for one dimensional schemes in the notes as

a guide. You will need to change the diffusivity in order to vary the Von-Neumann number

independently.

Space and time accuracy: 5 marks

Using Solver 1 and Solver 2, set the time-step to a fixed value and obtain solutions over a

range of grid sizes, then set the grid size to a fixed value and obtain solutions over a range of

time steps. Assess and comment on the behaviour of the solution and the order of accuracy.

Best solution: 2 marks

Using Solver 1 and Solver 2, give your best estimate for the peak value of the solution at

the end of the simulation based on all the simulations you have performed. Include details

of your calculations.

Implicit solver: 4 marks

Develop Solver 3. Pick one of the grids that you used with solvers 1 & 2 and test the

stability by varying the time-step only. Compare results to those with solvers 1 & 2.

Presentation: 2 marks

Plots showing time development of the solution for both solvers and discussion of key dif-

ferences in qualitative behaviour.

Code: 2 marks

Hand in your matlab code.

2