56
Using the dynamicTopoFvMesh class in OpenFOAM Sandeep Menon Kyle Mooney Multi-phase Flow Simulation Laboratory University of Massachusetts Amherst June 13 2011

Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Embed Size (px)

Citation preview

Page 1: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Using the dynamicTopoFvMesh class inOpenFOAM

Sandeep Menon Kyle Mooney

Multi-phase Flow Simulation LaboratoryUniversity of Massachusetts Amherst

June 13 2011

Page 2: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Introduction

ExamplesI Leaky Faucet (free surface flow)I Micron Scale Droplet Collision (free surface flow)I Translating Circle (2D parallel remeshing)I Cylinder Intake Stroke (internal flow)I Store Separation (external flow & six-DOF)

Adaptive reconnection methodsI Mesh quality optimizationI Length scale resolution

Solution remappingParallel mesh reconnectionSetting Up A Case

I Configuring dynamicMeshDictI Running A Simulation

Slide: 2/31

Page 3: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Droplet formation under gravity

Slide: 3/31

Page 4: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Droplet formation under gravity

Slide: 4/31

Page 5: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Micron Scale Droplet Collision

Slide: 5/31

Page 6: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Translating Circle in DomainNo Redistribution Redistribution every 100 time steps

Slide: 6/31

Page 7: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Parallel In-cylinder Simulations

Slide: 7/31

Page 8: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Store Separation Simulations

Slide: 8/31

Page 9: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Store Separation Simulations

Slide: 9/31

Page 10: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Governing Equations

Integral Conservation Law for Moving / Deforming Control Volumes:

d

dt

∫V

ρφ dV +

∫S

n · ρ(v − vs)φ dS = −∫S

n · qφ dS +

∫V

sφ dV

Conservation of Mass:

d

dt

∫V

ρ dV +

∫S

n · ρ(v − vs) dS = 0

Conservation of Linear Momentum:

d

dt

∫V

ρv dV +

∫S

n · ρ(v − vs)v dS =

∫V

ρg dV +

∫S

n · σ dS

Space Conservation Law:

d

dt

∫V

dV −∫S

n · vs dS = 0

Slide: 10/31

Page 11: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Mesh Smoothing

Objectives:Continuously maintain mesh qualityNo changes to mesh connectivityDelay local re-meshing requirementsEasily incorporated into conservation laws

Spring Analogy Laplacian:∑j

kij(xij − xi) = 0

Laplacian Smoothing on Surfaces:

(I− nnT )∑j

kij(xij − xi) = 0

Slide: 11/31

Page 12: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Mesh Smoothing

Objectives:Continuously maintain mesh qualityNo changes to mesh connectivityDelay local re-meshing requirementsEasily incorporated into conservation laws

Spring Analogy Laplacian:∑j

kij(xij − xi) = 0

Laplacian Smoothing on Surfaces:

(I− nnT )∑j

kij(xij − xi) = 0

Slide: 11/31

Page 13: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Adaptive Mesh Reconnection

Reconnection for Improved Mesh QualityHandle excessive distortionUsed when mesh-motion algorithms are insufficientLocalized nature to avoid interpolation errorsOnly simplical 2D and 3D meshes considered

Reconnection for Length-Scale ResolutionAccurately capture physical phenomenaAchieve trade-off for computational cost vs. solution accuracy

Edge Swapping

Edge Bisection and Collapse

Slide: 12/31

Page 14: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Adaptive Mesh Reconnection

Reconnection for Improved Mesh QualityHandle excessive distortionUsed when mesh-motion algorithms are insufficientLocalized nature to avoid interpolation errorsOnly simplical 2D and 3D meshes considered

Reconnection for Length-Scale ResolutionAccurately capture physical phenomenaAchieve trade-off for computational cost vs. solution accuracy

Edge Swapping

Edge Bisection and Collapse

Slide: 12/31

Page 15: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Adaptive Mesh Reconnection

Reconnection for Improved Mesh QualityHandle excessive distortionUsed when mesh-motion algorithms are insufficientLocalized nature to avoid interpolation errorsOnly simplical 2D and 3D meshes considered

Reconnection for Length-Scale ResolutionAccurately capture physical phenomenaAchieve trade-off for computational cost vs. solution accuracy

Edge Swapping

Edge Bisection and Collapse

Slide: 12/31

Page 16: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Adaptive Mesh Reconnection

Reconnection for Improved Mesh QualityHandle excessive distortionUsed when mesh-motion algorithms are insufficientLocalized nature to avoid interpolation errorsOnly simplical 2D and 3D meshes considered

Reconnection for Length-Scale ResolutionAccurately capture physical phenomenaAchieve trade-off for computational cost vs. solution accuracy

Edge Swapping

Edge Bisection and Collapse

Slide: 12/31

Page 17: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Solution RemappingSupermesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

φ(xKb) =

1

VKb

[n∑i=1

{φKa+ (xiKc

− xKa) · (∇φ)Ka

}V iKc

]

Slide: 13/31

Page 18: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Solution RemappingSupermesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

φ(xKb) =

1

VKb

[n∑i=1

{φKa+ (xiKc

− xKa) · (∇φ)Ka

}V iKc

]

Slide: 13/31

Page 19: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Solution Remapping

Supermesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

φ(xKb) =

1

VKb

[n∑i=1

{φKa+ (xiKc

− xKa) · (∇φ)Ka

}V iKc

]

Slide: 13/31

Page 20: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Solution Remapping

Supermesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

StepsCompute intersectionsCompute and limit gradients on source meshVolume and distance weighted Taylor series interpolate to supermeshAgglomeration on target mesh

φ(xKb) =

1

VKb

[n∑i=1

{φKa+ (xiKc

− xKa) · (∇φ)Ka

}V iKc

]

Slide: 13/31

Page 21: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Parallel Mesh Reconnection

Shared memory parallelismEntire memory is accessible to all compute nodesThread-safety is always a concernUsing the pthreads library for thread handlingLimited by memory bandwidth / capacity

Distributed memory parallelismEach compute node sees only its share of memoryInter-processor communication using MPITheoretically infinite memory capacity

Halo meshes

Slide: 14/31

Page 22: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Parallel Mesh Reconnection

Shared memory parallelismEntire memory is accessible to all compute nodesThread-safety is always a concernUsing the pthreads library for thread handlingLimited by memory bandwidth / capacity

Distributed memory parallelismEach compute node sees only its share of memoryInter-processor communication using MPITheoretically infinite memory capacity

Halo meshes

Slide: 14/31

Page 23: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Parallel Mesh Reconnection

Shared memory parallelismEntire memory is accessible to all compute nodesThread-safety is always a concernUsing the pthreads library for thread handlingLimited by memory bandwidth / capacity

Distributed memory parallelismEach compute node sees only its share of memoryInter-processor communication using MPITheoretically infinite memory capacity

Halo meshes

Slide: 14/31

Page 24: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring dynamicMeshDict

Dictionary Organization:Smoothing and dynamicMesh Library SelectionSmoother OptionsDefine Explicit Patch MotionGeneral dynamicTopoFvMesh Options

I Refinement Options

Parallel Redistribution Options

Slide: 15/31

Page 25: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

circCylinder3D Tutorial

Slide: 16/31

Page 26: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring dynamicMeshDict

//- Select the type of dynamicFvMeshdynamicFvMesh dynamicTopoFvMesh;

//- Select the type of motionSolversolver mesquiteMotionSolver;

Slide: 17/31

Page 27: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring mesquiteOptions Subdict.

mesquiteOptions{

//- Specify interval for surface smoothingsurfInterval 1;

//- Optimization metricoptMetric AspectRatioGamma;

//- Objective functionobjFunction LPtoP;

//- Optimization algorithmoptAlgorithm FeasibleNewton;

//- Termination criteria sub-dictionaries//- (takes default values if not specified)//- Specifying an empty sub-dictionary//- terminates with available optionstcInner{

absGradL2 1e-4;cpuTime 0.5;

}

Slide: 18/31

Page 28: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring mesquiteOptions Subdict. cont.

//- Power value for the LPtoP objective functionpValue 2;power 2;

//- Specify a tolerance for the surface-smoothing CG solvertolerance 1e-2;

//- Specify number of CG sweeps for surface-smoothingnSweeps 2;

//- Specify slip patches for the motionSolverslipPatches{

sideWall;topWall;

}

Slide: 19/31

Page 29: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring mesquiteOptions Subdict. cont.

//- Constrain surface mesh-motion on a specified cylindercylindricalConstraints{

//- Specify options per slip patchsideWall{

axisPoint (0.0 0.0 0.0);axisVector (0.0 0.0 1.0);radius 1.0;

}}

Slide: 20/31

Page 30: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring mesquiteOptions Subdict cont.

//- Specify fixedValue patches for the motionSolverfixedValuePatches{

topWall{

type angularOscillatingDisplacement;amplitude -0.0125;//type oscillatingDisplacement;//amplitude (0 0 -0.01);axis (1 0 0);origin (0 0 3);angle0 0.0;omega 0.15;value uniform (0 0 0);

}}

Other fixedValuePatch types can be found here:/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived//-End of Mesquite options

Slide: 21/31

Page 31: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring dynamicTopoFvMesh

//- Options for dynamicTopoFvMeshdynamicTopoFvMesh{

//- Should all options be made mandatory?//- Useful for first-time use.allOptionsMandatory no;

//- Set run-time debug level [0-5]// debug 0;

//- Specify the number of threadsthreads 1;

//- Specify re-meshing interval//- Negative value implies no re-meshinginterval 1;

//- Specify whether the length-scale field//- should be dumped to diskdumpLengthScale false;

Slide: 22/31

Page 32: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Configuring dynamicTopoFvMesh

//- sliverThreshold specifies the//- quality criteria for sliver removal.sliverThreshold 0.35;

//- Should the tool attempt to remove slivers//- that fall below the sliverThreshold value?removeSlivers false;

//- Skip mapping step. Useful while using//- this tool as a pre-processor// skipMapping true;

// Toggle edgeRefinement on/offedgeRefinement yes;

//- If the number of modifications are to be limited, set this option// maxModifications 1000;

//- Load custom libraries for metrics// tetMetricLibs ("libtetMetrics.so");

//- Tetrahedral mesh quality metrictetMetric Knupp;

//- Avoid 2-2 swapping on certain patchesnoSwapPatches{}

Slide: 23/31

Page 33: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

ConfiguringdynamicTopoFvMesh::refinementOptions

//- Options for edge-bisection/collapse.//- The edgeRefinement flag must be set for//- the following options to have effectrefinementOptions{

collapseRatio 0.5;bisectionRatio 1.5;growthFactor 1.03;

//- By default, existing boundary edge-lengths//- are used for length-scales.//- Length-scale can be fixed for certain patches.fixedLengthScalePatches{

topWall 0.2;bottomWall 0.2;sideWall 0.2;outlet 0.2;

}

Slide: 24/31

Page 34: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

ConfiguringdynamicTopoFvMesh::refinementOptions

//- Avoid refinement on certain patches, if necessarynoModificationPatches{}

//- Set floating length-scale values on certain patchesfreeLengthScalePatches{}

//- Limit lengthScales to specified values, if necessary// minLengthScale 0.1;// maxLengthScale 0.3;

//- Field-based refinement options// fieldRefinement gamma;// fieldLengthScale 0.005;// lowerRefineLevel 0.001;// upperRefineLevel 0.999;// maxRefineLevel 4;// meanScale 0.015;

Slide: 25/31

Page 35: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Droplet Formation: Setup

Slide: 26/31

Page 36: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Droplet Formation: growthFactor

Slide: 27/31

Page 37: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Store Separation: Setup

Slide: 28/31

Page 38: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Fixed Displacement: Setup

Patch motion can be explicity perscribedin the motionSolver subdictionary

Slide: 29/31

Page 39: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Limitations

Topology changes on simplicial elements only (Tri & Tet)I Some success in mixed element meshes by tagging zones

for topo changes

Crushing CellsI Currently does not support cell “crushing”I Example: complete valve closure for cylinder simulationsI Potentially performed via coupling with a GGI patch

Serial version available in 1.6-ext release.Parallel redistribution still a little buggy. (Consider it Beta)

Slide: 30/31

Page 40: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Discussion and Future Work

Successful implementation of mesh-topology modificationalgorithmsHighly versatile application rangeConservative solution transferEfficient due to shared / distributed memory parallelizationFuture focus:

I Constrained, cost-effective remapping for divergence-free fluxesI Testing / validation of two-phase flowsI Handling of coalescence and separation regimes

Thank You

Slide: 31/31

Page 41: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Discussion and Future Work

Successful implementation of mesh-topology modificationalgorithms

Highly versatile application rangeConservative solution transferEfficient due to shared / distributed memory parallelizationFuture focus:

I Constrained, cost-effective remapping for divergence-free fluxesI Testing / validation of two-phase flowsI Handling of coalescence and separation regimes

Thank You

Slide: 31/31

Page 42: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Discussion and Future Work

Successful implementation of mesh-topology modificationalgorithmsHighly versatile application range

Conservative solution transferEfficient due to shared / distributed memory parallelizationFuture focus:

I Constrained, cost-effective remapping for divergence-free fluxesI Testing / validation of two-phase flowsI Handling of coalescence and separation regimes

Thank You

Slide: 31/31

Page 43: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Discussion and Future Work

Successful implementation of mesh-topology modificationalgorithmsHighly versatile application rangeConservative solution transfer

Efficient due to shared / distributed memory parallelizationFuture focus:

I Constrained, cost-effective remapping for divergence-free fluxesI Testing / validation of two-phase flowsI Handling of coalescence and separation regimes

Thank You

Slide: 31/31

Page 44: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Discussion and Future Work

Successful implementation of mesh-topology modificationalgorithmsHighly versatile application rangeConservative solution transferEfficient due to shared / distributed memory parallelization

Future focus:I Constrained, cost-effective remapping for divergence-free fluxesI Testing / validation of two-phase flowsI Handling of coalescence and separation regimes

Thank You

Slide: 31/31

Page 45: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Discussion and Future Work

Successful implementation of mesh-topology modificationalgorithmsHighly versatile application rangeConservative solution transferEfficient due to shared / distributed memory parallelizationFuture focus:

I Constrained, cost-effective remapping for divergence-free fluxesI Testing / validation of two-phase flowsI Handling of coalescence and separation regimes

Thank You

Slide: 31/31

Page 46: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Discussion and Future Work

Successful implementation of mesh-topology modificationalgorithmsHighly versatile application rangeConservative solution transferEfficient due to shared / distributed memory parallelizationFuture focus:

I Constrained, cost-effective remapping for divergence-free fluxesI Testing / validation of two-phase flowsI Handling of coalescence and separation regimes

Thank You

Slide: 31/31

Page 47: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Extra slides

Page 48: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Governing Equations

Newtonian Stress Tensor:

σ = −pI+ τ

τ = µ[∇v + (∇v)T ]

Incompressible Navier Stokes Equations:∫S

n · v dS = 0

d

dt

∫V

ρv dV +

∫S

n · ρ(v − vs)v dS =

∫V

ρg dV −∫V

∇p dV +

∫S

n · (µ∇v) dS

Page 49: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Conditions at a Fluid Interface

Dynamic Condition:∫S

n · σ2 dS −∫S

n · σ1 dS +

∫∂S

mσ dL = 0

Differential Form:

(p2 − p1)n− n · (τ 2 − τ 1) = ∇sσ + κσn

Normal Stress Balance:

(p2 − p1)− nn : (τ 2 − τ 1) = κσ

Tangential Stress Balance:

n · (τ 2 − τ 1)− n[nn : (τ 2 − τ 1)] = −∇sσ

Kinematic Condition:n · v2 − n · v1 = 0

Momentum transfer:

(I− nn) · v2 − (I− nn) · v1 = 0

Continuity of Velocity:v2 = v1

Page 50: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Conditions at a Fluid Interface

Dynamic Condition:∫S

n · σ2 dS −∫S

n · σ1 dS +

∫∂S

mσ dL = 0

Differential Form:

(p2 − p1)n− n · (τ 2 − τ 1) = ∇sσ + κσn

Normal Stress Balance:

(p2 − p1)− nn : (τ 2 − τ 1) = κσ

Tangential Stress Balance:

n · (τ 2 − τ 1)− n[nn : (τ 2 − τ 1)] = −∇sσ

Kinematic Condition:n · v2 − n · v1 = 0

Momentum transfer:

(I− nn) · v2 − (I− nn) · v1 = 0

Continuity of Velocity:v2 = v1

Page 51: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Conditions at a Fluid Interface

Dynamic Condition:∫S

n · σ2 dS −∫S

n · σ1 dS +

∫∂S

mσ dL = 0

Differential Form:

(p2 − p1)n− n · (τ 2 − τ 1) = ∇sσ + κσn

Normal Stress Balance:

(p2 − p1)− nn : (τ 2 − τ 1) = κσ

Tangential Stress Balance:

n · (τ 2 − τ 1)− n[nn : (τ 2 − τ 1)] = −∇sσ

Kinematic Condition:n · v2 − n · v1 = 0

Momentum transfer:

(I− nn) · v2 − (I− nn) · v1 = 0

Continuity of Velocity:v2 = v1

Page 52: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Mesh Smoothing

Local Optimization:Gauss-Seidel iteration over verticesMaximize quality of local cell-groupGlobal convergence is unclear

Global Optimization:Maximize quality of all elements simultaneouslyTypically involves large, sparse-matricesAttempts to find a global optimumMay not adequately penalize worst quality cells

Algebraic Mesh Quality Metric

Mean Ratio =12(3V 2)1/3∑6

i L2e

Page 53: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Mesh Smoothing

Local Optimization:Gauss-Seidel iteration over verticesMaximize quality of local cell-groupGlobal convergence is unclear

Global Optimization:Maximize quality of all elements simultaneouslyTypically involves large, sparse-matricesAttempts to find a global optimumMay not adequately penalize worst quality cells

Algebraic Mesh Quality Metric

Mean Ratio =12(3V 2)1/3∑6

i L2e

Page 54: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Mesh Smoothing

Local Optimization:Gauss-Seidel iteration over verticesMaximize quality of local cell-groupGlobal convergence is unclear

Global Optimization:Maximize quality of all elements simultaneouslyTypically involves large, sparse-matricesAttempts to find a global optimumMay not adequately penalize worst quality cells

Algebraic Mesh Quality Metric

Mean Ratio =12(3V 2)1/3∑6

i L2e

Page 55: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Solution RemappingRepeated remapping tests

Source field Inverse distance weighting

First order conservative Second order conservative

Page 56: Using the dynamicTopoFvMesh class in OpenFOAM · Using the dynamicTopoFvMesh class in OpenFOAM ... Slide: 2/31. Droplet ... Successful implementation of mesh-topology modification

Adaptive Mesh Reconnection