parallel simulation and animation of free surface flow ... · shallow water coupling fluid control....

Post on 11-Jul-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Parallel Simulation andParallel Simulation andAnimation of Free Surface FlowAnimation of Free Surface Flow

with the Lattice Boltzmann Methodwith the Lattice Boltzmann Method

Lehrstuhl für Informatik 10 (Systemsimulation)

Universität Erlangen-Nürnberg

www10.informatik.uni-erlangen.de

TUM, July 2006

N. Thürey (LSS Erlangen)

T. Pohl (RRZE Erlangen)

U. Rüde (LSS Erlangen, ruede@cs.fau.de)

2

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

3

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

4

The Lattice-Boltzmann Method (1)The Lattice-Boltzmann Method (1)

Based on cellular automata

Introduced by von Neumann around 1940

Famous: Conway’s Game of Life

Lattice Gas Cellular Automata were used to simulate gases

Complex system with simple rules

Regular grid

Local rules specifying time evolution

Intrinsically parallel for model & simulation, similar to elliptic PDE solvers

5

The Lattice-Boltzmann Method (2)The Lattice-Boltzmann Method (2)

Weakly compressible approximation of the Navier-Stokes equations

Easy implementation

Applicable for small Mach numbers (< 0.1)

Easy to adapt, e.g. forComplicated or time-varying geometries

Free surfaces

Additional physical and chemical effects

6

The Lattice-Boltzmann Method (3)The Lattice-Boltzmann Method (3)

Real valued representation of particles

Discrete velocities and positions

Algorithm proceeds in two steps:Stream

Collide

7

Fluid Cell Treatment

Algorithm proceeds in two steps:•Stream: advect fluid elements (copy DFs to neighbors)•Collide: compute collisions of fluid molecules

8

Fluid Cell Treatment

Algorithm proceeds in two steps:•Stream: advect fluid elements (copy DFs to neighbors)•Collide: compute collisions of fluid molecules

9

Fluid Cell Treatment

Algorithm proceeds in two steps:•Stream: advect fluid elements (copy DFs to neighbors)•Collide: compute collisions of fluid molecules

10

Fluid Cell Treatment

Algorithm proceeds in two steps:•Stream: advect fluid elements (copy DFs to neighbors)•Collide: compute collisions of fluid molecules

11

Fluid Cell Treatment

Algorithm proceeds in two steps:•Stream: advect fluid elements (copy DFs to neighbors)•Collide: compute collisions of fluid molecules

12

The Collide StepThe Collide Step

Amounts for collisions of particles during movementWeigh equilibrium velocities and velocities from streaming depending on fluid viscosity

13

LBM in Equations Stream/Collide:

Equilibrium DF:

Zur Anzeige wird der QuickTime Dekompressor TIFF (LZW)

bentigt.

Zur Anzeige wird der QuickTime Dekompressor TIFF (LZW)

bentigt.

Zur Anzeige wird der QuickTime Dekompressor TIFF (LZW)

bentigt.

Zur Anzeige wird der QuickTime Dekompressor TIFF (LZW)

bentigt.

Zur Anzeige wird der QuickTime Dekompressor TIFF (LZW)

bentigt.

Zur Anzeige wird der QuickTime Dekompressor TIFF (LZW)

bentigt.

Zur Anzeige wird der QuickTime Dekompressor TIFF (LZW)

bentigt.

14

LBM DemonstrationLBM Demonstration(Java applet)

start-applet

15

Stability & Turbulence ModellingSmagorinsky Subgrid Model:

Similar to approach for NS-Solvers

Model subgrid-scale vortices by locally changing the viscosity

Implementation for LBMReynolds stress tensor computed for each cell

Changes only in collision operator

Ca. 20% slowdown, significant gain due to decreased resolution requirements

16

Falling Drop with Turbulence Model

Zur Anzeige wird der QuickTime Dekompressor

bentigt.

17

Falling Drop with Turbulence Model (slower)

Zur Anzeige wird der QuickTime Dekompressor

bentigt.

18

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

19

Free surfaces with LBMFree surfaces with LBM

Metal Foams – huge gas volumes

Only simulate and track fluid motion

Compute boundary conditions at free surface

Three cell types: Empty/Gas, Fluid, Interface

20

Boundary ConditionsBoundary Conditions

Gas

Liquid

Problem: Missing distribution functions at interface cells after streaming!

Reconstruction such that macroscopic boundary conditions are satisfied.

Körner et al. Lattice Boltzmann Model for Free Surface Flow, Journal of Computational Physics

21

Free Surface Treatment

22

Free Surface Treatment

23

Free Surface Treatment

24

Free Surface Treatment

25

Free Surface Treatment

26

Free Surface Treatment

27

Free Surface Treatment

28

Free Surface Treatment

29

Free surface simulationsFree surface simulations

Algorithmic Overview:

Before stream step, compute mass exchange across cell boundaries for interface cells

Calculate bubble volumes and pressure

Surface curvature for surface tension

Change topology if interface cells become full or empty – keep layer of interface cells closed

30

Free Surface Cell Conversions

Emptied interface cell > gasFilled interface cell > fluid

Guarantee closed layer of interface cells

Redistribute mass in the neighborhood

31

Curvature calculation (version I)Curvature calculation (version I)

Alternative approaches: Integrate normals over surface (weighted triangles)

Level set methods (track surface as implicit function)

32

Surface Tension (Vers. 2)Surface Tension (Vers. 2)

ΑΑΑ −=δΑ

Α

1ν_3n

_

2n_

Marching-cube surface triangulationCompute a curvature for each triangle

k=12dAdV

Associate with each LBM cell the average curvature of its trianglesComplicatedBeats level sets for our applications (mass conservation)

33

VOF vs. Level-Set MethodsVOF vs. Level-Set Methods

Volume of FluidVolume of Fluid+ Mass + Mass

conservationconservation

+ Efficiency+ Efficiency

+ Good integration + Good integration for LBMfor LBM

Level SetsLevel Sets+ Smooth + Smooth

representationrepresentation

+ Accurate & + Accurate & efficient curvature efficient curvature calculationcalculation

34

VisualizationVisualization

Ray-tracing

Refraction

Reflection

Caustics

About 15 Min per frame = 1 day for 4 secs

About same compute time as flow simulation

35

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

36

GlassCeramics

MetalsPolymers

Structural Properties stiffness

energy absorption damping

Functional Properties burner, shock absorber,

heat exchanger, batteries

large, dynamic surface expansion

Examples of FoamsExamples of Foams

37

Towards Simulating Metal FoamsTowards Simulating Metal Foams

Bubble growth, Bubble growth, coalescence, collapse, coalescence, collapse, drainage, rheology, etc. are drainage, rheology, etc. are still poorly understoodstill poorly understood

Simulation as a tool to Simulation as a tool to better understand, control better understand, control and optimize the processand optimize the process

38

Foaming Simulation 1

Zur Anzeige wird der QuickTime Dekompressor Cinepak

bentigt.

39

Foaming Simulation 2

Zur Anzeige wird der QuickTime Dekompressor

bentigt.

40

Numerical Experiment: Single Rising BubbleNumerical Experiment: Single Rising Bubble

Validation for Metal Forms or e.g. Bubble Reactors

Comparison to 2D Level-Set Volume of Fluid method and Experimental Results

Modified Parameter: Surface Tension

> External Animation

41

Numerical Experiment: Single Rising BubbleNumerical Experiment: Single Rising Bubble

42

Parallel PerformanceParallel Performance

LSSLSS-Cluster-Cluster

Fujitsu-SiemensFujitsu-Siemens

43

Performance on SR 8000Performance on SR 8000Free surface LBM-Code Free surface LBM-Code

Standard LBM-CodeStandard LBM-Code

Performance lousy on a single node! Conditionals: 2,9 SLBM 51 free surface LBMPentium 4: almost no degradation ~ 10%SR 8000: enormous degradation (pseudo-vector, predictable jumps)

44

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

45

Nanotechnology ApplicationsNanotechnology Applications

Properties of materials and surfaces determined by structure of the nano-scale particles

Possible applications of LBM:Simulate the behavior of particles and particle agglomerates in solutions (e.g. breaking up or further agglomeration)

On a larger scale simulate segregation processes

46

Nanotechnology Applications (1)Nanotechnology Applications (1)

Curved Boundaries:Particles are approximates with spheresImprove accuracy of LBM simulations by using curved boundary conditions

Standard No-Slip:Reflect DFs at cell boundary

More accurate:Take distance to boundary surface into account, then interpolate DFs accordingly

47

Nanotechnology Nanotechnology ApplicationsApplications

Fluid-Body Interaction:Compute the forces acting upon a body due to the fluid flow around it

Integrate DFs towards the body for all cells on its surface

Body-Fluid Interaction:Bodies moving in the fluid

Modify outgoing DFs at the boundary with the surface velocity of the body

StudienarbeitC. Feichtinger

48

Nanotechnology ApplicationsNanotechnology Applications

Moving particle agglomerate in the flow

K. Iglberger - Master Thesis Project

Zur Anzeige wird der QuickTime Dekompressor YUV420 codec

bentigt.

Zur Anzeige wird der QuickTime Dekompressor YUV420 codec

bentigt.

49

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

50

Adaptive Time StepsAdaptive Time Steps

Problems with LBM parametrization:

Gravity driven flows cause strongly varying velocitiesBubble coalescence during foaming processes result in high velocities

Standard LBM Algorithm:Time step size fixed (not a parameter)Grid resolution, velocity, viscosity and time step size are coupled

Zur Anzeige wird der QuickTime Dekompressor YUV420 codec

bentigt.

51

Adaptive Time StepsAdaptive Time Steps

Resizing the time step:Only done when the necessity arises (e.g. when high velocities are detected)

Compute the desired time step size, and the corresponding LBM parameters

Rescale the DFs of all fluid cells to match the new parameters

Simulation can be continued with the new time step…

52

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

53

Adaptive Coarsening

Adaptivity:Minimize computations in fluid only regions

Fine grid for free surface, coarse grid for fluid volumes

54

Adaptive Coarsening

Adaptivity:Minimize computations in fluid only regions

Fine grid for free surface, coarse grid for fluid volumes

55

Grid Transfer

Rescaling of Non-equilibrium DF parts for transferSpatial interpolation necessary

56

Grid Transfer

Rescaling of Non-equilibrium DF parts for transferSpatial interpolation necessary

57

Grid Transfer

Rescaling of Non-equilibrium DF parts for transferSpatial interpolation necessary

58

Grid Transfer

Rescaling of Non-equilibrium DF parts for transferSpatial interpolation necessary

59

Grid Transfer

Rescaling of Non-equilibrium DF parts for transferSpatial interpolation necessary

60

Adaptive Grids Timestepping

Property of LBM: spatial and temporal resolution coupledLarge resolution means large time steps

61

Adaptive Grids Timestepping

Property of LBM: spatial and temporal resolution coupledLarge resolution means large time steps

62

Adaptive Grids Timestepping

Property of LBM: spatial and temporal resolution coupledLarge resolution means large time steps

63

Adaptive Grids Timestepping

Property of LBM: spatial and temporal resolution coupledLarge resolution means large time steps

64

Adaptive Grids Timestepping

Property of LBM: spatial and temporal resolution coupledLarge resolution means large time steps

65

Adaptive Grids Timestepping

Property of LBM: spatial and temporal resolution coupledLarge resolution means large time steps

66

Adaptive Grids Timestepping

Property of LBM: spatial and temporal resolution coupledLarge resolution means large time steps

67

Adaptive Grids Performance

Speed up: factor 2-4 for larger resolutions

Insignifcant overhead for small resolutions

Zur Anzeige wird der QuickTime Dekompressor

bentigt.

68

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

69

Simulation of Large Scale Open WaterSimulation of Large Scale Open Water

Problem:Huge range of scales: from surface waves to small drops of water

Not resolvable in a single simulation

ApproachSimulate water surface with coupled 2D/3D shallow water / free surface model

Eulerian simulation of drops

70

Coupled Shallow Water Simulation

Simulate only a layer on the water surfaceRegion of interest is handled with full 3D simulationWave propagation outside by shallow water model

71

Coupled Shallow Water Boundary Conditions

Two layers of boundary conditions

Set height and velocity in outer layer

Set only height in inner layer

72

Example Coupled Simulations Example Coupled Simulations

Zur Anzeige wird der QuickTime Dekompressor

bentigt.

73

Overview

The LBM AlgorithmFree SurfacesApplications

Metal FoamsNano Particles

AdaptivityTime StepsGrid Coarsening

ExtensionsShallow Water CouplingFluid Control

74

Physically Based AnimationPhysically Based Animation

Special Effects e.g. for Computer generated movies

Realistic appearance necessary, but only where it‘s absolutely necessary

> Control Fluid or other simulations

Examples of Fluid Simulations in Movies: Harry Potter 4 (ship-scene), Ice Age 2 (throughout), Poseidon (in August)

75

Detail Preserving Fluid ControlDetail Preserving Fluid Control

Control Fluid without destroying small scale DetailsApply Control Forces only on a large Scale

76

Detail Preserving Fluid ControlDetail Preserving Fluid Control

Control Fluid without destroying small scale DetailsApply Control Forces only on a large Scale

77

Detail Preserving Fluid ControlDetail Preserving Fluid Control

78

Detail Preserving Fluid ControlDetail Preserving Fluid Control

79

Detail Preserving Fluid ControlDetail Preserving Fluid Control

80

Detail Preserving Fluid ControlDetail Preserving Fluid Control

81

Detail Preserving Fluid ControlDetail Preserving Fluid Control

82

Zur Anzeige wird der QuickTime Dekompressor mpeg4

bentigt.

Simulations with Fluid Control

83

Talk is Over

Please wake up!

Zur Anzeige wird der QuickTime Dekompressor

bentigt.

84

85

86

The Stream StepThe Stream Step

Move particle distribution functions along corresponding velocity vector

Normalized time step, cell size and particle speed

87

Fluid Cell Treatment

Algorithm proceeds in two steps:•Stream: advect fluid elements (copy DFs to neighbors)•Collide: compute collisions of fluid molecules

88

Numerical Experiment: Single Rising BubbleNumerical Experiment: Single Rising BubbleUNUSEDUNUSED

top related