CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering HW 5 Repeat the HW associated with the FD LBI except that you will now use 1-D FEM with linear elements. Also, you will only consider the isothermal case with the non- dimensionalized temperature set to 1. A sample program has been provided for you. Among the tasks are: –Check the sample program for bugs (especially the matrix element equations). –Place the boundary conditions into the matrix. –Modify the matrix storage for use of PETSC. –Look at different values of dissipation (both varying in time and space) and see how they affect the solution.
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering HW 5 (cont’d 2) The sample code stores the matrix in a banded format:
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Higher Order Elements in 1-D The Lagrange family provides basis functions to approximate the solution to any degree polynomial in 1-D. To approximate a k th degree polynomial, we need k+1 nodes:
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Higher Order Elements in 1-D (cont’d 2) One possibility: The above expression does not satisfy the condition that Therefore,
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Higher Order Elements in 1-D (cont’d 3) Example for quadratic (k=2)
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering 2-D Finite Element Method for Isothermal Flow of Ionized Gas Through a Nozzle Robert Lee
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Differences from 1-D Case Method of weighted residuals applied over a surface rather than a line. Unknowns increase because velocity along two directions. Finite element basis functions are 2-D. The resulting matrix equation produces general sparse matrices.
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Differences from 1-D Case (cont’d 2) Gridding of geometry now becomes complicated. There are numerous choices for element shapes Errors present in both discretization of unknowns and the geometry.
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Equation of Interest After application of the method of weighted residuals, the equation of interest is
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Review of FEM The basis functions j (x) are generated by simple functions defined piecewise (element by element) over the FEM grid. The basis must be smooth enough such that their derivatives in the weight residual equation exists (assume n th order derivatives), i.e., FEM provides a systematic and very general way of generating the basis functions (usually polynomial approximations). The criteria are:
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Review of FEM (cont’d 2) The basis functions are chosen in such a way that the coefficients defining the unknown quantity are precisely the value of the unknown quantity at the nodes. There are two ways to find the basis functions over an arbitrary element. We will call them Method 1 and Method 2
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 1 for Triangles Consider a 3-node triangle. With 3 nodes, one has 3 degrees of freedom for the basis functions, An obvious choice for the placement of the nodes is at the vertices of the triangle. The basis functions will be continuous along the edges of the triangle as long as the unknowns at the nodes associated tith that edge are single valued.
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 1 for Triangles (cont’d 2) 1 3 2
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 1 for Triangles (cont’d 3)
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Higher Order Triangles Pascal’s triangle: Examples:
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Quadrilateral Elements The 4-node quadrilateral has bilinear behavior,
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Concept of Master Element Let us consider the concept of master element for the 1D case.
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Mapping from Master Element
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Mapping from Master Element (cont’d 2) e.g., if then
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 2 for Quadrilaterals The elements formed by method 2 are called isoparametric elements,
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 2 for Quadrilaterals (cont’d 2)
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 2 for Quadrilaterals (cont’d 3)
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 2 for Quadrilaterals (cont’d 4) The 2x2 matrix is referred to as the Jacobian matrix [J]. The determinant of the Jacobian matrix is
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 2 for Quadrilaterals (cont’d 5)
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Method 2 for Quadrilaterals (cont’d 6) Applying Gauss Quadrature,
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering Accuracy of Mapping The accuracy of the FEM solution is highly dependent on the element shape. The best solutions are produced in those grids where the element is well-shaped (the best shape being a square) For quadrilaterals with inner angles greater than 180 degrees, the mapping may be outside the quadrilateral. Typically, we would like no inner angles greater than 150 degrees.