improving overset performance within...

35
Improving Overset Performance within STAR-CCM+ Björn Gmeiner, Eberhard Schreck, Daniel Uhlmann Siemens PLM Software

Upload: others

Post on 07-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Improving Overset Performance within STAR-CCM+

Björn Gmeiner, Eberhard Schreck, Daniel Uhlmann

Siemens PLM Software

Page 2: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 2 / 35 Siemens PLM Software

● Motivation

● Core-level and Node-level Optimization: Exact Volume Integration

● Parallel Performance Improvements

● Overset Prism Layer Shrinkage

● Examples

Content

Page 3: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 3 / 35 Siemens PLM Software

● Core-level and node-level optimization (Exact volume integration)

Effects of serial optimization techniques and node-level load balancing

● Parallel algorithm

Redesign for parts of the parallel Overset algorithm

● Reducing overall work (Overset Prism Layer Shrinkage)

Move cells to where they are needed: lightweight local morphing

Improve Performance on Different Levels

Low

High

Ab

str

acti

on

Page 4: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 4 / 35 Siemens PLM Software

Improving Overset Performance within STAR-CCM+

Core-level and Node-level Optimization:

Exact Volume Integration

Page 5: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 5 / 35 Siemens PLM Software

Performance Enhancements for Exact Volume Integration

(Core and Node level)

Avoid double counting

Page 6: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 6 / 35 Siemens PLM Software

Motivation: Run-time for an Exact Volume Integration

Method:

Cells are chopped up into tetrahedral which are then being intersected

against each other (optional).

For some evaluated cases (serial) before optimization:

Polyhedral mesh:

Overset Volume Correction is 60-80% of the total Overset intersection time

Trimmed mesh:

Overset Volume Correction is ~30% of the total Overset intersection time

Page 7: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 7 / 35 Siemens PLM Software

Why is Exact Volume Calculation Expensive for Polyhedral Cells?

• Average number of tetrahedra per polyhedral cell: 30-40

• Tetrahedron / tetrahedron intersection leading to zero-volume intersections: ~70%

• Average number of tetrahedral intersections per polyhedral cell: ~1000

• Load imbalance: Depends much on the partitioning but can be a large factor

Page 8: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 8 / 35 Siemens PLM Software

Optimization opportunities

• Average number of tetrahedra per polyhedral cell: ~35Reduce them by choosing another decomposition

• Tetrahedron / tetrahedron intersection leading to zero-volume intersections: ~70%Implement a fast tetrahedron-tetrahedron collision detection

(see Ganovelli, Fabio, Federico Ponchio, and Claudio Rocchini. "Fast tetrahedron-

tetrahedron overlap algorithm." Journal of Graphics Tools 7.2 (2002): 17-25.)

• Average number of tetrahedral intersections per polyhedral cell: ~1000Optimize the computational intersections kernels

• Load Balancing:Node-wise re-distribution of work

Page 9: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 9 / 35 Siemens PLM Software

Different Simple Element Decompositions: Polyhedral / Trimmed Meshes

• Good element shapes

• #Elements: 10

• Worse element shapes

• #Elements: 8

• Good element shapes

• #Elements: 4

• Good element shapes

• #Elements: 2

Page 10: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 10 / 35 Siemens PLM Software

Problem:

Hotspot analysis shows the time is spent in many different kernels!

• ~ 25% of the time is spent within 10 hotspots

• ~ 50% of the time is spent within 40 hotspots

Consequence:

We have to optimize several hotspots and cannot easily expect an

improvement by e.g. an order of magnitude.

Basically to get an improvement you are trying to get one percent after

another.

Optimization of Intersection Kernels

Page 11: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 11 / 35 Siemens PLM Software

Anyhow, we tried and optimized by:

• Changing the tetrahedron volume calculation formula

• Avoiding square roots

• Removing small loops

• Removing branches

• Optimizing sorting routines

• Reordering executions

• ...

Optimization of Intersection Kernels

Page 12: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 12 / 35 Siemens PLM Software

Serial optimizations improvements (version 12.02)

• Improvement for polyhedral meshes: ~25%

~5 % tetrahedra decomposition

~10% fast tetrahedron-tetrahedron collision detection

~10% kernel optimization

• Improvement for trimmed meshes: ~60%

Node-wise optimization improvements (result based on serial optimization)

• Improvement (in parallel, 20 cores, version 13.04): ~50%

and ~60% reduction in main memory consumption (using a blocking technique)

Exact Volume Calculation Runtime (averages on over 10 different cases)

Page 13: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 13 / 35 Siemens PLM Software

Improving Overset Performance within STAR-CCM+

Parallel Performance Improvements (v13.06)

Page 14: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 14 / 35 Siemens PLM Software

Underlying task: For hole-cutting large surfaces have to be collected (in

parallel) in order to perform inside/outside tests.

Previous approach: Collect the (global) surfaces for each process and then

perform tests locally.

Drawback: High memory consumption (not scaling for this task) and high

amount of communication required

New approach (version 13.06):

- Identify and collect only the surface parts that are locally required.

- Make the test itself “more local”

Motivation

Page 15: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 15 / 35 Siemens PLM Software

Parallel Performance Improvement (Planetary Gear, half populated)

Page 16: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 16 / 35 Siemens PLM Software

Parallel Performance Improvement for Gearbox (motion only !)

Page 17: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 17 / 35 Siemens PLM Software

Improving Overset Performance within STAR-CCM+

Overset Prism Layer Shrinkage (v13.02)

“Honey I shrunk the Prisms”

Page 18: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 18 / 35 Siemens PLM Software

Why Prism Layer Shrinkage for Overset?

last prism edge

boundary edge

Not shrunk Shrunk

Object in overset

region

Object in overset

region

x x x xxx

x: Active cell (not covered by object in the overset region)

Page 19: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 19 / 35 Siemens PLM Software

Why Prism Layer Shrinkage for Overset?

last prism edge

boundary edge

control edge

relaxation edge

- Boundary edge and the last prism edge are not getting changed by the shrinker

- The shrinking algorithm changes the control edge by proposing a new ratio

(prism layer stretching) between the two adjacent layers

- Relaxation edges above or below the control edge are always relaxed towards

the original ratio

Not shrunk Shrunk

Object in overset

region

Object in overset

region

Page 20: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 20 / 35 Siemens PLM Software

Algorithmic procedure

Setup connectivity (once per remeshing/repartitioning):

1. Identify prismatic cells

2. Mark vertices only attached to prismatic cells

3. Number prismatic vertex layers

4. Create vertex connectivities

5. Compute original ratios

Adapt prism layers (once per time-step):

1. Exchange adjacent vertex coordinates (for parallel only)

2. Calculate boundary wall distances to determine new shrinkage ratios

3. Move control vertex and relax other prism vertices

Page 21: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 21 / 35 Siemens PLM Software

Algorithmic procedure

Setup connectivity (once per remeshing/repartitioning):

1. Identify prismatic cells

2. Mark vertices only attached to prismatic cells

3. Number prismatic vertex layers

4. Create vertex connectivities

5. Compute original ratios

Adapt prism layers (once per time-step):

1. Exchange adjacent vertex coordinates (for parallel only)

2. Calculate boundary wall distances to determine new shrinkage ratios

3. Move control vertex and relax other prism vertices

Page 22: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 22 / 35 Siemens PLM Software

First Attempts

Use the Overset status (i.e. location of the acceptor cells)!

+ Cheap!

- Requires at (least a partial) overset intersection

- Non-accurate distances in space and time resulting in oscillations

Tried to smooth out, e.g. by using:

- nearest neighbour relaxation in space

- moving averages in time (simple, exponential, median)

but were not really happy with the results… We need something more accurate!

=> Full distance based treatment

Page 23: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 23 / 35 Siemens PLM Software

User Interface

Page 24: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 24 / 35 Siemens PLM Software

Examples

Page 25: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 25 / 35 Siemens PLM Software

Test-geometry (3D): without shrinkage (left), with shrinakge (right)

Page 26: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 26 / 35 Siemens PLM Software

Test-geometry (3D): without shrinkage (left), with shrinakge (right)

Page 27: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 27 / 35 Siemens PLM Software

Without shrinkage (top), with shrinkage (bottom). Target: Three cell layers

Page 28: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 28 / 35 Siemens PLM Software

ZeroGap without shrinkage (Gear pump, 2D)

Overset representationVolume representation

Page 29: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 29 / 35 Siemens PLM Software

ZeroGap with shrinkage, minimal gap distance: 0.000125

Page 30: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 30 / 35 Siemens PLM Software

ZeroGap with shrinkage, minimal gap distance: 0

Overset representationVolume representation

Page 31: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 31 / 35 Siemens PLM Software

Lobe Blower (3D) (Mesh motion)

Page 32: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 32 / 35 Siemens PLM Software

Lobe Blower (3D) (Velocity)

Page 33: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 33 / 35 Siemens PLM Software

Gearbox VOF (2D)

Page 34: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 34 / 35 Siemens PLM Software

Gerotor (3D)

Page 35: Improving Overset Performance within STAR-CCM+2018.oversetgridsymposium.org/assets/presentations/... · 2018. 9. 29. · 1. Identify prismatic cells 2. Mark vertices only attached

Unrestricted © Siemens AG 2018

04.10.2018Page 35 / 35 Siemens PLM Software

Conclusion and Outlook

● Core-level and node-level optimizations significantly helped to improve

the performance of the exact volume integration

● Parallel performance improvements are going to help large Overset

cases with respect to run-time and memory requirements

● Overset Prism Layer Shrinkage now allows quickly setting up

geometries involving very small gaps