Reference no: EM133339203
Question 1: Burgers Equation
Consider 1D Burgers Equation,
∂u/∂t + ∂(u2/2)/∂x = 0
with the following boundary conditions
Problem 1:
u1(x, 0) = 1, if x < 0
u1(x, 0) = 1 + x, if 0 ≤ x ≤ 1
u1(x, 0) = 2, if x > 0.
Problem 2:
u2(x, 0) = 2, if x < 0
u2(x, 0) = 2 - x, if 0 ≤ x ≤ 1
u2(x, 0) = 1, if x > 1.
Draw two sets of characteristics, one for each problem. Feel free to do so by hand, but include it in a pdf file. Do you observe a solution with a shock or a rarefaction wave?
HINT: Take your time and double-check the solution so that you can use it to verify the correctness of your code on the next page. Upload a . pdf file with your solution below.
Problem 2: Solve 1D Burgers
Consider 1D Burgers Equation,
∂u/∂t + ∂(u2/2)/∂x = 0
with the following boundary conditions
Problem 1:
u1(x, 0) = 1, if x 0
u1(x, 0) = 1 + x, if 0 ≤ x ≤ 1
u1(x, 0) = 2, if x > O.
Problem 2:
u2(x, 0) = 2, if x C 0
u2(x, 0) = 2 - x, if 0 ≤ x ≤ 1
u2(x, 0) = 1, if x > 1.
Given the starter code, implement
• Local Lax-Friedrichs (LLF), (Book eq. 6.44, 6.54, 6.56)
• First order Godunov Scheme (Book eq. 6.66, 6.68)
• Second-order explicit Runge-Kutta (Book eq. 6.89-6.90) minmod scheme, with LLF flux function and minmod-limited reconstructed interface values (Book Sec. 6.5.1) on a domain (x, t) ∈ [-1, 6] x [0, 2]. Use ghost-cells to impose boundary conditions so that the left-hand and right-hand boundaries of the interval keep fixed values for all time (Book Section 9.3).
Compare with the exact solution (Problem 1) at time T = 1 and T = 2. Do the shocks match? Determine if the shock has the correct speed.
HINT: Implement your PDE in a semi-discrete form (Book eq. 6.34) to be able to switch out time integrators more easily. Upload a .pdf file with your solution below, and upload the code in the . py or . ipynb format on the next page.