Introduction to ANSYS FLUENT Meshing -...

29
© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 1 Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop 04 CAD Import and Meshing from Conformal Faceting Input

Transcript of Introduction to ANSYS FLUENT Meshing -...

Page 1: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 1

Introduction to ANSYS FLUENT Meshing

14.5 Release

Workshop 04 CAD Import and Meshing from Conformal Faceting Input

Page 2: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 2

Workshop Description:

• CAD files will be imported into the Fluent Meshing software with different import options to understand their impact on the workflow which must be taken for generating volume meshes. The user will see how conformal faceting can be used directly as a surface mesh to generate a volume mesh.

Learning Aims:

This workshop aims to teach basic skills in the use of the Fluent Meshing interface.

– Launching Fluent in Mesher Mode

– Importing CAD geometry

– Using Design Modeler as a pre-processor to set up boundary names in CAD

– Understanding the CAD import options

• Tessellation Refinement

• Conformal Tessellation

– Using Conformal Tessellation to go straight to volume meshing

I Introduction

Page 3: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 3

Ensure that you have installed Workbench with CAD reader options. Fluent Meshing uses the Workbench CAD readers to import CAD and so this is a prerequisite.

– Open the Fluent Launcher by clicking the Windows Start menu, then selecting Fluent.

14.5 in the Fluid Dynamics sub-menu of the ANSYS 14.5 program group. – Enable Meshing Mode under Options. – Set Working Directory to the area where files are – Click OK to start Fluent in meshing mode.

Starting ANSYS Fluent in Meshing Mode

Page 4: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 4

• From the File menu select Import and then CAD.

File > Import > CAD... • In the Import CAD Geometry dialog box Browse and select the file ‘WS4_Exhaust_Pipe.igs’. • Click Advanced... to open CAD Advanced Options dialog box. • Enable Save PMDB in the File group box. • Select mm from the Length Unit drop-down list. • Click Apply. • Retain the other default settings and click Close. • Click Import. Note that it takes ~45 seconds to import the file.

Importing a CAD Model

PMDB is an intermediate file format which contains the interpreted geometry data prior to tessellation.

After initial import the user can more quickly change tessellation options by reading this file instead of

the original CAD to avoid re-read of the geometry data.

Page 5: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 5

Re-Import from the PMDB

• Re-import the CAD Model but this time select the *.pmdb file which was generated after the first import of the IGES file.

• Use the same default options but disable Save PMDB in the CAD Advanced Options

• Time to import is much reduced compared to reading the raw IGES file

Page 6: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 6

Displaying and Inspecting Mesh

• Click Manage... under Object group box.

• In the Manage Objects dialog box select all in the list under Objects.

• Click Draw. All Face and Edge Zones within the Objects selected are shown graphically.

• Deselect all Face Zones and click Draw to see the feature edges which are also imported from the CAD curves.

• Re-Select all Face Zones and enable Free in the Face Options group box and click Draw. This will show faces with disconnected nodes i.e. “free” faces in blue in the graphics window.

• Note that there are lots of disconnected faces in the model.

• A wrapping option could be applied to this Geometry Object in order to make the faces conformal.

Page 7: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 7

• By default body is selected from the One zone per drop-down list for CAD Import.

• Let’s reimport the PMDB file with different zone options – choose One zone per

face and import

• With One zone per body the Geometry Objects are imported with all triangles in a single face zone.

• With One zone per face each patch from the CAD is imported as a separate face zone. Thus the imported geometry has many face zones.

• Reimport with One zone per body and we will continue to work with that.

Reimport PMDB file

One zone per body One zone per face

Note that different levels of granularity in the way the surfaces are split may be required for different

situations. Sometimes boundaries need to be separated for boundary condition definition or for sizing

definition in the mesher. Fluent Meshing has some tools to separate out zones as well.

Page 8: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 8

Named Selections From Design Modeler

• Double-click on the file ‘Exhaust_Pipe_with_NS.agdb’ from the folder

• Workbench will launch

• Double-click Geometry cell to open Design Modeler

• In Design Modeler you will see a number of Named Selections (NS) in the tree. Click on the NS to understand which surfaces are included in each one

• Create your own Named Selections for some faces as shown

– Select face, right-click and select Named Selection from the context menu

– Enter a name in Details View

– Click Generate to complete

Some complex cases can benefit from

creation of NS in DM before moving to

Fluent Meshing as shown in these slides.

Page 9: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 9

• Select Export... from the File menu and save the agdb file as exhaust_pipe_with_NS_2.agdb. Close Design Modeler and Workbench

• Import the agdb file saved into Fluent Meshing

– In the CAD Advanced Options dialog box ensure that Import Part Names and Import Body Names are enabled. Ensure that Save PMDB is enabled. You can see the names given in DesignModeler in the Manage Objects dialog box.

– Re-import the agdb file with the Import Part Names and Import Body Names options disabled and note the difference in the Face Zone names.

Importing AGDB into Fluent Meshing

NS have Body name(s) as post-fix

NS have No Body names

Page 10: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 10

Measure Min and Max Sizes

• We will measure some relevant distances on the coarse initial geometry import in order to give better import parameters and better capture the geometry curvature

• Press ‘Ctrl+n’ to switch to node-filter. Right-click and select two nodes as shown. Using hot keys ‘Ctrl+d’ you can measure the distance of the smallest features. Press ‘F2’ to clear the selected nodes or ‘Escape’ to clear the last selected if in error

• Here we see that there is a thickness of the solid requiring ~1mm to get 10 cells across

• Reimport the last PMDB created, unchecking “save PMDB”

• Choose tolerance of 0.1 (one tenth of the smallest cell size in our mesh assuming we wish 10 cells across the solid zone)

Page 11: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 11

Default Vs Tessellation Refinement

It is clear from this that the default tessellation is not satisfactory in general to give a smooth

curvature capture for high accuracy. We recommend to use a tolerance of 1/10th to 1/100th the

min size in your mesh during import if choosing the Tessellation Refinement import option.

Default Tessellation Tessellation Refinement Used

Page 12: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 12

Tessellation Refinement

• Open the Manage Objects panel, select all the Objects and click Draw.

• Inspect better curvature capture with Tessellation Refinement.

• Enable ‘Free’ and then click Draw. You can see that the model is still badly disconnected.

• Disable ‘Draw Edge Zones” and click Draw again in Manage Objects so only triangular faces are shown

• To make objects properly conformal we can wrap the Object or import instead with the Conformal Faceting option

• Wrapping will be investigated in later workshops so we will next concentrate on use of conformal faceting

Page 13: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 13

• Import the last generated PMDB file using the options shown. Note this will take a few minutes.

• Use Manage Objects panel to display the Face Zones and examine the geometry

• Display ‘free’ faces to examine connectivity of the elements

• The facets should be fully connected in this case and there should be no blue faces as the Object is conformal.

Import with Conformal Tessellation

Page 14: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 14

• Reimport the pmdb with exact same settings but this time activate ‘Edge Proximity’ with 3 Cells Per Gap in CAD Advanced Options

• Note that when the objects are displayed we see more elements across small gaps in the model where proximity has been detected between features.

Edge Proximity for Conformal Faceting

Edge Proximity is only suggested if conformal faceting is to be used to go directly to volume meshing. If wrap/sew is to

be used later then Size Function refinement can refine these areas and Edge Proximity on import is not required.

Page 15: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 15

• We have meshed the surfaces of the solid volume on import in this case and we need to cap the 4 inlets and one outlet in order to define a closed fluid volume.

• We will next cap these boundaries, merge the nodes on these caps and use them to define the fluid region.

Capping the Fluid Volume

One outlet

Four Inlets

Page 16: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 16

Capping the Outlet – Caps …

• Open the Caps… panel from the Mesh Generation Create part of the workflow

• Select the Object “obj” and hit Draw.

• Zoom to the outlet we need to cap as pictured

• Give an Object Name of “outlet”

• Choose Type as “Pressure Outlet”

• Choose Edge as Entity Type to cap by and also select Create Edges, Remesh and Auto Redisplay

• RMB on the edge as pictured and hit Create

Create

Page 17: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 17

• Now, using the same method as in the last slides, cap the four inlet zones with this procedure:

– Give Object Name e.g. inlet1

– Select Type = Velocity Inlet

– Select Edge using RMB (Remember ‘F2’ can be used to clear unwanted selections if the wrong edge is chosen)

– Create

– Repeat for inlet2, inlet3, inlet4 i.e.until all inlets are capped

Cap the Four Inlets

After all 4 inlets capped

Page 18: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 18

• Under Display -> Face Options tick ‘free’ and ‘multi’ and click Draw again within the Capping Surface Panel

• The new caps are not connected to the “pipe-solid” object – they have separate nodes and this is shown by the free (blue) faces

• We will use Merge Nodes now in order to connect the new patches to the solid object to “close” the fluid region

Check Connectivity of Patches

Page 19: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 19

• Open Boundary Merge Nodes…

• For the list on the LHS, select the four inlet boundaries and one outlet boundary and tick Only Free Nodes because we wish only to allow nodes on free faces to be merged

• For the list on the RHS, select the four inlet boundaries and one outlet boundary and click Invert Selection . Un-tick Only Free Nodes because the nodes on the solid are not free – they are connected within the solid. Note here we could use ctrl-z and select the Face Zones from the graphics window with RMB.

• Choose Percent of shortest connected edge length and the default 10% and click Merge

Connect the Patches with Node Merge

Page 20: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 20

• Under Display -> Face Options tick ‘free’ and ‘multi’. Open the Manage Objects panel, select all objects and click Draw

• We now see that the caps are properly connected to the “pipe-solid” object – the nodes have been merged and this is shown by the multi (yellow) faces

• The model is now well connected and we should get a valid tet mesh if we meshed from here.

• However, to get good quality volume mesh we need to improve surface mesh quality first!

Verify Connectivity of Patches

Page 21: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 21

Quality Check • We have verified that connectivity is correct but now we

need to ensure quality is good before proceeding to volume meshing.

• Check quality.

• Select Face Limits... from the Report menu.

• Click Quality Measure ....

• Open the Quality Measure dialog box to see that the default Skewness measure is selected.

• In the Report Face Limits dialog box, select all the Face Zones and click Compute. The skewness is computed and displayed.

• Face max skewness is too high to get a good volume mesh. To improve quality we will next use the Surface Mesh Improve Panel.

• Surface Mesh Improve works on Objects of type ‘wrap’ or ‘mesh’.

• Select all objects and change them to geometry type. Select all again and then using the Operations tab choose Merge Objects. Change the merged Object Name to “obj” and hit Change.

• Here we have closed the geometry properly without the need for wrapping and we can directly change the type of the Object to ‘Mesh’ by selecting it in Manage Objects, changing type to ‘Mesh’ and hitting Change.

Page 22: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 22

• Open Surface Mesh -> Improve panel

• Select the Object ‘obj’ and hit ‘Improve’

• You will see that Fluent Meshing has utilized improvement algorithms to drop max triangle skew to < 0.7 skewness which should be good enough to get a volume mesh

• Save the mesh again

– File -> Write Mesh -> Exhaust-capped-improved.msh.gz

Object Improve

Page 23: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 23

• We will now create a Material Point to set the name for the fluid region and to use for orienting prism normals

• Draw the Object ‘obj’ by selecting it in the Manage Object panel and hitting Draw

• Use Clipping Planes in x in order to view the inside of the geometry and use ‘ctrl-n’ to switch to node filter and right-click on two nodes as shown

• Open Create -> Material Point panel, hit ‘Compute’ and then tick ‘Draw’ to show the centroid of current selected entities. If point is incorrect some other entities will be also in the selection so use F2 to clear selections, reselect 2 nodes, ‘Compute’ and then un-tick and re-tick the ‘Draw’ option. When satisfied the point lies within the fluid zone, choose a ‘Name’ and hit ‘Create’.

Create Material Point

Page 24: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 24

• As our Mesh Object contains both fluid and solid we need to tell Fluent Meshing where the solid zone is by using another Material Point

• Repeat the Material Point creation process by clearing selection with ‘F2’ and then using ‘ctrl-n’ to pick two nodes whose centre-point will lie inside the solid. Name the Material point ‘solid’ and hit ‘Create’

• ‘List’ will print our two material point descriptions to the console.

Create Solid Material Point

Page 25: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 25

• Open Volume Mesh -> Auto Mesh...

• Select our Object ‘obj’ from the dropdown list

• Select both ‘Material Points’

• Note that ‘Keep Solid Cell Zones’ is irrelevant here as we have no “solid” type Objects

• Retain defaults for all other fields – we will use the default 1.6 growth tet mesh to get a quick result

• Hit ‘Mesh’ to generate a tet mesh

Volume Meshing with Auto Mesh

Page 26: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 26

• Check the mesh quality using the dropdown

– Report -> Cell Limits...

• Change the Cell Zone Type using the dropdown

– Mesh -> Manage...

– Change type of cell zone ‘solid’ to solid type (default is fluid for all material point based cell zones)

– This is the Cell Zone type used for Fluent Solver material properties etc

Check Quality and Manage Cell Zones

Page 27: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 27

• Use Display -> Grid dropdown to set the Bounds to Zmin = Zmax = 0

• Never display cell zones without limiting display to a cutplane in this manner

• Move to the ‘Cells’ tab of Display Grid and select both cell zones and Display

• Investigate the tet mesh in the graphics window

• Save the Volume Mesh

– File -> Write Mesh -> Exh-vol.msh.gz

View a Cutplane of the Volume Mesh

Page 28: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 28

• Hit the Switch to Solution button to enable the solver

• Scale the grid as we imported in mm

– Select Scale…

– Choose Mesh Was Created In mm

– Hit Scale

– Close

Switch to Solver Mode

Page 29: Introduction to ANSYS FLUENT Meshing - dl.mr-cfd.comdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5_WS4_Cad... · Introduction to ANSYS FLUENT Meshing 14.5 Release Workshop

© 2011 ANSYS, Inc. December 21, 2012 Release 14.0 29

• Check cell count using Mesh Info Size

• Choose Mesh Polyhedra Convert Domain

• Check new mesh size Mesh Info Size

• Save case file

– File Write Case Exh-poly.msh.gz

Convert to Polyhedral Cells

Note that Polyhedral conversion

reduces cell count by up to 60%

compared to tet equivalent mesh