finite element-fictitious boundary methods for the ...• constant mesh/data structure gpu •...

62
Page 1 Turek/Münster/Mierka | TU Dortmund Finite Element-Fictitious Boundary Methods for the Numerical Simulation of Particulate Flows Stefan Turek, Raphael Münster, Otto Mierka Institut für Angewandte Mathematik, TU Dortmund http://www.mathematik.tu-dortmund.de/LS3 http://www.featflow.de

Upload: others

Post on 15-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 1Turek/Münster/Mierka | TU Dortmund

Finite Element-Fictitious Boundary Methods for theNumerical Simulation of Particulate Flows

Stefan Turek, Raphael Münster, Otto MierkaInstitut für Angewandte Mathematik, TU Dortmund

http://www.mathematik.tu-dortmund.de/LS3http://www.featflow.de

Page 2: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 2Page 2Turek/Münster/Mierka | TU Dortmund

Basic CFD Tool: FeatFlow

Non-Newtonian flow module:• generalized Newtonian model

(Power-law, Carreau,...)• viscoelastic model

(Giesekus, FENE, Oldroyd,...)

Multiphase flow module (resolved interfaces):• l/l – interface capturing (Level Set)• s/l – interface tracking (FBM)• s/l/l – combination of l/l and s/l

Numerical features:• Higher order (Q2P1) FEM in space &

(semi-) Implicit FD/FEM in time• Semi-(un)structured meshes with

dynamic adaptive grid deformation• Fictitious Boundary (FBM) methods• Newton-Multigrid-type solvers

Engineering aspects:• Geometrical design• Modulation strategy• Optimization

Here: FEM-based tools for the accurate simulation of multiphase flow problems, particularly with liquid-(rigid) solid interfaces

HPC features:• Moderately parallel• GPU computing• Open source Hardware

-oriented Numerics

Page 3: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 3Page 3Turek/Münster/Mierka | TU Dortmund

Liquid–(Rigid) Solid Interfaces

The fluid flow is modelled by the Navier-Stokes equations:

where σ is the total stress tensor of the fluid phase:

0uf,σuutuρ

]uuμ[pItX,σ T

iΩ iΩfΩ

Page 4: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 4Page 4Turek/Münster/Mierka | TU Dortmund

Equations of Motion (I)

The motion of particles can be described by the Newton-Euler equations.A particle moves with a translational velocity Ui and angular velocity ωi

which satisfiy:

g, ΔMFFdt

dUM i'ii

ii i,iii

ii TωIω

dtdωI

• Mi : mass of the i-th particle (i=1,...,N)• Ii : moment of inertia tensor of the i-th particle• ∆Mi : mass difference between Mi and the mass of the fluid• Fi : hydrodynamic force acting on the i-th particle• Ti : hydrodynamic torque acting on the i-th particle

Page 5: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 5Page 5Turek/Münster/Mierka | TU Dortmund

Equations of Motion (II)

The position and orientation of the i-th particle are obtained by integrating thekinematic equations:

which can be done numerically by an explicit Euler scheme:

,ii Udt

dX ,ii ω

dtdθ

i1ii TIdt

ni

ni

1ni ΔtUXX ni-1ini1ni TIΔtωω nini1ni Δtωθθ

We apply the velocity u(X) as no-slip boundary condition at theinterface ∂Ωi between the i-th particle and the fluid, which for X ϵ Ωi isdefined by:

iii XXωUXu

Boundary Conditions

Page 6: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 6Page 6Turek/Münster/Mierka | TU Dortmund

Numerical Solution Scheme

Solve for velocity and pressure applying FBM-conditions

ni

ni

1n1nf u,ΩBCp,uNSE

Position updateni

ni

1ni ΔtuXX nini1ni Δtωθθ

Compute new velocity and angular velocity

ic,-1i

ni

1ni FrΔtIωω

︶ /MΔt ︵Fuu i1nic,ni1ni

Calculate hydrodynamic force, torque and apply1n

iF 1niT

Contact force calculation1nic,F

Page 7: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 7Page 7Turek/Münster/Mierka | TU Dortmund

Fictitious Boundary MethodEulerian Approach:

• FBM = special case of (scaled) Penalty method• Objects are represented as a boolean (in/out) function on the mesh• Complex shapes are possible (surface triangulation, implicit functions)• Use of a fixed mesh possible only first order accurate• But: Higher accuracy possible by (local) mesh adaptation techniques

Page 8: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 8Page 8Turek/Münster/Mierka | TU Dortmund

Dynamic ALE-Mesh AdaptationAdvantages:• Constant mesh/data structure GPU• Increased resolution in regions of interest (“r-adaptivity”)• Anisotropic ‘umbrella’ smoother (with snapping/projection) or GDM• Straightforward usage on general meshes in 2D / 3D

Quality of the method depends on the construction of the monitor function• Geometrical description (solid body, interface triangulation)• Field oriented description (steep gradients, fronts) numerical stabilization

Validation: 2.5D Rising bubble – light setup Testing: 3D Rising bubble - hard setup

Page 9: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 9Page 9Turek/Münster/Mierka | TU Dortmund

Test: Oscillating Cylinder• Measure Drag/Lift Coefficients for a sinusoidally oscillating cylinder• Compare results for FBM, adapted FBM and adapted FBM + boundary

projection/parametrization

Nodes concentrated near liquid-solid interface

Nodes projected and parametrized on boundary

plus concentration of nodes near boundary

Page 10: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 10Page 10Turek/Münster/Mierka | TU Dortmund

Oscillating Cylinder Results

Page 11: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 11Page 11Turek/Münster/Mierka | TU Dortmund

Oscillating Cylinder Results

Page 12: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 12Page 12Turek/Münster/Mierka | TU Dortmund

(Passive) Microswimmer

Page 13: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 13Page 13Turek/Münster/Mierka | TU Dortmund

Sedimentation

Page 14: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 14Page 14Turek/Münster/Mierka | TU Dortmund

Viscous Liquid JetsJ. M. Nóbrega et al.: The phenomenon of jet buckling: Experimental and numerical predictions

Corn syrup-air system

Rendering: Raphael Münster / Blender

24x24x48 mesh

Interface triangulation:T0: ~100,000 trianglesTN: ~300,000 triangles

,ΩdασFih,

TTTih,hi

Page 15: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 15Page 15Turek/Münster/Mierka | TU Dortmund

How to calculate thehydrodynamic forces???

Page 16: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 16Page 16Turek/Münster/Mierka | TU Dortmund

Hydrodynamic ForcesHydrodynamic force and torque acting on the i-th particle

iΩ iii ,d ΓnσF

iΩ iii dΓnσXXT

Force Calculation with Fictitious Boundary Method

Alternative:Replace the surface integral by a

volume integral

Problems: The FBM can only decide:• `INSIDE`(1) and `OUTSIDE`(0)• No description of the surface

Page 17: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 17Page 17Turek/Münster/Mierka | TU Dortmund

Numerical Force Evaluation (I)

Define an indicator function αi:

Remark: The gradient of αi is zero everywhere except at the surface of the i-thParticle and approximates the normal vector (in a weak sense), allowing us towrite:

f

ii ΩXfor0

ΩXfor1Xα

, TΩ ii d ΩασF

TΩ iii dΩασXXT

Page 18: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 18Page 18Turek/Münster/Mierka | TU Dortmund

Numerical Force Evaluation (II)

Integration over ΩT too expensive:• Gradient is non-zero on ∂Ωi

• Information available from FBM• Evaluate boundary cells only• Visit each cell only once

,ΩdασFih, TTT ih,hi

ih,

TTT Ω ih,hii dΩασXXT

Large-scale FBM-Simulations

αh,i (x) : finite element interpolant of α(x) Th,i : elements intersected by i-th particle

Page 19: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 19Page 19Turek/Münster/Mierka | TU Dortmund

Contact/Collision Modelling

• Contact determination for rigid bodies A and B:→ Distance d(A,B)→ Relative velocity vAB = (vA + ωA ×rA– (vB + ωB ×rB))→ Collision normal N = (XA (t) – XB (t))→ Relative normal velocity N · (vA + ωA ×rA– (vB + ωB ×rB))

• Contact force calculation realized as a three step process→ Broad phase→ Narrow phase→ Contact/Collision force calculation

Several single, resp., multibody collision models are realizedand tested, but…..

Page 20: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 20Page 20Turek/Münster/Mierka | TU Dortmund

How to validate???

Page 21: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 21Page 21Turek/Münster/Mierka | TU Dortmund

Benchmarking and Validation (I)

02.1,2.0 ssd

02.1,3.0 ssd

14.1,2.0 ssd

Münster, R.; Mierka, O.; Turek, S.: FiniteElement fictitious boundary methods (FEM-FBM) for 3D particulate flow, IJNMF, 2011

Free fall of particles:• Terminal velocity• Different physical parameters• Different geometrical parameters

14.1,3.0 ssd

Source: Glowinski et al. 2001

Page 22: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 22Page 22Turek/Münster/Mierka | TU Dortmund

Benchmarking and Validation (II)Settling of a sphere towards a plane wall:• Sedimentation Velocity• Particle trajectory• Kinetic Energy• Different Reynolds numbers

SetupComputational mesh:• 1.075.200 vertices• 622.592 hexahedral cells• Q2/P1:

→ 50.429.952 DoFs

Page 23: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 23Page 23Turek/Münster/Mierka | TU Dortmund

Sedimentation Benchmark (I)

Re umax/u∞ umax/u∞ umax/u∞ ten Cate exp

1.5 0.945 0.894 0.947 4.1 0.955 0.950 0.953 11.6 0.953 0.955 0.959 31.9 0.951 0.947 0.955

Tab. 1 Comparison of the umax/u∞ ratios between the FEM-FBM, ten Cate's simulation and ten Cate's experiment

• Velocity profiles compare well to ten Cate‘s data• Maximum velocity close to experiment• Flow features are accurately resolved

Observations

Page 24: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 24Page 24Turek/Münster/Mierka | TU Dortmund

Sedimentation Benchmark (II)

Comparison of FEM-FBM andthe experimental values andthe LBM results of the groupof Sommerfeld

Source: 13th Workshop on Two-Phase Flow Predictions 2012Acknowledgements: Ernst, M., Dietzel, M., Sommerfeld, M.

Page 25: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 25Page 25Turek/Münster/Mierka | TU Dortmund

Sedimentation Benchmark (III)

FEM-Multigrid Framework• Increasing the mesh resolution produces more accurate results

Test performed at different mesh levels• Maximum velocity is approximated better • Shape of the velocity curve matches better

Page 26: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 26Page 26Turek/Münster/Mierka | TU Dortmund

Now let‘s get it „colorful“…

Page 27: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 27Page 27Turek/Münster/Mierka | TU Dortmund

Some More Complex Examples

Page 28: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 28Page 28Turek/Münster/Mierka | TU Dortmund

‘Kissing, Drafting, Thumbling’

Page 29: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 29Page 29Turek/Münster/Mierka | TU Dortmund

(More) Complex Geometry Examples

Page 30: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 30Page 30Turek/Münster/Mierka | TU Dortmund

Fluidized Bed Example

Page 31: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 31Page 31Turek/Münster/Mierka | TU Dortmund

…and finally someapplications of FBM…

Page 32: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 32Page 32Turek/Münster/Mierka | TU Dortmund

Example: (Active) Microswimmer

Application to microswimmers (published: Nature Comm.)• Exp.: Cooperation with AG Fischer (MPI IS Stuttgart)• Analysis with respect to shear thickening/thinning• Use of grid deformation to resolve s/l interface

Page 33: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 33Page 33Turek/Münster/Mierka | TU Dortmund

Example: Screw Extruder (I)

• Numerical simulation of (partially filled) (twin)screw extruders• Non-Newtonian rheological models (shear & temperature dependent)

with non-isothermal conditions (cooling from outside, heat production)• Analysis of the influence of local characteristics on the global product

quality, prediction of hotspots and maximum shear rates• Optimization of torque acting on the screws, energy consumption

Page 34: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 34Page 34Turek/Münster/Mierka | TU Dortmund

Example: Screw Extruder (II)

ALE based Mesh Deformation

Page 35: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 35Page 35Turek/Münster/Mierka | TU Dortmund

Example: Screw Extruder (III)Twin-screw-element library

Combination of screw segments

Page 36: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 36Page 36Turek/Münster/Mierka | TU Dortmund

• Numerical simulation of complex geometries• Use of a regular semi-unstructured preadapted mesh• Resolution of small scale details by local mesh adaptation

Example: Virtual Wind Tunnel (I)

Mesh Slices with and without adaptation

Streamline visualization of the flow field around a car

Page 37: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 37Page 37Turek/Münster/Mierka | TU Dortmund

Influence of Mesh Adaptation (II)

• Details may be lost without adaptation• Better resolution with the same number of DOFs• Mesh adaptation saves at least one refinement level

Car representation by the computational mesh

with adaptation original no adaptation

Page 38: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 38Page 38Turek/Münster/Mierka | TU Dortmund

Example: Fluid Prilling&Encapsulation• Numerical simulation of micro-fluidic drug encapsulation (“monodisperse compound droplets”)• Polymeric “bio-degradable” outer fluid with generalized Newtonian behaviour• Optimization w.r.t. boundary conditions, flow rates, droplet size, geometry

Page 39: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 39Page 39Turek/Münster/Mierka | TU Dortmund

Extensions & Future Activities

• Viscoelastic fluids• Multiphase problems

→ Liquid-Liquid-Solid→ Melting/Solidification • Improve parallel efficiency of collision

detection and force computation on GPU• Dynamic grid adaptation with snapping

Hardware-Oriented Numerics

Fluidics

Benchmarking• 1 „complex“ object• „Many“ (=2) objects!

More communication between the scientific communities is required!

Page 40: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 40Page 40Turek/Münster/Mierka | TU Dortmund

Backup slides …

Page 41: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 41Page 41Turek/Münster/Mierka | TU Dortmund

Complex Rigid Bodies (I)

• Important Properties:→ Center of Mass

→ Moment of Inertia tensor

m

dVxxρV

22

22

22

bam5100

0cam510

00cbm51

• Geometric representation:→ Surface triangulation

Page 42: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 42Page 42Turek/Münster/Mierka | TU Dortmund

Moment of Inertia Tensor:• Can be calculated in a preprocessing step using FEM software• Moment of inertia tensor changes as the body moves and rotates

→ Transform the moment of inertia tensor by the transformation matrix of the rigid body

Transformation of I:

Complex Rigid Bodies (II)

zz

yy

xx

I000I000I

zzyzxz

yzyyxy

xzxyxx

IIIIIIIII

Tlwlww MIMI

P22

zz

P22

yy

P22

xx

dPzy,x,ρyxI

dPzy,x,ρzxI

dPzy,x,ρzyI

Pyz

Pxz

Pxy

dPzy,x,ρyzI

dPzy,x,ρxzI

dPzy,x,ρxyI

Page 43: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 43Page 43Turek/Münster/Mierka | TU Dortmund

Spatial Partitioning/Uniform Grids

• Cell size relates to radius of (bounding) sphere• Only objects in neighbouring cells are candidates for collision• Multiple grid levels for objects of different size• Efficient storage by using a hash mapping

GridArray

ArrayIndex=hashfunc(x,y)

Page 44: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 44Page 44Turek/Münster/Mierka | TU Dortmund

Collision Pipeline on the GPU (I)

• Domain is covered by a uniform grid or Aspatial hash→ use cell size equal to particle diameter

• Sort particles with GPU Radix sort by grid cell index→ Need to check only neighbouring cells for collisions→ Sorting leads to cache efficient grid traversal

Collision Detection

array cell particle

0 1 01 5 12 15 23 5 34 10 45 10 5

array cell particle

0 1 01 5 32 5 13 10 44 10 55 15 2

Uniform Grid Data Structure

Cell array 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sorted Data Structure

Page 45: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 45Page 45Turek/Münster/Mierka | TU Dortmund

Collision Pipeline on the GPU (II)

• Use a DEM approach that can be easily evaluated in parallel• Consider only the 3x3x3 neighbouring cells for each particle

Collision forces1r

2r12r

Forces acting on each particle

Sum up for each collision

k,η: material constants

ij

ijijsi, r

rrdkF ijdi, uηF

ij,tti,t ukF ij

ij

ij

ijijijij,t r

rrr

uuu

icollisions

i,tdi,si,ci, FFFF

icollisions

i,tdi,si,ici, FFFrT

• Can be extended to rigid bodies• Details: GPU Gems 3 (Takahiro Harada)

Page 46: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 46Page 46Turek/Münster/Mierka | TU Dortmund

Multi-Body Collision Model (III)

• Apply pairwise impulses iteratively

• Normal impulse

• Tangential (frictional) impulse

• Terminate when:• Impulses become small• Iteration limit is reached

Details: Guendelman, Nonconvex rigid bodies with stacking

Sequential Impulses

max ,0nn

Pk

v n

clamp( , , )t n nt

P P Pk

v t

1 11 1 1 2 2 2

1 2

1 1tk I I

m m r t r r t r t

n t nP P P

tv v t

Page 47: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 47Page 47Turek/Münster/Mierka | TU Dortmund

Alternative LCP formulation:

Multi-Body Collision Model (II)

kkj1

jlj33j

Tljjkki

1ilj33

i

Tlij

kkj1

jli33j

Tljikki

1ili33

i

Tliilk

nrIr1m

1nδnrIr1m

1nδ

nrIr1m

1nδnrIr1m

1nδ A

kklk

klkklk

kl

kklk

klkklk

kl

,00,xw,,xw0bx,w,,R,Rbx,w,b,Axw

nn11

nnn

A

This LCP can be solved with efficient iterative methods like theprojected Gauss-Seidel solver (PGS).

Page 48: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 48Page 48Turek/Münster/Mierka | TU Dortmund

Grid Deformation Method

Idea : construct transformation withlocal mesh area

1. Compute monitor function and

3. Solve the ODE system

new grid points:Grid deformation preserves the (local) logical structure

tx ,, fdetf

1,0, Cftxf

,,1 dxtxf

,,

1,

tft

tv

]1,0[ t

2. Solve ])1,0[( t0

nv

ttvttftt

,,,,,

1,iix

Page 49: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 49Page 49Turek/Münster/Mierka | TU Dortmund

Alternative LCP formulation:

Multi-Body Collision Model (II)

kkj1jlj33jTljjkki1ilj33i

Tlij

kkj1jli33jTljikki1ili33i

Tliilk

nrIr1m1nδnrIr1m

1nδ

nrIr1m1nδnrIr1m

1nδ A

kklkklkklkkl

kklkklkklkkl

,00,xw,,xw0bx,w,,R,Rbx,w,b,Axw

nn11

nnn

A

This LCP can be solved with efficient iterative methods like theprojected Gauss-Seidel solver (PGS).

Page 50: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 50Page 50Turek/Münster/Mierka | TU Dortmund

Particle Simulation on the GPU(II)

Stefan Turek

• Use a DEM approach that can be easily evaluated in pa• Consider only the 3x3x3 neighbouring cells for each pa

Collision forces

ij

ijijsi r

rrdkF , ijdi uF ,

tijtti ukF ,, ij

ij

ij

ijijijtij r

r

r

ruuu

,

)(

,,,,icollisions

tidisici FFFF

)(

,,,,icollisions

tidisiici FFFrT

Forces acting on each particle

Sum up for each collision

1r

2r12r

d

k,η: material constants

Page 51: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 51Page 51Turek/Münster/Mierka | TU Dortmund

Efficient FBM CalculationEfficient large-scale FBM

For n particles and m dofs a naive calculation of the inside/outside function on the grid has a complexity of O(n·m)

Neccessary only if the grid data structure does not have links between the cell index and the geometric location of the cell

Exploit temporal coherency• The particle trajectory is relatively smooth• Change in position between timesteps is small

FBM Update Strategy→ Store the cells intersected by a particle in tn→ Start neighbour search from these cells in tn+1

→ While cell is in object and not visited:→ Store cell, mark as visited→ Search next neighbour

→ Number of cells visited is a constant:→ Update complexity: O(n)

Alternative:Hierarchical Uniform Hash Grids

Page 52: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 52Page 52Turek/Münster/Mierka | TU Dortmund

Examples• Flows with complex geometries• Fluidized bed• Particulate flow demonstrating incompressibility• GPU sedimentation example• Numerical results and benchmark test cases• Comparison of results with other groups

Page 53: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 53Page 53Turek/Münster/Mierka | TU Dortmund

Microswimmer Example

Compared to the classic FBM approach the force curve is much

smoother with grid adaptation

Page 54: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 54Page 54Turek/Münster/Mierka | TU Dortmund

Microswimmer Example

Page 55: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 55Page 55Turek/Münster/Mierka | TU Dortmund

Page 56: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 56Page 56Turek/Münster/Mierka | TU Dortmund

Many Particle Sedimentation

Page 57: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 57Page 57Turek/Münster/Mierka | TU Dortmund

Driven Cavity with Particles

Page 58: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 58Page 58Turek/Münster/Mierka | TU Dortmund

Contact/Collision Modelling

• Contact determination for rigid bodies A and B:→ Distance d(A,B)→ Relative velocity vAB = (vA + ωA ×rA– (vB + ωB ×rB))→ Collision normal N = (XA (t) – XB (t))→ Relative normal velocity N · (vA + ωA ×rA– (vB + ωB ×rB))

• distinguishes three cases of how bodies move relative to each other:→ Colliding contact : N · vAB < 0→ Separation : N · vAB > 0→ Touching contact : N · vAB = 0

N · vAB < 0 N · vAB = 0 N · vAB > 0

Page 59: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 59Page 59Turek/Münster/Mierka | TU Dortmund

Contact Force Calculation• Contact force calculation realized as a three step process

→ Broad phase→ Narrow phase→ Contact/Collision force calculation

• Worst case complexity for collision detection is O(n2)→ Computing contact information is expensive→ Reduce number of expensive tests → Broad Phase

• Broad phase→ Simple rejection tests exclude pairs that cannot intersect→ Use hierarchical spatial partitioning

• Narrow phase→ Uses Broadphase output→ Calculates data neccessary for collision force calculation

Several single, resp., multibody collision models arerealized and tested, but…..

Page 60: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 60Page 60Turek/Münster/Mierka | TU Dortmund

For a single pair of colliding bodies we compute the impulse f that causes the velocities of the bodies to change:

Single Body Collision Model

112

12

T112111

11

T111

12

11

11221111211

nrInrnrInrmmnrnrv-vn 1f

ωωε

Using the impulse f, the change in linear and angular velocitycan be calculated:

1111

1111

111 fnrIttt,

mfntvttv ωΔωΔ

1121

2222

122 fnrIttt,

mfntvttv ωΔωΔ

Page 61: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 61Page 61Turek/Münster/Mierka | TU Dortmund

Multi-Body Collision Model

In the case of multiple colliding bodies with K contact points the impulsesinfluence each other. Hence, they are combined into a system of equationsthat involves the following matrices and vectors:

• N: matrix of contact normals• C: matrix of contact conditions• M: rigid body mass matrix• f: vector of contact forces (fi≥0)• fext: vector of external forces(gravity, etc.)

b x A

0 f 0,fΔtMuCNΔtfCNMCN ext1tTTΔtt-1TT

A problem of this form is called a Linear Complementarity Problem (LCP) which can be solved with efficient iterative methods like theProjected Gauss-Seidel solver (PGS).Kenny Erleben,Stable, Robust, and Versatile Multibody Dynamics Animation

Page 62: Finite Element-Fictitious Boundary Methods for the ...• Constant mesh/data structure GPU • Increased resolution in regions of interest (“r-adaptivity”) •Anisotropic ‘umbrella’

Page 62Page 62Turek/Münster/Mierka | TU Dortmund

DGS Configuration