Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Part (i) is compulsory and is required to pass the assignment. The other parts are all optional
and are only required for the higher grades. It should be noted that part (ii) (iv) are
independent i.e. it is possible to complete (i) and (iii) or (i) and (iv) only etc...
(i) Write a simple finite volume code to solve the one dimensional linear advection equation.
Implement inflow on the left and outflow conditions on the right. Use the Lax-Friedrichs flux.
Consider both (a) square wave initial conditions
and (b) triangular wave initial conditions
In the report please show the time evolution of the solution and explain how you implemented
the boundary conditions.
(ii) Optional: Repeat question(i) for the one dimensional inviscid Burgers equation.
(iii) Optional: Investigate the effect of adding a limiter, try minmod, superbee and Woodward.
Comment on which gives the best results for each problem.
(iv) Voluntary +1 points: For the problem in (i) find the exact solution. For different
grid resolutions consider the difference between the exact solution and your numerical solution.
Hence comment on the error in your numerical method as a function of the grid size.
2
APiE Exercise - Finite Volume for systems of eqn’s (0.5 EC)
Part (i) is compulsory and is required to pass the assignment. The other parts are all optional
and are only required for the higher grades.
Euler equations in fluid dynamics describe the behaviour of inviscid flows. Ideal fluids that are
assumed to have no viscocity are referred to as inviscid. Leonhard Euler actually derived these
equations from the conservation of mass and momentum: 1 2
For simplicity, consider a = 1.
(i) Solve the equations on a unit domain 0 < x < 1. Consider an inflow boundary condition
on the left, given by ρ = 0.5 and u = 1, and an outflow condition on the right side. As initial
conditions, take uniform density ρ = 1 and velocity u = 1. Plot and comment the evolution of
the solution until it reaches a steady state. Comment on the steady state reached.
(ii) Consider now a wall at x = 0.5, separating the system into a uniform density and zero
velocity region to the left, and no material at all to the right. (You may need to place a small
density to the right; comment). Start your code at t = 0 with the wall already removed. Plot
the evolution of the density profile with time. You should see a sharp front (shock) propagating
into the empty space. What is the velocity of the shock?
(iii) Consider now solid walls boundary conditions at x = 0 and x = 1. Plot the evolution of
the density.
(iv) Optional: Use the MUSCL scheme. Comment of the effect.