Presentation on theme: "Chapter 2 Introduction to the ANSYS Meshing Application"— Presentation transcript:
1Chapter 2 Introduction to the ANSYS Meshing Application ANSYS Meshing Application Introduction
2Introduction to the ANSYS Meshing Application OverviewIntroduction to the ANSYS Meshing ApplicationMeshing Requirements for Different PhysicsANSYS Meshing WorkflowMeshing Methods for 3D and 2D geometriesWorkshop 2.1Automatic Meshing for a Multibody PartProgram Controlled InflationTransferring Mesh to CFX or FLUENT
3Workbench Guiding Principles Parametric: Parameters drive systemPersistent: Model updates passed through systemHighly-automated: Baseline simulation w/limited inputFlexible: Able to add controls to influence resulting mesh (complete control over model/simulation)Physics aware: Key off physics to automate modeling and simulation throughout systemAdaptive architecture: Open system that can be adapted to a customer’s processCAD neutral, meshing neutral, solver neutral, etc.
4What is the “ANSYS Meshing Application”? ANSYS has been working to integrate “best in class” technologies from several sources:ICEM CFDTGridGAMBITCFXANSYS Prep/PostEtc.
5ANSYS Meshing Application Overview The objective of the ANSYS Meshing Application in Workbench is to provide access to common ANSYS Inc. meshing tools in a single location, for use by any analysis type:FEA SimulationsMechanical Dynamics SimulationExplicit Dynamics SimulationAUTODYNANSYS LS DYNAElectromagnetic SimulationCFD SimulationANSYS CFXANSYS FLUENT5
6Pyramids (where tet. and hex. cells meet) Mesh SpecificationPurposeFor both CFD (fluid) and FEA (solid) modelling, the software performs the computations at a range of discrete locations within the domain.The purpose of meshing is to decompose the solution domain into an appropriate number of locations for an accurate result.The basic building-blocks for a 3D mesh are:Tetrahedrons(unstructured)Pyramids (where tet. and hex. cells meet)Prisms (formed when a tet mesh is extruded)Hexahedrons(usually structured)Manifold Example: Outer casting and internal flow region are meshed for coupled thermal/stress gas flow simulation6
7Mesh Specification Considerations Detail: Refinement How much geometric detail is relevant to the simulation physics.Including unnecessary detail can greatly increase the effort required for the simulation.RefinementWhere in the domain are the most complex stress/flow gradients? These areas will require higher densities of mesh elements.Is it necessary to resolve this recess?Refined mesh around bolt-holeExtra mesh applied across fluid boundary layer7
8Mesh Specification Efficiency Greater numbers of elements require more compute resource (memory / processing time). Balance the fidelity of the simulation with available resources.8
9Mesh Specification Quality In areas of high geometric complexity mesh elements can become distorted. Poor quality elements can lead to poor quality results or, in some cases, no results at all!There are a number of methods for measuring mesh element quality (mesh metrics*). For example, one important metric is the element ‘Skewness’. Skewness is a measure of the relative distortion of an element compared to its ideal shape and is scaled from0 (Excellent) to 1 (Unacceptable).Excellent very good good acceptable bad Unacceptable*Further information on mesh metrics is available in the documentation and training lecture appendices9
10Mesh SpecificationExample showing difference between good and poor meshes:This example illustrates an unconverged thermal field in a manifold solid casting. On closer inspection it is clear that the simulation is unable to resolve a sensible data field in the region of poor quality elements.The example with good quality elements demonstrates no problems in the solution field.The ANSYS Meshing Application provides many tools to help maximise mesh quality10
11FEA Meshing Issues Structural FEA Refine mesh to capture gradients of concernE.g. temperature, strain energy, stress energy, displacement, etc.tet mesh dominated, but hex elements still preferredsome explicit FEA solvers require a hex meshtet meshes for FEA are usually second order (include mid-side nodes on element edges)Meshing issues are very different for CFD and structural FEA cases.For both cases you want to refine the mesh to capture gradients of concernHowever for FEA cases, one is often concerned with strain energy, stress energy, displacement, and so forth. Also, tet meshes for FEA are usually second order (include mid-side nodes on element edges)
12CFD Meshing Issues CFD Refine mesh to capture gradients of concern E.g. Velocity, pressure, temperature, etc.Mesh quality and smoothness critical for accurate resultsThis leads to larger mesh sizes, often millions of elementstet mesh dominated, but hex elements still preferredtet meshes for CFD are usually first order (no mid-side nodes on element edges)For CFD cases, one is often concerned with velocity, total pressure, turbulence, and so forth. Because CFD involves the fluid domain, mesh sizes tend to be larger often millions of elements.Most CFD solvers use mix of tet/hex/prism and pyramid elementsIn the next few slides we will look at the advantages of different mesh types.
13Tet Mesh and Tet/Prism hybrid Mesh TypesTet Mesh and Tet/Prism hybridThe other common meshing type is tet or tet/prism hybrids.In these figures, you can see that tet elements fill the body of the domain while prism elements are placed along the walls.
15Mesh Types Tet Mesh Mesh can be generated in 2 steps: 1) Can be generated quickly, automatically, and for complicated geometryMesh can be generated in 2 steps:Step 1: Define element sizingStep 2: Generate Mesh
16Mesh TypesTet Mesh2) Isotropic refinement – in order to capture gradients in one direction, mesh is refined in all three directions – cell counts rise rapidlyPerforated plate resulting in pressure drop in x directionx
17Mesh TypesTet Mesh3) Inflation layer helps with refinement normal to the wall, but still isotropic in 2-D (surface mesh)One region where we definitely do not want isotropic refinement is near the wall. For this reason tet meshes are almost always combined with a prism layer at the wall. Let’s take a look at how this prism layer is formed using the Advancing Front Method.CLICK we start with a surfaceCLICK which is then turned into a surface mesh. What you should note is that refinement of the surface mesh is still isotropic.CLICK Prisms are then createdCLICK by inflating the surfaceCLICK meshCLICK the prism layer then transitions to tetrahedral elementsCLICK this transition sometimes including pyramidal elementsCLICK
18Mesh Types Hex Mesh TET HEX Fewer elements required to resolve physics for most CFD applicationsThis hexahedral mesh, which provides the same resolution of flow physics, has LESS than half the amount of nodes as the tet-mesh)The two most common meshes involve tetrahedral and hexahedral elements. The most significant advantage of hexahedral elements is that fewer elements are required to resolve physics for most CFD applications. This hexahedral mesh, which provides the same resolution of flow physics, has LESS than half the amount of nodes as the tet-mesh.MJC: note correctionTETHEX
19Mesh TypesHex MeshFewer elements required to resolve physics for most CFD applications.Anisotropic elements can be aligned with anisotropic physics (boundary layers, areas of tight curvature like wing leading and trailing edges)The reason why hexahedral elements allow for this is that anisotropic elements can be aligned with anisotropic physics. For example,CLICKThere is not much variation along the wall so elements can be long without degrading the solution.However, there IS significant variation in velocity away from the wall so the element height must be small to capture the gradients.Essentially, hexahedral elements can more efficiently account for such anisotropic physics.
20Mesh TypesHex MeshFor arbitrary geometries, hex meshing may require a multi-step process which can yield a high quality/high efficiency meshFor many simpler geometries, sweep techniques can be a simpler way to generate hex meshesSweepMultiZoneThe downside of hexahedral meshes is the labor required to generate them. As shown here, one way of generating a hex mesh is the ‘blocking technique’. Here we start off with an encompassing block and remove portions until it is representative of the geometry. The block edges are projected onto the geometry edges and then meshing parameters are set. For complex geometries, this task can be time consuming and challenging.
21ANSYS Meshing Application Workflow The ANSYS Meshing Application uses a ‘divide & conquer’ approachA different ‘Meshing Method’ can be applied to each part in the geometryMeshes between bodies in different parts will be non-matching or non-conformalMatched or conformal meshes will be generated for bodies in a single partAll meshes are written back to a common central databaseA number of different methods are available for 3D and 2D geometry21
22Meshing Methods for 3D Geometry There are six different meshing methods in the ANSYS Meshing Application for 3D Geometry:AutomaticTetrahedronsPatch ConformingPatch Independent(ICEM CFD Tetra algorithm)Swept MeshingMultiZoneHex DominantCFX-Mesh22
23Meshing Methods for 2D Geometry There are four different meshing methods in the ANSYS Meshing Platform for 2D Geometry which can be applied to Surface Bodies or Shells:Automatic Method (Quadrilateral Dominant)All TrianglesUniform Quad/TriUniform Quad
24Patch Conforming Tetrahedrons Tetrahedrons Method with Patch Conforming AlgorithmFaces and their boundaries (edges and vertices) are respectedIncludes the Expansion Factor setting, which controls the internal growth rate of tetrahedrons with respect to boundary sizeIncludes inflation or boundary layer resolution for CFDCan be mixed with Sweep methods for bodies in a single part – conformal meshes will be generatedElement ShapesPrismPyramidTetrahedral MeshTetSwept Mesh24
25Patch Independent Tetrahedrons Tetrahedrons Method with Patch Independent (ICEM CFD Tetra) AlgorithmFaces and their boundaries (edges and vertices) are not necessarily respected unless there is a load, boundary condition, or other object scoped to themUseful for gross defeaturing or to produce a more uniformly sized meshSimplified version of Tetra tightly integrated into the ANSYS Meshing ApplicationHonors standard ANSYS Meshing Application mesh sizing controlsTetra parts can also have inflation appliedCoarse mesh ‘walks over’ detail in surface modelElement ShapesPrismPyramidTetInflation layerapplied for CFD25
26Sweep Method Produces Hexes and/or Prisms Body must be Sweepable Single Source, Single TargetInflation can yield pure hex or prismsBody split into 2 parts to allow for swept meshingExtrusion removed to allow for swept meshingElement ShapesPrismHexAllows for inflation layer (boundary layer resolution) for CFD26
27Thin Solid Sweep Meshing Multiple source/target facesWorks at body level with other methodsMultiple elements through thickness possible for single body parts
28Programmed Controlled Inflation Automatic MethodThe Automatic setting toggles between Tetrahedral (Patch Conforming) and Swept Meshing, depending upon whether the body is sweepable. Bodies in the same part will have a conformal mesh.Tetrahedron (Patch Conforming)SweptTetrahedron (Patch Conforming)No inflationProgrammed Controlled Inflation28
29InflationInflation is accomplished by extruding faces normal to a boundary to increase the boundary mesh resolution, typically for CFDSmooth Transition from inflated layer to interior meshCollision avoidance:Stair-steppingLayer compressionPreview InflationPre vs. Post inflationAll methods can be inflated except for Hex-Dominant and Thin SweepSweeping:Pure hex or wedge
30MultiZone Sweep Meshing New feature for 12.0Automatic geometry decompositionWith the swept method, this part would have to be sliced into 3 bodies to get a pure hex meshWith MultiZone, it can be meshed directly!
31Hex-dominant mesh shown above: Hex-Dominant MethodThe hex-dominant meshing algorithm creates a quad-dominant surface mesh first, then hexahedral, pyramid and tetrahedral elements are filled in as needed.Recommended when a hex mesh is desired for a body that cannot be sweptUseful for bodies with large amounts of interior volumeNot useful for thin complicated bodies where the ratio of volume to surface area is lowNo boundary layer resolution for CFDMainly used for FEA analysisPrismHexTetPyramidElement ShapesHex-dominant mesh shown above:19,615 Hex (60%)5,108 Tet (16%)211 Prisms (1%)7,671 pyramids (24%)
32CFX-Mesh Method Generate Volume Mesh CFX-Mesh uses a ‘loose’ integration.No Meshing Application sizings are respected or transferred to CFX-MeshSelecting Right Mouse ‘Edit…’ on the Method launches the CFX-Mesh GUI.Define mesh settings/controls/ inflationPreview & generate volume meshCommit the current mesh modelReturn to ANSYS MeshingPossible to ‘Generate Mesh’ on a CFX-Mesh method without opening the applicationUses current or default settingsGenerate Volume MeshInflation layer32
34GoalsThis workshop will illustrate the use of the Automatic Meshing Method for a single body partThe transfer of the mesh to FLUENT and CFX is also demonstrated34
35Specifying GeometryCopy the pt.agdb file from the tutorial files folder to your working directoryStart Workbench and double-click the Mesh entry in the Component Systems panel in the ToolboxRight-click on Geometry in the Mesh entry in the Project Schematic and select Import Geometry/BrowseBrowse to the pt.agdb file you copied and click OpenNote that the Geometry entry in the Project Schematic now has a green check mark indicating that geometry has been specified35
36Initial MeshDouble-click the Mesh entry in the schematic or right-click and select Edit. This will open the Meshing ApplicationIn the Meshing Options panel set the Physics Preference to CFD, the Mesh Method to Automatic and press OKRight click on Mesh and select Generate MeshUse the view manipulation tools and the axis triad to inspect the meshBased upon choice of physics (CFD), the Meshing Application has produced a mesh accommodating curvature, a reasonable sizing strategy and automatic selection of optimal mesh methods with minimal user input. There are many ways in which the Meshing Application can control and improve the mesh. Some further mesh controls will now be demonstrated.
37Named Selectionsvelocity-inlet-2velocity-inlet-1Set the Selection Filter to Faces and select one of the pipe end faces as shown. Right-click in the Model View and choose Create Named Selection. Enter velocity-inlet-1 for the Selection NameRepeat for the other two pipe end faces using the naming as shownThe Named Selections just created are listed in the Outline by expanding Named Selections. The names assigned here will be transferred to the CFD solver so the appropriate flow conditions can be applied on these surfaces.pressure-outlet
38Inflation Select Mesh in the Outline and expand Inflation in Details Set Use Automatic Tet Inflation to Program Controlled, leave other settingsRight click on Mesh and select Generate Mesh. Note the inflation layers are grown from all boundaries not assigned a Named Selection. The thickness of the inflation layers is calculated as a function of the surface mesh and applied fully automatically.
39Section PlanesOrient the model by clicking on the axis triad (+X Direction)Click on the New Section Plane icon in the menu bar. Left click, hold and drag the cursor in the direction of the arrow as illustrated to create the Section PlaneCreated Section Planes are listed (bottom left). Planes can be individually activated using the checkbox, deleted and toggled between 3D element view and 2D slice view. Try this now (you will need to rotate the model to see the cross-section)After the Section Plane has been created the Section Plane cursor tool will still be active. Left clicking in the viewport and dragging will slide the Section Plane along its axis.Clicking on either side of the Plane tool will cut the mesh on each side respectively. Clicking twice on one side will change the view to a planar slice.When the position is finalized, select a view manipulation tool
40Mesh StatisticsIf you expand the Statistics entry under Mesh, it will summarize the number of nodes and elements in the meshUnder Mesh Metric select Skewness. Note the reported mesh quality
41Transferring Mesh to CFD After the mesh has been generated, you can transfer it to a new CFD simulationIn the main Workbench Window, right click on the Mesh entry in the Meshing instance you created on the Project Schematic and observe that you can transfer the mesh to a new FLUENT or CFX simulation (Transfer Data To New >). Select either FLUENT or CFXNote that the Mesh entry now has an Update symbol, right click the Mesh entry and select Update. This will pass data to the new FLUENT/CFX instance.
42Fluent with Workbench Mesh If FLUENT was selected - Double click the Setup entry and accept the default options in the FLUENT LauncherFLUENT will start with the mesh loadedSave the project from the Workbench File Menu
43CFX with Workbench Mesh If CFX was selected - Double click the Setup entry, CFX Pre will launch with the mesh loadedSave the project from the Workbench File Menu