Computational Fluid Dynamics (CFD)

0 downloads 0 Views 3MB Size Report
The geometry consists of a cylinder of diameter=1m, and a fluid domain of ... Select the surface inside the inner cylinder and and click Apply. The surface ... Similarly, enable (Toggle selection of points), and disable all other toggle selections,.
Workshop and Finishing School on

Computational Fluid Dynamics (CFD)

Editor

Prof. (Dr.) Syed Fahad Anwar

Organized by

Department of Mechanical Engineering

Aligarh Muslim University Aligarh, Uttar Pradesh, India

EXCEL INDIA PUBLISHERS NEW DELHI

First Impression: 2013 © AMU, Aligarh Workshop and Finishing School on Computational Fluid Dynamics (CFD) ISBN: 978-93-82880-58-5 No part of this publication may be reproduced or transmitted in any form by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the copyright owners. DISCLAIMER The authors are solely responsible for the contents of the papers compiled in this volume. The publishers or editors do not take any responsibility for the same in any manner. Errors, if any, are purely unintentional and readers are requested to communicate such errors to the editors or publishers to avoid discrepancies in future. Published by EXCEL INDIA PUBLISHERS 91 A, Ground Floor Pratik Market, Munirka, New Delhi–110067 Tel: +91-11-2671 1755/ 2755/ 3755/ 5755 ● Fax: +91-11-2671 6755 E-mail: [email protected] Web: www.groupexcelindia.com Typeset by Excel Publishing Services, New Delhi–110067 E-mail: [email protected] Printed by Excel Printing Universe, New Delhi–110067 E-mail: [email protected]

7 Mesh Generation using ICEM CFD 14.0 Noorul Huda1, Mohammad Khalid2, Saif Akram3, Jawed Mustafa4, Nadeem Hasan5 and S.F. Anwer6 1,3Post-Graduate

student, Department of Mechanical Engineering, ZHCET, AMU, Aligarh–202002 student, Department of Chemical Engineering, ZHCET, AMU, Aligarh–202002 4.5,6Assistant Professor, Department of Mechanical Engineering, ZHCET, AMU, Aligarh–202002 2Post-Graduate

UNSTRUCTURED MESH GENERATION OVER A CIRCULAR CYLINDER In this tutorial, a 2D unstructured mesh will be generated over a circular cylinder consisting of one inlet, one outlet and a cylinder wall. First, a course mesh will be created, and then the mesh will be refined and smoothened. PROCEDURE 1. Creating the geometry in ICEM CFD 14.0 2. Mesh generation in ICEM CFD 14.0 3. Exporting the mesh to ANSYS Fluent 14.0 Creating the Geometry in ICEM CFD 14.0

The geometry consists of a cylinder of diameter=1m, and a fluid domain of diameter=40m with an inflow and an outflow boundary. The geometry can be created as follows: 1. Open ICEM CFD 14.0

Fig. 1: ICEM CFD Window

68  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

The ICEM CFD window will look like as shown in Figure 1. On the top there is a toolbar with all the geometry and meshing options. The left portion of the window shows a model tree. 1. In the geometry function tab, click on Geometry button and then select the point) as shown below.

(create

2. Under (explicit Locations), enter the coordinates for creating the points for the cylinder. Enter x=0.5, y=0 and z=0 and click Apply. A point will be created at the center of the window. Similarly enter x=0, y=0.5 and z=0 and Apply to create another point. Similarly enter coordinates (-0.5,0,0), (0,0.5,0) and (0,-0.5,0) to create rest of the points.

3. Now in the geometry function tab click (create/ modify curve). On the left side of the window under create/modify curve, select (Arc). Under Create Arc, retain the method as selection from 3 Points. Click (select location(s)). Select 3 points in the left half of the geometry as shown in Figure 2. Moving in the same way, complete the circle.

Fig. 2: Creating Curves from Points

4. Now scale this geometry to make the outer circular fluid domain. Click (Transform geometry). Under transformation tools on the left side, select (scale geometry). Click (select geometry) and select both the curves along with the points over them and press enter. Under scale option, tick mark before the Copy optionto create a separate scaled copy of the geometry. Enter 40 for x and y scale factors and 1 for z scale factor. Leave other options as default and click Apply.

Mesh Generation using ICEM CFD 14.0  69

A circular domain of diameter equal to 40m will be created around the cylinder as shown in Figure 3.

Fig. 3: Circular Geometry

5. Now we will create a surface for the fluid domain. For that select

(create/modify

surface) from the Function Tab. On the left, under create/ modify surface, select (simple surface) Use the selection method From 2-4 Curves and take the default value of tolerance as 0.01 as shown. Note: Adjacent curve ends must be within this tolerance distance in order for boundaries of the surface to be created.

70  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

6. Click (select curve(s)) and select the curves of the inner circle and press MMB. Enable the display of surfaces from the display tree. A surface will be created inside the inner cylinder. Click Apply. Again click (select curve(s)), and this time select curves of both the inner and the outer circles. Click Apply. Another surface will be created separated from the first one and having a different shade around the inner cylinder in the outer domain as shown in Figure 4.

Fig. 4: Surface Created from Curves

7. Finally, select (Delete Surface), and from the left, click (select surface(s)). Select the surface inside the inner cylinder and and click Apply. The surface inside the inner cylinder will be deleted. It is necessary since we want to generate mesh in the outer fluid domain only.

Fig. 5: Inner Surface Removed from the Geometry

Note: By default, the surface will be displayed in wireframe mode. For better visibility change it to solid display if necessary as shown below.

Note: For selecting the curves of the inner cylinder press F9. It brings us from selection mode to dynamic mode so that we can zoom into the figure and select small parts. After selecting the small curves, return to the selection mode by again pressing F9. Also we can slide the geometry across the screen by pressing the MMB and dragging the mouse without releasing it. 8. Now expand the part display tree by clicking the + before Parts. The geometry is contained in a single part. We will put the geometry in different parts to define different boundary regions. Click right mouse button RMB on the Parts and select Create Part. A create part window will appear as shown below.

Mesh Generation using ICEM CFD 14.0  71

9. Create a new part for the cylinder. Write cylinder in place of PART 1. Select part by selection) and click (select entities) as shown below.

(create

The select tool bar geometry will appear as shown below.

(Toggle selection of points), (Toggle selection of surfaces) and Toggle selection of bodies (material region definition) to avoid the selection of entities other than curves by just clicking them.

10. Disable,

11. Select the two curves of the cylinder and press MMB. A new part will be displayed in the part display tree as shown below.

12. Similarly, select the left curve of the outer circle with the toggle selections remained unchanged and type inflow as part name and press MMB or Apply. Similarly, select the right curve of the outer circle and type outflow as part name and Apply. 13. Now Disable (Toggle selection of points), Toggle selection of curves, and (Toggle selection of bodies) (material region definition) to avoid the selection of entities other than surfaces. Ensure that (Toggle selection of surfaces) is enabled, select the surface around the inner circle and enter Fluid as part name.

72  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Similarly, enable (Toggle selection of points), and disable all other toggle selections, and create a part for all the points. The part display tree would look like this.

Note: If the Fluid domain is not visible in the window, then turn on the surfaces in display tree model. In fact, we can turn off and on any part from the display tree. Finally, save the project. 14. Click file in the Utility menu. Under geometry select save geometry as, select a suitable location and save the geometry. Mesh Generation

1. Now turn off the surface from the display tree window. Select Mesh from the Function Tab and select (Global mesh set up) icon under it as shown.

2. A global mesh set window will appear on the left. Take Global element factor as 1. 3. Take Global element seed size as 5.

Note: Global element scale factor multiplies other mesh parameters to globally scale the model. Under Global element seed size. For example, if the Max Element Size of a given entity is 4 units, and the Global Element Scale Factor is 3.5, then the actual maximum element size used for meshing of that entity will be 4 * 3.5 = 14.0 units. Global Element Seed Size Controls the size of the largest element. The largest element size in the model will not exceed the Max Element size multiplied by the Global Element Scale Factor. Take other parameters as default. Click Apply.

Mesh Generation using ICEM CFD 14.0  73

4.

Select (Part Mesh Setup) from the Function Tab. Part mesh set up window will appear. Enter the parameters as shown. The Part Mesh Setup option opens a dialog where you can specify the mesh parameters for different parts. Enter the parameters as shown below and click Apply.

5. In the Function Tab, under mesh option, click shown in Figure 6.

(Compute Mesh). Mesh will generated as

Fig. 6: Initial Coarse Mesh Generated

6. The mesh generated is course and also it is not smooth. So the next procedure is to smooth the mesh followed by its refinement. 7. Under Edit Mesh select (Smooth Hexahedral Mesh Orthogonal). A Smooth Hexahedral Mesh Orthogonal window will appear on the left. Retain the default selections and click Apply. Note: The unstructured hexahedral smoother relaxes unstructured hexahedral meshes in order to obtain smooth grid lines orthogonal to the boundary as well as smooth grid angles and transitions in the inner volume 8. Now under Edit Mesh select (Smooth Mesh Globally). A smooth mesh globally window will appear on the left. Enter a value 30 for smoothening iterations, for upto value, enter 0.6 and select quality criteria as Aspect ratio. Scroll down and click Apply.

74  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

9. For refining the mesh, select (Adjust Mesh Density) Under Edit Mesh. A adjust mesh density display window will appear on the left. Retain the default values and click Apply.

10. The mesh will be refined globally but it would not be smooth Therefore again select (Smooth Hexahedral Mesh Orthogonal) and retain the default selections and click Apply. You will notice that the grid lines have become smooth but the quality is low. So select (Smooth Mesh Globally) and enter the parameters as taken before and click Apply. 11. Follow the steps VII and VIII one more time to get a refined and smooth mesh as shown in Figure 7.

Fig. 7: Tri Unstructured Mesh Generation

12. At the last, check the quality of the mesh generated. For this, Select (Display Mesh Quality) under Edit Mesh. Click Apply. Quality of the mesh will be displayed in the form of a histogram as shown.

Click File. Under Save Project as, save the file to a suitable location.

Mesh Generation using ICEM CFD 14.0  75

EXPORT THE MESH TO ANSYS FLUENT 14.0 1. In the Functional Tab, Select Output.

2. A select solver window will be displayed. Select Output solver as ANSYS Fluent and Common Structural solver as ANSYS. Click Apply.

3. Click (Boundary Conditions). A separate boundary conditions window will appear. Click on +before every part name to further expand the options.

76  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

4. Now click on create new below Fluid and in the selection sub window, select fluid and click Okay as shown.

5. Similarly select wall for CYLINDER. Select velocity inlet for INFLOW, pressure outlet for OUTFLOW. After all the BC have been given, click Accept at the bottom. 6. Finally, click (Write Input) and save the file. At the last, select grid dimensions as 2D, when ANSYS Fluent sub window appears. Click Done. 7. A file named fluent.msh file will be created that will be exported to ANSYS Fluent.

STRUCTURED MESH GENERATION OVER DOUBLE SQUARE CYLINDERS

Fig. 8: Geometry of the Problem

Mesh Generation using ICEM CFD 14.0  77

PROCEDURE Start ICEM CFD. This will open ICEMCFD like in figure 9.

Fig. 9

Step 1: Creating Geometry of the Problem 1. Create a point usingxyz coordinates. 2. Under explicit location enter (5,0) as (x,y) coordinates. 3. Click Apply.

4. This will create a point as shown below.(Use mouse wheel for zoom purpose, if point is not visible)

78  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

5. Similarly enter other coordinates of geometry as shown in figure.

6. Click on create/modify curve then choose from points to join these points

Select the two points with left button and middle to join. Note: Press the wheel for moving geometry.

Mesh Generation using ICEM CFD 14.0  79

7. Similarly draw other two squares of length 1m and a spacing of 1m between them.

8. Assigning Name to different parts of Geometry a. Right click on Parts

create parts

Name the part as Inflow for bottom part,

b. Select entities using

and select bottom and finalize with middle button.

The inflow (bottom part) will be shown in different color. In this case it is red.

80  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

c. Similarly name the other parts as Outflow for top most part, farfield_left for left boundary, farfield_right for right boundary, Cyl_1 for lower cylinder and finally Cyl_2 for higher cylinder. 9. Create Surfaces a. Left click on Create/ Modify Surfaces. b. Choose simple curve then select whole geometry.

It might be possible that surfaces are not visible, so expand geometry and choose sufaces.

c. Again choose simple curveand now select two cylinders. d. Delete cylindrical sufaces from Geometry. Left click on Delete Surfacesthen select two cylinders one by one.

This will look like.

e. Name the surface using Create part option as FLUID. While naming surface, toggle selection of points, selection of curves and selection of bodies so that only surface would be named.

Mesh Generation using ICEM CFD 14.0  81

Step 2: Blocking the Geometry 1. Create initial Block. a. Initialize the 2D blocking.

I.

Choose FLUID in the Part field.

II. Change the Type to 2D Planar. III. Click Apply. b. Enable Vertices under Blocking.

c. Select Number under vertices. Blocking

right click

Vertices

left click

Numbers

Fig. 10: Numbering the Vertices

The Black block encloses the geometry as shown in Figure 11.

82  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Fig. 11: Initial Blocking of Geometry

2. Split the initial block into sub-blocks.

In this case, you will first do two vertical splits and four horizontal split a. Create vertical split. I.

Ensure that Curves under Geometry is enabled

II. Retain default selection of Screen select from the Split Method drop-down list in Split Block DEZ.

Fig. 12: Split Edge

III. Click

select edge(s)

Select the vertices define by 11 & 19 or 13& 21. IV. To position the new edge, click the left-mouse button, slide the new edge to the desired location and click middle-mouse button the split is shown in Figure. Note: To cancel the previous selection, click the right-mouse button while in selection mode.

Mesh Generation using ICEM CFD 14.0  83

V. Similarly create one more vertical split.

b. Create Horizontal split I.

Click

select edge(s)

II. Select the vertices define by 13 &11 or 21 & 19

III. Similarly create 3 more horizontal split.

84  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

3. Delete unnecessary blocks.

a. Disable Delete permanently. b. Click

Select Block(s)

c. Select the blocks enclosing two cylinders

d. Click apply in the Delete Block Step 3: Associating to Geometry In this step, you will associate edges of the blocking to the curves of the CAD geometry. You should first select edges and then curves to which you want to associate the edges. If two or more curves are selected per operation, those curves will automatically be grouped. 1. Associate the outer edge to Geometry

I.

Select the required edges a. Ensure that Project vertices are disabled (default). b. Click

select edge(s)

c. Select edge 13 & 11 completely d. Click the middle-mouse button to accept the selection

Mesh Generation using ICEM CFD 14.0  85

II. Select the appropriate curves. e. Click f.

(Select compcurve(s)).

Select the curve (farfield_left)

g. Click the middle mouse button to accept the selection h. Click Apply in the Associate Edge The associated edge will turn green Note: Associate edge to curve operation runs in continuation mode, allowing you to select the next set of edges and curves without reinvoking the function. The function will be cancelled, if you click the middle-mouse button or click Dismiss without selecting entities. III. Similarly associate the following edges to cylinder’s curves 

Edge 42-43 to crv 10



Edge 42-48 to crv 11



Edge 43-49 to crv 09



Edge 48-49 to crv 08

IV. Similarly do for another cylinder, and for inflow,Outflow and farfield_right. V. Verify that the correct associations have been set (Figure 13). a. Right click on edges and enabled show association as shown in Figure 13.

86  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Fig. 13: Association of Geometry

Note: After completion, if the associations do not appear correctly, you can associate the edges to the correct curves again. It is not necessary to disassociate and then re-associate. Associating the edge to a new curve will overwrite the previous association. The steps of operation can also be retraced using Undo and Redo button. b. Deselect Show association. I.

Snap project vertices. (Snap project vertices)

Step 4: Moving the Vertices

I.

Set location method to set position

II. Set Refrence from Vertex

III. Choose refrence vertex 48

IV. Set coordinate system as cartesian & enable modify Y

Apply

Mesh Generation using ICEM CFD 14.0  87

V. Choose vertices to set and select vetices 47 & 50

VI. Click apply It will align like this

VII. Similarly align vertical vertices Make sure to disable Modify Y, & enable Modify X for alligning vertical edges

Step 5: Generating the Mesh

In this step, you will generate an initial mesh I.

Determine Number of nodes along differentb edges

II. Select Select edge(s) or Edge parameters Cylinder 2) when prompted.

and select edge 53-52 (one side of

88  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

III. In the Pre-Mesh Params DEZ, enter 0.01 for Spacing 1 and Spacing 2 IV. Number of Nodes 50. Note: Spacing 1 refers to the node spacing at the beginning of the edge,and Spacing 2 refers to the spacing at the end of the edge. The begin-ning of the edge is shown by the white arrow after the edge is selected. V. Enter 1.2 for Ratio 1 and Ratio 2. VI. Click Apply.

VII. Enable copy parameters and select Method To All Parallel Edges

Note: The Mesh law is by default set to BiGeometric. This allows the nodes to be biased towards both ends of the edge. The expansion rate from the end is a linear progression. Several other mathematical progression functions (laws) are available. VIII. Similarly, re-select or default mesh law click Apply.

, select edge53-61, change Nodes to50, and choose

Similarly determine Nodes on all edges of both squares and alsoon edge between two squares. IX. Enable Pre-Mesh and recompute to view the new mesh

Mesh Generation using ICEM CFD 14.0  89

Fig. 14: Edges Parameter

Note: Figure 14 shows a structured grid. When the number of nodes is changed on one edge, all parallel opposing edges will automatically have the same number of nodes. In this case, edges 5352 and 45-37 will have the same number of Nodes as edges 46-38 and 61-60 respectively. X. Disable Pre-Mesh and Curves to view the bunching on the edges. XI. Re-select or Geometric 2.

, select edge 45-53, change Nodes to 25, choose Mesh law

XII. Enter 0.01 for spacing 2 and 1.2 for Ratio 2. XIII.Click apply. Requested values for spacing and ratio are entered in the first column. Actual values are displayed in the second column. The requested ratios cannot beattained due to the number of Nodes, Mesh law,.Increase or decrease the number of Nodesas the case may be using the arrow until the ratios are close to the entered value, 1.2 for Ratio 2 & 0.01 for spacing 2. Note: Geometric 1 refers to the node spacing at the end of the edge,and Geometric 2 refers to the spacing at the beginning of the edge. The beginning of the edge is shown by the black arrow after the edge is selected.

XIV. Repeat step viii, ix & x for edge 61-46 except for mesh type. This time select Geometric 1and enter same Values for spacing 1 & Ratio 1as that of spacing 2& Ratio 2 in previous case.

90  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

XV. Similarly for edge 49-50 select mesh law: geometric 2, spacing 2: 0.01 and Ratio 2: 1.07 and set the number of nodes to be 50 (according to spacing & Ratio).

XVI. Similarly for edge 53-54select mesh law: geometric 1, spacing 1: 0.01 and Ratio 1: 1.07 and set the number of nodes to be 66 (according to spacing & Ratio).

XVII. Enable Pre-Mesh and re-compute to view the refined mesh shown in Figure 15.

Mesh Generation using ICEM CFD 14.0  91

Fig. 15: Refined Mesh

Step 6: Verifying and Saving the Mesh

1. Save the mesh in unstructured format. Pre-Mesh > Convert to Unstruct Mesh 2. Give an output to mesh.

I.

choose Output solver as: Ansys Fluent.

II. Common Structural solver as Ansy. III. Click Apply.

3. write & save the file.

I.

save the file and open the given mesh file, you can also change file name here.

92  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

II. Set Grid dimensions to 2D III. Scaling: No IV. Choose 2_cylinders as name for output file. Default name is fluent Step 7: Conclusion

2-cylinders.msh file will be generated in working folder.

STRUCTURED MESH GENERATIONOVER AN AIRFOIL Step 1: Open ICEM CFD

START →ALL PROGRAMS →ANSYS14.0 →MESHING →ICEM CFD

Step 2: Import Airfoil Data

FILE →IMPORT GEOMETRY→FORMATTED POINT DATA →select airfoil data ile from the directory →APPLY

Mesh Generation using ICEM CFD 14.0  93

Step 3: Make Curves from the Points

GEOMETRY →CREATE/MODIFY CURVE →FROM POINTS →select upper half points of the airfoil → APPLY Repeat the steps for the lower half points Step 4: Make Surface from the Curves

CREATE/MODIFY SURFACE →SIMPLE SURFACE →select both the surfaces →APPLY Step 5: Create Far Field

CREATE POINT →EXPLICIT COORDINATES →create points for the coordinates given below:(0,5,0), (0,-5,0), (-5,0,0), (5,5,0), (5,-5,0)

94  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Step 6: Create Curve from the Points and then Surface as Described for the Airfoil

Step 7: Blocking of Far Field

BLOCKING →CREATE BLOCK →set type as “2D linear” →APPLY ASSOCIATE →ASSOCIATE EDGE TO CURVE →select edges and curves one by one and associate by clicking middle mouse button →APPLY

Mesh Generation using ICEM CFD 14.0  95

SPLIT →O GRID BLOCK →select middle block →L M B →select right side of the block →L M B → APPLY SPLIT →SPLIT BLOCK → select the edge to split →APPLY SNAP VERTICES →APPLY

Delete the middle block that contain the aerofoil DELETE BLOCK →select the middle block →APPLY Move vertices to obtain the fig. below

96  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Step 8: Associate the Middle Block to the Aerofoil

ASSOCIATE →ASSOCIATEB EDGE TO VERTEX →select edges and curves →APPLY PRE-MESH PARAMS →SPLIT EDGE →select update all →APPLY

EDIT EDGE →select automatic linear →APPLY Step 9: Merge the Side Block

MERGE VERTICES →COLLAPSE BLOCK →select the edge and block →APPLY

Mesh Generation using ICEM CFD 14.0  97

Step 10: Generating the Mesh

PRE MESH PARAMETER →APPLY EDGE PARAMETER →select edges one by one →change nodes to 25 →COPY →ALL PARALLEL EDGES →PPLY MESH →PART MESH SETUP →change the values to 0.1, 0.05, 0.05 →APPLY →DISMISS In the model tree at the left side of the screen select pre mesh in the blocking section Select YES Pre-mesh is ready

98  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Right Click PRE-MESH in the model tree →CONVERT TO UNSTRUCT MESH CONGRATULATIONS!!! Your final mesh is ready. It should look like



To import this mesh into any solver it has to be converted in to a corresponding readable format.

Mesh Generation using ICEM CFD 14.0  99

Step 11: Let us Import it into Fluent

OUTPUT → SELECT SOLVER → OUTPUT SOLVER → FLUENT V6 → COMMON STRUCTURAL SOLVER →ANSYS →APPLY WRITE INPUT →YES →OPEN →2D →DONE

The output Fluent.msh can now be imported in ANSYS Fluent Solver directly from the directory.

UNSTRUCTURED MESH GENERATION OVER AN AIRFOIL The procedure for creating geometry consists of two steps. I.

Creating the geometry

II. Mesh will be generated in the domain around the airfoil. CREATING THE GEOMETRY

Fig. 16: Geometry

100  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

The details of the geometry are given in the above Figure 16 The geometry can be created as follows: I.

Open ICEM CFD 14.0

Fig. 17: ICEM CFD Window

The ICEM CFD window will look like as shown in Figure 17. On the top there is a toolbar with all the geometry and meshing options. The left portion of the window shows a model tree. II. First, we will import the airfoil coordinates. For that follow the steps: FILE → IMPORT GEOMETRY→ FORMATTED POINT DATA →select airfoil data ile from the directory → APPLY

Mesh Generation using ICEM CFD 14.0  101

III. Create the curves with the points as follows. GEOMETRY → CREATE/MODIFY CURVE → FROM POINTS → select upper half points of the airfoil →APPLY Repeat the steps for the lower half points IV. Make surface from the curves CREATE/MODIFY SURFACE →SIMPLE SURFACE →select both the surfaces →APPLYRepeat the steps for the lower half points V. In the geometry function tab, click on Geometry button and then select the create point icon as shown below

VI. Under explicit Locations, enter the coordinates (0,5,0), (0,-5,0), (-5,0,0), (5,5,0), (5,-5,0) and click Apply. The imported airfoil coordinates and the points of the domain have been shown in the Figure. 18

Fig. 18: Points Created

VII. Now join the coordinates for creating the curves for the outer domain. In the geometry function tab click (create/ modify curve). On the left side of the window under create/modify curve, select (from points). Select two points at a time and press MMB, then select another pair of points and press MMB. Moving in the similar fashion, make the outer fluid domain as shown in Figure 19.

Fig. 19: Outer Domain around the Airfoil

102  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

VIII. Now we will create the surface from the curves. For that select (create/modify surface) from the Function Tab. On the left, under create/ modify surface, select (simple surface) Use the selection method From 2-4 Curves and take the default value of tolerance as shown below.

IX. Click (select curve(s)) and select the curves of the airfoil and press MMB. Enable the display of surfaces from the display tree. A surface will be created inside the inner airfoil. Click Apply. Again click (select curve(s)), and this time select the outer fluid domain and airfoil both. Click Apply. Another surface will be created separated from the first one and having a different shade around the inner cylinder in the outer domain as shown in Figure 20.

Fig. 20: Surface Generation around the Airfoil

Note: By default, the surface will be displayed in wireframe mode. For better visibility change it to solid display if necessary as shown below.

X. Finally,

select (Delete Surface), and from the left, click

(select surface(s)).

Select the surface inside the inner cylinder and and click Apply. The surface inside the inner cylinder will be deleted. It is necessary since we want to generate mesh in the outer fluid domain only Figure 21.

Mesh Generation using ICEM CFD 14.0  103

Fig. 21: Surface Removed Inside Airfoil

Note: For selecting the curves of the airfoil press F9. It brings us from selection mode to dynamic mode so that we can zoom into the figure and select small parts. After selecting the small curves, return to the selection mode by again pressing F9. Also we can slide the geometry across the screen by pressing the MMB and dragging the mouse without releasing it. XI. Now expand the part display tree by clicking the + before Parts. The geometry is contained in a single part. We will put the geometry in different parts to define different boundary regions. Click right mouse button RMB on the Parts and select Create Part. A create part window will appear as shown below. Now we will make different parts namely far field, airfoil, fluid out of this single geometry.

XII. Create a new part for the airfoil. For this, write airfoil for the airfoil boundary in place of PART.1. Select (create part by selection) and click (select entities) as shown above.

The select tool bar geometry will appear as shown below. XIII. Disable, (Toggle selection of points), (Toggle selection of surfaces) and Toggle selection of bodies (material region definition) to avoid the selection of entities other than curves by just clicking them. Select the curves of the airfoil and press MMB. A new part will be cerated and it will be displayed in the display tree. Similarly a part for far field and fluid domain and points. For creating part for fluid domain, enable only (Toggle selection of surfaces) and disable all toggle selections. For creating a part for points, enable only all other toggle selections.

(Toggle selection of points) and disable

After all parts have been created, the model tree display will look like this.

104  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Note: If the Fluid domain is not visible in the window, then turn on the surfaces in display tree model. In fact, we can turn off and on any part from the display tree. Finally, save the project. XIV. Click file in the Utility menu. Under geometry select save geometry as, select a suitable location and save the geometry. MESH GENERATION AROUND THE AIRFOIL I.

Now turn off the surface from the display tree window.

II. Select (Mesh) from the Function Tab and select shown.

(Global mesh set up) icon under it as

III. A global mesh set window will appear on the left. Take Global element factor as 1. Take Global element seed size as 5. Take other parameters as default. Click Apply.

Note: Global element scale factor multiplies other mesh parameters to globally scale the model. Under Global element seed size. For example, if the Max Element Size of a given entity is 4 units, and the Global Element Scale Factor is 3.5, then the actual maximum element size used for meshing of that entity will be 4 * 3.5 = 14.0 units. Global element seed size controls the size of the largest element. The largest element size in the model will not exceed the Max Element size multiplied by the Global Element Scale Factor.

Mesh Generation using ICEM CFD 14.0  105

IV. Select (Part Mesh Setup) from the Function Tab. Part mesh set up window will appear. Enter the parameters as shown. The Part Mesh Setup option opens a dialog where you can specify the mesh parameters for different parts. Enter the parameters as shown below and click Apply. V. In the Function Tab, under mesh option, click (Compute Mesh). An Unstructured triangular mesh will be generated over the airfoil in the fluid domain. VI. The mesh generated is course and also it is not smooth. So the next procedure is to smooth the mesh followed by its refinement. VII. Under Edit Mesh select (Smooth Hexahedral Mesh Orthogonal). A Smooth Hexahedral Mesh Orthogonal window will appear on the left. Retain the default selections and click Apply. Note: The unstructured hexahedral smoother relaxes unstructured hexahedral meshes in order to obtain smooth grid lines orthogonal to the boundary as well as smooth grid angles and transitions in the inner volume. VIII. Now under Edit Mesh select (Smooth Mesh Globally). A smooth mesh globally window will appear on the left. Enter a value 30 for smoothening iterations, for up to value, enter 0.6 and select quality criteria as Aspect ratio. Scroll down and click Apply. IX. For refining the mesh, select (Adjust Mesh Density) Under Edit Mesh. A adjust mesh density display window will appear on the left. Retain the default values and click Apply.

X. The mesh will be refined globally but it would not be smooth Therefore again select (Smooth Hexahedral Mesh Orthogonal) and retain the default selections and click Apply. You will notice that the grid lines have become smooth but the quality is low. So select (Smooth Mesh Globally) and enter the parameters as taken before and click Apply.

106  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

XI. Follow the steps VII and VIII one more time to get a refined and smooth mesh Figure 22.

Fig. 22: Mesh Generated Around the Airfoil

XII. Finally, check the quality of the mesh generated. For this, Select (Display Mesh Quality) under Edit Mesh. Click Apply. Quality of the mesh will be displayed in the form of a histogram. XIII. Click File. Under Save Project as, save the file to a suitable location. EXPORT THE MESH TO ANSYS FLUENT 14.0 1. In the Functional Tab, Select Output

2. A select solver window will be displayed. Select Output solver as ANSYS Fluent and Common Structural solver as ANSYS. Click Apply.

3. Finally, click (Write Input) and save the file. At the last, select grid dimensions as 2D, when ANSYS Fluent sub window appears. Click Done. 4. A file named fluent.msh file will be created that will be exported to ANSYS Fluent.

Mesh Generation using ICEM CFD 14.0  107

THREE DIMENSIONAL MESHING INSIDE A CHANNEL MESH GENERATION Start ICEM CFD. This will open ICEMCFD like in Figure 23.

Fig. 23

CREATING GEOMETRY OF THE PROBLEM Create points using xyz coordinates.

Click on transform geometry then choose from translate to create copy in z direction.

Select the four points with left button and middle to join. Roll the mouse wheel (middle button) for zoom purpose. Press the wheel for moving geometry.

108  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

Click on create/modify curve then choose from points to join these points.

Select the four points with left button and middle to join. Roll the mouse wheel (middle button) for zoom purpose. Press the wheel for moving geometry.

Similarly draw other side of the channel.

Mesh Generation using ICEM CFD 14.0  109

CREATE SURFACES Left click on Create/ Modify Surfaces, choose simple curve then select all faces of the geometry one by one.

Create parts

Click on parts then select the face inlet, outlet, side1, side2, top and bottom.

110  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

BLOCKING THE GEOMETRY Initialize the 3D blocking.

Choose FLUID in the Part field Change the Type to 3D bounding Box. Cli ck Apply Enable Vertices under Blocking.

ASSOCIATING TO GEOMETRY In this step, you will associate edges of the blocking to the curves of the CAD geometry. You should first select edges and then curves to which you want to associate the edges. If two or more curves are selected per operation, those curves will automatically be grouped. Associate the outer edge to farfield.

Mesh Generation using ICEM CFD 14.0  111

Select the required edges Ensure that Project vertices are disabled (default). Click

select edge(s)

Select all edge completely Click the middle-mouse button to accept the selection

Select the appropriate curves. Click

(Select compcurve(s)).

Select the curve ( farfield_left) Click the middle mouse button to accept the selection Click Apply in the Associate Edge The associated edge will turn green Note: Associate edge to curve operation runs in continuation mode, allowing you to select the next set of edges and curves without reinvoking the function. The function will be cancelled, if you click the middle-mouse button or click Dismiss, without selecting entities. GENERATING THE MESH In this step, you will generate an initial mesh. Determine Number of nodes along differentb edges

Select edge(s) or Edge parameters and select edge (one side of the channel) when prompted. In the Pre-Mesh Params, enter uniform grid for x and z direction (select no of points) and Click Apply. For variable grid Select edge(s) side of the channel) when prompted.

or Edge parameters

and select edge (one

In the Pre-Mesh Params DEZ, enter 0.001 for Spacing 1 and Spacing 2 Note: Spacing 1 refers to the node spacing at the beginning of the edge,and Spacing 2 refers to the spacing at the end of the edge. The begin-ning of the edge is shown by the white arrow after the edge is selected. Enter 1.2 for Ratio 1 and Ratio 2. and Click Apply.

112  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

VERIFYING AND SAVING THE MESH Save the mesh in unstructured format. Pre-Mesh > Convert to Unstruct Mesh

Choose Output solver as: Ansys Fluent Common Structural solver as Ansy Click Apply

write & save the file.

save the file and open the given mesh file, you can also change file name here.

Mesh Generation using ICEM CFD 14.0  113

Set Grid dimensions to 3D Scaling: No Choose Channel as name for output file. Default name is fluent and channel.msh file will be generated in working folder.

UNSTRUCTURED MESH GENERATION OVER A WING In this tutorial, a 3D unstructured mesh will be generated over wing. A profiled wing section NACA 0012 have been used in to create the geometry. This provides a short step by step procedure to generate unstructured grid over a wing. The aim of this tutorial is to introduce you to the basic features of ICEM CFD 14.0 package. PROCEDURE 1. Create the geometry 2. Generate Mesh CREATE THE GEOMETRY I.

Obtain the data for a profiled airfoil section NACA0012.

II. Go to File, Import Geometry and select Formatted point data, browse for data file in the working folder, select the data and click Apply.

114  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

III. Curve along with the points will be generated as shown in Figure 24.

Fig. 24: Data Input to ICEM CFD

IV. Select Local Coordinate systems from the utility menu. Under Defined by, select 1 Point as shown.

V. Now select the point at the trailing edge of the airfoil and Apply or MMB. A local coordinate system will be generated with origin at the trailing edge as shown in Figure 25.

Fig. 25: Coordinate System Formed at the Trailing Edge

Mesh Generation using ICEM CFD 14.0  115

VI. Select (Create/Modify Surface) from the Function Tab. On the left, under create/ modify surface, select (simple surface) Use the selection method From 2-4 Curves and take the default value of tolerance as 0.01 as shown.

Note: Adjacent curve ends must be within this tolerance distance in order for boundaries of the surface to be created. VII. Select the two curves of the airfoil and Apply. A surface will be created as shown in Figure 26.

Fig. 26: Surface Created Inside the Airfoil

VIII. In the geometry function tab, click on Geometry button and then select the (create point) as shown below IX. Under create

(explicit Locations), enter the coordinates (6,2,0), (6,-2,0), (-4,2,0), (6,-2,0) to points at these locations.

116  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

X. Now in the geometry function tab click (create/ modify curve). On the left side of the window under create/modify curve, select (From points). Select two adjacent points and press MMB or Apply. A line will be created joining those two points. Similarly, join other points as shown in Figure 27.

Fig. 27: Curves created from points

XI. Again go to (create/modify surface) from the Function Tab. On the left, under create/ modify surface, select (simple surface) Use the selection method From 2-4 Curves and take the default value of tolerance. Select all the outer four curves and the inner two curves of the airfoil and Apply. A surface would be created in the whole domain. XII. Finally, select (Delete Surface). Select the surface inside the inner airfoil and click Apply. The surface inside the airfoil will be deleted. It is necessary since we want to generate mesh in the outer fluid domain only as shown in Figure 28.

Note: Change from wireframe mode to solid display as shown.

Fig. 28: Surface Removed from Inside the Airfoil

Mesh Generation using ICEM CFD 14.0  117

XIII. Enable surfaces, curves and points from the display model tree. Go to (Transform geometry) and select (Translate Geometry). Mark a tick before Copy to translate a separate copy of the whole geometry. Enter a value of -4 for Z offset. Select the whole geometry and Apply. The whole geometry will be translated in opposite to Z direction as shown in Figure 29.

Fig. 29: Geometry Translated

XIV.

Now in the geometry function tab click (create/ modify curve). On the left side of the window under create/modify curve, select (From points). Connect the surfaces with the lines as shown in Figure 30.

Fig. 30: Surfaces Connected

XV.

Create a surface for the wing. Go to (create/modify surface) from the Function Tab and select (simple surface). Disable the surfaces. Figure 31 to create the bottom surface of the airfoil.

Select the four curves as shown in

Fig. 31: Curves Selected to Create a Surface for the Wing

118  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

XVI. Similarly, create a bottom surface for the wing. Now enable surfaces from the model display tree and the surfaces can be seen as in Figure 32.

Fig. 32: Wing Surface Created

Similarly, create all other faces of the domain as shown in Figure 33.

Fig. 33: Outer Domain with Surface Boundaries

XVII. Click right mouse button RMB on the Parts and select Create Part. A create part window will appear as shown below.

Mesh Generation using ICEM CFD 14.0  119

XVIII. Create a new part for the cylinder. Write Inflow in place of PART.1. part by selection) and click

Select (create

(select entities) as shown below.

The select tool bar geometry will appear as shown below.

(Toggle selection of points), (Toggle selection of curves) and Toggle selection of bodies (material region definition) and (Toggle selection of points) to avoid the selection of entities other than surfaces by just clicking them.

XIX. Disable,

XX. Enable only (Toggle selection of Surfaces) and select the surface shown in Figure 34 and Apply. A part named INFLOW will now appear in the display model tree. Similarly create other parts as shown in Figure 34.

Fig. 34: Geometry with Different Parts

120  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

XXI. Now select 2 points.

(Create Body). On the left subwindow enter Fluid Part. Select Centroid of

Note: Change the surface mode from solid display to wireframe mode to view the points and the created fluid body clearly. I.

Select the two points and Apply shown in Figure 35.

Fig. 35: Fluid Domain Created

Note: A material body is used to define the region of the fluid domain. Click file in the Utility menu. Under geometry select save geometry as, select a suitable working geometry and save the geometry. Mesh Generation

I.

Now turn off the surface from the display tree window.

II. Select Mesh from the Function Tab and select shown.

(Global mesh set up) icon under it as

Mesh Generation using ICEM CFD 14.0  121

3. A global mesh set window will appear on the left. Take Global element factor as 1. 4. Take Global element seed size as 1.

5. Click (Volume Meshing Parameters). and Apply.

6. The Function Tab, under mesh option, click shown in Figure 36.

Select Robust (Octree) as Mesh method

(Compute Mesh). Mesh will generated as

Fig. 36: Generated Mesh in the Fluid Domain

122  Workshop and Finishing School on Computational Fluid Dynamics (CFD)

III. Select (Part Mesh Setup) from the Function Tab. Part mesh set up window will appear. The Part Mesh Setup option opens a dialog where you can specify the mesh parameters for different parts. Enter the parameters as shown below and click Apply.

IV. Click

RMB on the Mesh in display control tree and see the cut plane in Figure 37.

Fig. 37

V. From Figure 38 it can be seen that the growth ratio is not gradual. Therefore we will replace this Robust (Octree) mesh with Delaunay mesh as it fills the volume more efficiently and has smoother volume transition.

Fig. 38: Octree Mesh Generated in Around the Airfoil

Mesh Generation using ICEM CFD 14.0  123

1. For this, first we will delete the volume mesh and retain the surface mesh. Then we will smooth the surface mesh and use this surface mesh for generating Delaunay mesh. 2. Disable Fluid from the model display tree. Go to edit mesh in the Function Tab and select (Delete Elements). A tool bar will appear. Select (all appropriate Blanked Objects) and Apply.

3. The volume elements will be deleted. 4. Now under Edit Mesh, select (Smooth Mesh Globally). A smooth mesh globally window will appear on the left. Enter a value 30 for smoothening iterations, for upto value, enter 0.6 and select quality criteria as Aspect ratio. Scroll down and Apply.

5. Select

Mesh from the Function Tab and click select

(Global mesh set up).

6. Under (Volume Meshing Parameters), change the mesh method to Quick (Delaunay) and Apply. 7. Under mesh option, click

(Compute Mesh). Mesh will generated as shown in Figure 39.

8. Again go to the Manage cut plane as before see the generated mesh once again in Figure 39.

Fig. 39: Delaunay Mesh Generated Around the Wing

Finally, save and export the mesh as given in previous tutorial.