Automated Computational Modelling for Complicated Partial Differential Equations
Total Page:16
File Type:pdf, Size:1020Kb
Automated computational modelling for complicated partial differential equations Automated computational modelling for complicated partial differential equations Proefschrift ter verkrijging van de graad van doctor aan de Technische Universiteit Delft, op gezag van de Rector Magnificus prof. ir. K.C.A.M. Luyben, voorzitter van het College voor Promoties, in het openbaar te verdedigen op dinsdag 3 december 2013 om 12.30 uur door Kristian Breum ØLGAARD Master of Science in Civil Engineering, Aalborg Universitet Esbjerg geboren te Ringkøbing, Denemarken Dit proefschrift is goedgekeurd door de promotor: Prof. dr. ir. L. J. Sluys Copromotor: Dr. G. N. Wells Samenstelling promotiecommissie: Rector Magnificus Voorzitter Prof. dr. ir. L. J. Sluys Technische Universiteit Delft, promotor Dr. G. N. Wells University of Cambridge, copromotor Dr. ir. M. B. van Gijzen Technische Universiteit Delft Prof. dr. P. H. J. Kelly Imperial College London Prof. dr. R. Larsson Chalmers University of Technology Prof. dr. L. R. Scott University of Chicago Prof. dr. ir. C. Vuik Technische Universiteit Delft Prof. dr. A. Scarpas Technische Universiteit Delft, reservelid Copyright © 2013 by K. B. Ølgaard Printed by Ipskamp Drukkers B.V., Enschede, The Netherlands ISBN 978-94-6191-990-8 Foreword This thesis represents the formal end of my long and interesting journey as a PhD student. The sum of many experiences over the past years has increased my knowledge and contributed to my personal development. All these experiences originate from the interaction with many people to whom I would like to express my gratitude. I am most grateful to Garth Wells for giving me the opportunity to come to Delft and to study under his competent supervision. His constructive criticism and vision combined with our nice discussions greatly improved the quality of my research. As the head of the computational mechanics group, Bert Sluys has played a vital role by creating a very nice and supportive working environment where people enjoy a lot of creative freedom. As creativity is key in this research I consider myself lucky to have been part of Bert’s group. Ronnie Pedersen did a very good job in persuading me to come to Delft for a PhD, and I am happy that he managed to convince me. I am also grateful for enjoying his friendship throughout the years, the good times on the football pitch, and the even better times in ’t Proeflokaal watching football and discussing work and life in general. A friendly and inspiring working environment is important in order to produce quality work. Therefore, I would like to thank past and present colleagues Rafid Al- Khoury, Roberta Bellodi, Frank Custers, Frank Everdij, Huan He, Cecilia Iacono, Cor Kasbergen, Oriol Lloberas-Valls, Prithvi Mandapalli, Frans van der Meer, Andrei Metrikine, Peter Moonen, Dung Nguyen, Vinh Phu Nguyen, Mehdi Nikbakth, Marjon van der Perk, Frank Radtke, Zahid Shabir, Xuming Shan, Angelo Simone, Mojtaba Talebian, Andy Terrel, Ilse Vegt, Jaap Weerheijm, Sigurd Blöndal, Lars Damkilde, Niels Dollerup, Jens Hagelskjær, Michael Jepsen, Sven Krabbenhøft and Søren Lambertsen. In particular, I would like to thank Frans for the years that we shared the same office and for translating the propositions into Dutch. A special thanks goes to Mehdi, my ‘brother-in-arms’, the only person remaining in the group who was also involved with the FEniCS Project after Garth left for Cambridge and Xuming left for home. The research presented in this thesis, is centered around the FEniCS Project and, vi therefore, I would also like to thank all the people in the FEniCS community, in particular my close collaborators from Simula Anders Logg, Martin Alnæs, Marie Rognes and Johan Hake for all the nice discussions, debugging assistance and good ideas. During my PhD, I also had the pleasure of visiting the University of Michigan and in this regard I want to thank Krishna Garikipati, Jake Ostien and his wife Erin for their hospitality during my stay in Ann Arbor. Outside the office, I enjoyed many hours in the good company of my friends Linda Grimstrup and Lars Freising which definitely improved the quality of my social life a lot. I also want to thank all my former team mates at Vitesse Delft for the many memorable hours on the football pitch trying to learn the secrets behind ‘totaalvoetbal’. Although The Netherlands and Denmark are quite similar in terms of weather, nature and culture it was always nice to receive visitors from home. For this, I would like to thank my friends Kenneth Guldager, Henrik Hansen, Mads Madsen, Christian Meyer, Nick Nørreby and Thomas Sørensen. Last, but certainly not least I want to thank my parents and my brother and sisters for their encouragement, support, help and visits during my years in Delft. I also wish to thank both of my sons for putting things in perspective which helped me to focus during the last iterations towards finishing this thesis. Of all people, I am most grateful to my wife. I know her patience has been tested to the limit, yet she remained supportive, loving and caring during all the years. For this, and for our sons, I am forever indebted. The research presented in this thesis was carried out at the Faculty of Civil Engineering and Geosciences at Delft University of Technology. The research was supported by the Netherlands Technology Foundation STW, the Netherlands Organisation for Scientific Research and the Ministry of Public Works and Water Management. Kristian Breum Ølgaard Ølgod, Denmark, November 2013 Contents 1 Introduction1 1.1 Research objectives and approach....................2 1.2 Outline....................................4 1.3 The FEniCS Project.............................5 1.3.1 Simple model problem.......................6 1.3.2 Unified Form Language......................8 1.3.3 FEniCS Form Compiler...................... 11 1.3.4 Unified Form-assembly Code................... 15 1.3.5 DOLFIN............................... 18 2 FEniCS applications to solid mechanics 29 2.1 Governing equations............................ 30 2.1.1 Preliminaries............................ 30 2.1.2 Balance of momentum....................... 31 2.1.3 Potential energy minimisation.................. 32 2.2 Constitutive models............................ 33 2.2.1 Linearised elasticity........................ 33 2.2.2 Flow theory of plasticity...................... 34 2.2.3 Hyperelasticity........................... 35 2.3 Linearisation issues for complex constitutive models......... 36 2.3.1 Consistency of linearisation.................... 36 2.3.2 Quadrature elements........................ 38 2.4 Implementations and examples...................... 41 2.4.1 Linearised elasticity........................ 43 2.4.2 Plasticity............................... 43 2.4.3 Hyperelasticity........................... 49 2.4.4 Elastodynamics........................... 52 2.5 Current and future developments.................... 53 viii Contents 3 Representations and optimisations of finite element variational forms 57 3.1 Motivation and approach......................... 58 3.2 Representation of finite element tensors................. 60 3.2.1 Quadrature representation.................... 61 3.2.2 Tensor contraction representation................ 62 3.3 Quadrature optimisations......................... 64 3.3.1 Eliminate operations on zeros.................. 67 3.3.2 Simplify expressions........................ 69 3.3.3 Precompute integration point constants............. 71 3.3.4 Precompute basis constants.................... 72 3.3.5 Further optimisations....................... 73 3.4 Performance comparisons of representations.............. 75 3.4.1 Performance for a selection of forms............... 75 3.4.2 Performance for common, simple forms............ 80 3.4.3 Performance for forms of increasing complexity........ 82 3.5 Performance comparisons of quadrature optimisations........ 86 3.6 Automatic selection of representation.................. 92 3.7 Future optimisations............................ 93 4 Automation of discontinuous Galerkin methods 97 4.1 Extending the framework to discontinuous Galerkin methods.... 98 4.1.1 Extending the Unified Form Language............. 99 4.1.2 Extending the Unified Form-assembly Code.......... 100 4.1.3 Extending the FEniCS Form Compiler.............. 100 4.1.4 Extending DOLFIN......................... 101 4.2 Examples................................... 103 4.2.1 The Poisson equation....................... 104 4.2.2 Steady state advection–diffusion equation........... 105 4.2.3 The Stokes equations........................ 109 4.2.4 Biharmonic equation........................ 110 4.2.5 Further applications........................ 114 5 Automation of lifting-type discontinuous Galerkin methods 115 5.1 Lifting-type formulation for the Poisson equation........... 116 5.2 Semi-automated implementation of lifting-type formulations.... 117 5.3 Comparison of IP and lifting-type formulations............ 122 5.4 Future developments............................ 127 6 Strain gradient plasticity 129 6.1 A strain gradient plasticity model.................... 130 6.2 A discontinuous Galerkin formulation for the plastic multiplier... 133 6.3 Linearisation of the governing equations................ 135 Contents ix 6.4 Implementation............................... 137 6.4.1 The predictor step......................... 138 6.4.2 The corrector step......................... 139 6.4.3 Implementing the variational forms............... 141 6.5 Numerical examples............................ 141 6.5.1 Unit square