Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Summative coursework – Continuous Systems

To be handed in via Learn Ultra. Deadline: 2pm on 24th April 2022.

Consider the finite difference method

 + ¸ « = 0

for solving the advection equation ut + ¸ux = 0.

Task 1. Write a short report to answer the following:

(i) Assess the stability of the method using von Neumann analysis. [30 marks]

(ii)  Compute the truncation error "T and hence find the accuracy order of the method in time and space. [20 marks]

You can type your solutions with LaTeX or Word, or scan in handwritten answers, but you must submit a task1 .pdf file.

For full marks, your answers must be legible and correct, you must show your working, and you must explain clearly what you are doing in reasonable English.

Task 2. For ¸ = 1, write a Python code to implement this method on 0 < x < 2 with initial condition

8 0                if x 0.5

u(x, 0) = < sin (4Tx)   if 0.5 < x < 1.5

:  0                 if x ≥ 1.5

and periodic boundary conditions, up to t = 2. Your program must generate a plot comparing the final solution u(x, 2) with the initial condition.

Submit your code as a task2.py file.

• 20 marks for correct implementation of the method, initial and boundary conditions.

•  15 marks for appropriate choice of parameters and correct solution.

•  10 marks for appropriate form of output, including graphical plots.

• 5 marks for good coding style, including logical and efficient organisation and use of com- ments.