14
Scientiļ¬c Computing II Overview Michael Bader Technical University of Munich Summer 2017

Scientific Computing II - Overview - TUM

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Scientific Computing II

Overview

Michael BaderTechnical University of Munich

Summer 2017

Remember: The Simulation Pipeline

phenomenon, process etc.

mathematical model?

modelling

numerical algorithm?

numerical treatment

simulation code?

implementation

results to interpret?

visualization

ļæ½ļæ½ļæ½ļæ½ļæ½HHHHj embedding

statement tool

-

-

-

validation

Michael Bader | Scientific Computing II | Overview | Summer 2017 2

Topic #1: Solving Systems of Linear Equations

Focussing onā€¢ large systems: 106ā€“109 unknownsā€¢ sparse systems: typically only O(N) non-zeros in the system matrix

(N unknowns)ā€¢ systems resulting from the discretization of PDEs

Topicsā€¢ relaxation methods (as smoothers)ā€¢ multigrid methodsā€¢ Conjugate Gradient methodsā€¢ preconditioning

Michael Bader | Scientific Computing II | Overview | Summer 2017 3

Recall: Finite Volume Model for Heat Equationā€¢ object: a rectangular metal plateā€¢ model as a collection of small connected rectangular cells

hx

hy

ā€¢ compute the temperature distribution on this plate!

Michael Bader | Scientific Computing II | Overview | Summer 2017 4

A Finite Volume Model (2)

ā€¢ model assumption: temperatures in equilibrium in every grid cellā€¢ heat flow across a given edge is proportional to

ā€¢ temperature difference (T1 āˆ’ T0) between the adjacent cellsā€¢ length h of the edge

ā€¢ e.g.: heat flow across the left edge:

q(left)i,j = kx

(Ti,j āˆ’ Tiāˆ’1,j

)hy

note: heat flow out of the cell (and kx > 0)ā€¢ heat flow across all edges determines change of heat energy:

qij = kx(Tij āˆ’ Tiāˆ’1,j

)hy + kx

(Tij āˆ’ Ti+1,j

)hy

+ ky(Tij āˆ’ Ti,jāˆ’1

)hx + ky

(Tij āˆ’ Ti,j+1

)hx

Michael Bader | Scientific Computing II | Overview | Summer 2017 5

A Steady-State Model. . . and a large system of linear equations

ā€¢ heat sources: consider additional source term Fi,j due toā€¢ external heatingā€¢ radiation

ā€¢ Fi,j = fi,jhxhy (fi,j heat flow per area)ā€¢ equilibrium with source term requires qi,j + Fi,j = 0:

fi,jhxhy = āˆ’kxhy(2Ti,j āˆ’ Tiāˆ’1,j āˆ’ Ti+1,j

)āˆ’ky hx

(2Ti,j āˆ’ Ti,jāˆ’1 āˆ’ Ti,j+1

)ā€¢ leads to large system of linear equationsā€¢ 1/h2 unknowns, sparse system matrix (only 5 entries per row)

ā†’ will be our model problem!

Michael Bader | Scientific Computing II | Overview | Summer 2017 6

Multigrid: HHG for Mantle Convection(Rude et al., 2013; project: TERRA NEO)

Michael Bader | Scientific Computing II | Overview | Summer 2017 7

Multigrid: HHG for Mantle Convection (2)Mantle Convection on PetaScale Supercomputers:

ā€¢ mantle convection modeled via Stokes equation (ā€œcreeping flowā€)ā€¢ linear Finite Element method on an hierarchically structured tetrahedral

meshā€¢ requires solution of global pressure equation in each time step

Weak Scaling of HHG Multigrid Solver on JuQueen:ā€¢ geometric multigrid for Stokes flow via pressure-correctionā€¢ pressure residual reduced by 10āˆ’3 (A) or 10āˆ’8 (B)

Nodes Threads Grid points Resolution Time: (A) (B)1 30 2.1 Ā· 1007 32 km 30 s 89 s4 240 1.6 Ā· 1008 16 km 38 s 114 s

30 1 920 1.3 Ā· 1009 8 km 40 s 121 s240 15 360 1.1 Ā· 1010 4 km 44 s 133 s

1 920 122 880 8.5 Ā· 1010 2 km 48 s 153 s15 360 983 040 6.9 Ā· 1011 1 km 54 s 170 s

Michael Bader | Scientific Computing II | Overview | Summer 2017 8

Topic #2: Molecular Dynamics

Discuss large part of the simulation pipeline:ā€¢ modelling: potentials, forces, systems of ODEā€¢ numerics: suitable numerical methods for the ODEsā€¢ implementation: short-range vs. longe-range forcesā€¢ visualisation? (well, actually not the entire pipeline . . . )

Focussing onā€¢ large systems: 106ā€“109 particlesā€¢ short-range vs. long-range forcesā€¢ N-body methods, parallelization

Michael Bader | Scientific Computing II | Overview | Summer 2017 9

N-Body Methods: Millennium-XXL Project

(Springel, Angulo, et al., 2010)

ā€¢ N-body simulation with N = 3 Ā· 1011 ā€œparticlesā€ā€¢ compute gravitational forces and effects

(every ā€œparticleā€ correspond to āˆ¼ 109 suns)ā€¢ simulation of the generation of galaxy clusters

plausibility of the ā€œcold dark matterā€ modelMichael Bader | Scientific Computing II | Overview | Summer 2017 10

N-Body Methods: Particulate Flow Simulation

(Rahimian, . . . , Biros, 2010)

ā€¢ direct simulation of blood flowā€¢ particulate flow simulation (coupled problem)ā€¢ Stokes flow for blood plasmaā€¢ red blood cells as immersed, deformable particles

Michael Bader | Scientific Computing II | Overview | Summer 2017 11

Organisation

Michael Bader | Scientific Computing II | Overview | Summer 2017 12

Exams, ECTS, Modules

ECTS, Modulesā€¢ 5 ECTS (2+2 lectures/tutorials per week)ā€¢ CSE: compulsory courseā€¢ Biomed. Computing/Computer Science:

elective/Master catalogueā€¢ others?

Tutorials:ā€¢ tutor: Carsten Uphoffā€¢ time and day: Tue, 10-12, MI 02.07.023

Exam:ā€¢ written exam at end of semesterā€¢ based on exercises presented in the tutorials

Michael Bader | Scientific Computing II | Overview | Summer 2017 13

Lecture Slides: Color Code for Headers

Black Headers:ā€¢ for all slides with regular topics

Green Headers:ā€¢ summarized details: will be explained in the lecture, but usually not as an

explicit slide; ā€œgreenā€ slides will only appear in the handout versions

Red Headers:ā€¢ advanced topics or outlook: will not be part of the exam topics

Michael Bader | Scientific Computing II | Overview | Summer 2017 14