Numerical Methods for PDEs MATH 610 - 600 Alan Demlow Computer Assignment 2 Spring 2015 Computer Assignment 2 Exercise 1 100% FEM for Two-Point Boundary Value Problems Using Linear Elements Write a program for solving two-point boundary value problems for second order ordinary differential equations by Ritz-Galerkin method using quadratic finite elements. Specifications 1. Use double precision (which is the default in MATLAB). If you are using MATLAB, you can solve the corresponding tridiagonal linear system using the backslash operator. You should however be sure to use sparse data structures in your implementation. 2. Use 10, 20, 40, 80 mesh intervals. In a table give the error in L2 , H 1 , L∞ and also make plots of the error norms versus the mesh size. 3. The expected format of your computer assignment will be discussed in lab. Please be sure to follow your TA’s instructions in this regard. Computational examples - solve the following problems : 1. The deflection of a uniformly loaded, long rectangular plate under axial tension force and fixed ends, for small deflections, is governed by the second order differential equation. Let S represent the axial force and q the intensity of the uniform load. The deflection W along the elemental length is given by : W 00 (x) − qx S W (x) = − (l − x), 0 < x < l, W (0) = W (l) = 0, D 2D (1) where l is the length of the plate, and D is the flexural rigidity of the plate. Take q = 200 lb/in2 , S = 100 lb/in., D = 8.8 107 lb in, and l = 50 in. The exact solution is given by : 2 ql4 a = Sl D , b = 2D , t = x/l and √ √ b 2 2 √ [sinh( at) + sinh( a(1 − t))] . W (t) = −t2 + t − + a a a sinh( a) 2. Consider the problem (1) when the r.h.s. solution for Q = 2 ql 2D qx 2D (l − x) is replaced by the constant q 2D . The exact is : W (t) = Q a 1− √ √ 1 √ sinh( at) + sinh( a(1 − t)) . sinh a Investigate how using different quadrature rules in the computation of the stiffness matrix and mass matrix affects the quality of the consider the folloR1 R 1 approximation. In particular, 1 1 ) + f (0.5 + 2√ )], and wing three rules : 0 f (x) dx ≈ f (0.5) ; 0 f (x) dx ≈ 12 [f (0.5 − 2√ 3 3 p p R1 4 5 f (x) dx ≈ 9 f (0.5) + 18 [f (0.5 − 0.5 3/5) + f (0.5 + 0.5 3/5)]. First use the third rule to 0 compute the mass matrix while trying the first and second to compute the stiffness matrix. Then use the second rule to compute the stiffness matrix while trying the first, second, and third to compute the mass matrix. Report how these variations affect the order of convergence as measured in the three norms specified above. 3. Consider the problem (1) when the right end of the plate is elastically supported, i.e. instead β of the boundary condition W (l) = 0 now we have the condition W 0 (l) + D W (l) = 0, where β is the characteristic of the elastic support. Solve the problem in the following two cases : (a) β = 0, i.e., the end is free ; (b) β = 2 1010 lb (you can also try the case of a very stiff elastic support, e.g., β = 2 1013 lb). The exact solution for the case of a plate with a free end (i.e., β = 0) is : √ √ √ 2 1 b 2 √ [ a sinh( at) + 2 cosh( a(1 − t))] . −t + t − + W (t) = a a a cosh( a) Compare the solution of the case β = 2 1010 lb with the solution of problem (??).