23
Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342 Immersed Boundary Surface Method in foam-extend Hrvoje Jasak Wikki and University of Zagreb OpenFOAM in Hydraulic Engineering Conference BAW Karlsruhe, 21-22/Nov/2018 Immersed Boundary Surface Method in foam-extend – p. 1

Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

  • Upload
    vungoc

  • View
    235

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Immersed Boundary Surface Method infoam-extend

Hrvoje Jasak

Wikki and University of Zagreb

OpenFOAM in Hydraulic Engineering Conference

BAW Karlsruhe, 21-22/Nov/2018

Immersed Boundary Surface Method in foam-extend – p. 1

Page 2: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Outline

Objective

• Present the new (stabilised) formulation of the Immersed Boundary Method in

foam-extend: Immersed Boundary Surface (IBS)

• Provide examples from hydraulic engineering

Topics

• Background: Immersed Boundary Method in foam-extend

• New algorithm: Immersed Boundary Surface (IBS) Method

• Imposition of boundary conditions

• Validation: Simple static mesh cases

• Handling IBS motion: Dynamic IBS

• Validation: Dynamic mesh cases

• Hydraulic engineering example: ONR Tumblehome

• Summary

Immersed Boundary Surface Method in foam-extend – p. 2

Page 3: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Background

Immersed Boundary Method in foam-extend

• Implementation of the Immersed Boundary Method (IBM) is based on polynomial

fitting of the solution with respect to the boundary condition

φP = φib + C0(xP − xib) + C1(yP − yib)

+ C2(xP − xib)(yP − yib) + C3(xP − xib)2 + C4(yP − yib)

2

��������

������

������

���������

���������

������

������

������������

��������

���������

���������

��������

Fluid cells

Solid cells

IB cells

IB points

Extended stencilP

ib

• The IBM performs satisfactorily in single-phase flows, but carries some drawbacks:

handling of Neumann boundary conditions, wall function implementation

• In free surface flows, the solver shows strong instability due to matching of

gradients next to the IB surface

Immersed Boundary Surface Method in foam-extend – p. 3

Page 4: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Background

Project Objective

• Objective: provide a robust and efficient Immersed Boundary capability for naval

hydrodynamics simulations, specifically for motion of floating objects in confinedspaces

Functional Analysis

• While functionally correct, the idea of polynomial fitting is adequate for smoothly

varying solution variables in single-phase flows

• Handling of Neumann boundary conditions at the IB was unsatisfactory: fitting

condition cannot be fully implicit, yielding instability

• Wall function implementation carries some uncertainty due to log-law fitting

• A free surface indicator such as Volume-of-Fluid cannot be adequately fitted and

leads to instability

• Attempts to use the Level Set free surface capturing and the Ghost Fluid Method

for interface handling proved superior over the original method, but was not

completely satisfactory: alternative solution is sought

• Immersed surface data is evaluated on the STL: resolution-dependent

Conclusion: further improvement in robustness and accuracy is sought regarding

the precision and stability of discretisation at the IB surface

Immersed Boundary Surface Method in foam-extend – p. 4

Page 5: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Immersed Boundary Surface

Immersed Boundary Surface

• IB implementation relies on the imposition of the boundary condition in the bulk of

the mesh: this is built into the discretisation matrix

• Old implementation loses information in the cut cell: reduction in volume; loss of

precision at the intersection

• Objective: implement the influence of the presence of a boundary within the mesh

as if the mesh is body-fitted:

◦ Introduce the “new” IB face in the cut cell

◦ Account for the partial cell volume without loss of accuracy

◦ Account for partial face areas without loss of accuracy

◦ Calculate face and cell centre consistent with cell cut

• . . . without changing the geometric mesh at all!

Immersed Boundary Surface Method in foam-extend – p. 5

Page 6: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Immersed Boundary Surface

Immersed Boundary Surface: Finite Volume Support

• The FVM method operates on the following geometrical data

1. Cell-to-face connectivity: owner/neighbour addressing

2. Cell volumes and face area vectors

3. Interpolation factors and delta-coefficients (1/distance)

• . . . and nothing else!!! All data contained in fvMesh class

Implementation Rationale

• Introduce new IBS faces: intersected cells via distance functions

• Cell-to-face addressing, face area and face centre calculated from intersection

• For affected cells, FV data (above) is adjusted

Notes

• Underlying mesh connectivity remains the same after cutting

• Cut cell re-uses discretisation matrix slot of the original cell

• New faces created as 1-per-cut-cell and contained in the immersed patch:

face-cell addressing identifies cut cells

Immersed Boundary Surface Method in foam-extend – p. 6

Page 7: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Immersed Boundary Surface

Immersed Boundary Surface: Old and New Methodology

Fluid cells

Solid cells

IB cells

IB points$\n$

Fluid cells: untouched

Solid cells: deactivated

IBS: intersected cells

Adjusted IBS centres

Characteristics of IBS Implementation

• Immersed boundary patch is included into the mesh via the distance function: all

cells that straddle the immersed boundary remain active

• STL resolution or quality is not important: only using nearest distance

• As the immersed boundary sweeps the cell, the “live” part of the cell remains well

defined: positive face-to-cell distance

• Convex cell cut by a zero-distance plane remains convex: no discretisation issues

Immersed Boundary Surface Method in foam-extend – p. 7

Page 8: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Immersed Boundary Surface

Immersed Boundary Surface: Modified Immersed Boundary Cells

Background cell Background cell

Corrected face centre

Corrected cell centre

Immersed face centre

• Nearest distance calculated for vertices of all affected cells

• Intersection is calculated for all faces and cells: replace original data with

centres/areas/volumes of the “live part”

• Immersed intersection calculated based on point distance

◦ All faces and cells are cut by a distance plane

◦ Simple planar cutting provides robustness: no feature edges

• Near-wall distance calculated from live cell centre to immersed face

• Delta coefficients and interpolation factors corrected for centre position

Immersed Boundary Surface Method in foam-extend – p. 8

Page 9: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Immersed Boundary Surface

Immersed Boundary Surface: Imposition of Boundary Conditions

• Immersed boundary is represented in the mesh by STL intersection with cells

• Therefore, conventional boundary condition implementation suffice on the

immersed patch for a static mesh and IB surface

• Immersed boundary motion involves change in intersection: number of IB faces

changes!

• Evaluation of immersed properties is performed without interpolation or

simplification

• STL surface is automatically refined/coarsened to comply with the background

mesh: automatic coarsening and refinement

Immersed Boundary Surface Method in foam-extend – p. 9

Page 10: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Immersed Boundary Surface

Calculation of IB Intersection: Degenerate Surface Cutting Cases

• “Regular intersection” occurs between a cell and STL surface

• Due to finite accuracy, STL regularly coincides with faces or does not provide

accurate intersection

◦ Direct face intersection between Dry and Wet cell: face becomes IB face

◦ Inaccurate intersection of STL feature edges/points may yield a geometrically

open cell, with possible robustness issues

◦ Using the Marooney Maneouvre to guarantee a closed cell after cutting

∑C

sf = 0 for a regular cell

∑C

γf sf + sf IB = 0 for an intersected cell

where γf is the area correction, obtained by cutting

◦ Corrected IB face area sf IB is:

sf IB = −

∑C

γf sf

Immersed Boundary Surface Method in foam-extend – p. 10

Page 11: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Static Mesh Validation

Static Mesh Immersed Boundary: Laplace Equation, Potential Flow

Immersed Boundary Surface Method in foam-extend – p. 11

Page 12: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Static Mesh Validation

Static Mesh Immersed Boundary Cases: Laminar and Turbulent Flow

Immersed Boundary Surface Method in foam-extend – p. 12

Page 13: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Static Mesh Validation

Static Mesh Immersed Boundary Cases: Free Surface Flow

• Free surface flow with the Ghost Fluid Method

• Cylindrical Immersed Boundary obstacle at the bottom, intersecting with boundary

Immersed Boundary Surface Method in foam-extend – p. 13

Page 14: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Moving Immersed Boundary

Moving Immersed Boundary Surface Support

• Moving mesh Finite Volume Method uses a compensated form of the transport

equation

∫V

∂φ

∂tdV +

∮S

φ [n•(u− ub)] dS −

∮S

γ(n•∇φ) dS =

∫V

qv dV

where ub is the boundary velocity

• Motion consistency requires auxiliary “Conservation of Space” condition

∫V

∂V

∂t−

∮S

(n•ub) dS = 0

• Discretised space conservation law yields

V n − V o

∆t−

∑f

Fb = 0

Immersed Boundary Surface Method in foam-extend – p. 14

Page 15: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Moving Immersed Boundary

Calculation of Cell Volumes and Motion Fluxes For Immersed Cells

• Volume swept by immersed face is calculated from new IB face and motion

distance.

Vb = xb•sfn volume swept in red

where xb is geometrical motion distance from old to new STL

• As the intersected area changes, swept volume must be distributed:

◦ Cell A: expand from cut volume to full volume: no IB face in new configuration

◦ Cell B: cut both at new and old configuration: IB face present

◦ Cell C: expand from zero volume to partial volume: IB face present

◦ (Cell D): expand from zero to full volume (cell fully swept by IB): no IB face

Volold

Volnew

volume swept byimmersed face

CELL B

New Position

Old Position

CELL C

CELL ACELL C

Immersed Boundary Surface Method in foam-extend – p. 15

Page 16: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Dynamic Mesh Validation

Dynamic Mesh Validation: Single-Phase Flow

• Moving immersed boundary within a static mesh

• Laminar Flow, Re = 50

• Some noise in viscous force signal in small cut volumes

Immersed Boundary Surface Method in foam-extend – p. 16

Page 17: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Dynamic Mesh Validation

Dynamic Mesh Validation: Moving Mesh Free Surface Flow

• Free surface capturing, VOF equation, Ghost Fluid Method

• Floating body described by Immersed Boundary Surface

• Prescribed motion: heave and sway motion

• Small oscillation in force related to viscous terms. This can be adjusted with mesh

refinement

Immersed Boundary Surface Method in foam-extend – p. 17

Page 18: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Adaptive Refinement, Load Balance

Example: 6-DOF Free Floating with Adaptive Refinement and Load Balancing

• Force spikes caused by sharp corners on STL geometry: not a good idea

Immersed Boundary Surface Method in foam-extend – p. 18

Page 19: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Verification: Resistance Forces

ONR Tumblehome Ship Hull: Body-Fitted vs Immersed Boundary

• ONR Tumblehome Ship from the Tokyo 2015 Workshop on Naval Hydrodynamics

• Bare hull in full scale at Fr = 0.2

• Comparison of a body fitted mesh simulation and immersed boundary

• No dynamic sinkage and trim, and no turbulence modelling (still working on that)

• Result: Resistance comparison

Mesh structure Resistance [kN]

Body Fitted Mesh 98.0 kN

Immersed Boundary 92.0 kN

• Notes

◦ The complete hull is modelled as Immersed Boundary

◦ No near-wall prismatic layers: wall functions see fluctuating y+

◦ Immersed boundary solver significantly faster: no small cells for CFL limit

◦ Intended use for IB patches are appendage geometries, not the complete hull

Immersed Boundary Surface Method in foam-extend – p. 19

Page 20: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Verification: Resistance Forces

ONR Tumblehome Ship Hull: Body-Fitted vs Immersed Boundary

Immersed Boundary Surface Method in foam-extend – p. 20

Page 21: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Verification: Resistance Forces

ONR Tumblehome Ship Hull: Body-Fitted vs Immersed Boundary

Immersed Boundary Surface Method in foam-extend – p. 21

Page 22: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Verification: Resistance Forces

ONR Tumblehome Ship Hull: Body-Fitted vs Immersed Boundary

Immersed Boundary Surface Method in foam-extend – p. 22

Page 23: Immersed Boundary Surface Method in foam-extend · Immersed boundary solver significantly faster: no small cells for CFL limit Intended use for IB patches are appendage geometries,

Wikki Ltd. Proprietary and Confidential: Do not copy or re-distribute. Tracking: 43145000342

Summary

Summary: Immersed Boundary Surface

• New implementation of Immersed Boundary Surface performed within the project

• Immersed Boundary created as a set of cell-to-STL intersection faces, capturing

all effects of the STL on underlying mesh: no simplifications!

• Significant improvement in robustness, accuracy, boundedness of the solution and

stability of the code

• For static mesh cases, conventional boundary conditions can be used

• Automatic adaptation of the triangular mesh: conforming with background mesh

intersection

Summary: Validation and Verification

• Validation and verification on static mesh and moving immersed boundary

presented for single-phase and free surface flows

Summary: Adaptive Refinement and Dynamic Load Balancing

• Adaptive refinement uses a newly developed refinement class operating on

polyhedral cells

• Refinement criterion: distance from immersed boundary; limited to 2-3 levels

• Dynamic load balancing: improved efficiency on massively parallel cases

Immersed Boundary Surface Method in foam-extend – p. 23