SnappyHexMesh - OpenFOAMWiki

Transcription

snappyHexMeshTheory and ApplicationAndrew JacksonDaniel P. Combest11th OpenFOAM Workshop26 June – 30 June 2016Guimarães, Portugalinfo@engys.com Tel: 44 (0)20 32393041 Fax: 44 (0)20 33573123 www.engys.com Copyright 2016 ENGYS Limited. All rights reserved.

DisclaimerOPENFOAM is a trademark of OpenCFD(ESI Group). This presentation is notapproved or endorsed by OpenCFD or ESIGroup, the owner of the OPENFOAM trademark. Copyright 2016 ENGYS Limited. All rights reserved.

Contents snappyHexMesh Description and Key FeaturesBackground, Origin, and ForksBrief Code OverviewMethodology Overview Manual Setup Meshing with HELYX-OS Backward Facing StepPipeReactor Geometry Closing Remarks Copyright 2016 ENGYS Limited. All rights reserved.

Contents snappyHexMesh Description and Key FeaturesBackground, Origin, and ForksBrief Code OverviewMethodology Overview Manual Setup Meshing with HELYX-OS Backward Facing StepPipeReactor Geometry Closing Remarks Copyright 2016 ENGYS Limited. All rights reserved.

Description and Key FeaturesUtility snappyHexMesh is used to createautomatically high quality three-dimensional hexdominant meshes from input of triangulatedsurfaces or simple primitive shapes Copyright 2016 ENGYS Limited. All rights reserved.

Description and Key FeaturesFully parallel execution Base mesh is created in serial and then distributed ton-processorsTrue parallel performance depends on meshcomposition but tens of millions of cells can be createdrapidly on complex geometriesOptimal decomposition via ptScotch and dynamic loadbalancing allows for improved performance Copyright 2016 ENGYS Limited. All rights reserved.

Description and Key FeaturesSurface, Volume, Edge Refinement Surface refinement based on curvature of the inputgeometryVolume refinement (inside/outside/distance) based onprimitive objects or additional imported geometryEdge refinement based on eMesh description Copyright 2016 ENGYS Limited. All rights reserved.

Description and Key FeaturesFeature Edge and Surface Detail Preservation Automatic surface mesh created during edge, surface,and volume refinement and feature snapping phaseUsers provide STL, OBJ, or NASTRAN surface mesh filesSurface detail is controlled by surface geometry detailand local cell size Copyright 2016 ENGYS Limited. All rights reserved.

Description and Key FeaturesZonal Meshing Allows for creation of cellZones for source terms e.g.porous media, MRF and other fvOptionsEnables multi-region meshing for conjugate heattransfer and/or dynamic mesh cases with automaticgeneration of coupling via AMI patches Copyright 2016 ENGYS Limited. All rights reserved.

Description and Key FeaturesWall Layer AdditionTo allow for better modeling of near wall phenomenae.g. boundary layer formation Near wall first cell height, total layer thickness, numberof layers, etc. to be specified Copyright 2016 ENGYS Limited. All rights reserved.

Description and Key FeaturesQuality guaranteed final mesh that will run inOPENFOAM Key mesh quality metrics include: OrthogonalityPyramid VolumeConcavityFace AreaSkewness Tet Decomposition QualityFace TwistDeterminantsFace WeightsVolume RatiosMeshes that do not meet quality criteria are scaled backto previous “high-quality“ state Copyright 2016 ENGYS Limited. All rights reserved.

Background Original and Current Dev. Introduced 3rd OpenFOAM Workshop in Milan2008 “Automatic Parallel Polyhedral Mesh Generation onComplex Geometries in OpenFOAM” E. de Villiers,A. Jackson (Engys), M. Janssens (OpenCFD Ltd) A version of snappyHexMesh calledhelyxHexMesh continues to be developed byEngys Copyright 2016 ENGYS Limited. All rights reserved.

Background Original and Current Dev.ENGYS’ Continued Developments on an In-House Version Enhanced feature capturing andautomationImproved layers and layerspecification methodsAnisotropic volumetric refinementGeneration of Internal layers Enhanced parallel performance Reduced overall memory usageImproved scaling for 32 processors Graphical User interface Integration HELYXHELYX-OSELEMENTS Copyright 2016 ENGYS Limited. All rights reserved. Topological improvementsAutomatic block mesh creation anddecompositionMesh wrapping and small leakclosureand many other extensions

Background Motorbike Tutorial CaseOpenFOAM-Plus snappyHexMeshNumber Cells 352KLayer coverage 57% Copyright 2016 ENGYS Limited. All rights reserved.helyxHexMeshNumber Cells 362KLayer coverage 85%

Background Motorbike Tutorial CaseOpenFOAM-Plus snappyHexMeshNumber Cells 352KLayer coverage 57% Copyright 2016 ENGYS Limited. All rights reserved.helyxHexMeshNumber Cells 362KLayer coverage 85%

Background Original and Current Dev.ENGYS currently working on new dualised mesh generator Improved layer coverage Reduced jump in cell volumeat refinement interfaces Optimisation to improve meshquality Improved surface topology Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview snappyHexMeshOverview of snappyHexMesh.C Reads the base mesh Reads the geometry files Reads all user provided information fromsystem/snappyHexMeshDict Instantiates and calls mesh refinement, snapping,and layer addition drivers Outputs balanced meshMajority of the work is performed in separateclasses constructed in this utility Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview C ClassesMain Library autoMesh Contains refinement, snapping and layer additionroutines in 44k lines of codeCore OpenFOAM libraries Leveraging data structures and methods forperforming low level tasks including changing the mesh topologyoctree’s for surface intersection checkingDetermine optimal decomposition during loadbalancing Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview C ClassesGeometry searchableSurfaces.H container for searchable objectswith methods for finding nearest and line pointintersections with the surface triSurfaceMesh.H constructs triangulated surfaceand uses indexedOctree.H class for hierarchicalrecursive search on these searchableCylinder.H and other primitive shape (e.gsearchableSphere.H and searchablePlane.H) classesare available Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview C ClassesRefinement Containers refinementSurfaces.H class is container for data used forsurface driven refinement e.g. refinement level refinementFeatures.H class is a container for data usedfor feature based queries shellSurfaces.H class is a container for performingqueries for volumetric based refinement Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview C ClassesRefinement autoRefineDriver.H class controls which refinementmethods are used meshRefinement.H class for selecting which cells torefine and zone. Controlled by separate included files Cells to refine (meshRefinementRefine.C) Cells to zone (meshRefinementBaffles.C) Cells remove based on topology and geometricchecks (meshRefinementProblemCells.C ) Patch faces to merge (meshRefinementMerge.C) hexRef8.H class performs the actual refinement of (split)hexes using the polyTopoChange.H class. This is also thesame engine used by the dynamic mesh refinement Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview C ClassesSnapping snapParameters.H class is container for snap specificinformation autoSnapDriver.H class performs snapping of mesh tothe surface and methods for feature extraction (seeautoSnapDriveFeature.C) Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview C ClassesLayers layerParameters.H class is container for layer specificinformation autoLayerDriver.H controls methods for layer generation externalDisplacementMeshMover.H is virtual base classfor mesh motion away from the surface. The defaultmethod is based on a medial axis calculation (seemedialAxisMeshMover.H) . A displacement motionsolver method is also available (seedisplacmentMotionSolverMeshMover.H) addPatchCellLayers.H class performs addition of layer ofcells to an indirect primitive patch (class is also used byextrudeMesh utility) Copyright 2016 ENGYS Limited. All rights reserved.

Code Overview C ClassesMesh Quality motionSmoother.H class part of the dynamicMeshlibrary is used for performing mesh scaling back basedon mesh quality checks (seemeshSmootherAlgoCheck.C) polyMeshGeometry.H class performs actual meshquality checks and flags faces and cells that are in error Copyright 2016 ENGYS Limited. All rights reserved.

Methodology Overview Usage Define snappyHexMeshDict Execute snappyHexMesh Execution:snappyHexMesh [-noFunctionObjects ][-overwrite] e dir][-roots (dir1 . dirN) ] [-help] Parallel execution available using mpirun Requirements: Dictionary file system/snappyHexMeshDict Geometry data (stl, nas, obj) in constant/triSurface Hexahedral base mesh (decomposed if running in parallel) Dictionary file system/decomposeParDict for parallel runs All system dictionaries (e.g controlDict, fvSchemes, fvSolutions) Copyright 2016 ENGYS Limited. All rights reserved.

Methodology Overview WorkflowDefine blockMeshDictDefine snappyHexMeshDictDefine decomposeParDictExecute blockMeshExecute decomposeParExecute snappyHexMesh Copyright 2016 ENGYS Limited. All rights reserved. Manually Scripted Graphical UserInterface

Methodology Overview Base Mesh Step 1: Create base mesh Custom made Using utility blockMeshNote: Cells should be close to unit Aspect Ratio for optimum behaviourSTL or Nastran(constant/triSurface)NOTE: File names must notcontain any spaces, unusualcharacters or begin with anumber. The same applies to thenames of the parts and regionsdefined within the geometryfiles.Hexahedral basemesh level 0 size Copyright 2016 ENGYS Limited. All rights reserved.

Methodology Overview Base Refine Step 2: Refine base mesh Surface refinement feature lines, proximity & curvatureVolume refinement closed surfaces, geometric shapesLevel 0Level 1Level 2Level 3 Copyright 2016 ENGYS Limited. All rights reserved.

Methodology Overview Base Refine Step 2: Refine base mesh Surface refinement feature lines, proximity & curvatureVolume refinement closed surfaces, geometric shapes Copyright 2016 ENGYS Limited. All rights reserved.

Methodology Overview Remove Cells Step 3: Remove unused cells User defines keep point Copyright 2016 ENGYS Limited. All rights reserved.Castellated mesh

Methodology Overview Snapping Step 4: Snap mesh to surface Implicit wrapping Preserve featuresSmooth & Merge faces“Snapped” Edge Copyright 2016 ENGYS Limited. All rights reserved.

Methodology Overview Snapping Step 4: Snap mesh to surface Implicit wrapping Preserve featuresSmooth & Merge facesOriginal STL Surface Copyright 2016 ENGYS Limited. All rights reserved.Snapped Surface

Methodology Overview Layers Final Step 5: Add layers to the surface Push mesh away fromsurfaceAdd layersCheck qualityScale back displacement iferrorsRepeat until all qualitychecks pass Step 6: Final load balance Output to file Copyright 2016 ENGYS Limited. All rights reserved.

Methodology Overview Overall Copyright 2016 ENGYS Limited. All rights reserved.

Contents snappyHexMesh Description and Key FeaturesBackground, Origin, and ForksBrief Code OverviewMethodology Overview Manual Setup Meshing with HELYX-OS Backward Facing StepPipeReactor Geometry Closing Remarks Copyright 2016 ENGYS Limited. All rights reserved.

Manual SetupManually specify system/snappyHexMeshDict Copyright 2016 ENGYS Limited. All rights reserved.

Contents snappyHexMesh Description and Key FeaturesBackground, Origin, and ForksBrief Code OverviewMethodology Overview Manual Setup Meshing with HELYX-OS Backward Facing StepReactor GeometryTube-Bend Closing Remarks Copyright 2016 ENGYS Limited. All rights reserved.

Meshing with HELYX-OSOverall Goal of Session Connect meshing methodology with HELYX-OS controls Technology preview of the new version of HELYX-OSSkills Obtained Importing STLs Creating base meshes Setting surface refinement Extracting feature lines Creating volume refinement boxes Adding layers Copyright 2016 ENGYS Limited. All rights reserved.

Meshing with HELYX-OSRequirements Installed version of HELYX-OS Technology preview of HELYX-OS v2.4.0 on workshop imageOr HELYX-OS v 2.3.1 http://engys.github.io/HELYX-OS/ Minimum of 1 core, suggested multiple cores Download the geometry files from the workshop website Copyright 2016 ENGYS Limited. All rights reserved.

Meshing with HELYX-OSThe InterfaceView PortData Panel Copyright 2016 ENGYS Limited. All rights reserved.Info Bar

Meshing with HELYX-OSThe InterfaceMenu Bar Copyright 2016 ENGYS Limited. All rights reserved.Main ToolbarInfo Bar

Meshing with HELYX-OSThe t 2016 ENGYS. All rights reserved.

Meshing with HELYX-OSThe InterfaceTabsTree EntriesStart on the meshing tab and work our way down the treeCopyright 2016 ENGYS. All rights reserved.

Backward Facing Step Usage IntroOverall Goal of Session Introduce controls of HELYX-OSSkills Obtained Creating base meshes Setting surface refinement Extracting feature lines Creating volume refinement boxesCopyright 2016 ENGYS. All rights reserved.

Backward Facing Step Usage Intro New Open ExitRecent CasesStarting Screen Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroCase CreationCase NameParent FolderParallel Settings Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage Intro Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroDefining a Base MeshAutomatic Creates background mesh Used for close geometriesFrom File Lets you to create, import,edit existingblockMeshDict files Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroDefining a Base MeshUser Defined User provides min and max bounds of x,y,z User provides number of elements in eachdirection Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroDefining a Base Mesh1. Choose “User Defined”2. Configure a mesh with these settings Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage Intro3. Click on “ffminx” in the tree4. Change the Face Name to inlet Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroDefining a Base Mesh4. Repeat for each ofthe following Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroDefining a Box Primitive Object5. In the geometry tree entry add a box primitiveobject named step6. Set with above min and max Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroDefining Surface RefinementLevel 0Level 17. In refinement tab, under surface,set min and max levels to 1 Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroVolume Refinement8. Create a boxprimitive object9. Named VR110.Set a volumetricrefinement modeinside11.Set a refinementlevel of 1 Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroVolume Refinement12.Clone VR1 by RMB andselect clone Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroVolume Refinement13.Create a boxprimitive object14.Named VR215.Set a volumetricrefinement modeinside16.Set a refinementlevel of 2 Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroSet the Material Point17.Select a material point inside the domain(2,2,0)18.Select the create button Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage Intro How do we fix theissue of snapping atthe top of the step? Increaserefinement? Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroSurface RefinementLevel 1Level 2Level 3We could increase the surface refinement levels Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage Intro This will increasemeshing time and stillnot solve our issue inthis case Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroExtract Feature Lines19.In the step, RMB and select extract20.Select apply and then save in the extractfeature lines tool Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage IntroExtract Feature LinesNoteAs distance isincreased,decrease levels20.Set a distance of 0 and a level of 1 Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage Intro Snapping is improved Can further move up VR* boxes to refine more Copyright 2016 ENGYS Limited. All rights reserved.

Backward Facing Step Usage Intro Background meshes can be made Automatically, with only a cell sizeBy defining as a simple bounding box and # ofelementsProvided as a blockMeshDict file for complex basemeshes We can build simple domains with primitiveobject Extracting feature lines can improve snapping aswell as increasing surface refinement Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersOverall Goal of Session Basics of layer additionSkills Obtained Creating base meshes Setting surface refinement Adjusting layer controls and perform a parametric studyCopyright 2016 ENGYS. All rights reserved.

Straight Pipe Adding LayersDefine a Base Mesh1. Create a user defined based mesh2. Change the ffminx and ffmaxx to inlet and outlet Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersDefine a Cylinder Primitive Object3. Define a cylinder primitive object named pipe Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersSet the Surface Refinement4. Set the surface refinement for the pipe as 2,2 Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersAdjust the Layer SettingsRequiredNumber of Layers first and expansion final and expansion5. Set the number of layers to 10 and leave defaults Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersSet the Material Point6. Set the material point to (0.25 0 0)7. Hit create Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersLayer Settings Parameter StudySee how each parameter influences layer addition Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyReduce the Numberof Layers to 3Overall wall layersand height reduced Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyIncrease the Numberof Layers to 5Overall wall layersand height increases Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyIncrease FLT to 0.8Overall wall layersstays the same andheight increases Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyIncrease layerstretching to 1.5Overall wall layersstays the same andheight decreases Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyIncrease layerstretching to 2.5Drastically squeezethe first few layers Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyDelete FLT and addsmall LMT or 0.01Overall wall layersstays the same heightreduced Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyTest the limits oflayer additionMany layers withsimilar ratio. Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyIncrease the layerstretching to 1.2Layers completelycollapsed Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyReduce layerstretchingMany layers added Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding LayersParameter StudyReduce the Layer minthicknessSmall layers, growthto lager layers, totalcoverage Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding Layers It is often helpful to choose simplified geometriesto prototype settings and understand howcontrols work Layer addition can be a very computationally timeconsuming action Layer collapse is caused by merely the fact thatadding layers will create a worse mesh thanwithout layers Copyright 2016 ENGYS Limited. All rights reserved.

Straight Pipe Adding Layers Try a similar study on a bent pipe and you willnotice different behavior Geometry is included in the first link of thetraining tube bend.stl Copyright 2016 ENGYS Limited. All rights reserved.

Reactor Geometry Snapping PracticeOverall Goal of Session More practice on feature snapping Importing STL’sSkills Obtained Creating base meshes Setting surface refinement Adjusting layer controls and perform a parametric study Be able to improve bad feature capturingCopyright 2016 ENGYS. All rights reserved.

Reactor Geometry Snapping PracticeLoad the geometry files located in reactor.zip1. Inlet2. Outlet3. WallsSet base mesh to “automatic” and 0.5 and mesh Copyright 2016 ENGYS Limited. All rights reserved.

Reactor Geometry Snapping Practice Change the min and max levels of walls to (1,1) Lack of resolution? Is snapping bad? Suggestions?Try increasing the refinement levels and remesh Copyright 2016 ENGYS Limited. All rights reserved.

Reactor Geometry Snapping Practice Change the min and max levels of walls to (1,2)Poor edge capturingTry increasing the refinement again and remesh Copyright 2016 ENGYS Limited. All rights reserved.

Reactor Geometry Snapping Practice Change the min and max levels of walls to (2,3)Sufficient?Use the feature edge extraction tool Copyright 2016 ENGYS Limited. All rights reserved.

Reactor Geometry Snapping Practice Right click on STL surface, then select “extract”Hit apply to preview and save to save an emesh Copyright 2016 ENGYS Limited. All rights reserved.

Reactor Geometry Snapping Practice In the lines dialog on the newly created emesh Set to level 3 RemeshWe now have a much improved mesh Copyright 2016 ENGYS Limited. All rights reserved.

Reactor Geometry Snapping PracticeProgression of refinement Base mesh size chosen by geometry size and availablecomputing power Increase levels accordingly and extract feature edges Requires very little adjustment to metrics and defaults Copyright 2016 ENGYS Limited. All rights reserved.

Contents snappyHexMesh Description and Key FeaturesBackground, Origin, and ForksBrief Code OverviewMethodology Overview Using HELYX-OS for Meshing Backward Facing StepStraight PipeReactor Geometry Closing Remarks Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Common Problems Castellation prior to snapping unsuccessfulTrouble snapping to featuresDifficulty in adding layersLayers collapsing in certain regionsDifficulty in choosing default values Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Common Problems Castellation prior to snapping unsuccessful Often a result in using an STL surface that is not water-tight.This prevents the algorithm from deciding what cells are inthe region occupied by the keep point.STL surface must be repaired and gaps closed to continue Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Common Problems Castellation prior to snapping unsuccessful Trouble snapping to features Often caused by too coarse a base-mesh or surfaces that arenot easily identified by a feature angleLower your base-mesh spacing to a smaller valueTry distance refinement near the surface having troublesnappingIncrease your levels on that particular surfaceUse explicit feature snapping and create eMesh or featureedge extraction utilityTry these remedies separately to begin Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Common Problems Castellation prior to snapping unsuccessful Trouble snapping to features Difficulty in adding layers Caused purely by the addition of a layer does not meet thequality criteriaFurther caused by near wall cells being too large or poorqualityRemedied by refining near surface of interest or adding asmaller number of layers to begin Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Common Problems Castellation prior to snapping unsuccessfulTrouble snapping to featuresDifficulty in adding layersLayers collapsing in certain regions Again caused by poor quality cells or too large of cellsRefine cells near the region of interest Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Common Problems Castellation prior to snapping unsuccessfulTrouble snapping to featuresDifficulty in adding layersLayers collapsing in certain regionsDifficulty in choosing default values Use existing tutorials or use the defaults set by HELYX-OS Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Overall Overall Coordinate system aligned surface are easier to meshIt is best not to change the meshQuality settings too muchWedges can be difficult since cells are collapsed in narrowregionsDistance refinement is a per STL surface feature and not a perpatch feature. Get around this by importing separate STL files for each patch Copyright 2016 ENGYS Limited. All rights reserved.

Closing Remarks Overall Snapping Increasing min and max for a particular surface has the sameaffect as decreasing level 0 sizeeMeshes can help fully resolve edges, only if base mesh issufficiently fineWe can further increase snapping if we increase snappingiterations see appendix Layer Addition Thinner layers are easier to insertUse relative size rather than absolute layer sizeMore uniform cells near a surface will have a more uniformboundary layer meshes Copyright 2016 ENGYS Limited. All rights reserved.

DisclaimerENGYS Limited is the proprietor of the copyright subsisting in thiswork. No part of this work may be translated, reprinted orreproduced or utilised in any material form either in whole or inpart or by any electronic, mechanical or other means, now knownor invented in the future, including photocopying and recording, orin any information storage and retrieval system, without priorwritten permission from ENGYS Limited.Applications for permission to reproduce any part of this workshould be addressed to ENGYS Limited at info@engys.cominfo@engys.com Tel: 44 (0)20 32393041 Fax: 44 (0)20 33573123 www.engys.com Copyright 2016 ENGYS Limited. All rights reserved.

A1: snappyHexMeshDictAppendix A1: References for snappyHexMeshDictAndrew Jackson. A Comprehensive Tour ofsnappyHexMesh. 7th OpenFOAM Workshop.June 25 2013. Darmstadt Germany.Paolo Geremia and Eugene de Villiers. AComprehensive Tour of snappyHexMeshwith HELYX-OS. Workshop "HPC enabling ofOpenFOAM for CFD applications”, 26-28November 2012, Bologna, Italy Copyright 2016 ENGYS Limited. All rights reserved.

A1: snappyHexMeshDictDictionary file consists of five main sections:geometry Prescribe geometry entities for meshingcastellatedMeshControls Prescribe feature, surface and volume mesh refinementssnapControls Control mesh surface snappingaddLayersControls Control boundary layer mesh growthmeshQualityControls Control mesh quality metrics Copyright 2016 ENGYS Limited. All rights reserved.

A1: Basic ControlsFoamFile{version 2.0;format ascii;classdictionary;object autoHexMeshDict;}castellatedMesh ype triSurfaceMesh;name flange;}sphereA{type searchableSphere;centre (0 0 -0.012);radius 0.003;}} Copyright 2016 ENGYS Limited. All rights reserved.File headerKeywords Switch on/off mesh steps

A1: geometryFoamFile{version 2.0;format ascii;classdictionary;object autoHexMeshDict;}castellatedMesh ype triSurfaceMesh;name flange;}sphereA{type searchableSphere;centre (0 0 -0.012);radius 0.003;}} Copyright 2016 ENGYS Limited. All rights reserved.Definition of geometry types STL and Nastran files serial ordistributed Basic shapes box, cylinder,sphere.

A1: Supported e follow;namegeomB;} Copyright 2016 ENGYS Limited. All rights reserved.Triangulated (e.g. Nastran, STL, OBJ) The standard type “triSurfaceMesh” readsa copy of each surface on to eachprocessor when running in parallel. A distributed surface type exists“distributedTriSurfaceMesh” which canreduce the memory overhead for largesurfaces Utility surfaceRedistributePar is used toinitially decompose the surface Three distribution methods availableindependent: distribution independent ofmesh to produce best memory balancefollow: distribution based on meshbounding box to reduce communicationfrozen: distribution remains unchanged

A1: Supported Typesbox{type searchableBox;min (-0.2 -0.2 -0.02);max (0.44 0.2 0.32);}sphere{type searchableSphere;centre (3 3 0);radius der;(0 0 0);(1 0 0);0.1; Copyright 2016 ENGYS Limited. All rights reserved.User defined shapes Basic shapes box, cylinder andsphere

A1: Supported rmal;pointAndNormalDict{basePoint(0 0 0);normalVector (0 1 0);}}plate{typeoriginspan}searchablePlate;(0 0 0);(0.5 0.5 0);

snappyHexMesh - OpenFOAMWiki . 2 ()