24
ICEM 102 ghazlani m . ali Understanding the tutorials May 2013 – version 1.0

ICEM Ansys Tutorial

Embed Size (px)

Citation preview

Page 1: ICEM Ansys Tutorial

I C E M 1 0 2

ghazlani m . ali

Understanding the tutorials

May 2013 – version 1.0

Page 2: ICEM Ansys Tutorial

Ghazlani M. Ali: ICEM 102, Understanding the tutorials, c© May 2013

Page 3: ICEM Ansys Tutorial

Teachers open the door but you must enter by yourself

— Chinese proverb

I N T R O D U C T I O N

Before going any further, i would like to inform the reader that I’mfar from being an experienced ICEM CFD user with some ten years ofexperience. I have started not even three years ago, every time i hadproblems with the software, i went online and asked for help on cfd-online.com. A great community is there, which without them, probablythis book would have been absent.

The tutorials available in Ansys customer portal are the real deal.Sometimes, you tend to follow the instruction without knowing what’shappening. The purpose of this book is... let’s say to bring a sense to allof what you are doing. To explain why we do this or that. I will alsoinclude some interesting features not covered in the tutorials.

Many thanks go to the people in cfd-online, i have learned a lot withyou guys, gratitude.

Mistakes will be made throughout the book. English is my third lan-guage, please bear with me...

iii

Page 4: ICEM Ansys Tutorial

C O N T E N T S

i a guide to the graphical interface 1

1 working efficiently 2

1.1 Organization 2

1.2 Useful buttons 2

ii geometry 4

2 geometry 5

2.1 Parts 5

2.2 Bodies 5

2.3 Curve and surfaces 6

iii the mesh 8

3 unstructured mesh 9

3.1 Good geometry 9

3.2 Flow of work 9

3.3 Adding an interior wall 10

3.4 Mesh Algorithm 10

3.5 Never too late to change the boundaries 11

3.6 The Edit Mesh Tab 12

4 structured mesh 14

4.1 Introduction 14

4.2 blocks can be parts 15

4.3 Useful links 15

5 merging an unstructured mesh with a structured

mesh 17

6 conclusion 19

iv

Page 5: ICEM Ansys Tutorial

L I S T O F F I G U R E S

Figure 1 The tabs 2

Figure 2 Holes to be grouped 5

Figure 3 A look at the mesh... 6

Figure 4 Difference 6

Figure 5 Difference 7

Figure 6 The mesh tab 9

Figure 7 The global mesh parameters 10

Figure 8 Interior wall 10

Figure 9 Select mesh elements tool 11

Figure 10 Select geometry tool 11

Figure 11 Selected boundary 12

Figure 12 Before and after 12

Figure 13 Duplicated mesh 13

Figure 14 Before and after 17

Figure 15 Before and after 18

v

Page 6: ICEM Ansys Tutorial

Part I

A G U I D E T O T H E G R A P H I C A L I N T E R FA C E

There is a lot of tabs in ICEM CFD, it’s all about orderingyour work, You will always navigate those tab from left toright. Take some time and read this part to learn more aboutthe steps of creating a mesh

Page 7: ICEM Ansys Tutorial

1W O R K I N G E F F I C I E N T LY

1.1 organization

The graphic interface in ICEM CFD is made so people do not get lostwhen working in it, but yet if you are just starting in cfd, you WILL GETLOST. here is what you need to understand: The steps by which we gothrough are pretty simple:

1. One starts by creating, or importing and modifying its geometry.This is why the geometry tab is first in the row. Everything there isrelated to creating, deleting, and changing the points, the surfaces,and the curves.

2. Next is the Mesh tab. This is where the parameters of the meshwill be specified: size of element, what kind of meshing techniqueone wants to use, each of the parameters can be applied in a globalscale, or for a particular part of your geometry, this why we find"surface mesh" or "curve mesh" tab.

3. Next is the blocking tab, this is to be skipped if you are planing anunstructured mesh (for the moment). There are some times whenthe blocking tab can be used along the mesh tab, but that willhappen when you’ll level up your knowledge in ICEM CFD.

4. When your mesh is generated, you will have to improve its quality,may be duplicate it, delete it, and many more editing. The editmesh is there for that. So you will play with that tab when youhave a generated mesh, and not before.

5. Finally when everything is ready to be transfered to your solver,you will then use the "output tab", the name speaks for itself, thereyou will assign the boundary conditions and create the mesh fileto be imported in the solver ICEM 102

version 1.0

Figure 1: The tabs

1.2 useful buttons

There are some very useful buttons there, you will get the chance touse them all while discovering the software, or after reading this book...

2

Page 8: ICEM Ansys Tutorial

1.2 useful buttons 3

Most of them deal with "how to efficiently select and entity". There aremany, i will only cite the most useful ones. The more we advance inthis book, i shall explain more. Let us take our cube, as we all know, thecube has 6 faces (surfaces), 8 corners (points), and 12 edges (curves). Thetoggle selection buttons make the job easier by letting you pick only theentity you desire. Two more buttons you may want to use:

• All entities

• Only visible

all entities will even select the objects that are not displayed in yourscreen, very useful if you wish to delete "everything".

only visible lets you buy some time if you wish to select all surfacesthat are displayed on your screen when you have ONLY those surfacesshown. Again, if your points are displayed (checked in the tree menu)and if you hit that button, surfaces AND point will be selected... just tomake sure you got it ;)

Page 9: ICEM Ansys Tutorial

Part II

G E O M E T RY

When just starting with ICEM CFD. One has to understandthe important of having a perfect geometry. As seen later,the algorithm behind generating a mesh depends on know-ing the curves, points and surfaces of the geometry so meshboundaries can be applied. If the geometry is bad, absence ofcurves, or overlapping surfaces, the resulting mesh -if generated-may just not be the one you wanted.

Page 10: ICEM Ansys Tutorial

2G E O M E T RY

Icem Cfd is good in importing geometries, but not creating ones. Unlessyou want to draw a box, a sphere any simple body, it is better to just usethe importer. Using the workbench reader, i never failed in importing anIGES, STEP or a workbench geometry.

2.1 parts

One of the coolest feature in ICEM CFD is to create a part. Parts can beanything: curves, surfaces, bodies, points and even a mix of all of themthem.

Figure 2: Holes to be grouped

The main reason why we createpart is to define boundary condi-tion for the curves (in 2D) andfor the surfaces (in 3D). I’m notsure if it is available in the tuto-rials or the training materials buthere is one more useful feature touse the create part which will giveyou some more insights and un-derstanding. Let’s say we have agroup of holes as shown in the pic-ture below: While meshing this,you boss expect from you to puta minimum a 20 nodes in eachog the curves representing the holes. As you begin with ICEM, youwill probably select individual curves and assign them the 20 nodes.Here is where the create part will be useful: select create part, toggleon (only curves) and select all the curves that matter. Name that par"group_curves". Now you have one part that includes all those curvesand if you go to Mesh Tab -> Mesh Curve -> Select Part -> "group_curves"and Number of nodes-> "20" : it will assign 20 nodes for each curve there.Now you are using ICEM CFD efficiently.

2.2 bodies

What’s a body? Why creating a body ? I will try to explain it by a verysimple example: figure 2 shows a cube inside another. Think of it as ametal box suspended in the air. I decide to create a body outside of theinner cube and name it "AIR". If i generate a mesh. The figure belowshows how it will look like.We notice here that the elements created will propagate until surfaces

5

Page 11: ICEM Ansys Tutorial

2.3 curve and surfaces 6

Figure 3: A look at the mesh...

are met. They will not cross the surfaces. I now have a convenient wayto tell my solver FLUENT -for example- that everything outside of theinner cube means air. Now, What if i want to study the temperatureprofile inside of the box. I need to tell my solver that i have aluminuminside of it. More over, i need to go back to Icem and create a bodyinside the inner cube, and call it "Aluminum". the figure below showsthe resulting mesh composed of two bodies.

(a) One body (b) Two bodies

Figure 4: Before and after.

I hope you could get this interesting concept. Bodies can be used fortoo many reasons, and it will be up to you to exploit this feature inthe future. Let’s move on to put into practice the use of the curve andsurface features.

2.3 curve and surfaces

REMINDER: if we have a square surface, then we have 4 curves, and4 points acting as boundaries. Simple right? I wanna show now how ican change my geometry by using them in order to have different inlet.Figure 5 shows a face of a cube, that face represents an inlet of air. Whatif i want to add a small window where the air will enter, and declare all

Page 12: ICEM Ansys Tutorial

2.3 curve and surfaces 7

the other boundaries as wall. This can be easily done by going throughthe following steps below: By doing so, and after generating the mesh. Iwill have two distinctive faces and i can move on to the solver to assignwhatever boundaries i want.

(a) Added points (b) Added curve

(c) Surface split (d) Generated mesh

Figure 5: The steps for splitting a mesh.

Page 13: ICEM Ansys Tutorial

Part III

T H E M E S H

Mesh can be structured or unstructured or both. In 2D, wetri elements for the unstructured and quad elements for thestructured. In 3D, we have tetra elements for unstructuredand hexa for structured. Penta elements are presents whenprism has been generated...

Page 14: ICEM Ansys Tutorial

3U N S T R U C T U R E D M E S H

I will not get into every details on how to generate an unstructured meshbecause it is well covered in the tutorials and the training materials. Iwant to show some additional features that will let you avoid startinga thread in the cfd-online forum. I will cover: adding wall, convertingthe mesh to a delaunay, checking the quality, creating part for mesh andsome more the Edit Tab.

3.1 good geometry

Before going any further, we have to make sure that we have a good ge-ometry. Mesh generation will fail if holes, and open surfaces are presents.

3.2 flow of work

The figure below shows what’s under the Mesh tab. One of the first thingto do is starting by giving a global element seed size. By global it meansthat everywhere in your geometry you will not get an element biggerthan what you have specified, for precaution. Always under the Mesh

Figure 6: The mesh tab

tab, the flow of work goes from left to right. After you select you globalparameters, you move on to "customize" your mesh on individual enti-ties.

• If you want to set a max size of 1 for a certain wall, and a max sizeof 12 for another entity, you can do that under the part mesh setup.

• if you want to apply a special meshing method on a specific sur-face, or to apply a specific sizing, you can do that under the surfacemesh setup.

• The Curve mesh setup let you add a specific node law distributionto a curve. This is where you specify the number of nodes as seenin chapter 2 section 1.

9

Page 15: ICEM Ansys Tutorial

3.3 adding an interior wall 10

Figure 7: The global mesh parameters

3.3 adding an interior wall

Let us consider our cube example: as we saw in chapter 2 section 3,

Figure 8: Interior wall

we used tow bodies (one insidethe inner cube) and one outsidethe inner cube (the metal box sur-rounded by air) What if i have asurface inside the cube, as shownin figure 8, and that i wish to con-

checking theinternal wall

sider that surface as a wall in mysimulation. ICEM CFD will ignorethat surface if you don’t specifyit as wall. Even if it looked likethe mesh was successfully gener-ated, you will not see your sur-face in the solver, because no shellelement are associated to it. Let’s see how we can avoid this: I willstart by putting my surface into a part and call it "wall_inner_cube",we click on Mesh tab->Part Mesh Setup, then we check int wall for ourwall_inner_cube. Hit Apply then Dismiss.That’s it, our mesh is generated and that surface is taken into account .A typical example for this case can be a flow over vertical plate ;)

3.4 mesh algorithm

Our mesh was generated using the Octree mesh method. Personally, i of-ten convert it to a delaunay mesh, the latter tends to generate less node,and is more suitable for CFD simulations. In opposition to the OctreeMethod, the Delaunay Method takes root from the surface, making it wayup to fill the hole geometry. That being said, if you want to generate adelaunay mesh without passing through the Octree method, you needto have your surfaces meshed.To get the delaunay mesh, head to Compute Mesh under the Mesh Tab,and select Quick (delaunay) instead of Robust Octree, click Compute.

Page 16: ICEM Ansys Tutorial

3.5 never too late to change the boundaries 11

3.5 never too late to change the boundaries

Now we have a beautiful mesh. But still we are not ready to export it.In fact, we forgot to define the boundary condition. We usually name asurface -part- as inlet, then we generate the mesh. The interesting fact tounderstand here is that all the shells and the superimposed surface willform one part, and that will be inlet. If i delete that part, the shell andthe surface will be deleted.That being said, we show again that a part can be shell elements too,deleting that part will result in deleting the surface and the shells. belowis a quick demo on how to define a group of shell as a boundary:

1. Right click on part, then select select new part

2. Give a name to your part (boundary), something like INLET

3. click on Select entity, things get interesting here, you need to knowthat there is two kind of windows for selecting elements, shownbelow, one is to let you select entities for geometry, and anotherone for mesh elements, you can toggle between them using thebutton framed in blue:

Figure 9: Select mesh elements tool

4. I’m introducing here a few more useful button to help you selectwhat you want. If you click on surface elements (framed in red), thiswill select all the shell elements, they can be either quads or tri.In our example, they are TRI since we used an unstructured mesh.Similarly, the button next to it is for Volume elements. i will usethat button if i would like to delete my volume mesh and leave thesurface mesh so i can generate a Delaunay mesh for example. Ifyou know the part’s name, click on the button framed in pink, allentities belonging the that part will be selected.

Figure 10: Select geometry tool

5. With the select mesh elements turned on, notice what happens ifyou click on any tri elements, followed by all item attached to selectedelement, up to angle, the entire boundary will be selected as shownin figure 7. That’s it, we have now an INLET ready to be set in thesolver after the output is done.

Page 17: ICEM Ansys Tutorial

3.6 the edit mesh tab 12

Figure 11: Selected boundary

3.6 the edit mesh tab

Sometimes, it is good to anticipate matters and spend less time dealingwith the geometry. We all now how cylindrical geometries are genera-tion, it’s all about revolution around a specific axis. Once a mesh is gen-erated, ICEM CFD can extrude it, copy it, scale it and rotate it. Knowingthis, why not mesh just one sector ? Consider the geometry shown be-low. Here, i have used a structured mesh by blocking a portion of mygeometry.

(a) A sector (b) full meshing

Figure 12: Before and after.

Page 18: ICEM Ansys Tutorial

3.6 the edit mesh tab 13

The quality is not great, the purpose of it is just to show you the ca-pabilities of the Edit mesh tab. I will then mirror it twice to get the finalgeometry. The steps are very easy, under the Edit mesh tab, click on Trans-form mesh-> Mirror -> Select all. In our case, we want to get the a hole 360

geometry so we need to check copy1.

Below again, a pattern was created using the copy and translate feature.Very easy and time saving !

Figure 13: Duplicated mesh

1 One more example on the use of the Edit Mesh tab:http://www.cfd-online.com/Forums/ansys-meshing/107222-heat-exchanger-too-much-fins.

html

Page 19: ICEM Ansys Tutorial

4S T R U C T U R E D M E S H

4.1 introduction

This is tough to explain. One way to get a structured mesh in icem CFDis to block your geometry. It all start by one block initialized, then it issplit into multiple blocks, to finally adapt it to the geometry. For onegeometry, there can be multiple blocking strategy, it is the reason why itis hard to cover it, and no matter how many geometries I show, you willalways end up with one different that the other, and it will require sometime to come up with a blocking strategy. Some thinks that it like a gene,you either know how to block or you don’t. I personally don’t think so.You need to know that there is no special recipe to master it, or thereis only one way: practise on geometries as much as you can. Cfd-onlineis full of people seeking help, even if you can’t help, try. And see thesolution from those who helped. Another important point: when youblock your geometry you don’t actually create a mesh, it is more like ascheme. To have a mesh, you need to right button click on blocking andselect convert to unstructured. Someone once asked this question in cfd-online: why do I always have to convert my mesh to unstructured even ifit’s structured ? It seems confusing what icem calls a unstructured meshis every mesh you can edit using the edit tab and you can output. As Isaid before, when you don’t convert your block , you don’t actually havea mesh, you can’t extrude it or scale or do anything under the edit tab. Ihope I made myself clear, if not... Just keep doing it, one day you’all getit ;) It is true that a structured mesh is more acurrate, I found the sizeof its .msh file much smaller also. Because generating one requires timeand expertise I often start by an unstructured mesh, see how it behavesduring the simulations , if I get a lots of warnings when performingiterations , I will try to make a structured mesh meanwhile waiting forthe results. Here are some rules that will help you get a good blocking:

• when you split a lot, avoid confusing by using the index control.It may seems difficult to use the numbers to filter the blocks youwant at first sight, so instead, use the select corners option,

• it is sometimes difficult to select the blocks you want, I usuallyright button click on block and select solid. It makes it easier tolook through than having them set to wire frame

• you get a good quality when the vertices are aligned, there aremany ways to align the vertices, take some time to discover how.It is not difficult at all.

14

Page 20: ICEM Ansys Tutorial

4.2 blocks can be parts 15

• a blocking can look beautiful, but its quality can be very bad. Thatis a problem from the inside.use scan plane after lest mouse clickon premesh to identify where does the problem come from.

4.2 blocks can be parts

Remember the concept of bodies, the purpose of having different bodies? When using a structured mesh, if you want to differentiate betweendifferent block, you can do that by right button click on create part thenclick on blocking material, create part as shown in the margin. This willresult in having different materials in your solver.

4.3 useful links

I tried to gather all the icem cfd related videos on youtube. some of themare mine, some from ansys, but the majority are from a channel calledturboengineer. The creator of the channel is a dedicated cfd engineer,very well known among the cfd-online community. He goes by the nameof FAR in the forum. A special thank for all these link...

• ICEM CFD basics

• The 3D hexa elbow tutorial

• The Hexa airfoil in 2D

• Wing with sharp trailing edge

• Cylinder 2D to 3D

• Injector

• Cylinder

• Cylinder inside cylinder

• Meshing of complex cylinder

• Introduction to quarter o-grid

• Meshing of elliptical cylinder

• Sphere cube tutorial

• Meshing of ahmed body (and simulation)

• Backward step with downstream rectangular inclined plate

• Mirroring block and geometry around symmetry plane

• 2D to 3D via rotation

• Blocking strategy for cruciforms fins

Page 21: ICEM Ansys Tutorial

4.3 useful links 16

• LES ICEM CFD blocking

• Supersonic intake hexa

Page 22: ICEM Ansys Tutorial

5M E R G I N G A N U N S T R U C T U R E D M E S H W I T H AS T R U C T U R E D M E S H

From time to time. we can come across geometries that can be decom-posed in 2 parts: a difficult part impossible to block. Another one whereblocking is pretty much doable. In this case, it is possible to merge astructured mesh with and unstructured one. Another scenario: using astructured mesh obliges us to have a dense region even when we don’treally need it. It is practical to use large elements near the entrance andrefine the more and more we approach our object of interest. The figurebelow explains very well what i mean.

Figure 14: Steps.

Here are the main steps on how to perform this operation:

1. Start by generating your unstructured mesh

2. When your blocking is finished, convert it to unstructured mesh.Icem will ask you if you want to replace your existing mesh ormerge, hit merge. Merging allow two meshes to coexist.

3. under the Edit Tab, click on Merge nodes, then Merge meshes. Thefinal step will be to select a surface. That surface should containboth the unstructured and the structured elements.

17

Page 23: ICEM Ansys Tutorial

merging an unstructured mesh with a structured mesh 18

I usually call that surface "interface". And be careful with this tech-nique, size matters here, your TRI and Quad should be of the same size(Tri 1.3 bigger than Quad) otherwise the mesh quality will be bad. Sincei love to see things in action, let us apply this to our cube inside cube,here are some screen shots:

(a) A sector (b) A sector

(c) A sector (d) full meshing

Figure 15: Before and after.

Page 24: ICEM Ansys Tutorial

6C O N C L U S I O N

That was it for this small documentation. This is the first version of thisbook, yet more has to be added later, i will update this book with newinformations regularly. To be honest, i was too excited to put it on-line.Of course, everybody who wishes to participate in the writing of thisbook is more than welcome. Just send me and e-mail.I need your support to continue with updating this book. I will feel veryhappy if I can get some feedbacks and critics in this website:

http://goo.gl/9BkiO

Thank You

19