Computational Methods for Engineering Applications II. Homework Problem Sheet 4

Size: px
Start display at page:

Download "Computational Methods for Engineering Applications II. Homework Problem Sheet 4"

Transcription

1 S. Mishra K. O. Lye L. Scarabosio Autumn Term 2015 Computational Methods for Engineering Applications II ETH Zürich D-MATH Homework Problem Sheet 4 This assignment sheet contains some tasks marked as Core problems. If you hand them in (see deadline at the end of the problem sheet), these tasks will be corrected. Full mark for the total of the core problems in all assignments will give a 20% bonus on the total points in the final exam. This is really a bonus, which means that at the exam you can still get the highest grade without having the bonus points (of course then you need to score more points at the exam). The total number of points for the Core problems of this sheet is 8 points. (The total number of points over all assignments will be around 20). Problem 4.1 We consider the problem where f L 2 (). Linear Finite Elements for the Poisson equation in 2D u = f(x) in R 2 (4.1.1) u(x) = 0 on (4.1.2) In the folder unittest you can find routines to test your implementation tasks for this problem. (4.1a) Write the variational formulation for (4.1.1)-(4.1.2). Solution: We multiply both the left handside and right handside of (4.1.1) by a test function v. Applying Green s formula for integration by parts on the left handside we get: u u(x)v(x) dx = u(x) v(x) dx (x)v(x) dx. n Since u satisfies Dirichlet boundary conditions, the test functions belong to H 1 0() and thus the boundary integral in the above expression vanishes. The variational formulation results then: Find u V = { w H 1 () : w = g on } such that u(x) v(x) dx = f(x)v(x) dx for all v H0(), 1 where the function g represents the boundary data (in our case g 0). We solve (4.1.1)-(4.1.2) by means of Galerkin discretization based on piecewise linear finite elements on triangular meshes of. Let us denote by ϕ i N, i = 0,..., N 1 the finite element Problem Sheet 4 Page 1 Problem 4.1

2 basis functions (hat functions) associated to the vertices of a given mesh, with N = N V the total number of vertices. The finite element solution u N to (4.1.1) can thus be expressed as u N (x) = N 1 i=0 µ i ϕ i N(x), (4.1.3) where µ = {µ i } N 1 i=0 is the vector of coefficients. Notice that we don t know µ i if i is an interior vertex, but we know that µ i = 0 if i is a vertex on the boundary. HINT: Here and in the following, we use zero-based indices in contrast to the lecture notes. Inserting ϕ i N, i = 0,..., N 1 as test functions in the variational formulation from subproblem (4.1a) we obtain the linear system of equations with A R N N and F R N. (4.1b) Write an expression for the entries of A and F in (4.1.4). Solution: We have A ij = for i, j = 0,..., N 1. Aµ = F, (4.1.4) ϕ j N (x) ϕi N(x) dx and F i = f(x)ϕ i N(x) dx, (4.1c) (Core problem) Complete the template file shape.hpp implementing the function inline double lambda(int i, double x, double y) which computes the the value a local shape function λ i (x), with i that can assume the values 0, 1 or 2, on the reference element depicted in Fig. 4.1 at the point x = (x, y). The convention for the local numbering of the shape functions is that λ i (x j ) = δ i,j, i, j = 0, 1, 2, with δ i,j denoting the Kronecker delta. Solution: See Listing 4.1 for the code. 1 #pragma once Listing 4.1: Implementation for lambda 2 3 //! The shape function (on the reference element) 4 //! 5 //! We have three shape functions. 6 //! 7 //! lambda(0, x, y) should be 1 in the point (0,0) and zero in (1,0) and (0,1) 8 //! lambda(1, x, y) should be 1 in the point (1,0) and zero in (0,0) and (0,1) 9 //! lambda(2, x, y) should be 1 in the point (0,1) and zero in (0,0) and (1,0) 10 //! Problem Sheet 4 Page 2 Problem 4.1

3 y 1 2 ˆK x Figure 4.1: Reference element ˆK for 2D linear finite elements. 11 i integer between 0 and 2 (inclusive). Decides which shape function to return. 12 x x coordinate in the reference element. 13 y y coordinate in the reference element. 14 i n l i n e double lambda ( i n t i, double x, double y ) { 15 i f ( i == 0) { 16 return 1 x y ; 17 } e l s e i f ( i == 1) { 18 return x ; 19 } e l s e { 20 return y ; 21 } 22 } (4.1d) (Core problem) Complete the template file grad shape.hpp implementing the function inline Eigen::Vector2d gradientlambda(const int i, double x, double y) which returns the value of the derivatives (i.e. the gradient) of a local shape functions λ i (x), with i that can assume the values 0, 1 or 2, on the reference element depicted in Fig. 4.1 at the point x = (x, y). Solution: See Listing 4.2 for the code. 1 #pragma once 2 # i n c l u d e <Eigen / Core> 3 Listing 4.2: Implementation for gradientlambda 4 //! The gradient of the shape function (on the reference element) 5 //! 6 //! We have three shape functions 7 //! 8 i integer between 0 and 2 (inclusive). Decides which shape function to return. Problem Sheet 4 Page 3 Problem 4.1

4 9 x x coordinate in the reference element. 10 y y coordinate in the reference element. 11 i n l i n e Eigen : : Vector2d gradientlambda ( c o n s t i n t i, double x, double y ) { 12 return Eigen : : Vector2d( 1 + ( i > 0) + ( i ==1), ( i > 0) + ( i ==2) ) ; 14 } The routine makecoordinatetransform contained in the file coordinate transform.hpp computes the Jacobian matrix of the linear map Φ l : R 2 R 2 such that ( ) ( ) ( ) ( ) 1 a11 0 a21 Φ l = = a 0 1, Φ l = = a 1 2, a 12 where a 1, a 2 R 2 are the two input arguments. (Core problem) Complete the template file stiffness matrix. hpp implementing the rou- (4.1e) tine template<class MatrixType, class Point> void computestiffnessmatrix(matrixtype& stiffnessmatrix, const Point& a, const Point& b, const Point& c) that returns the element stiffness matrix for the bilinear form associated to (4.1.1) and for the triangle with vertices a, b and c. HINT: Use the routine gradientlambda from subproblem (4.1d) to compute the gradients and the routine makecoordinatetransform to transform the gradients and to obtain the area of a triangle. Solution: See Listing 4.3 for the code. 1 #pragma once a 22 Listing 4.3: Implementation for computestiffnessmatrix 2 # i n c l u d e <Eigen / Core> 3 # i n c l u d e <Eigen / Dense> 4 # i n c l u d e g r a d s h a p e. hpp 5 # i n c l u d e c o o r d i n a t e t r a n s f o r m. hpp 6 # i n c l u d e i n t e g r a t e. hpp 7 8 //! Evaluate the stiffness matrix on the triangle spanned by 9 //! the points (a, b, c). 10 //! 11 //! Here, the stiffness matrix A is a 3x3 matrix 12 //! 13 //! A ij = λ K i (x, y) λ K j (x, y) dv 14 //! 15 //! where K is the triangle spanned by (a, b, c). 16 //! K Problem Sheet 4 Page 4 Problem 4.1

5 17 stiffnessmatrix should be a 3x3 matrix 18 //! At the end, will contain the integrals above. 19 //! 20 a the first corner of the triangle 21 b the second corner of the triangle 22 c the third corner of the triangle 23 template <c l a s s MatrixType, c l a s s Point > 24 void computestiffnessmatrix ( MatrixType& s t i f f n e s s M a t r i x, c o n s t Point& a, c o n s t Point& b, c o n s t Point& c ) 25 { 26 Eigen : : Matrix2d coordinatetransform = makecoordinatetransform ( b a, c a ) ; 27 double volumefactor = std : : abs ( coordinatetransform. determinant ( ) ) ; 28 Eigen : : Matrix2d elementmap = coordinatetransform. inverse ( ). transpose ( ) ; 29 f o r ( i n t i = 0; i < 3; ++ i ) { 30 f o r ( i n t j = i ; j < 3; ++ j ) { s t i f f n e s s M a t r i x ( i, j ) = i n t e g r a t e ( [ & ] ( double x, double y ) { 33 Eigen : : Vector2d gradlambdai = elementmap gradientlambda ( i, x, y ) ; 34 Eigen : : Vector2d gradlambdaj = elementmap gradientlambda ( j, x, y ) ; return volumefactor gradlambdai. dot ( gradlambdaj ) ; }) ; 39 } 40 } // Make symmetric (we did not need to compute these value above) 43 f o r ( i n t i = 0; i < 3; ++ i ) { 44 f o r ( i n t j = 0; j < i ; ++ j ) { 45 s t i f f n e s s M a t r i x ( i, j ) = s t i f f n e s s M a t r i x ( j, i ) ; 46 } 47 } } The routine integrate in the file integrate. hpp uses a quadrature rule to compute the approximate value of ˆK f(ˆx) dˆx, where f is a function, passed as input argument. (4.1f) (Core problem) Complete the template file load vector.hpp implementing the routine Problem Sheet 4 Page 5 Problem 4.1

6 template<class Vector, class Point> void computeloadvector(vector& loadvector, const Point& a, const Point& b, const Point& c, const std::function<double(double, double)>& f) that returns the element load vector for the linear form associated to (4.1.1), for the triangle with vertices a, b and c, and where f is a function handler to the right-hand side of (4.1.1). HINT: Use the routine lambda from subproblem (4.1c) to compute values of the shape functions on the reference element, and the routines makecoordinatetransform and integrate from the handout to map the points to the physical triangle and to compute the integrals. Solution: See Listing 4.4 for the code. 1 #pragma once 2 # i n c l u d e <Eigen / Core> 3 # i n c l u d e <Eigen / Dense> Listing 4.4: Implementation for computeloadvector 4 # i n c l u d e c o o r d i n a t e t r a n s f o r m. hpp 5 # i n c l u d e i n t e g r a t e. hpp 6 # i n c l u d e shape. hpp 7 # i n c l u d e <f u n c t i o n a l > 8 9 //! Evaluate the load vector on the triangle spanned by 10 //! the points (a, b, c). 11 //! 12 //! Here, the load vector is a vector (v i ) of 13 //! three components, where 14 //! 15 //! v i = λ K i (x, y)f(x, y) dv 16 //! 17 //! where K is the triangle spanned by (a, b, c). 18 //! 19 loadvector should be a vector of length //! At the end, will contain the integrals above. 21 //! 22 a the first corner of the triangle 23 b the second corner of the triangle 24 c the third corner of the triangle 25 f the function f (LHS). 26 template <c l a s s Vector, c l a s s Point > 27 void computeloadvector ( Vector& loadvector, 28 c o n s t Point& a, c o n s t Point& b, c o n s t Point& c, 29 c o n s t std : : f u n c t i o n <double ( double, double )>& f ) 30 { K Problem Sheet 4 Page 6 Problem 4.1

7 31 Eigen : : Matrix2d coordinatetransform = makecoordinatetransform ( b a, c a ) ; 32 double volumefactor = std : : abs ( coordinatetransform. determinant ( ) ) ; f o r ( i n t i = 0; i < 3; ++ i ) { 35 loadvector ( i ) = i n t e g r a t e ( [ & ] ( double x, double y ) { 36 Eigen : : Vector2d z = coordinatetransform Eigen : : Vector2d ( x, y ) + Eigen : : Vector2d ( a ( 0 ), a ( 1 ) ) ; 37 return f ( z ( 0 ), z ( 1 ) ) lambda ( i, x, y ) volumefactor ; 38 }) ; 39 } } (4.1g) (Core problem) Complete the template file stiffness matrix assembly.hpp implementing the routine template<class Matrix> void assemblestiffnessmatrix(matrix& A, const Eigen::MatrixXd& vertices, const Eigen::MatrixXi& triangles) to compute the finite element matrix A as in (4.1.4). The input argument vertices is a N V 3 matrix of which the i-th row contains the coordinates of the i-th mesh vertex, i = 0,..., N V 1, with N V the number of vertices. The input argument triangles is a N T 3 matrix where the i-th row contains the indices of the vertices of the i-th triangle, i = 0,..., N T 1, with N T the number of triangles in the mesh. HINT: Use the routine computestiffnessmatrix from subproblem (4.1e) to compute the local stiffness matrix associated to each element. HINT: Use the sparse format to store the matrix A. Solution: See Listing 4.5 for the code. 1 #pragma once Listing 4.5: Implementation for assemblestiffnessmatrix 2 # i n c l u d e <Eigen / Core> 3 # i n c l u d e <Eigen / Sparse> 4 # i n c l u d e <vector > 5 6 # i n c l u d e s t i f f n e s s m a t r i x. hpp 7 8 //! Sparse Matrix type. Makes using this type easier. 9 t y p e d e f Eigen : : SparseMatrix<double> SparseMatrix ; //! Used for filling the sparse matrix. 12 t y p e d e f Eigen : : T r i p l e t <double> T r i p l e t ; Problem Sheet 4 Page 7 Problem 4.1

8 13 14 //! Assemble the stiffness matrix 15 //! for the linear system 16 //! 17 A will at the end contain the Galerkin matrix 18 vertices a list of triangle vertices 19 triangles a list of triangles 20 template <c l a s s Matrix > 21 void assemblestiffnessmatrix ( Matrix& A, c o n s t Eigen : : MatrixXd& v e r t i c e s, 22 c o n s t Eigen : : M a t r i x X i& t r i a n g l e s ) 23 { c o n s t i n t numberofelements = t r i a n g l e s. rows ( ) ; 26 A. r e s i z e ( v e r t i c e s. rows ( ), v e r t i c e s. rows ( ) ) ; std : : vector <T r i p l e t > t r i p l e t s ; t r i p l e t s. reserve ( numberofelements 3 3) ; f o r ( i n t i = 0; i < numberofelements ; ++ i ) { 33 auto& indexset = t r i a n g l e s. row ( i ) ; c o n s t auto& a = v e r t i c e s. row ( indexset ( 0 ) ) ; 36 c o n s t auto& b = v e r t i c e s. row ( indexset ( 1 ) ) ; 37 c o n s t auto& c = v e r t i c e s. row ( indexset ( 2 ) ) ; Eigen : : Matrix3d s t i f f n e s s M a t r i x ; 40 computestiffnessmatrix ( s t i f f n e s s M a t r i x, a, b, c ) ; f o r ( i n t n = 0; n < 3; ++n ) { 43 f o r ( i n t m = 0; m < 3; ++m) { 44 auto t r i p l e t = T r i p l e t ( indexset ( n ), indexset (m), s t i f f n e s s M a t r i x ( n, m) ) ; 45 t r i p l e t s. push back ( t r i p l e t ) ; 46 } 47 } 48 } A. s e t F r o m T r i p l e t s ( t r i p l e t s. begin ( ), t r i p l e t s. end ( ) ) ; 51 } (4.1h) (Core problem) Complete the template file load vector assembly.hpp implementing the routine void assembleloadvector(eigen::vectorxd& F, const Eigen::MatrixXd& vertices, const Eigen::MatrixXi& triangles, const std::function<double(double, double)>& f) Problem Sheet 4 Page 8 Problem 4.1

9 to compute the right-hand side vector F as in (4.1.4). The input arguments vertices and triangles are as in subproblem (4.1g), and f is an in subproblem (4.1f). HINT: Proceed in a similar way as for assemblestiffnessmatrix and use the routine computeloadvector from subproblem (4.1f). Solution: See Listing 4.6 for the code. 1 #pragma once Listing 4.6: Implementation for assembleloadvector 2 # i n c l u d e <Eigen / Core> 3 # i n c l u d e l o a d v e c t o r. hpp 4 5 //! Assemble the load vector into the full right hand side 6 //! for the linear system 7 //! 8 F will at the end contain the RHS values for each vertex. 9 vertices a list of triangle vertices 10 triangles a list of triangles 11 f the RHS function f. 12 void assembleloadvector ( Eigen : : VectorXd& F, 13 c o n s t Eigen : : MatrixXd& v e r t i c e s, 14 c o n s t Eigen : : M a t r i x X i& t r i a n g l e s, 15 c o n s t std : : f u n c t i o n <double ( double, double )>& f ) 16 { 17 c o n s t i n t numberofelements = t r i a n g l e s. rows ( ) ; F. r e s i z e ( v e r t i c e s. rows ( ) ) ; 20 F. setzero ( ) ; 21 f o r ( i n t i = 0; i < numberofelements ; ++ i ) { 22 c o n s t auto& indexset = t r i a n g l e s. row ( i ) ; c o n s t auto& a = v e r t i c e s. row ( indexset ( 0 ) ) ; 25 c o n s t auto& b = v e r t i c e s. row ( indexset ( 1 ) ) ; 26 c o n s t auto& c = v e r t i c e s. row ( indexset ( 2 ) ) ; Eigen : : Vector3d elementvector ; 29 computeloadvector ( elementvector, a, b, c, f ) ; f o r ( i n t i = 0; i < 3; ++ i ) { 32 F ( indexset ( i ) ) += elementvector ( i ) ; 33 } 34 } 35 } The routine Problem Sheet 4 Page 9 Problem 4.1

10 void setdirichletboundary(eigen::vectorxd& u, Eigen::VectorXi& interiorvertexindices, const Eigen::MatrixXd& vertices, const Eigen::MatrixXi& triangles, const std::function<double(double, double)>& g) implemented in the file dirichlet boundary.hpp provided in the handout does the following: it gets in input the matrices vertices and triangles as defined in subproblem (4.1g) and the function handle g to the boundary data, i.e. to g such that u = g on (in our case g 0); it returns in the vector interiorvertexindices the indices of the interior vertices, that is of the vertices that are not on the boundary ; if x i is a vertex on the boundary, then it sets u(i )=g(x i ), that is, in our case, it sets to 0 the entries of the vector u corresponding to vertices on the boundary. (4.1i) (Core problem) Complete the template file fem solve.hpp with the implementation of the function int solvefiniteelement(vector& u, const Eigen::MatrixXd& vertices, const Eigen::MatrixXi& triangles, const std::function<double(double, double)>& f, const std::function<double(double, double)>& g). This function takes in input the matrices vertices, triangles as defined in the previous subproblems, the function handle f to the right-hand side f in (4.1.1) and the function handle g to the boundary data. For the moment, consider g to be the zero function. The output argument u has to contain, at the end of the function, the finite element solution u N to (4.1.1). HINT: Use the routines assemblestiffnessmatrix and assembleloadvector from subproblems (4.1g) and (4.1h), respectively, to obtain the matrix A and the vector F as in (4.1.4), and then use the provided routine setdirichletboundary to set the boundary values of u to zero and to select the free degrees of freedom. Solution: See Listing 4.7 for the code. 1 #pragma once Listing 4.7: Implementation for solvefiniteelement 2 # i n c l u d e <Eigen / Core> 3 # i n c l u d e <s t r i n g > 4 # i n c l u d e < i g l / readstl. h> 5 # i n c l u d e < i g l / s l i c e. h> 6 # i n c l u d e < i g l / s l i c e i n t o. h> 7 # i n c l u d e s t i f f n e s s m a t r i x a s s e m b l y. hpp 8 # i n c l u d e l o a d v e c t o r a s s e m b l y. hpp 9 # i n c l u d e d i r i c h l e t b o u n d a r y. hpp t y p e d e f Eigen : : VectorXd Vector ; //! Solve the FEM system. 14 //! 15 u will at the end contain the FEM solution. 16 vertices list of triangle vertices for the mesh Problem Sheet 4 Page 10 Problem 4.1

11 17 triangles list of triangles (described by indices) 18 f the RHS f (as in the exercise) 19 g the boundary value (as in the exercise) 20 //! return number of degrees of freedom (without the boundary dofs) 21 i n t solvefiniteelement ( Vector& u, 22 c o n s t Eigen : : MatrixXd& v e r t i c e s, 23 c o n s t Eigen : : M a t r i x X i& t r i a n g l e s, 24 c o n s t std : : f u n c t i o n <double ( double, double )>& f, 25 c o n s t std : : f u n c t i o n <double ( double, double )>& g ) 26 { 27 SparseMatrix A ; 28 assemblestiffnessmatrix (A, v e r t i c e s, t r i a n g l e s ) ; Vector F ; 31 assembleloadvector ( F, v e r t i c e s, t r i a n g l e s, f ) ; u. r e s i z e ( v e r t i c e s. rows ( ) ) ; 34 u. setzero ( ) ; 35 Eigen : : VectorXi i n t e r i o r V e r t e x I n d i c e s ; 36 s e t D i r i c h l e t B o u n d a r y ( u, i n t e r i o r V e r t e x I n d i c e s, v e r t i c e s, t r i a n g l e s, g ) ; F = A u ; SparseMatrix A I n t e r i o r ; i g l : : s l i c e (A, i n t e r i o r V e r t e x I n d i c e s, i n t e r i o r V e r t e x I n d i c e s, A I n t e r i o r ) ; 43 Eigen : : SimplicialLDLT <SparseMatrix> s o l v e r ; Vector F I n t e r i o r ; i g l : : s l i c e ( F, i n t e r i o r V e r t e x I n d i c e s, F I n t e r i o r ) ; s o l v e r. compute ( A I n t e r i o r ) ; i f ( s o l v e r. i n f o ( )!= Eigen : : Success ) { 52 throw std : : r u n t i m e e r r o r ( Could n o t decompose t h e m a t r i x ) ; 53 } Vector u I n t e r i o r = s o l v e r. solve ( F I n t e r i o r ) ; i g l : : s l i c e i n t o ( u I n t e r i o r, i n t e r i o r V e r t e x I n d i c e s, u ) ; return i n t e r i o r V e r t e x I n d i c e s. size ( ) ; 60 Problem Sheet 4 Page 11 Problem 4.1

12 Figure 4.2: Solution plot for subproblem (4.1j). 61 } (4.1j) (Core problem) Run the routine solvesquare contained in the file square.hpp to compute the finite element solution to (4.1.1) when = [0, 1] 2 is the unit square, the forcing term is given by f(x) = 2π 2 sin(πx) sin(πy) and the mesh is square 5.mesh. Use then the routine plot on mesh.py to produce a plot of the solution. Solution: See Fig. 4.2 for the plot. The functions computel2difference and computeh1difference, contained in the files L2 norm.hpp and H1 norm.hpp, respectively, are defined as double computel2difference(const Eigen::MatrixXd& vertices, const Eigen::MatrixXi& triangles, const Eigen::VectorXd& u1, const std::function<double(double, double)>& u2) double computeh1difference(const Eigen::MatrixXd& vertices, const Eigen::MatrixXi& triangles, const Eigen::VectorXd& u1, const std::function<eigen::vector2d(double, double)>& u2grad). In both cases, the argument u1 is considered to be a vector corresponding to a linear finite element function u 1, and thus containing the value of this function in the vertices of a mesh. The argument u2 in computel2difference is a function handle to a scalar function u 2 which is known analytically. The argument u2grad in computeh1difference is a function handle to a function gradient u 2, supposed to be known analytically. Then the routines computel2difference and computeh1difference compute an approximation to u 1 u 2 L 2 () and u 1 u 2 H 1 () = u 1 u 2 L 2 (), respectively. The routine convergenceanalysis contained in the file convergence.hpp performs a convergence study calling the routines computel2difference and computeh1difference. This function writes a file with the number of degrees of freedom used at each convergence step, a file with the computed L 2 -error norms and a file with the computed H 1 -error seminorms. (4.1k) Run the routine convergenceanalysis to perform a convergence study for the finite element solution to (4.1.1)-(4.1.2). For both errors, make a double logarithmic plot of error versus number of degrees of freedom. Which convergence orders with respect to the number of degrees of freedom do you observe? Solution: See Fig. 4.3 for the plots. Problem Sheet 4 Page 12 Problem 4.1

13 u FEM u L u FEM u H Number of free vertices Number of free vertices Figure 4.3: Convergence plots for subproblem (4.1k). Doing a linear fitting of the logarithm of the number of degrees of freedom versus the logarithm of the errors, we observe a rate of convergence of around 1 for the L 2 -norm error, and a rate of around 0.5 with respect to the H 1 -seminorm of the error. These rates are with respect to the number of degrees of freedom. They correspond, respectively to rates of around 2 and 1 with respect to the mesh width, as expected from the theory. We now consider the problem u = f(x) in R 2 (4.1.5) u(x) = g(x) on (4.1.6) where f L 2 () and now g is a continuous function which is in general not zero on the boundary. (4.1l) Modify your implementation of the routine solvefiniteelement implemented in subproblem (4.1i) in order to compute the finite element solution to (4.1.5)-(4.1.6). HINT: Use the information contained in the output of the routine setdirichletboundary and use the offset function technique. Solution: See Listing 4.7, line 38. (4.1m) Run the routine solvel contained in the file Lshape.hpp to compute the finite element solution to (4.1.5)-(4.1.6) when is the L-shaped domain = ( 1, 1) 2 \((0, 1) ( 1, 0)), as depicted in Fig The forcing term is given by f(x) = 0, the boundary condition by g = u, with u the exact solution, which, in polar coordinates, is given by u(r, ϑ) = r 2 3 sin( 2 3 ϑ), for r 0 and ϑ [0, 3 2π]. The mesh used is Lshape 5.mesh. Use then the routine plot on mesh.py to produce a plot of the solution. Solution: See Fig. 4.5 for the plot. (4.1n) Run the routine convergenceanalysis to perform a convergence study for the finite element solution to (4.1.5)-(4.1.6). For both errors, make a double logarithmic plot of error versus number of degrees of freedom. Which convergence orders with respect to the number of degrees of freedom do you observe? Solution: See Fig. 4.6 for the plots. In this case we have a rate of convergence with respect to the number of degrees of freedom of around 0.66 for the L 2 -norm and 0.32 for the H 1 -seminorm of the error. We can observe that the convergence rates are lower than the ones in subproblem (4.1k). The reason is that the exact solution presents a singularity at Problem Sheet 4 Page 13 Problem 4.1

14 Figure 4.4: Domain for subproblems (4.1m)-(4.1n) Figure 4.5: Solution plot for subproblem (4.1m). Problem Sheet 4 Page 14 Problem 4.1

15 u FEM u L u FEM u H Number of free vertices Number of free vertices Figure 4.6: Convergence plots for subproblem (4.1n). the origin. The convergence orders that we have seen in subproblem (4.1k) are achieved only if the exact solution is smooth enough, which is not the case here. Problem 4.2 Green s Formula To derive the variational formulation from a PDE, we needed multi-dimensional integration by parts as expressed through Green s first formula. In this problem we study the derivation of Green s formula, thus practicing elementary vector analysis and the application of Gauss theorem. Now prove Green s formula for R 2 j v dx = where j C 1 () 2 and v C 1 (). HINT: Use Gauss theorem. where F C 1 () 2. F dx = Solution: The vectorized product rule takes the form which, when integrated, is j n v ds + j v dx, F n ds, (jv) = j v + v j, (jv) dx = The first integral fits Gauss theorem, so we get j n v ds = which is what we wanted to show. Published on November 25. To be submitted on December 11. Last modified on January 7, 2016 j v dx + v j dx. j v dx + v j dx Problem Sheet 4 Page 15 Problem 4.2

TMA4220: Programming project - part 1

TMA4220: Programming project - part 1 TMA4220: Programming project - part 1 TMA4220 - Numerical solution of partial differential equations using the finite element method The programming project will be split into two parts. This is the first

More information

Finite Elements. Colin Cotter. January 15, Colin Cotter FEM

Finite Elements. Colin Cotter. January 15, Colin Cotter FEM Finite Elements January 15, 2018 Why Can solve PDEs on complicated domains. Have flexibility to increase order of accuracy and match the numerics to the physics. has an elegant mathematical formulation

More information

1. Let a(x) > 0, and assume that u and u h are the solutions of the Dirichlet problem:

1. Let a(x) > 0, and assume that u and u h are the solutions of the Dirichlet problem: Mathematics Chalmers & GU TMA37/MMG800: Partial Differential Equations, 011 08 4; kl 8.30-13.30. Telephone: Ida Säfström: 0703-088304 Calculators, formula notes and other subject related material are not

More information

The Finite Element Method for the Wave Equation

The Finite Element Method for the Wave Equation The Finite Element Method for the Wave Equation 1 The Wave Equation We consider the scalar wave equation modelling acoustic wave propagation in a bounded domain 3, with boundary Γ : 1 2 u c(x) 2 u 0, in

More information

Scientific Computing I

Scientific Computing I Scientific Computing I Module 8: An Introduction to Finite Element Methods Tobias Neckel Winter 2013/2014 Module 8: An Introduction to Finite Element Methods, Winter 2013/2014 1 Part I: Introduction to

More information

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V Part I: Introduction to Finite Element Methods Scientific Computing I Module 8: An Introduction to Finite Element Methods Tobias Necel Winter 4/5 The Model Problem FEM Main Ingredients Wea Forms and Wea

More information

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C. Lecture 9 Approximations of Laplace s Equation, Finite Element Method Mathématiques appliquées (MATH54-1) B. Dewals, C. Geuzaine V1.2 23/11/218 1 Learning objectives of this lecture Apply the finite difference

More information

[2] (a) Develop and describe the piecewise linear Galerkin finite element approximation of,

[2] (a) Develop and describe the piecewise linear Galerkin finite element approximation of, 269 C, Vese Practice problems [1] Write the differential equation u + u = f(x, y), (x, y) Ω u = 1 (x, y) Ω 1 n + u = x (x, y) Ω 2, Ω = {(x, y) x 2 + y 2 < 1}, Ω 1 = {(x, y) x 2 + y 2 = 1, x 0}, Ω 2 = {(x,

More information

Chapter 6. Finite Element Method. Literature: (tiny selection from an enormous number of publications)

Chapter 6. Finite Element Method. Literature: (tiny selection from an enormous number of publications) Chapter 6 Finite Element Method Literature: (tiny selection from an enormous number of publications) K.J. Bathe, Finite Element procedures, 2nd edition, Pearson 2014 (1043 pages, comprehensive). Available

More information

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends Lecture 3: Finite Elements in 2-D Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Finite Element Methods 1 / 18 Outline 1 Boundary

More information

Last name Department Computer Name Legi No. Date Total. Always keep your Legi visible on the table.

Last name Department Computer Name Legi No. Date Total. Always keep your Legi visible on the table. First name Last name Department Computer Name Legi No. Date 02.02.2016 1 2 3 4 5 Total Grade Fill in this cover sheet first. Always keep your Legi visible on the table. Keep your phones, tablets and computers

More information

Last name Department Computer Name Legi No. Date Total. Always keep your Legi visible on the table.

Last name Department Computer Name Legi No. Date Total. Always keep your Legi visible on the table. First name Last name Department Computer Name Legi No. Date 12.08.2016 1 2 3 4 5 Total Grade Fill in this cover sheet first. Always keep your Legi visible on the table. Keep your phones, tablets and computers

More information

The Discontinuous Galerkin Finite Element Method

The Discontinuous Galerkin Finite Element Method The Discontinuous Galerkin Finite Element Method Michael A. Saum msaum@math.utk.edu Department of Mathematics University of Tennessee, Knoxville The Discontinuous Galerkin Finite Element Method p.1/41

More information

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES)

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES) LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES) RAYTCHO LAZAROV 1 Notations and Basic Functional Spaces Scalar function in R d, d 1 will be denoted by u,

More information

ACM/CMS 107 Linear Analysis & Applications Fall 2017 Assignment 2: PDEs and Finite Element Methods Due: 7th November 2017

ACM/CMS 107 Linear Analysis & Applications Fall 2017 Assignment 2: PDEs and Finite Element Methods Due: 7th November 2017 ACM/CMS 17 Linear Analysis & Applications Fall 217 Assignment 2: PDEs and Finite Element Methods Due: 7th November 217 For this assignment the following MATLAB code will be required: Introduction http://wwwmdunloporg/cms17/assignment2zip

More information

INTRODUCTION TO FINITE ELEMENT METHODS

INTRODUCTION TO FINITE ELEMENT METHODS INTRODUCTION TO FINITE ELEMENT METHODS LONG CHEN Finite element methods are based on the variational formulation of partial differential equations which only need to compute the gradient of a function.

More information

OR MSc Maths Revision Course

OR MSc Maths Revision Course OR MSc Maths Revision Course Tom Byrne School of Mathematics University of Edinburgh t.m.byrne@sms.ed.ac.uk 15 September 2017 General Information Today JCMB Lecture Theatre A, 09:30-12:30 Mathematics revision

More information

CIV-E1060 Engineering Computation and Simulation Examination, December 12, 2017 / Niiranen

CIV-E1060 Engineering Computation and Simulation Examination, December 12, 2017 / Niiranen CIV-E16 Engineering Computation and Simulation Examination, December 12, 217 / Niiranen This examination consists of 3 problems rated by the standard scale 1...6. Problem 1 Let us consider a long and tall

More information

Scientific Computing WS 2017/2018. Lecture 18. Jürgen Fuhrmann Lecture 18 Slide 1

Scientific Computing WS 2017/2018. Lecture 18. Jürgen Fuhrmann Lecture 18 Slide 1 Scientific Computing WS 2017/2018 Lecture 18 Jürgen Fuhrmann juergen.fuhrmann@wias-berlin.de Lecture 18 Slide 1 Lecture 18 Slide 2 Weak formulation of homogeneous Dirichlet problem Search u H0 1 (Ω) (here,

More information

Simple Examples on Rectangular Domains

Simple Examples on Rectangular Domains 84 Chapter 5 Simple Examples on Rectangular Domains In this chapter we consider simple elliptic boundary value problems in rectangular domains in R 2 or R 3 ; our prototype example is the Poisson equation

More information

NGsolve::Give me your element

NGsolve::Give me your element NGsolve::Give me your element And let your eyes delight in my ways Jay Gopalakrishnan Portland State University Winter 2015 Download code (works only on version 6.0) for these notes from here. Give me

More information

Functional Analysis Exercise Class

Functional Analysis Exercise Class Functional Analysis Exercise Class Week 2 November 6 November Deadline to hand in the homeworks: your exercise class on week 9 November 13 November Exercises (1) Let X be the following space of piecewise

More information

Finite Element Methods

Finite Element Methods Solving Operator Equations Via Minimization We start with several definitions. Definition. Let V be an inner product space. A linear operator L: D V V is said to be positive definite if v, Lv > for every

More information

Time-dependent variational forms

Time-dependent variational forms Time-dependent variational forms Hans Petter Langtangen 1,2 1 Center for Biomedical Computing, Simula Research Laboratory 2 Department of Informatics, University of Oslo Oct 30, 2015 PRELIMINARY VERSION

More information

Math 164-1: Optimization Instructor: Alpár R. Mészáros

Math 164-1: Optimization Instructor: Alpár R. Mészáros Math 164-1: Optimization Instructor: Alpár R. Mészáros First Midterm, April 20, 2016 Name (use a pen): Student ID (use a pen): Signature (use a pen): Rules: Duration of the exam: 50 minutes. By writing

More information

1 Discretizing BVP with Finite Element Methods.

1 Discretizing BVP with Finite Element Methods. 1 Discretizing BVP with Finite Element Methods In this section, we will discuss a process for solving boundary value problems numerically, the Finite Element Method (FEM) We note that such method is a

More information

Implementation of the dg method

Implementation of the dg method Implementation of the dg method Matteo Cicuttin CERMICS - École Nationale des Ponts et Chaussées Marne-la-Vallée March 6, 2017 Outline Model problem, fix notation Representing polynomials Computing integrals

More information

3. Numerical integration

3. Numerical integration 3. Numerical integration... 3. One-dimensional quadratures... 3. Two- and three-dimensional quadratures... 3.3 Exact Integrals for Straight Sided Triangles... 5 3.4 Reduced and Selected Integration...

More information

The Virtual Element Method: an introduction with focus on fluid flows

The Virtual Element Method: an introduction with focus on fluid flows The Virtual Element Method: an introduction with focus on fluid flows L. Beirão da Veiga Dipartimento di Matematica e Applicazioni Università di Milano-Bicocca VEM people (or group representatives): P.

More information

Math 3C Lecture 20. John Douglas Moore

Math 3C Lecture 20. John Douglas Moore Math 3C Lecture 20 John Douglas Moore May 18, 2009 TENTATIVE FORMULA I Midterm I: 20% Midterm II: 20% Homework: 10% Quizzes: 10% Final: 40% TENTATIVE FORMULA II Higher of two midterms: 30% Homework: 10%

More information

A simple FEM solver and its data parallelism

A simple FEM solver and its data parallelism A simple FEM solver and its data parallelism Gundolf Haase Institute for Mathematics and Scientific Computing University of Graz, Austria Chile, Jan. 2015 Partial differential equation Considered Problem

More information

Question 9: PDEs Given the function f(x, y), consider the problem: = f(x, y) 2 y2 for 0 < x < 1 and 0 < x < 1. x 2 u. u(x, 0) = u(x, 1) = 0 for 0 x 1

Question 9: PDEs Given the function f(x, y), consider the problem: = f(x, y) 2 y2 for 0 < x < 1 and 0 < x < 1. x 2 u. u(x, 0) = u(x, 1) = 0 for 0 x 1 Question 9: PDEs Given the function f(x, y), consider the problem: 2 u x 2 u = f(x, y) 2 y2 for 0 < x < 1 and 0 < x < 1 u(x, 0) = u(x, 1) = 0 for 0 x 1 u(0, y) = u(1, y) = 0 for 0 y 1. a. Discuss how you

More information

Introduction. J.M. Burgers Center Graduate Course CFD I January Least-Squares Spectral Element Methods

Introduction. J.M. Burgers Center Graduate Course CFD I January Least-Squares Spectral Element Methods Introduction In this workshop we will introduce you to the least-squares spectral element method. As you can see from the lecture notes, this method is a combination of the weak formulation derived from

More information

PDEs, part 1: Introduction and elliptic PDEs

PDEs, part 1: Introduction and elliptic PDEs PDEs, part 1: Introduction and elliptic PDEs Anna-Karin Tornberg Mathematical Models, Analysis and Simulation Fall semester, 2013 Partial di erential equations The solution depends on several variables,

More information

Finite Difference Methods for Boundary Value Problems

Finite Difference Methods for Boundary Value Problems Finite Difference Methods for Boundary Value Problems October 2, 2013 () Finite Differences October 2, 2013 1 / 52 Goals Learn steps to approximate BVPs using the Finite Difference Method Start with two-point

More information

Chapter 12. Partial di erential equations Di erential operators in R n. The gradient and Jacobian. Divergence and rotation

Chapter 12. Partial di erential equations Di erential operators in R n. The gradient and Jacobian. Divergence and rotation Chapter 12 Partial di erential equations 12.1 Di erential operators in R n The gradient and Jacobian We recall the definition of the gradient of a scalar function f : R n! R, as @f grad f = rf =,..., @f

More information

Preparation for the Final

Preparation for the Final Preparation for the Final Basic Set of Problems that you should be able to do: - all problems on your tests (- 3 and their samples) - ex tra practice problems in this documents. The final will be a mix

More information

Computing Neural Network Gradients

Computing Neural Network Gradients Computing Neural Network Gradients Kevin Clark 1 Introduction The purpose of these notes is to demonstrate how to quickly compute neural network gradients in a completely vectorized way. It is complementary

More information

Lecture Notes: African Institute of Mathematics Senegal, January Topic Title: A short introduction to numerical methods for elliptic PDEs

Lecture Notes: African Institute of Mathematics Senegal, January Topic Title: A short introduction to numerical methods for elliptic PDEs Lecture Notes: African Institute of Mathematics Senegal, January 26 opic itle: A short introduction to numerical methods for elliptic PDEs Authors and Lecturers: Gerard Awanou (University of Illinois-Chicago)

More information

Matrices and Vectors

Matrices and Vectors Matrices and Vectors James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 11, 2013 Outline 1 Matrices and Vectors 2 Vector Details 3 Matrix

More information

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs Chapter Two: Numerical Methods for Elliptic PDEs Finite Difference Methods for Elliptic PDEs.. Finite difference scheme. We consider a simple example u := subject to Dirichlet boundary conditions ( ) u

More information

Vectors in Function Spaces

Vectors in Function Spaces Jim Lambers MAT 66 Spring Semester 15-16 Lecture 18 Notes These notes correspond to Section 6.3 in the text. Vectors in Function Spaces We begin with some necessary terminology. A vector space V, also

More information

Lecture 8: Boundary Integral Equations

Lecture 8: Boundary Integral Equations CBMS Conference on Fast Direct Solvers Dartmouth College June 23 June 27, 2014 Lecture 8: Boundary Integral Equations Gunnar Martinsson The University of Colorado at Boulder Research support by: Consider

More information

Introduction to PDEs: Assignment 9: Finite elements in 1D

Introduction to PDEs: Assignment 9: Finite elements in 1D Institute of Scientific Computing Technical University Braunschweig Dr. Elmar Zander Dr. Noemi Friedman Winter Semester 213/14 Assignment 9 Due date: 6.2.214 Introduction to PDEs: Assignment 9: Finite

More information

A brief introduction to finite element methods

A brief introduction to finite element methods CHAPTER A brief introduction to finite element methods 1. Two-point boundary value problem and the variational formulation 1.1. The model problem. Consider the two-point boundary value problem: Given a

More information

A Hybrid Method for the Wave Equation. beilina

A Hybrid Method for the Wave Equation.   beilina A Hybrid Method for the Wave Equation http://www.math.unibas.ch/ beilina 1 The mathematical model The model problem is the wave equation 2 u t 2 = (a 2 u) + f, x Ω R 3, t > 0, (1) u(x, 0) = 0, x Ω, (2)

More information

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations Sparse Linear Systems Iterative Methods for Sparse Linear Systems Matrix Computations and Applications, Lecture C11 Fredrik Bengzon, Robert Söderlund We consider the problem of solving the linear system

More information

Autumn 2015 Practice Final. Time Limit: 1 hour, 50 minutes

Autumn 2015 Practice Final. Time Limit: 1 hour, 50 minutes Math 309 Autumn 2015 Practice Final December 2015 Time Limit: 1 hour, 50 minutes Name (Print): ID Number: This exam contains 9 pages (including this cover page) and 8 problems. Check to see if any pages

More information

MATH 2400: Calculus III, Fall 2013 FINAL EXAM

MATH 2400: Calculus III, Fall 2013 FINAL EXAM MATH 2400: Calculus III, Fall 2013 FINAL EXAM December 16, 2013 YOUR NAME: Circle Your Section 001 E. Angel...................... (9am) 002 E. Angel..................... (10am) 003 A. Nita.......................

More information

Finite Element Method-Part II Isoparametric FE Formulation and some numerical examples Lecture 29 Smart and Micro Systems

Finite Element Method-Part II Isoparametric FE Formulation and some numerical examples Lecture 29 Smart and Micro Systems Finite Element Method-Part II Isoparametric FE Formulation and some numerical examples Lecture 29 Smart and Micro Systems Introduction Till now we dealt only with finite elements having straight edges.

More information

Scientific Computing WS 2018/2019. Lecture 15. Jürgen Fuhrmann Lecture 15 Slide 1

Scientific Computing WS 2018/2019. Lecture 15. Jürgen Fuhrmann Lecture 15 Slide 1 Scientific Computing WS 2018/2019 Lecture 15 Jürgen Fuhrmann juergen.fuhrmann@wias-berlin.de Lecture 15 Slide 1 Lecture 15 Slide 2 Problems with strong formulation Writing the PDE with divergence and gradient

More information

Overlapping Schwarz preconditioners for Fekete spectral elements

Overlapping Schwarz preconditioners for Fekete spectral elements Overlapping Schwarz preconditioners for Fekete spectral elements R. Pasquetti 1, L. F. Pavarino 2, F. Rapetti 1, and E. Zampieri 2 1 Laboratoire J.-A. Dieudonné, CNRS & Université de Nice et Sophia-Antipolis,

More information

Lecture 26: Putting it all together #5... Galerkin Finite Element Methods for ODE BVPs

Lecture 26: Putting it all together #5... Galerkin Finite Element Methods for ODE BVPs Lecture 26: Putting it all together #5... Galerkin Finite Element Methods for ODE BVPs Outline 1) : Review 2) A specific Example: Piecewise linear elements 3) Computational Issues and Algorithms A) Calculation

More information

The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods

The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods by Hae-Soo Oh Department of Mathematics, University of North Carolina at Charlotte, Charlotte, NC 28223 June

More information

Finite Elements for Nonlinear Problems

Finite Elements for Nonlinear Problems Finite Elements for Nonlinear Problems Computer Lab 2 In this computer lab we apply finite element method to nonlinear model problems and study two of the most common techniques for solving the resulting

More information

WRT in 2D: Poisson Example

WRT in 2D: Poisson Example WRT in 2D: Poisson Example Consider 2 u f on [, L x [, L y with u. WRT: For all v X N, find u X N a(v, u) such that v u dv v f dv. Follows from strong form plus integration by parts: ( ) 2 u v + 2 u dx

More information

Matrix construction: Singular integral contributions

Matrix construction: Singular integral contributions Matrix construction: Singular integral contributions Seminar Boundary Element Methods for Wave Scattering Sophie Haug ETH Zurich November 2010 Outline 1 General concepts in singular integral computation

More information

Fundamental Solutions and Green s functions. Simulation Methods in Acoustics

Fundamental Solutions and Green s functions. Simulation Methods in Acoustics Fundamental Solutions and Green s functions Simulation Methods in Acoustics Definitions Fundamental solution The solution F (x, x 0 ) of the linear PDE L {F (x, x 0 )} = δ(x x 0 ) x R d Is called the fundamental

More information

Math 273 (51) - Final

Math 273 (51) - Final Name: Id #: Math 273 (5) - Final Autumn Quarter 26 Thursday, December 8, 26-6: to 8: Instructions: Prob. Points Score possible 25 2 25 3 25 TOTAL 75 Read each problem carefully. Write legibly. Show all

More information

Quintic beam closed form matrices (revised 2/21, 2/23/12) General elastic beam with an elastic foundation

Quintic beam closed form matrices (revised 2/21, 2/23/12) General elastic beam with an elastic foundation General elastic beam with an elastic foundation Figure 1 shows a beam-column on an elastic foundation. The beam is connected to a continuous series of foundation springs. The other end of the foundation

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University Variational Problems of the Dirichlet BVP of the Poisson Equation 1 For the homogeneous

More information

Chapter 1: The Finite Element Method

Chapter 1: The Finite Element Method Chapter 1: The Finite Element Method Michael Hanke Read: Strang, p 428 436 A Model Problem Mathematical Models, Analysis and Simulation, Part Applications: u = fx), < x < 1 u) = u1) = D) axial deformation

More information

Math 164-1: Optimization Instructor: Alpár R. Mészáros

Math 164-1: Optimization Instructor: Alpár R. Mészáros Math 164-1: Optimization Instructor: Alpár R. Mészáros Final Exam, June 9, 2016 Name (use a pen): Student ID (use a pen): Signature (use a pen): Rules: Duration of the exam: 180 minutes. By writing your

More information

Institute of Structural Engineering Page 1. Method of Finite Elements I. Chapter 2. The Direct Stiffness Method. Method of Finite Elements I

Institute of Structural Engineering Page 1. Method of Finite Elements I. Chapter 2. The Direct Stiffness Method. Method of Finite Elements I Institute of Structural Engineering Page 1 Chapter 2 The Direct Stiffness Method Institute of Structural Engineering Page 2 Direct Stiffness Method (DSM) Computational method for structural analysis Matrix

More information

General elastic beam with an elastic foundation

General elastic beam with an elastic foundation General elastic beam with an elastic foundation Figure 1 shows a beam-column on an elastic foundation. The beam is connected to a continuous series of foundation springs. The other end of the foundation

More information

Non-Conforming Finite Element Methods for Nonmatching Grids in Three Dimensions

Non-Conforming Finite Element Methods for Nonmatching Grids in Three Dimensions Non-Conforming Finite Element Methods for Nonmatching Grids in Three Dimensions Wayne McGee and Padmanabhan Seshaiyer Texas Tech University, Mathematics and Statistics (padhu@math.ttu.edu) Summary. In

More information

Finite Element Method for Ordinary Differential Equations

Finite Element Method for Ordinary Differential Equations 52 Chapter 4 Finite Element Method for Ordinary Differential Equations In this chapter we consider some simple examples of the finite element method for the approximate solution of ordinary differential

More information

arxiv: v1 [math.na] 29 Feb 2016

arxiv: v1 [math.na] 29 Feb 2016 EFFECTIVE IMPLEMENTATION OF THE WEAK GALERKIN FINITE ELEMENT METHODS FOR THE BIHARMONIC EQUATION LIN MU, JUNPING WANG, AND XIU YE Abstract. arxiv:1602.08817v1 [math.na] 29 Feb 2016 The weak Galerkin (WG)

More information

LibMesh Experience and Usage

LibMesh Experience and Usage LibMesh Experience and Usage John W. Peterson peterson@cfdlab.ae.utexas.edu Univ. of Texas at Austin January 12, 2007 1 Introduction 2 Weighted Residuals 3 Poisson Equation 4 Other Examples 5 Essential

More information

(, ) : R n R n R. 1. It is bilinear, meaning it s linear in each argument: that is

(, ) : R n R n R. 1. It is bilinear, meaning it s linear in each argument: that is 17 Inner products Up until now, we have only examined the properties of vectors and matrices in R n. But normally, when we think of R n, we re really thinking of n-dimensional Euclidean space - that is,

More information

Generalized Finite Element Methods for Three Dimensional Structural Mechanics Problems. C. A. Duarte. I. Babuška and J. T. Oden

Generalized Finite Element Methods for Three Dimensional Structural Mechanics Problems. C. A. Duarte. I. Babuška and J. T. Oden Generalized Finite Element Methods for Three Dimensional Structural Mechanics Problems C. A. Duarte COMCO, Inc., 7800 Shoal Creek Blvd. Suite 290E Austin, Texas, 78757, USA I. Babuška and J. T. Oden TICAM,

More information

Numerical Solutions of Laplacian Problems over L-Shaped Domains and Calculations of the Generalized Stress Intensity Factors

Numerical Solutions of Laplacian Problems over L-Shaped Domains and Calculations of the Generalized Stress Intensity Factors WCCM V Fifth World Congress on Computational Mechanics July 7-2, 2002, Vienna, Austria Eds.: H.A. Mang, F.G. Rammerstorfer, J. Eberhardsteiner Numerical Solutions of Laplacian Problems over L-Shaped Domains

More information

CURRENT MATERIAL: Vector Calculus.

CURRENT MATERIAL: Vector Calculus. Math 275, section 002 (Ultman) Fall 2011 FINAL EXAM REVIEW The final exam will be held on Wednesday 14 December from 10:30am 12:30pm in our regular classroom. You will be allowed both sides of an 8.5 11

More information

CURRENT MATERIAL: Vector Calculus.

CURRENT MATERIAL: Vector Calculus. Math 275, section 002 (Ultman) Spring 2012 FINAL EXAM REVIEW The final exam will be held on Wednesday 9 May from 8:00 10:00am in our regular classroom. You will be allowed both sides of two 8.5 11 sheets

More information

CMU CS 462/662 (INTRO TO COMPUTER GRAPHICS) HOMEWORK 0.0 MATH REVIEW/PREVIEW LINEAR ALGEBRA

CMU CS 462/662 (INTRO TO COMPUTER GRAPHICS) HOMEWORK 0.0 MATH REVIEW/PREVIEW LINEAR ALGEBRA CMU CS 462/662 (INTRO TO COMPUTER GRAPHICS) HOMEWORK 0.0 MATH REVIEW/PREVIEW LINEAR ALGEBRA Andrew ID: ljelenak August 25, 2018 This assignment reviews basic mathematical tools you will use throughout

More information

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved. 7.5 Operations with Matrices Copyright Cengage Learning. All rights reserved. What You Should Learn Decide whether two matrices are equal. Add and subtract matrices and multiply matrices by scalars. Multiply

More information

FEM Convergence for PDEs with Point Sources in 2-D and 3-D

FEM Convergence for PDEs with Point Sources in 2-D and 3-D FEM Convergence for PDEs with Point Sources in -D and 3-D Kourosh M. Kalayeh 1, Jonathan S. Graf, and Matthias K. Gobbert 1 Department of Mechanical Engineering, University of Maryland, Baltimore County

More information

LibMesh Experience and Usage

LibMesh Experience and Usage LibMesh Experience and Usage John W. Peterson peterson@cfdlab.ae.utexas.edu and Roy H. Stogner roystgnr@cfdlab.ae.utexas.edu Univ. of Texas at Austin September 9, 2008 1 Introduction 2 Weighted Residuals

More information

MA 106 Linear Algebra

MA 106 Linear Algebra 1/44 MA 106 Linear Algebra Sudhir R. Ghorpade January 5, 2016 Generalities about the Course 2/44 INSTRUCTORS: Prof. Santanu Dey (D1 & D3) and Prof. Sudhir R. Ghorpade (D2 & D4) Generalities about the Course

More information

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4 Linear Algebra Section. : LU Decomposition Section. : Permutations and transposes Wednesday, February 1th Math 01 Week # 1 The LU Decomposition We learned last time that we can factor a invertible matrix

More information

2.20 Fall 2018 Math Review

2.20 Fall 2018 Math Review 2.20 Fall 2018 Math Review September 10, 2018 These notes are to help you through the math used in this class. This is just a refresher, so if you never learned one of these topics you should look more

More information

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically Finite difference and finite element methods Lecture 1 Scope of the course Analysis and implementation of numerical methods for pricing options. Models: Black-Scholes, stochastic volatility, exponential

More information

Applied Math Qualifying Exam 11 October Instructions: Work 2 out of 3 problems in each of the 3 parts for a total of 6 problems.

Applied Math Qualifying Exam 11 October Instructions: Work 2 out of 3 problems in each of the 3 parts for a total of 6 problems. Printed Name: Signature: Applied Math Qualifying Exam 11 October 2014 Instructions: Work 2 out of 3 problems in each of the 3 parts for a total of 6 problems. 2 Part 1 (1) Let Ω be an open subset of R

More information

Contents as of 12/8/2017. Preface. 1. Overview...1

Contents as of 12/8/2017. Preface. 1. Overview...1 Contents as of 12/8/2017 Preface 1. Overview...1 1.1 Introduction...1 1.2 Finite element data...1 1.3 Matrix notation...3 1.4 Matrix partitions...8 1.5 Special finite element matrix notations...9 1.6 Finite

More information

MAC2313 Final A. (5 pts) 1. How many of the following are necessarily true? i. The vector field F = 2x + 3y, 3x 5y is conservative.

MAC2313 Final A. (5 pts) 1. How many of the following are necessarily true? i. The vector field F = 2x + 3y, 3x 5y is conservative. MAC2313 Final A (5 pts) 1. How many of the following are necessarily true? i. The vector field F = 2x + 3y, 3x 5y is conservative. ii. The vector field F = 5(x 2 + y 2 ) 3/2 x, y is radial. iii. All constant

More information

Math 251 December 14, 2005 Answer Key to Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

Math 251 December 14, 2005 Answer Key to Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt Name Section Math 51 December 14, 5 Answer Key to Final Exam There are 1 questions on this exam. Many of them have multiple parts. The point value of each question is indicated either at the beginning

More information

03 - Basic Linear Algebra and 2D Transformations

03 - Basic Linear Algebra and 2D Transformations 03 - Basic Linear Algebra and 2D Transformations (invited lecture by Dr. Marcel Campen) Overview In this box, you will find references to Eigen We will briefly overview the basic linear algebra concepts

More information

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count

More information

Institute of Structural Engineering Page 1. Method of Finite Elements I. Chapter 2. The Direct Stiffness Method. Method of Finite Elements I

Institute of Structural Engineering Page 1. Method of Finite Elements I. Chapter 2. The Direct Stiffness Method. Method of Finite Elements I Institute of Structural Engineering Page 1 Chapter 2 The Direct Stiffness Method Institute of Structural Engineering Page 2 Direct Stiffness Method (DSM) Computational method for structural analysis Matrix

More information

3.2 Gaussian Elimination (and triangular matrices)

3.2 Gaussian Elimination (and triangular matrices) (1/19) Solving Linear Systems 3.2 Gaussian Elimination (and triangular matrices) MA385/MA530 Numerical Analysis 1 November 2018 Gaussian Elimination (2/19) Gaussian Elimination is an exact method for solving

More information

Qualifying Examination

Qualifying Examination Summer 24 Day. Monday, September 5, 24 You have three hours to complete this exam. Work all problems. Start each problem on a All problems are 2 points. Please email any electronic files in support of

More information

FEniCS Course. Lecture 0: Introduction to FEM. Contributors Anders Logg, Kent-Andre Mardal

FEniCS Course. Lecture 0: Introduction to FEM. Contributors Anders Logg, Kent-Andre Mardal FEniCS Course Lecture 0: Introduction to FEM Contributors Anders Logg, Kent-Andre Mardal 1 / 46 What is FEM? The finite element method is a framework and a recipe for discretization of mathematical problems

More information

CHAPTER 8: Matrices and Determinants

CHAPTER 8: Matrices and Determinants (Exercises for Chapter 8: Matrices and Determinants) E.8.1 CHAPTER 8: Matrices and Determinants (A) means refer to Part A, (B) means refer to Part B, etc. Most of these exercises can be done without a

More information

Matrix assembly by low rank tensor approximation

Matrix assembly by low rank tensor approximation Matrix assembly by low rank tensor approximation Felix Scholz 13.02.2017 References Angelos Mantzaflaris, Bert Juettler, Boris Khoromskij, and Ulrich Langer. Matrix generation in isogeometric analysis

More information

Mathematical Preliminaries

Mathematical Preliminaries Mathematical Preliminaries Introductory Course on Multiphysics Modelling TOMAZ G. ZIELIŃKI bluebox.ippt.pan.pl/ tzielins/ Table of Contents Vectors, tensors, and index notation. Generalization of the concept

More information

Math 251 December 14, 2005 Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

Math 251 December 14, 2005 Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt Math 251 December 14, 2005 Final Exam Name Section There are 10 questions on this exam. Many of them have multiple parts. The point value of each question is indicated either at the beginning of each question

More information

Mesh Grading towards Singular Points Seminar : Elliptic Problems on Non-smooth Domain

Mesh Grading towards Singular Points Seminar : Elliptic Problems on Non-smooth Domain Mesh Grading towards Singular Points Seminar : Elliptic Problems on Non-smooth Domain Stephen Edward Moore Johann Radon Institute for Computational and Applied Mathematics Austrian Academy of Sciences,

More information

MAT Linear Algebra Collection of sample exams

MAT Linear Algebra Collection of sample exams MAT 342 - Linear Algebra Collection of sample exams A-x. (0 pts Give the precise definition of the row echelon form. 2. ( 0 pts After performing row reductions on the augmented matrix for a certain system

More information

Evaluating Determinants by Row Reduction

Evaluating Determinants by Row Reduction Evaluating Determinants by Row Reduction MATH 322, Linear Algebra I J. Robert Buchanan Department of Mathematics Spring 2015 Objectives Reduce a matrix to row echelon form and evaluate its determinant.

More information

SOLUTIONS TO THE FINAL EXAM. December 14, 2010, 9:00am-12:00 (3 hours)

SOLUTIONS TO THE FINAL EXAM. December 14, 2010, 9:00am-12:00 (3 hours) SOLUTIONS TO THE 18.02 FINAL EXAM BJORN POONEN December 14, 2010, 9:00am-12:00 (3 hours) 1) For each of (a)-(e) below: If the statement is true, write TRUE. If the statement is false, write FALSE. (Please

More information