fein oder nicht fein - adaptive gitterverfeinerung in...

26
Member of the Helmholtz-Association Fein oder nicht fein Adaptive Gitterverfeinerung in Brandsimulationen December 13, 2016 Marc Fehling Civil Security & Traffic (CST)

Upload: others

Post on 14-Jun-2020

10 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Fein oder nicht feinAdaptive Gitterverfeinerungin Brandsimulationen

December 13, 2016 Marc Fehling Civil Security & Traffic (CST)

Page 2: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Introduction

Marc Fehlingborn 1990M. Sc. Physics, RUB, 2015

since November 2015:PhD candidate at JSC,Division Civil Security & Traffic

December 13, 2016 Marc Fehling Slide 2 19

Page 3: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Table of contents

Motivation

Modeling fires

Finite Element Method (FEM)

Adaptive Mesh Refinement (AMR)

High–performance computing on JURECA

Summary & Outlook

Unstructured grids

December 13, 2016 Marc Fehling Slide 3 19

Page 4: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Motivation: Fire Safety

Safety measures increase chance of survival ofinhabitants in case of emergency.Fire safety measures:

Fire doors, building materials, smoke extraction, sprinklers, ...German legislation prescribes ’building codes’.

For ’normal’ purposes:residential buildings

Figure: Fire triangle. (source: wiki)

For ’special’ purposes:event hallsmallsgaragesaccommodationsfactoriesskyscrapers...

December 13, 2016 Marc Fehling Slide 4 19

Page 5: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Motivation: Architecture

Modern architecture and large–scale projects (like BER)may not fit in ’building code’.Individual considerations necessary:

Model experiments, CFD investigations, ...

Figure: Interior of BMW World, Munich.

December 13, 2016 Marc Fehling Slide 5 19

Page 6: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Motivation: Project Orpheus

Optimierung der Rauchableitung und Personenfuhrung inU-Bahnhofen: Experimente und Simulationen

Smoke and fire spread in complex metro stations.High dimensional parameter space for fire scenarios,including underground climate.

December 13, 2016 Marc Fehling Slide 6 19

Page 7: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Modeling fires

Processes to model:

Fluid dynamics.Navier–Stokesequations.Turbulence modeling.

Radiation.Discrete TransferRadiation.Discrete Ordinates.Monte–Carlo.

CombustionMixture fraction.Finite rate kinetics.

Pyrolysis.Figure: Burning solid fuel in air withphysical processes involved. [1]

December 13, 2016 Marc Fehling Slide 7 19

Page 8: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Modeling: Equations for smoke propagation

Smoke propagation with incompressible Navier–Stokes(INS) equations:

∇ · u = 0ρ0 [∂tu + (u · ∇)u] +∇p −∇(2µ εij(u)) = f(T )

ρ0 [∂tT + (u · ∇)T ]− 2µ

cpεij(u) :∇u−∇ ·

( µPr∇T

)= γ

with strain rate tensor εij(u) = 12

[∇u + (∇u)T ].

Turbulence model: Smagorinsky–Lilly LES [2]:

ν = νmol + νturb with νturb = (Csh)2 ∣∣∣∣εij(u)∣∣∣∣2 .

December 13, 2016 Marc Fehling Slide 8 19

Page 9: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Numerical methods

Spatial discretization methods for computational fluiddynamics and software packages using it:

Finite Difference Method (FDM).Open source: NIST Fire Dynamics Simulator (FDS), ...

Finite Volume Method (FVM).Open source: FireFOAM (OpenFOAM), ...

Finite Element Method (FEM).Lattice–Boltzmann Method (LBM).

December 13, 2016 Marc Fehling Slide 9 19

Page 10: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

FEM: Features

Why use FEM?

Unstructured grids.Allow for better domain representation without aliasing.

hp–adaptivity.Dynamic resolution of numerical grid.Adaptive polynomial degree of basis functions.→ Increase accuracy where the action is happening!

Discontinuous Galerkin (DG) methods.Allow discontinuities across cell borders.Continuous Galerkin (CG) methods unstable for advectionlike problems, thus require stabilization.

December 13, 2016 Marc Fehling Slide 10 19

Page 11: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

FEM: Formulation

Solve variational equation from ’weak’ formulation of thedifferential equation with bilinear form a(u, v):

∃u ∈ V : ∀v ∈ V : a(u, v) = f (v)

Choose subspace Vh with basis wi, out of which theapproximate solution uh =

∑uiwi ∈ Vh will be constructed:

a(uh,wj) =∑

a(wi ,wj) ui = f (wj) → AU = F

Figure: Q1 elements in 2D (source: deal.II)

December 13, 2016 Marc Fehling Slide 11 19

Page 12: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

JuFire

Investigate applicability of Finite Element Methods (FEM)for fire simulation.

Use open–source library deal.II [3].’Toolbox’ for the creation of FEM codes.

Differential Equations Analysis Library

December 13, 2016 Marc Fehling Slide 12 19

Page 13: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

JuFire: Features

Implemented:Unstructured grids.Continuous Galerkin Methods.Adaptive mesh refinement (AMR).MPI parallelization.Utilization of CAD models asmanifolds for mesh refinement.

Current field of activity:Verification of flow solver.

Future work:Discontinuous Galerkin methods.p–adaptivity.

December 13, 2016 Marc Fehling Slide 13 19

Page 14: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Adaptive mesh refinement (AMR)

Solution of differential equations with FEM requires:Discretization of space in cells of length h.Shape functions with polynomial degree p.

But: The more accurate the solution by choosing h and p,the longer the computation.

→ Adaptive refinement as a ’compromise’.Adjustment of parameters locally where necessary.Variable mesh precision at runtime.

J.D

rehe

r,R

UB

December 13, 2016 Marc Fehling Slide 14 19

Page 15: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

AMR: Algorithm

How to determine refinement criteria?

Set up decision criterion for refinement/coarsening.Our choice:

Calculate ||∇u|| on each cell.Normalize values with respect to all cells.

Flag top/lower 30% for refinement/coarsening at each step.Define max/min refinement levels as upper/lower bounds.

Cells are not allowed to differ by more than one level ofrefinement.

December 13, 2016 Marc Fehling Slide 15 19

Page 16: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

AMR: Example

Demonstration of adaptive mesh refinement via movingvortex test case as a shape–preserving potential stream.

Figure: Video of velocity magnitude of moving vortex, overlayedwith corresponding mesh.

December 13, 2016 Marc Fehling Slide 16 19

Page 17: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

AMR: Benefits

Comparison of runtime and accuracy between uniform andadaptively refined meshes with the moving vortex example.

1 2 3 4 50.2

0.4

0.6

0.8

1

1.2

1.4

·10−5

number of pass–throughs

L2 –

erro

r

Figure: Global L2–errors at eachperiodic pass–through of thevortex.

adaptive: 5×5 . . . 320×320 cellsuniform: 160×160 cellsuniform: 320×320 cells

0 0.2 0.4 0.6 0.8 1 1.2·105

AMR

uniform160

uniform320

execution time [s]

Figure: Execution time of thevortex simulation, run in serial ona common desktop computer.

December 13, 2016 Marc Fehling Slide 17 19

Page 18: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

HPC on JURECA: Parallelization

MPI parallelization with Trilinos and p4est throughdeal.II backends.

24 48 96 192 384 768 1,536 3,072 6,144

103

104

cores

wal

lclo

cktim

e[s

]

measured time, 64×64×64 cellsideal slope, 64×64×64 cellsmeasured time, 128×128×128 cellsideal slope, 128×128×128 cells

Figure: Strong scaling on JURECA forfixed 3D problems with 262,144 and2,097,152 cells, respectively.

Figure: Examplary domaindecomposition with p4est

in an AMR case.December 13, 2016 Marc Fehling Slide 18 19

Page 19: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Summary & Outlook

Summary:Adaptive Mesh Refinement works satisfactorily (for now).Flow solver accomplishes first verification tests.

Future work:Implementation of models.

Buoyancy, radiation, combustion, pyrolysis, ...Extension of numerical methods.

DG methods, p-adaptivity, ...

Comparison with other fire solvers.Validation using experiments.

Thank you for your kind attention!

December 13, 2016 Marc Fehling Slide 19 19

Page 20: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

References I

Guan Heng Yeoh and Kwok Kit Yuen.Computational Fluid Dynamics in Fire Engineering –Theory, Modelling and Practice.Butterworth–Heinemann, 1st edition, 2009.

Joseph Smagorinsky.General circulation experiments with the primitiveequations.Monthly Weather Review, 91(3):99–164, March 1963.

December 13, 2016 Marc Fehling Slide 20 19

Page 21: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

References II

W. Bangerth, D. Davydov, T. Heister, L. Heltai,G. Kanschat, M. Kronbichler, M. Maier, B. Turcksin, andD. Wells.The deal.II library, version 8.4.Journal of Numerical Mathematics, 24, 2016.

Cedric Taylor and P. Hood.A numerical solution of the Navier–Stokes equationsusing the finite element technique.Computers & Fluids, 1:73–100, 1973.

December 13, 2016 Marc Fehling Slide 21 19

Page 22: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

References III

Bernardino Roig.One–step Taylor Galerkin methods forconvection–diffusion problems.Journal of Computational and Applied Mathematics,204:95–101, 2007.

N.D. Heavner and L.G Rebholz.Locally chosen grad–div stabilization parameters for finiteelemnt discretizations of incompressible flow problems.SIAM Undergraduate Research Online (SIURO), 7.

December 13, 2016 Marc Fehling Slide 22 19

Page 23: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Fein oder nicht fein:AnhangAdaptive Gitterverfeinerungin Brandsimulationen

December 13, 2016 Marc Fehling Civil Security & Traffic (CST)

Page 24: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

JuFire: Algorithm

Time evolution with backward differentiation formula (BDF)Taylor–Hood elements [4]: (u,p)∈Qdim

k+1 ×Qk

Decoupling of (u,p) by projection schemeLeads to the pressure–Poisson equation

Stabilization of momentum equationTaylor–Galerkin stabilization [5] for Taylor–Hood elements

Additional diffusion in flow direction

Grad–div stabilization [6] to enforce ∇ · u=0

Neumann series for fast matrix assembly

Boussinesq approximation for buoyancy force density

December 13, 2016 Marc Fehling Slide 24 19

Page 25: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Unstructured Grids: Example: T–pipe

Why T–pipe?Compound bodies.Crooked areas (→ cylinder casing area).Discontinuous edges (→ ’welding seam’).

Develop procedure for the creation of appropriate initialmeshes.

CAD model. Initial mesh.December 13, 2016 Marc Fehling Slide 25 19

Page 26: Fein oder nicht fein - Adaptive Gitterverfeinerung in ...juser.fz-juelich.de/record/825312/files/fehling_jsc_eoyc_nopause.pdf · Modern architecture and large–scale projects (like

Mem

bero

fthe

Hel

mho

ltz-A

ssoc

iatio

n

Iterations of global refinement:

0x 1x

2x 3xDecember 13, 2016 Marc Fehling Slide 26 19