联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2019-07-03 10:07

APiE Assignment - Finite Volume for scalar equations (0.5EC)

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.

1This can be written as a system of equations,

2Note, the advection speeds for the Euler equation are u ± |a|


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp