Adaptive numerical methods

Similar documents
AMS527: Numerical Analysis II

Contents. I The Basic Framework for Stationary Problems 1

Finite element algorithm with adaptive quadtree-octree mesh refinement

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 36

Computational Fluid Dynamics - Incompressible Flows

Finite Element Method. Chapter 7. Practical considerations in FEM modeling

The multi-level hp-method for three-dimensional problems: dynamically changing high-order mesh refinement with arbitrary hanging nodes

1.2 Numerical Solutions of Flow Problems

Lecture 2 Unstructured Mesh Generation

CURVILINEAR MESH GENERATION IN 3D

DEVELOPMENTS OF PARALLEL CURVED MESHING FOR HIGH-ORDER FINITE ELEMENT SIMULATIONS

PROGRAMMING OF MULTIGRID METHODS

Effective adaptation of hexahedral mesh using local refinement and error estimation

Documentation for Numerical Derivative on Discontinuous Galerkin Space

Adaptive Surface Modeling Using a Quadtree of Quadratic Finite Elements

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

Adaptive-Mesh-Refinement Pattern

Chapter 7 Practical Considerations in Modeling. Chapter 7 Practical Considerations in Modeling

Application of Finite Volume Method for Structural Analysis

Transfinite Interpolation Based Analysis

What is Multigrid? They have been extended to solve a wide variety of other problems, linear and nonlinear.

arxiv: v1 [math.na] 20 Sep 2016

ALF USER GUIDE. Date: September

DOWNLOAD PDF BIG IDEAS MATH VERTICAL SHRINK OF A PARABOLA

Anisotropic quality measures and adaptation for polygonal meshes

An Interface-fitted Mesh Generator and Polytopal Element Methods for Elliptic Interface Problems

High Order Nédélec Elements with local complete sequence properties

Shape Modeling and Geometry Processing

An easy treatment of hanging nodes in hp-finite elements

Numerical Methods for PDEs : Video 11: 1D FiniteFebruary Difference 15, Mappings Theory / 15

Non-Linear Finite Element Methods in Solid Mechanics Attilio Frangi, Politecnico di Milano, February 3, 2017, Lesson 1

An introduction to mesh generation Part IV : elliptic meshing

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Chapter 13. Boundary Value Problems for Partial Differential Equations* Linz 2002/ page

Collocation and optimization initialization

f xx + f yy = F (x, y)

Memory Efficient Adaptive Mesh Generation and Implementation of Multigrid Algorithms Using Sierpinski Curves

13.472J/1.128J/2.158J/16.940J COMPUTATIONAL GEOMETRY

Handling Parallelisation in OpenFOAM

CHARMS: A Simple Framework for Adaptive Simulation SIGGRAPH Presented by Jose Guerra

Finite Element Implementation

ADAPTIVE APPROACH IN NONLINEAR CURVE DESIGN PROBLEM. Simo Virtanen Rakenteiden Mekaniikka, Vol. 30 Nro 1, 1997, s

EN 10211:2007 validation of Therm 6.3. Therm 6.3 validation according to EN ISO 10211:2007

Transactions on Information and Communications Technologies vol 15, 1997 WIT Press, ISSN

Efficient Multigrid based solvers for Isogeometric Analysis

ADAPTIVE FINITE ELEMENT

PARALLEL MULTILEVEL TETRAHEDRAL GRID REFINEMENT

Department of Computing and Software

Variational Geometric Modeling with Wavelets

INTRODUCTION TO FINITE ELEMENT METHODS

PARALLEL DECOMPOSITION OF 100-MILLION DOF MESHES INTO HIERARCHICAL SUBDOMAINS

AS 5850 Finite Element Analysis

Algebraic Flux Correction Schemes for High-Order B-Spline Based Finite Element Approximations

Finite element solution of multi-scale transport problems using the least squares based bubble function enrichment

Generative Part Structural Analysis Fundamentals

Motivation Patch tests Numerical examples Conclusions

Efficient Storage and Processing of Adaptive Triangular Grids using Sierpinski Curves

A High-Order Accurate Unstructured GMRES Solver for Poisson s Equation

Top Math Summer School on Adaptive Finite Elements: Analysis and Implementation Organized by: Kunibert G. Siebert

List of NEW Maths content

Predictive Engineering and Computational Sciences. Data Structures and Methods for Unstructured Distributed Meshes. Roy H. Stogner

Learning Module 8 Shape Optimization

Parameterization. Michael S. Floater. November 10, 2011

CS 450 Numerical Analysis. Chapter 7: Interpolation

Numerical integration of polynomials and discontinuous functions on irregular convex polygons and polyhedrons

Voronoi Diagram. Xiao-Ming Fu

Parallel Performance Studies for COMSOL Multiphysics Using Scripting and Batch Processing

APPROXIMATING PDE s IN L 1

Computational Physics PHYS 420

Numerical integration of polynomials and discontinuous functions on irregular convex polygons and polyhedrons

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

CS354 Computer Graphics Surface Representation IV. Qixing Huang March 7th 2018

Sung-Eui Yoon ( 윤성의 )

Journal of Engineering Research and Studies E-ISSN

Chapter 6. Petrov-Galerkin Formulations for Advection Diffusion Equation

REPORT DOCUMENTATION PAGE

Implementation of a General Mesh Refinement Technique

course outline basic principles of numerical analysis, intro FEM

Radiosity. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

SELECTIVE ALGEBRAIC MULTIGRID IN FOAM-EXTEND

High Performance Computing: Tools and Applications

Method of taking into account constructional and technological casting modifications in solidification simulations

Lesson 5: Mesh Refinement

FEM Convergence Requirements

PITSCO Math Individualized Prescriptive Lessons (IPLs)

Supplementary Materials for

When implementing FEM for solving two-dimensional partial differential equations, integrals of the form

St John s Curriculum Overview Year 8

implicit surfaces, approximate implicitization, B-splines, A- patches, surface fitting


Efficiency of adaptive mesh algorithms

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

1 Exercise: Heat equation in 2-D with FE

Delaunay Triangulations. Presented by Glenn Eguchi Computational Geometry October 11, 2001

QUADRATIC UNIFORM B-SPLINE CURVE REFINEMENT

On a nested refinement of anisotropic tetrahedral grids under Hessian metrics

: What is Finite Element Analysis (FEA)?

The Finite Element Method

Modeling Unsteady Compressible Flow

A three-dimensional high-order generalized FEM for through-the-thickness branched cracks

Transcription:

METRO MEtallurgical TRaining On-line Adaptive numerical methods Arkadiusz Nagórka CzUT Education and Culture

Introduction Common steps of finite element computations consists of preprocessing - definition of geometry, boundary conditions, initial conditions, material properties, meshing processing - assembly and solution of a system of equation (possibly in a time and/or non-linear loop) postprocessing - evaluation of derived quantities, visualisation of the results 2

Cost of computations Some parts are more time-consuming than another time of creation of the geometric model and setting up the problem depends on its complexity and user s experience meshing of complicated models can take a long time assembly time is proportional to number of elements and polynomial degree imposition of boundary condition is as above solution of linear systems is usually the most timeconsuming, O(N 3 ) for LU, O(N 2 ) for LU and banded matrices, O(N 3/2 ) for for conjugate gradients In transient problems cost per step may depend on step size 3

Error in the results Numerical methods give approximate solutions. The error at a point is Global measures over the entire domain infinity norm ( maximal absolute value of the difference ) E = e L L1, L2 norms, etc. E e( x) = u( x) u ( x) esssup e( x) ( Ω ) = x Ω = p e p e d Lp ( Ω ) = (x) x Ω (essential supremum) problem-dependent energy norm, e.g. for the Poisson eq. ( Ω) Ω h Ω E = e = k e( x) e( x) dx E 4

Convergence The smaller element size in FEM (and also FDM, FVM etc.), the smaller the error. The approximate solution is converging to the exact one. Convergence rate describes how quickly the convergence occurs, i.e. h = h0 / 2 E = E0 / 2, E = Ch rate = 1 h = h0 / 2 E = E0 / 4, E = Ch rate = 2 h = h0 / 2 E = E0 / 8, E = Ch rate = 3 2 3 5

Convergence plot Solution on a mesh with element of size h has the error E. It is a point per solution in a size-error coordinate system. E log E α h log h r E = Ch = tgα r log E = log C + r log h is convergence rate, h measures problem size 6

Convergence plot, cont. If a discretization is non-uniform, total number of nodes N is a better measure of problem size. For unit line, square etc. h h = 1/ N = O( N 1 = 1/ N = O( N ) 3 1/3 1D ) 3D h = 1/ N = O( N p = O(N) 1/ 2 ) 2D log E log E log h log N 7

e e L 2 ( Convergence of FEM with h-refinement C h = p+ 1 Ω ) 1 e = C E( Ω) 2 q = CN algebraic convergence h p (constants depend on the solution) 8

e e L 2 ( Convergence of FEM with p-refinement p+ 1 p = h C e = C (constants depend on Ω ) 1 r E( Ω) 2 r p ( q ) 2 q N 1 h p the solution) = C exp exponential convergence 9

Adaptivity Smaller element size gives more accurate results but at higher cost. Shorter step size means more time steps to do. A trade-off exists between accuracy and solution time. Adaptivity allows to reduce cost while controlling accuracy. Cost reduction is possible thanks to refining where necessary. Accuracy is assessed by error estimates. According to user needs it is possible to obtain the solution with required accuracy at the lowest cost obtain the most accurate solution possible 10

Adaptive loop for a steady problem Mesh is adapted to the solution iteratively Assume a coarse initial mesh repeat Solve the problem on current mesh Estimate the error of the solution if the solution is not accurate enough then Select where to refine or coarsen the mesh Modify the mesh until required accuracy is achieved 11

Mesh adaptation for a transient problem Mesh adaptation can be embedded in a transient loop t < T while Assume a coarse initial mesh or use the previous mesh repeat Transfer the solution from the previous to the current mesh Solve the time step on the current mesh Estimate the error of the solution if the solution is not accurate enough then Select where to refine or coarsen the mesh Modify the mesh until required accuracy is achieved t t + t 12

Error estimation Error estimation is a key part of adaptive computations quantitative information on accuracy, local estimates (called error indicators) point out places to refine, global estimates can be used in stopping condition Error estimators: estimate the error of a solution in terms of this solution and problem data Estimators of error due to space discretization residual (explicit and implicit), averaging based (postprocessing of solution derivatives) Estimators of error due to time discretization second temporal derivative, helper solution with half step 13

Refinement by subdivision Subdivide a triangle into four smaller triangles 3 1 4 2 1 Uniform and isotropic h = h 0 2 14

Hanging nodes A mesh is irregular if it contains hanging nodes Hanging nodes cause discontinuity. Constraints should be imposed to prevent it A one-irregular mesh Discontinuity of approximation 15

Elimination of hanging nodes Triangle with hanging node(s) is a green triangle A green triangle can be bisected into 2 transient elements Bad shape should be avoided - one-irregular rule, three-neighbour rule 16

Alternative refinement by subdivision Subdivision into two triangles by the longest edge Rivara algorithm of refinement of a set of elements 1 3 Subdivision of the bold triangle may cause subdivision of neighbour(s) 2 Bisect all elements in the set by the longest edge (1) Place all irregular elements in the set (the bottom triangle) Bisect all elements from the set (2). If the midpoint point is a new hanging node, connect it with the other (3) Repeat until the set is empty 17

Tree data structure Element being subdivided is the parent. It has four or two child elements Refinement: the parent becomes a tree node, children become leafs Coarsening: pruning leaf elements and restoring the parent coarsening 18

Coarsening by edge collapsing Coarsening does not require earlier refinement Edge collapsing: make the length of an edge equal to zero by shifting the first vertex to the second one Erase all internal edges, then retriangulate Collapsed vertex V0 is shifted to the target vertex V3 V1 V5 V1 V5 V0 V2 V4 V2 V4 V3 V3 19

p-refinement and hierarchic approximation Mesh is adapted to the solution by varying polynomial degree of elements, whereas mesh geometry is fixed A family of finite elements with increasing order of approximation is needed Hierarchic basis functions are well suited for refinement. In a higher order element a correction is added to the solution in the original element (1) (1) u x) = N0 ( x) u0 + ( N ( x) u (1) 1 1 linear quadratic (2) (1) (1) u x) = N0 ( x) u0 + N1 ( x) u1 + ( N ( x) a (2) 2 2 cubic (3) (1) (1) (2) u x) = N0 ( x) u0 + N1 ( x) u1 + N2 ( x) a2 + ( N ( x) a (3) 3 3 20

Mass and stiffness matrices of hierarchical elements Mass and stiffness matrices are the integrals of product of shape functions or of their derivatives Mass or stiffness matrix of element of the order p+1 includes the matrix of the element of the order p p=1 p=2 p=3 p=4 p=5 The matrix inherited from the element of order p-1 is augmented with terms involving the new p-th order functions Hierarchical degrees of freedom are not the values of the solution at nodes or edges or in the centre 21

Orthogonality Two shape functions or their gradients are orthogonal if the integral of the appropriate product is zero. Ω N i N j dx = 0 Ni N jdx = 0, Ω i j p=1 p=2 p=3 If integrals of some products of shape functions are zero, the mass matrix will have zero elements. Similarly for gradients and the stiffness matrix. p=4 p=5 Example stiffness matrix for a hierarchical triangle 22

Integrated Legendre polynomials Legendre polynomials are orthogonal in ( ξ ) ( p ) [( ) ] p p 1 1 d 2 p 1 p Pp = ξ 1 1! 2 dξ [ 0,1] The mass matrix is nearly diagonal if basis functions are Legendre polynomials The stiffness matrix nearly diagonal if basis function derivatives are Legendre polynomials. Then N ( p) = P dξ, ξ( 0 ) = ξ( 1) = 0, p p 1 2 N (2) 2 (3) 1 = ξ 1, N = 2 ξ 4 ( 3 ) (4) ( 4 2 ξ ξ, N = 15ξ 18 + 3) etc. 23

Hierarchical basis functions on the triangle A hierarchical basis function associated with an edge should reduce to one dimensional-function on the edge. Such an edge function should be zero on other edges and at vertices Three edge functions of the order p can be introduced Starting from p=3 extra functions are needed to represent complete polynomial. These are the bubble functions associated with element interior. They are zero on element boundary Bubble functions can be defined as products of edge and vertex functions 24

Hierarchical basis functions on the triangle, cont. p =1 p =2 3 x +3x +3 x +3x p =3 p =4 +1x +2x 25

p-refinement Refinement: introduce a higher order correction (extra basis functions and degrees of freedom) without altering element shape The one-level difference rule should be obeyed Coarsening: removal of some hierarchical deg. of freedom 26

p-refinement, cont. Transient elements need to be introduced to preserve continuity of approximation A transient element has extra unknowns on the edge shared with a higher-order element 27

Solution transfer After refinement, a solution from the original mesh often needs to be transferred (projected) to the new adapted mesh new starting vector for an iterative solution method (conjugate gradients etc.) previous step solution in time stepping schemes solution from the previous non-linear iteration 28

Solution transfer during h-refinement by subdivision Linear interpolation at new midpoint nodes Interpolation involving more surrounding nodes is more accurate (e.g moving least-squares) 29

Solution transfer during coarsening of h-refined mesh Linear interpolation in parent element instead of piecewise-linear interpolation in deleted children Loss of accuracy 30

Solution transfer during p-refimenent and coarsening Higher-order unknowns introduced can be initially 0 Trimming highest-order unknowns during coarsening Before refinement u u ( p) h ( p+ 1) h = = M i= 1 M i= 1 N i N a i a After refinement i i + N j= 1 N ( p+ 1) M + j a M + j higher-order correction u ( p+ 1) h ( p) = uh + if am + 1 = 0, am 2 = 0,K higher-order unknowns (degrees of freeedom) 31

Adaptive strategy Assume error indicators and global estimate is available How many elements of the mesh are to refine, how many to coarsen (if any)? What is the preferred element size? h-refinement, p-refinement or both? Adapt the time step? Should the mesh be adapted in this time step? More refined elements per iteration means greater error reduction. Overrefinement is possible. Fewer refined elements - more iterations of the adaptive loop 32

Fixed adaptive strategies Fixed threshold strategy Refine elements with the error greater than Coarsen elements with the error less than Fixed fraction strategy Refine α r 100% elements with the highest error Coarsen α c 100% elements with the lowest error Fixed contribution strategy Refine elements with the highest error where E elems elem = α retotal Er = α re max Ec = αce max Coarsen elements with the lowest error contributing α c E total 33

Error equidistribution strategy Error equidistribution (Zienkiewicz-Zhu) strategy Each element should contribute the same local error in energy to the total error E 2 E η 2 2 total elem = Eavg = = Nelems ( ) u N h E elems 2 p E elem = Ch elem (a priori estimates of convergence) Suggested local element size is h new elem = h elem E elem 1/ p η u Subdivide if h new < 0. 5h h E N elems Unrefine if h new > 2h 34

Automatic selection of time step size Adaptation of time step size in the k-th time increment Solve the step at, estimate the error E k 1 t k Calculate the suggested step length t new k = t E < Ecrit = η u k t + ηt u E 1 n+ 1 n - order of the method If (the solution is accurate enough) use this step length in the next time increment k+1 new k 1 t k Otherwise repeat the step (find the solution at ) t + 35

Adaptive solution of a solidification problem Solidification of a casting made of Al-Cu alloy T = 886 K - solidus isotherm, T = 926 K - liquidus isotherm 36

Solution of the solidification problem with h-refinement Final meshes at selected times 37

Solution of the solidification problem with p-refinement Final meshes at selected times 38

Solidification with adaptive time stepping Adapted time step reflects the error of time stepping 39

Solidification with hp-refinement and adaptive time stepping Polynomial degree p Time step is the distance between the symbols. It is smaller when solidification starts and finishes. 40