Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture...

30
© 2011 ANSYS, Inc. December 21, 2012 1 14.5 Release Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing

Transcript of Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture...

Page 1: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

1

14.5 Release

Lecture 6: CAD Import

Introduction to ANSYS Fluent Meshing

Page 2: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

2

Wrap Flow Volume

Fluent Meshing 14.5 Assembly meshing Workflow

Gap closing

Auto Mesh

-Prism Setup

-Tet or HexCore

Individual “Wrap” or Change to “Wrap”

Extract Flow-volume (only)

Multiple Fluids/Solids Extract Fluid + Solid

Gap closing

Make “Mesh”+Improve Improve

Sew

Create Size Function/ Material points

Cap Inlet/Outlets, Create Domains/BOI

Tessellated or Conformal CAD import Import

Real Creations

Wrapping Operations

Surface mesh

Volume mesh

Virtual Creations

This Lecture

Page 3: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

3

• CAD Import Formats

• CAD Import Standard Options

• CAD Import Advanced Options

• Appendix

– Suggested usage

– Advanced batch CAD conversion features

Agenda

Page 4: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

4

• CAD Import Formats

• CAD Import Standard Options

• CAD Import Advanced Options

• Appendix

– Suggested usage

– Advanced batch CAD conversion features

Agenda

Page 5: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

5

• Fluent R14.5 utilises Workbench CAD import tools to read CAD files directly.

• Workbench must be installed to have the ability to access the CAD import option. Many require license keys.

• Converted to Faceted geometry on import – On-the-fly triangulation (Fluent Meshing has no geom kernel)

– Conformal or non conformal options

• Available Formats are – ANSYS WB formats; agdb, meshdat, mechdat

– ANSYS legacy formats: tin (ICEM CFD), dbs (Gambit)

– Standard/Free CAD formats; Iges, STEP, ACIS, Parasolid

– Spaceclaim files: .scdoc

– Licensed readers; Autodesk Inventor, CATIA V4, CATIA V5, Creo Parametric, JT Open, NX, SolidWorks

– Plug-ins: Autodesk Inventor, CATIA V5, Solid Edge, Creo Parametric, JT Open, NX, SolidWorks,

• NOTE; most of these are Windows – and must be configured using ANSYS CAD Configuration Manager

– Non-CAD formats; STL (note for STL the faceting input parameters are irrelevant and will have no effect)

– Native PMDB (Part Manager Data Base) format

CAD Import

Page 6: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

6

• CAD Import Formats

• CAD Import Standard Options

• CAD Import Advanced Options

• Appendix

– Suggested usage

– Advanced batch CAD conversion features

Agenda

Page 7: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

7

• CAD Import options

– Single File import

• Browse and select a file

• For assemblies choose the assembly master file (e.g. *.CATProduct for CATIA V5)

– Multi-file import

• De-select “Import Single File”

• Select a Directory + a pattern (*.agdb, *.*).

• Useful for assemblies in separate files

– Standard Options

• Import Curvature Data from CAD – Recommended for improved size function calculation

– Curvature calculations for size function will be based on CAD surfaces and not faceted geometry

• Append

– Will add any CAD files to the currently loaded geometry rather than overwrite

– Useful if user wishes to import different CAD files with different import (tessellation, etc) options

CAD Import – Standard Options (1)

Single File Import

Multi File Import

Page 8: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

8

• Feature Angle

– Feature Edge Zones are created on import of CAD

– Feature Angle specifies the angle change required for a CAD curve to be classed as a “feature” i.e. it is an input to control Feature Edge Zones generated at import

– Note that

• The default of 40 is generally good and

• If required, features can be created inside Fluent Meshing from the faceted representation

• Scale Factor

– Scales the geometry on import if required

• Zone Name Prefix

– Apply a prefix string to all Face and Edge Zones for current import

– Useful for multiple imports

CAD Import – Standard Options (2)

Imported Face Zones

Imported Edge Zones

Page 9: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

9

CAD Import – Granularity in Object

Example – Mixer-T with 4 bodies in 2 parts

Note that Face Zones can also be separated inside Fluent Meshing after CAD import

Page 10: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

10

• One Zone Per File is useful when each object or set of surfaces is contained in a file with a meaningful name

– E.g. STL files named by part/body

– Import all *.stl files within folder

– One zone per file will name objects and face zones after the file name

One Zone Per File

Page 11: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

11

• CAD Import Formats

• CAD Import Standard Options

• CAD Import Advanced Options

• Appendix

– Suggested usage

– Advanced batch CAD conversion features

Agenda

Page 12: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

12

• CAD Advanced options

– Read CAD in Subdirectories

• Only available during Multi-file import

• Useful if users have a set of tree-like directories containing assembly/sub-assembly files

– Save PMDB

• 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 PMDB file instead of the original CAD to avoid slow re-read and interpretation of the original geometry data

• Generally recommended but strongly recommended for large cases

CAD Advanced Options

- Miscellaneous options • Make Objects Independent ensures that objects are

made independent (objects do not share face zones) on import. This is applicable to cases where face zones are shared between objects

• Import Part and /or Body Names is recommended and is on by default

• Continue on Error continues the import of the CAD file(s), despite errors or problems creating the faceting on certain surfaces, or other issues

• Enclosure Symmetry Processing allows processing of enclosure and symmetry Named Selections during import. This option is disabled by default and is only applicable to ANSYS DesignModeler (*.agdb) files

• Length Unit should be set to units user wishes to work with inside Fluent Meshing (which is unitless)

Page 13: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

13

• Tessellation Refinement

– Fast, STL-like tessellation of the geometry with no regard for quality or connectivity of triangles

• Inputs are based upon length unit chosen (m, mm, etc)

• Tolerance specifies the tolerance for the tessellation (faceting) refinement when Tessellation Refinement is selected. The default value is 0, which implies no tessellation (faceting) refinement during import.

• Max Size specifies a maximum facet size for the imported model to avoid very large facets. Zero default means unlimited max size.

Tessellation 1 – Tessellation Refinement

Note on Tessellation Tolerance: It is recommended

that you use the default value of 0 for an initial

(diagnostic) import. You can then determine the

minimum size you intend to use for the mesh and

import the file(s) again using a Tolerance value 1/10th

the intended minimum mesh size.

Tessellation Refinement is Recommended

for very large Assemblies where shrink-

wrap is planned to be used i.e.

connectivity is not as important

Page 14: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

14

Default – no refinement

Default Vs Refined Tessellation Refinement

Tolerance = 0.1 mm

Facets in the original import should be smaller than final mesh

requirement to ensure smooth curvature capture!

Page 15: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

15

• Here we see an example of poorly (too coarsely) tessellated geometry. The wrapped mesh reflects this coarse faceting even though the mesh size is as required.

• Always check curvature is captured well enough in the initial geometry before proceeding to meshing!

• Fluent Meshing relies on imported surface facets being close to the CAD representation!

Poor Geometric Tessellation…

Poor faceting on curved surfaces

Initial Geometry

Wrapped Result

Page 16: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

16

Tessellation 2 – Conformal Tessellation

• Tessellation Refinement

– High Quality, CFD-like faceting taking care to give good quality where possible and fully connected facets

• Inputs are based upon length unit chosen (m, mm, etc)

• Min Size specifies the min facet size which will be reached in areas of high curvature/proximity

• Max Size specifies a maximum facet size

• Edge Proximity enables the use of the edge proximity size function for creating the conformal tessellation, based on the number of cells per gap specified

• Cells Per Gap specifies the number of layers of elements to be generated in the gap for the edge proximity size function

• Merge Nodes allows you to merge free nodes after import. Nodes will be merged automatically at the object level with a tolerance of 1e-10

Conformal Tessellation takes

more time but is recommended

for simple to medium geometry

or where cut-wrap/cutcell are

planned to be used

(connectivity more important)

Page 17: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

17

Conformal Faceting - Edge Proximity

Edge Proximity during conformal faceting is only relevant if the user wishes to try to create the volume mesh from the original imported geometric faceting or to use “Meshed” size function to set mesh sizings later. If a wrap or cutcell method is to be used in Fluent Meshing then proximity refinement can be applied using Advanced Size Functions at a later stage.

Page 18: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

18

• By default “Import Named Selections” is on inside the Advanced Options panel

• If required, user can apply boundary naming convention in their CAD tools and bring them through

– E.g. Named Selections in Design Modeler and then export .agdb

– E.g. Publications from CATIA V5

• Named Selections can sometimes be unrequired for analysis – e.g. “Layer” or “Color” labeling from CATIA will come through as a NS. These can be removed by adding Ignore options by Pattern/Expression

CAD Advanced Option - Named Selections

Page 19: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

19

• Surface Bodies will come through into Fluent Meshing with the “–sheet” post fix in the Object Name

• Users should be aware of these Surface Bodies which may need removing if duplicate (as in this example case) but also could need capping to create a closed object before proceeding to wrap/cutcell etc

• View “free” faces to create caps by edge select and F5 “create”

Surface or Solid bodies

Page 20: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

20

• CAD Import Formats

• CAD Import Standard Options

• CAD Import Advanced Options

• Appendix

– Suggested usage

– Advanced batch CAD conversion features

Agenda

Page 21: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

21

14.5 Release

Appendix

Page 22: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

22

• Model size – Large ~ 100s – 1000s of bodies/parts of low-medium complexity OR small

cases of very high complexity (100s-1000s of small surfaces making up few bodies/parts) • Import first with default advanced options (quick-read) except switch “save pmdb” to YES.

(Import coarse, light grid with no faceting refinement to examine conversion and understand best import settings)

• Re-import the .pmdb file with faceted refinement tolerance setting to relevant value based on min feature size ~1/30th min feature size (0.1*min-cell-size with 3 cells across gap)

• If all bodies are “solid” then the conformal faceting option can be tried also, which will take longer but remove the “wrapping” step later

• Examine curved areas -> Is faceting sufficient? If no then re-import with lower tolerance/min-size and re-examine

– For Extremely large models, special methods are available to group objects on import

• E.g. lump nuts and bolts into single object rather than individual objects

• Requires use of a batch script outside Fluent Meshing which has additional options (see appendix)

CAD Import – Model Size Large/Complex

Page 23: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

23

• Model size – Medium ~10s to 100s of bodies/parts of low-medium complexity

• Repeat quick-read as above with no refinement (default) to save pmdb

• If dirty geometry exists (gaps, holes, not closed volumes)

– Re-import as above with faceted refinement tol~1/30th min feature size and ensure curved regions and features are captured well before proceeding

• If geometry is relatively clean (each body, part is a closed volume)

– Re-import with “conformal faceting”, setting max size 3-5x smaller than the final min and max required in surface mesh and lower curvature angle than final mesh requirement. Examine geometry in critical areas to ensure sufficient curvature capture etc

– Single closed part

• Import directly with conformal faceting with sizing relevant to final mesh sizing

• Faceting at import can be used directly for volume meshing in some instances (edge proximity should be switched on to resolve small gaps/faces better)

• Additional options are available in command line “batch reader” to optimise conformal faceting and apply e.g. face proximity as well as edge proximity to ensure e.g. N cells across gaps. See appendix for more info on Batch CADReader.

CAD Import – Model Size Medium

Page 24: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

24

• Model size – Low part count with ~<100s of surfaces per part

• Import directly with conformal faceting following above conformal faceting requirements

– Single closed part

• Import directly with conformal faceting with sizing relevant to final mesh sizing

• Faceting at import can be used directly for volume meshing in some instances (edge proximity should be switched on to resolve small gaps/faces better)

• Additional options are available in command line “batch reader” to optimise conformal faceting and apply e.g. face proximity as well as edge proximity to ensure e.g. N cells across gaps. See appendix for more info on Batch CADReader.

CAD Import – Low Complexity/ Small

Page 25: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

25

• A number of additional CAD read options are available for Fluent Meshing but only through a batch reader (beta) which works outside the Fluent Meshing graphical interface

• Occasionally, users may benefit from extra options for tessellation including

– Ability to lump similar parts into one zone (reduction of zones in Fluent Meshing for large assemblies)

– Ability to use ICEMCFD tessellation

– Ability to enforce face-face proximity size function for conformal faceting

Advanced CAD Options

Page 26: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

26

• Each time the CAD reader is used an XML is created in background which can be found in the temp directory which can be accessed by typing %TEMP% into the quick launch on Windows

• By ordering the contents of this folder by date you should see the most recent options#.xml file which will contain the data for the last CAD read. This file can be edited to add other tags to run in the batch CAD reader.

• Copy this file into your working directory.

CAD Reader XML

Page 27: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

27

• Some of the xml lines are not compatible with running in batch and must be edited/removed

• We remove the Merge to get multiple files and we remove OutputPath and replace with OutputDirectory which is identical to InputDirectory

• Note that capitals are important and xml flags on RHS have / in them!

Editing XML File

XML Example

Page 28: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

28

• Now to process this XML in batch we need to use a .bat file and point to this XML file see next slide

Edited XML File

Page 29: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

29

• runCADReaders.bat is found in C:\Program Files\ANSYS Inc\v145\commonfiles\CPython\winx64\Ansys\TGrid

CAD Batch Reader – beta feature

Shift RMB in whitespace in the folder gives option to “open command prompt here”

Execution of this bat file result is .tgf (tgrid faceted format) files which can be manually read into TGrid

Executing runCADReaders.bat -h gives all flags

Page 30: Lecture 6: CAD Import - dl.ptecgroup.irdl.ptecgroup.ir/virtual_education/mechanical... · Lecture 6: CAD Import Introduction to ANSYS Fluent Meshing ... • Fluent R14.5 utilises

© 2011 ANSYS, Inc. December 21, 2012

30

• The key flag required to run from XML file is

– runCADReaders.bat –a /mydirectory/options.xml

• Example useful XML lines:

– Switch on face-face proximity refinement (very CPU expensive) – <ConformalFacetingProximitySourceType>FaceFace</ConformalFacetingProximitySourceType>

– Switch on ICEMCFD Faceting (check Face and Edge zones and use with care)

– <UseICPartMgr>Yes</UseICPartMgr>

– Set a different min size for proximity SF calc compared to curvature min size

– <ConformalFacetingProximityMinSize>0.11mm</ConformalFacetingProximityMinSize>

– Proximity can be too sensitive to very small gaps at times and user may need to adjust tolerance

– <ConformalFacetingGapToleranceFactor>0.1</ConformalFacetingGapToleranceFactor>

• More options exist so please contact support if something is required

Running Batch Reader with Edited XML