Description
Problem 1: Method of manufactured solutions
| −∇2u(x) = f (x), x ∈ Ω
u(x) = uD(x), x ∈∂Ω In the class, we did the example where 2 2 uD = 1 + x1 + 2x2, f (x) = 6.0 The solution to the Laplace equation in this case is 2 2 u(x) = 1 + x1 + 2x2 We can verify this by computing the laplacian of u(x) as |
(1.1)
(1.2) (1.3) (1.4) |
| ∂2u ∂2u
+ = 2 + 2 × 2 = 6 = −f (x) ∂x2 ∂x2 |
(1.5) |
solution using your code. This is called theequationA common way to verify that your code is working is to start with a known solution and then try to obtain thatmethod of manufactured solutions. Let’s look at the original Poisson
Let’s try this out for more cases. 1 2
(1a) Edit the python script and show results generated by Paraview. Report the errors.Try uknown(x) = uD(x) = x13 and f (x) = −6x1. First show that this satisfies the Poisson equation. Next,
(1b) Repeat the above with uknown(x) = uD(x) = x23 and f (x) = −6x2.
Problem 2: Improving accuracy Let’s go back to the above problem and take
uknown(x) = uD(x) = x13, f (x) = −6x1 (2.1)
You must have noticed error of the order to ∼ 0.001 or more. Let’s try to improve this.
(2a) One way of improving the error is to make your mesh higher resolution. Try increasing the mesh fromelements:to . Has the error reduced? Plot the L2 error norm and max error for increasing number ofand . Include the plots in your submission.
8 × 8 16 × 16
(2b) Another way to improve is to change the shape function. So far we have been dealing with LagrangePolynomial of ordermight not do a good job approximating it. Increase the order of the polynomial. Plot the L2 error norm4,8,16,32 . These are basically linear functions. If the solution64 and These simulations will take time… be patient.is cubic, the linear function
1 uknown
and max error for increasing order: 1,2,3,4



