Jakubˇcervený AUTOMATIC Hp-ADAPTIVITY for TIME
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSITY OF WEST BOHEMIA FACULTY OF ELECTRICAL ENGINEERING DEPARTMENT OF THEORY OF ELECTRICAL ENGINEERING Jakub Cerven´yˇ AUTOMATIC hp-ADAPTIVITY FOR TIME-DEPENDENT PROBLEMS DOCTORAL THESIS Advisor: Prof. Ing. Ivo Doleˇzel,CSc. Co-advisor: RNDr. Pavel Sol´ın,Ph.D.ˇ Plzeˇn,2011 Acknowledgements I would first like to thank my advisor, Prof. Ing. Ivo Doleˇzel,CSc. for all his support, both at the Institute of Thermomechanics at the Academy of Sciences in Prague and at the KTE FEL at the University of West Bohemia in Plzeˇn,during the many years of my PhD. studies. Without his constant encouragement and endless patience I would never have finished this work. Many thanks also go to my co-advisor, RNDr. Pavel Sol´ın,Ph.D.ˇ for giving me the opportunity to work on interesting projects in his hp-FEM group at the University of Texas at El Paso. Most results in this work were obtained during the three years of my stay there, which I thoroughly enjoyed. I would also like to thank Dr. Sol´ınforˇ his insistence on making the results published in international journals and presented at relevant conferences. I was only able to appreciate this effort much later. Finally, Dr. Sol´ınwroteˇ two excellent monographs [45, 43] which helped me learn the basics of the finite element method and introduced me to numerical analysis in general. I would like to thank Dr. William F. Mitchell for sending me the data for the comparison graphs from his survey [35]. I am also thankful to my colleagues from the hp-FEM group, Martin Z´ıtka, David Andrˇs,Pavel K˚usand Lenka Dubcov´a,for creating a friendly and inspir- ing working environment. Lenka deserves a special mention for her valuable contributions to Hermes2D, for always being ready to help me with mathe- matical issues, for being a great person and for eventually becoming my life partner. I love you :-) This work and related code was developed solely using open-source software. I would like to use this opportunity to appreciate the work of the thousands of individuals who created, made free and continue to maintain great projects like the GNU/Linux, GCC, UMFPACK, Octave, LATEX, Inkscape and many more, which were all indispensable during my work on this thesis. i Abstract This dissertation focuses on the development of algorithms for automati- cally adaptive hp-FEM that can be used to solve both stationary and time- dependent partial differential equations (PDEs) in two spatial dimensions. The hp-FEM is an advanced version of the classical finite element method which employs elements of varying diameter h and polynomial degree p to obtain superior (exponential) convergence rates. However, the method puts high demands on its implementation and presents a number of open problems. In this work we review the basics of 2D hp-FEM and then show how to extend a standard hp-FEM solver to support meshes with hanging nodes, which is a prerequisite for automatic hp-adaptation of the approximate solution. Our original algorithm and data structure enable the use of arbitrarily irregular meshes that can reduce both the size of the discrete problem and the com- plexity of the hp-adaptation algorithm. Practical implementation details and examples are included. Next we review several existing hp-adaptation strategies for stationary PDEs, in particular an existing algorithm based on the reference solution approach. We design a new algorithm that is both simpler and faster, while delivering better or comparable results, as we demonstrate on two standard benchmark problems. The next topic is the solution of systems of PDEs. We motivate the use of different meshes for different equations in the system and present an original algorithm for the assembly of the stiffness matrix of such multi-mesh systems. The goal is to save degrees of freedom and to prepare the solver for dynamic meshes in time-dependent PDEs. We test the implementation on a model problem of thermoelasticity. Finally, we use the new multi-mesh assembling and the adaptive Rothe method to obtain computations with meshes that can change with time, in order to speed up the solution of time-dependent problems that exhibit moving features in their solution. We develop an algorithm that automatically adjusts the mesh between successive time steps and test it on two nonlinear model problems from the areas of incompressible fluid flow and combustion physics. ii Anotace Tato dizertace se zamˇeˇrujena n´avrhalgoritm˚upro automaticky adaptivn´ı hp-FEM pro ´uˇcelyˇreˇsen´ıstacion´arn´ıch i ˇcasovˇez´avisl´ych parci´aln´ıch diferen- ci´aln´ıch rovnic (PDR) ve dvou prostorov´ych rozmˇerech. Metoda hp-FEM je zdokonalen´averze klasick´emetody koneˇcn´ych prvk˚u,kter´avyuˇz´ıv´aelementy r˚uzn´ych polomˇer˚u h a polynomi´aln´ıch stupˇn˚u p k dosaˇzen´ıvynikaj´ıc´ı(expo- nenci´aln´ı)rychlosti konvergence. Klade ovˇsem velk´en´arokyna implementaˇcn´ı str´ankua pˇrin´aˇs´ıˇraduotevˇren´ych probl´em˚u. V t´etopr´acishrnujeme z´aklady hp-FEM ve 2D a pot´epopisujeme rozˇs´ıˇren´ı standardn´ıhoˇreˇsiˇce hp-FEM o podporu s´ıt´ıs vis´ıc´ımiuzly, kter´aje pˇredpokla- dem pro automatickou hp-adaptaci pˇribliˇzn´ehoˇreˇsen´ı.N´aˇsp˚uvodn´ıalgoritmus a datov´astruktura umoˇzˇnuj´ıpouˇzit´ılibovolnˇeneregul´arn´ıch s´ıt´ı,jeˇzmohou v´estke zmenˇsen´ıdiskr´etn´ıhoprobl´emu a ke zjednoduˇsen´ıalgoritmu pro hp- adaptivitu. Popisujeme i praktick´eimplementaˇcn´ıdetaily a pˇr´ıklady. D´aleshrnujeme nˇekolik existuj´ıc´ıch strategi´ı hp-adaptivity pro stacion´arn´ı PDR, zejm´enaexistuj´ıc´ıalgoritmus zaloˇzen´yna tzv. referenˇcn´ımˇreˇsen´ı.Navr- hujeme nov´yalgoritmus, kter´yje jednoduˇsˇs´ıa rychlejˇs´ı,pˇriˇcemˇzale dosahuje lepˇs´ıch nebo srovnateln´ych v´ysledk˚u,jak ukazujeme na dvou standardn´ıch testovac´ıch probl´emech. Dalˇs´ımt´ematem je ˇreˇsen´ısoustav PDR. Obhajujeme moˇznostpouˇzit´ır˚uzn´ych s´ıt´ı pro r˚uzn´erovnice v soustavˇea pˇrin´aˇs´ıme p˚uvodn´ı algoritmus pro ses- taven´ımatice tuhosti takov´ehosyst´emu (tzv. multi-mesh assembling). C´ılem je ´uspora stupˇn˚uvolnosti a pˇr´ıprava ˇreˇsiˇcena dynamick´es´ıtˇeu ˇcasovˇez´avis- l´ych rovnic. Implementaci testujeme na modelov´empˇr´ıkladuz termoelasticity. Nov´yalgoritmus pro multi-mesh assembling v z´avˇeruvyuˇz´ıv´amespolu s adap- tivn´ıRotheho metodou k v´ypoˇct˚umna s´ıt´ıch, kter´ese mohou mˇenitv ˇcase,za ´uˇcelemzrychlen´ıˇreˇsen´ıˇcasovˇez´avisl´ych probl´em˚u,kter´evykazuj´ıpohybuj´ıc´ıse ´ukazy v jejich ˇreˇsen´ı.Vyv´ıj´ımealgoritmus, kter´ydok´aˇzeautomaticky upravo- vat s´ıˇt mezi jednotliv´ymiˇcasov´ymikroky a testujeme jej na dvou neline´arn´ıch modelov´ych probl´emech z oblast´ınestlaˇciteln´ehoproudˇen´ıa fyziky hoˇren´ı. iii I hereby declare that this Ph.D. dissertation is completely my own work and that I used only the cited sources. Prague, September 2011 Jakub Cerven´yˇ iv Contents Acknowledgements . .i Abstract . ii Anotace . iii 1 Introduction 1 1.1 History of hp-FEM . .1 1.2 Objectives of This Work . .3 2 Higher-Order FEM 4 2.1 Weak Formulation of a Model Problem . .4 2.2 The Galerkin Method . .6 2.3 Standard Linear Elements . .7 2.4 Affine Concept of the FEM . .9 2.5 Higher-Order Finite Element Space . 11 2.6 Nodal Shape Functions . 11 2.7 Hierarchic Shape Functions . 13 2.8 Nodes and Connectivity Arrays . 16 2.9 Higher-Order Numerical Quadrature . 17 2.10 Assembling Procedure . 17 3 Constrained Approximation 19 3.1 Hanging Nodes and Mesh Regularity . 19 3.2 Explicit Constraints . 21 3.2.1 Solver-enforced Constraints . 23 3.2.2 Lagrange Multipliers . 24 v 3.2.3 Matrix Condensation Method . 25 3.3 Implicit Constraints . 27 3.3.1 One-Level Hanging Nodes . 27 3.3.2 Arbitrary-Level Hanging Nodes . 30 3.3.3 Mesh Data Structures . 34 4 Automatic hp -Adaptivity for Stationary Problems 40 4.1 Introduction . 40 4.2 Existing hp-Adaptive Strategies . 41 4.3 Projection-Based-Interpolation Algorithm . 43 4.3.1 1D Algorithm . 44 4.3.2 2D Algorithm . 46 4.4 Our hp-Adaptivity Algorithm . 47 4.5 Fast Algorithm with Orthonormal Bases . 51 4.6 Benchmarks . 54 4.6.1 L-shaped Domain Problem . 54 4.6.2 Inner Layer Problem . 57 4.7 Conclusion and Future Work . 61 5 Systems of PDEs and Multi-Mesh Assembling 63 5.1 Introduction . 63 5.2 Discretization of Systems of PDEs . 64 5.3 Assembling on Multiple Meshes . 66 5.3.1 Integration Over Sub-elements . 67 5.3.2 Union Mesh Traversal . 69 5.3.3 Evaluation of Coupling Forms . 72 5.3.4 Small Elements vs. High Order Elements . 74 5.4 Model Problem: Thermoelasticity . 75 5.5 Conclusion . 78 vi 6 Time-Dependent Problems and hp-Adaptivity 82 6.1 Introduction . 82 6.2 Method of Lines vs. the Rothe Method . 83 6.3 Basic Idea and Algorithm . 84 6.4 Simple Dynamic h-Adaptivity . 86 6.4.1 Model Problem: 2D Incompressible Viscous Flow . 86 6.5 Full Dynamic hp-Adaptivity . 91 6.5.1 Improved Refinement Criterion . 91 6.5.2 Coarsening Based on Super-Coarse Solutions . 91 6.5.3 Model Problem: Propagation of Laminar Flame . 92 6.6 Conclusions and Future Work . 98 7 Conclusion 99 7.1 Future Work . 100 7.2 Publications and Citations . 101 References 102 vii Chapter 1 Introduction Today, the development of most fields of engineering and natural sciences would be unthinkable without the use of computers. Computer simulation has become an essential part of electric, mechanical and civil engineering as well as of many areas of physics, chemistry and biology. Indeed, computational science is now regarded as the third mode of science, complementing the two classical domains of experimentation and theory.