High Performance Computing - Morris...

23
ADVANCED SCIENTIFIC COMPUTING Dr. – Ing. Morris Riedel Adjunct Associated Professor School of Engineering and Natural Sciences, University of Iceland Research Group Leader, Juelich Supercomputing Centre, Germany Finite Elements Method November 21 th , 2017 Room TG-227 High Performance Computing SHORT LECTURE 16

Transcript of High Performance Computing - Morris...

Page 1: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

ADVANCED SCIENTIFIC COMPUTING

Dr. – Ing. Morris RiedelAdjunct Associated ProfessorSchool of Engineering and Natural Sciences, University of IcelandResearch Group Leader, Juelich Supercomputing Centre, Germany

Finite Elements MethodNovember 21th, 2017Room TG-227

High Performance Computing

SHORT LECTURE 16

Page 2: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Review of Lecture 15 – Computational Fluid Dynamics (CFD)

Short Lecture 16 – Finite Elements Method

Numerical methods toanalyze fluid flows

Large Eddy Simulations (LES)

CFD uses Computational Steering

[1] S. Orszag et al.

(Turbulence simulation – flow is characterized by ‘chaotic property changes‘ – LES: filtered Navier Stokes equations)

[2] P. Wenisch et al.

2 / 23

Page 3: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Short Lecture 16 – Finite Elements Method

HPC-A[dvanced] Scientific Computing – Second Part

Consists of techniques for programming large-scale HPC Systems Approach: Get a broad understanding what HPC is and what can be done Goal: Train general HPC techniques and bits of domain-specific applications

High Performance Computing(a field of constant changes)

HPC – A Course

Domain-specific Science &

Engineering A

Domain-specific –

FEM Applications

Domain-specific –

Engineering Applications

Domain-specific Science &

Engineering N

3 / 23

Page 4: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Outline of the Course

1. High Performance Computing

2. Parallelization Fundamentals

3. Parallel Programming with MPI

4. Advanced MPI Techniques

5. Parallel Algorithms & Data Structures

6. Parallel Programming with OpenMP

7. Hybrid Programming & Patterns

8. Debugging & Profiling Techniques

9. Performance Optimization & Tools

10. Scalable HPC Infrastructures & GPUs

Short Lecture 16 – Finite Elements Method

11. Scientific Visualization & Steering

12. Terrestrial Systems & Climate

13. Systems Biology & Bioinformatics

14. Molecular Systems & Libraries

15. Computational Fluid Dynamics

16. Finite Elements Method

17. Machine Learning & Data Mining

18. Epilogue

+ additional practical lectures for our

hands-on exercises in context

4 / 23

Page 5: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Outline

Finite Elements Method Terminology & Motivation Boundary Value Problems Mesh Generation Technique Adaptive Mesh Refinement Application Examples

Selected Libraries & Methods Elmer Code_Aster & Salome-Meca Platform Ansys OpenFOAM Revisited

Selected promises from previous lecture(s):

Lecture 5: Lecture 16 will give in-depth details on parallel algorithms in conjunction with finite elements

Lecture 5: Lectures 12-17 will provide more details on how NETCDF and HDF is used with application data

Lecture 15: Lecture 16 provide more details on the finite element method (FEM) used by CFD simulations

Lecture 15: Lecture 16 provide more details on advanced domain decomposition methods reffered to as mesh

Lecture 15: Lecture 16 provide more details on how smoke can be simulated using adaptive mesh refinement

Short Lecture 16 – Finite Elements Method

Short Lecture only shows subsets of libraries & applications in domains

5 / 23

Page 6: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Finite Elements Methods

Short Lecture 16 – Finite Elements Method 6 / 23

Page 7: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Finite Elements Methods – Terminology & Motivation

Short Lecture 16 – Finite Elements Method

Finite Elements Methods (FEM) is a numerical method to find approximate solutions to boundary value problems (governed by partial differential equations) by connecting many simple elements

Approach Approximate ‘complex equations

over a large domain‘ (i.e. resulting mesh) Connecting many simple element equations

over many small subdomains (i.e. finite elements)

Boundary value problems Boundary outlines a region governed by

partial differential equations (PDEs)

[3] Wikipedia on FEM

[4] Wikipedia on ‚Boundary value problems‘

(FEM mesh to solve a magnetic problem)

7 / 23

Page 8: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

FEM – Mesh Generation Technique

Short Lecture 16 – Finite Elements Method

Mesh generation (aka grid generation) refers to generating a polygonal or polyhedral mesh that approximates a geometric domain and that is used in a wide variety of CFD and FEM simulations

[5] Wikipedia on Mesh

Practice ‘mesh creation‘ Tools offer the creation of meshes For large complex geometry objects

even parallelization should be used Result is an ‘unpartitioned mesh‘

Parallelization Domain decomposition (cf. Lecture 2) Solving ‘partitioned mesh‘ in parallel

Wide variety of different mesh types Uniform meshes or non-uniform meshes (also cf. Lecture 11 on Visualization)

[6] T. Zwinger et al.

[3] Wikipedia on FEM

8 / 23

Page 9: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

FEM – Adaptive Mesh Refinement

Overcome ‘static mesh‘ limits ‘Discrete mesh‘ spacing resolution simple approach in numerical analysis No solutions of the numerical analysis on scales smaller then mesh spacing AMR dynamically changes the

spacing and shape of the mesh (i.e. dynamic grid)

Useful for very large range of scales

Selected benefits Increased computational savings over static grids Flexible control of grid resolution as needed compared

to the static grids or static mesh refinement Increased storage savings over static grid

Short Lecture 16 – Finite Elements Method

Adaptive mesh refinement (AMR) is a method in numerical analysis & HPC to dynamically change the accuracy of a solution in certain regions during the time the solution is calculated as simulation

modified from [7] Wikipedia on AMR

(static mesh refinement can be used for some regions that do not

change shape over time)

(e.g. fire and heat transfer

requires AMR as interesting regions vary

over time)

(use of adaptive meshrefinement as a methodfor reduction of big dataoutcomes of simulations)

9 / 23

Page 10: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

FEM – Adaptive Mesh Refinement – Tree-Code Example

Different approaches

Short Lecture 16 – Finite Elements Method

[8] F. Salvatore et al.

Often tree-based implementation(cf. Lecture 5)

(point-based) (patch-based)(block-based tree)

10 / 23

Page 11: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Selected Libraries & Methods – FDS – Revisited

Selected Facts Open source package Includes visualization tool SmokeView

Parallelization MPI (cf. Lecture 3) & OpenMP (cf. Lecture 6) Hybrid programming (cf. Lecture 7)

Examples Smoke and heat transport from

fires in underground stations(e.g. fire safety / civil engineering)

Short Lecture 16 – Finite Elements Method

Fire Dynamics Simulator (FDS) is a CFD simulation package solving simplified forms of the Navier-Stokes equations and enables large-eddy simulations (LES) for low-speed flows (i.e. smoke/fire)

modified from [9] FDS Web page

[10] Civil Security & Traffic Group

11 / 23

Page 12: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

FEM – Adaptive Mesh Refinement – CFD Example

Short Lecture 16 – Finite Elements Method

Example over time CFD smoke simulations (cf. Lecture 15)

[10] Civil Security & Traffic Group

12 / 23

Page 13: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

[Video] Finite Element Analysis in Boat Collisions

Short Lecture 16 – Finite Elements Method

[11] YouTube Video, Boat Collision scenario

13 / 23

Page 14: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Selected Libraries & Methods

Short Lecture 16 – Finite Elements Method 14 / 23

Page 15: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Selected Libraries & Methods – Elmer

Selected Facts Open source multi-physical simulation software Includes physical models of structural mechanics,

electromagnetics, heat transfer, accoustics, etc. Differen tools ElmerGUI, ElmerSolver, ElmerPost

Parallelization Distributed memory with MPI (cf. Lecture 3)

Example Blood flow in carotid artery

(poses a fluid-structureinteraction challenge)

Short Lecture 16 – Finite Elements Method

Elmer is an open source multi-physical simulation software package that solves physical models described by partial differential equations via FEM and is used in a wide variety of HPC simulations

modified from [12] Elmer Web page

[13] Elmer Para2012 Tutorial

(e.g. research on calcification that reduces

elasticity of arteries)

15 / 23

Page 16: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Selected Libraries & Methods – Code_Aster & Salome-Meca

Selected Facts Free and open source software

tool for FEM and related methods Integrated with Salome-Meca platform

(GUI functions, visualization, etc.)

Parallelization Specific version of code_aster

supports MPI (cf. Lecture 3)

Example Nonlinear thermomechanical

calculation of a combustion turbine

Short Lecture 16 – Finite Elements Method

Code_Aster offers a full range of multiphysical analysis and modelling approaches useful for computer aided engineering (CAE) and takes also partly advantage of parallelization methods

modified from [14] Code_Aster Manual

16 / 23

Page 17: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Selected Libraries & Methods – Ansys

Selected Facts Strong commercial software tools w.r.t. functionality

(although commercial available at many HPC centers) Enables predictions how manufactured products will operate in real world Offers FEM, structurual analysis, computational fluids dynamics, etc.

Parallelization Different ‘HPC packs‘ across

multiple physics problems packages GPU enabled (cf. Lecture 10) package Stores grids in HDF files (cf. Lecture 5)

Example Internal combustion engine

modeled using ANSYS FluentShort Lecture 16 – Finite Elements Method

Ansys is a commercial software package that consists of a wide variety of tools that enable HPC simulation-driven product development with several dedicated HPC packs and GPU parallelization

modified from [15] Ansys Web page

17 / 23

Page 18: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Selected Libraries & Methods – OpenFOAM Revisited

Selected Facts Open source and many other features (cf. Lecture 15)

Parallelization Implementation of

adaptive mesh refinement(and coarsening)

Example Automatic resolution

control for the finitevolume method

Error guides the refinementprocess and updates mesh

Short Lecture 16 – Finite Elements Method

Open source field operation and manipulation (OpenFOAM) is a C++ toolbox of numerical solvers and pre-/post processing utilities for the solution of CFD problems used in HPC simulations

modified from [16] OpenFOAM Web page

[17] OpenFOAM Tutorial

(automatically improve the accuracy of CFD and FEM

simulations in interesting regions)

18 / 23

Page 19: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

[Video] Speedo Use Case

Short Lecture 16 – Finite Elements Method

[18] YouTube Video, ‘Speedo Use Case’

19 / 23

Page 20: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Lecture Bibliography

Short Lecture 16 – Finite Elements Method 20 / 23

Page 21: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Lecture Bibliography (1)

[1] Steven Orszag et al., ‘Lattice Boltzmann Methods for Fluid Dynamics‘,Online: http://physics.wustl.edu/nd/event/qmcd09/Presentations/qmcd09Talks/orszag.pdf

[2] P. Wenisch et al., ‘Computational Steering: Interactive Flow Simulation in civil Engineering’, inSiDE, Vol. 5(2),2007

[3] Wikipedia on ‘Finite Elements Method‘,Online: http://en.wikipedia.org/wiki/Finite_element_method

[4] Wikipedia on ‘Boundary Value Problems‘,Online: http://en.wikipedia.org/wiki/Boundary_value_problem

[5] Wikipedia on ‘Mesh generation‘, Online: http://en.wikipedia.org/wiki/Mesh_generation

[6] Thomas Zwinger, ‘Introduction into Elmer multiphysics FEM package‘ [7] Wikipedia on ‘Adaptive Mesh Refinement‘,

Online: http://en.wikipedia.org/wiki/Adaptive_mesh_refinement [8] F. Salvadore, ’Parallel algorithms for Partial Differential Equations’, Online:

https://hpc-forge.cineca.it/files/ScuolaCalcoloParallelo_WebDAV/public/anno-2013/Summer-School/ParAlgo-slides-Rome.pdf

[9] FDS Web page, Online: http://code.google.com/p/fds-smv/

[10] Civil Security & Traffice Group, Online: http://www.fz-juelich.de/ias/jsc/EN/Research/ModellingSimulation/CivilSecurityTraffic/FireSimulation/Activities/_node.html

Short Lecture 16 – Finite Elements Method 21 / 23

Page 22: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Lecture Bibliography (2)

[11] YouTube Video, ‘Boat collision analysis‘, Online: http://www.youtube.com/watch?v=9TRfY_H3l90

[12] ELMER Scientific FEM code, Online: https://csc.fi/web/elmer

[13] ELMER Para2012 Tutorial [14] Code_Aster Manual,

Online: http://www.code-aster.org/V2/UPLOAD/DOC/Presentation/plaquette_aster_en.pdf [15] Ansys Web page,

Online: http://www.ansys.com/ [16] OpenFOAM Web page,

Online: http://www.openfoam.com/ [17] Anton Berce, ‘OpenFOAM Tutorial - Adaptive mesh refinement’, [18] YouTube Video, ‘Ansys Speedo Use Case‘,

Online: http://www.youtube.com/watch?v=H1EuTIhmAAA

Short Lecture 16 – Finite Elements Method 22 / 23

Page 23: High Performance Computing - Morris Riedelmorrisriedel.de/wp-content/uploads/2018/03/HPC-Lecture... · 2018-03-02 · multiple physics problems packages GPU enabled (cf. Lecture 10)

Short Lecture 16 – Finite Elements Method 23 / 23