0% found this document useful (0 votes)
49 views20 pages

Computational Fluid Dynamics Assignment 2

Uploaded by

AYUSH RAI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views20 pages

Computational Fluid Dynamics Assignment 2

Uploaded by

AYUSH RAI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

INSTITUTE OF SPACE AND TECHNOLOGY

Computation Fluid Dynamics


Assignment # 02

Submitted by:
Sarah Saleem
210101048
Aero 20-A

Submitted to:
Dr. Umer Sohail

31/03/2024
Department of Aeronautics and Astronautics
Institute of Space Technology, Islamabad

1
Copyright © 2024
This document is jointly copyrighted by the authors and the Institute of Space
Technology (IST). The author and IST can use, publish or reproduce this
document in any form. Under the copyright law no part of this document can be
reproduced by anyone, except copyright holders, without the permission of the
authors.

2
Table of Contents
2D Pipe Junction ..................................................................................................................................... 5
Introduction ............................................................................................................................................. 5
1. Create a Project ........................................................................................................................... 5
2. Initialize Blocking ....................................................................................................................... 6
3. Split to Create Topology ............................................................................................................. 6
4. Deleteeing Blocks ....................................................................................................................... 7
5. Vertex to Point Association ........................................................................................................ 8
6. Associate Edges to Curves .......................................................................................................... 9
7. Displaying Associations............................................................................................................ 10
8. Grouping Curves ....................................................................................................................... 10
9. Finishing Edge to Curve Associations ...................................................................................... 11
10. Move Vertices onto Geometry .............................................................................................. 12
11. Mesh Sizes ............................................................................................................................ 12
12. Update Sizes.......................................................................................................................... 13
13. Compute Pre-Mesh ............................................................................................................... 14
14. Edge Parameters.................................................................................................................... 14
15. Matching Edges .................................................................................................................... 15
16. Convert to Unstructured Mesh .............................................................................................. 16
17. Select Solver ......................................................................................................................... 17
18. Boundary Conditions ............................................................................................................ 18
19. Write Input File ..................................................................................................................... 19

3
Table of Figures
Figure 1. Geometry of 2D pipe junction ................................................................................................. 5
Figure 2. Blocking of 2D pipe junction .................................................................................................. 6
Figure 3. Splitting 2D pipe junction to create topology .......................................................................... 7
Figure 4. Boxes to delete in geometry .................................................................................................... 7
Figure 5. Geometry after deletion of boxes ............................................................................................ 8
Figure 6. Vertex to point association guidelines ..................................................................................... 8
Figure 7. Vertex to Point Association ..................................................................................................... 9
Figure 8. Associating curves to edges ..................................................................................................... 9
Figure 9. Displaying Associations in geometry .................................................................................... 10
Figure 10. Guidelines for grouping curves ........................................................................................... 10
Figure 11. Grouped curves .................................................................................................................... 11
Figure 12. Finishing Edge to Curve Associations................................................................................. 11
Figure 13. Move Vertices onto Geometry ............................................................................................ 12
Figure 14. Mesh Sizes ........................................................................................................................... 13
Figure 15. Update Sizes ........................................................................................................................ 13
Figure 16. Compute Pre-Mesh .............................................................................................................. 14
Figure 17. Edge Parameters .................................................................................................................. 15
Figure 18. Solid and wire geometry ...................................................................................................... 15
Figure 19. Matching Edges of geometry ............................................................................................... 16
Figure 20. Unstructured Mesh on geometry ......................................................................................... 16
Figure 21. Solver setup ......................................................................................................................... 17
Figure 22. Select Solver ........................................................................................................................ 18
Figure 23. Selecting Boundary Conditions. .......................................................................................... 19
Figure 24. Saving Project ...................................................................................................................... 20
Figure 25. Ansys Fluent options ........................................................................................................... 20

4
2D Pipe Junction
Introduction
In this project we will learn meshing on ANSYS-ICEM. We have 2D Pipe Junction geometry and we
will study the basic process and tools used for hexa-blocking. In this assignment we will analyze a step-
by-step tutorial which demonstrates

• Top-down process and structuring concepts for desired grid line flow.
• Edge associations.
• Curve grouping.
• Match edges.
• Convert to an Unstructured mesh.

1. Create a Project

In first step we will import the geometry of 2D Pipe Junction in ANSYS-ICEM, and parts names will
be assigned by using the option of Create Part.

New part name can be assigned in following steps:

• Click on parts
• Assign part name.
• Select 1st figure under create part option.
• Enter the name of the part
• Right-click on Parts in the tree and select “Good” colours when done.
• Only necessary to set up parts for the boundary conditions here.

Figure 1. Geometry of 2D pipe junction

5
2. Initialize Blocking

Blocking is a technique used to create structured or mapped grids in regions of the mesh. Structured
grids are composed of quadrilateral elements, which offer several advantages over unstructured grids,
such as better numerical accuracy, efficiency, and ease of boundary condition specification.

To initialize blocking following steps are needed to be followed:

• Select Blocking > Create Block > Initialize Blocks.


• Select type FLUID for the Part
• Change Type to 2D Planar.
• Click on Apply.

This will create a block in the FLUID part which encloses the entire geometry. Curves will
automatically change colour (coloured separately instead of by part) to allow us to see the ends of
curves.

Figure 2. Blocking of 2D pipe junction

3. Split to Create Topology

Split to Create Topology tool is used to divide the geometry into smaller, more manageable parts to
facilitate meshing, particularly in regions where the geometry is complex or where specific meshing
requirements exist. This tool allows us to create additional edges, faces, or vertices on the geometry
without altering its overall shape.

Splitting can be created as:

• Select Blocking > Split Block > Split Block.


• Select the Select edges(s) button and left click on the edge to split.
• The new edge will be normal to the edge that you select. Hold left mouse button and drag the
split to desired location. Middle mouse to complete or press Apply.

6
In this way two vertical and one horizontal splits are created.

Figure 3. Splitting 2D pipe junction to create topology

4. Deleteeing Blocks

Deleting Blocks command is used in ANSYS-ICEM to remove or delete structured blocks that have
been created during the blocking process.

Extra blocks can be deleted in a following way:

• Select the lower corner blocks on left and right side.

Figure 4. Boxes to delete in geometry

7
• Click Apply to delete boxes.

Figure 5. Geometry after deletion of boxes

5. Vertex to Point Association

Vertex to Point Association is used to connect mesh vertices to specific points on the geometry. This
association is crucial for ensuring that the mesh accurately conforms to the geometry and that boundary
conditions are correctly applied.

Vertex to point association can be applied as:

• Turn on Points in the model tree.


• Select Blocking > Associate > Associate Vertex.
• Entity type is already Point: Can proceed directly with selecting from screen (press Select
vert(s) to enter selection).
• Select one vertex as shown in the lower left picture, then select point (left mouse), and it will
jump there.

Figure 6. Vertex to point association guidelines


• Note change in colour of vertices (White/black (boundary) to red (fixed – constrained to point)).
• Proceed as shown in the pictures left to right. Press middle click button when done.

8
Figure 7. Vertex to Point Association

6. Associate Edges to Curves

Associate Edges to Curves is used to establish a relationship between the edges of a geometry and the
curves defined within that geometry.

Edges can be associated to curves in a following way:

• Select Blocking > Associate > Associate Edge to Curve.


• Select edges then press middle mouse button.
• Select the curves and then press middle mouse button.
• Curves will automatically be grouped into one (Note single colour of grouped curve).
• Note colour of edges (White/black (boundary) to green (constrained to curve)).

Figure 8. Associating curves to edges

9
7. Displaying Associations

Displaying Association is used to display associations for understanding the relationship between the
geometry and the mesh.

Here’s how it can be displayed:

• Right click on Blocking > Edges > Show Association in the model tree.
• Use to visually verify proper association.
• First tool in diagnosing projection problems.

Figure 9. Displaying Associations in geometry

8. Grouping Curves

Grouping Curves is used to organize and manage curves in the geometry. This is particularly useful
when dealing with complex geometries or when specific meshing requirements need to be met.

Curves are grouped in following way:

• Select Blocking > Associate > Group/Ungroup curves.


• Select curves and middle mouse or apply.

Figure 10. Guidelines for grouping curves

10
• Colour of first selected curve is taken. This doesn’t concatenate the curves. It is only a grouping
which is saved to the block file. Once the block file is closed, this grouping is gone.

Figure 11. Grouped curves

9. Finishing Edge to Curve Associations

Finishing Edge to Curve Associations in meshing is a process used to establish a relationship between
mesh edges and geometric curves. This association is crucial for accurately transferring the geometry
information to the mesh and ensuring that the mesh conforms to the intended geometry.

This process is optional in our project

Figure 12. Finishing Edge to Curve Associations

11
10. Move Vertices onto Geometry

Move Vertices onto Geometry is used for several purposes, primarily aimed at improving mesh quality,
ensuring accurate boundary representation, and facilitating better mesh generation.

Vertices are moved into the geometry in following way:

• Select Blocking > Move Vertex > Move Vertex.


• Press the Select vert(s) button. Left click, hold, and drag the 2 vertices to the desired location.
Middle click when finished moving all vertices.
• Move vertices so blue (internal) edges are as normal to inner curve as much as possible.

Figure 13. Move Vertices onto Geometry

11. Mesh Sizes

In ICEM-ANSYS meshing, specifying mesh sizes is crucial for controlling the resolution of the mesh.
Mesh sizes determine the spacing of mesh nodes or elements, which directly affects the accuracy,
computational cost, and convergence of the simulation.

Mesh sizes are created as written below:

• Select Mesh > Curve Mesh Setup.


• Press Select curve(s) button to enter curve selection.
• Type “a” (with cursor over main viewer) to select all curves. Set Maximum Size = 3, Height =
1, and Height ratio = 1.5.
• Click on Apply.
Maximum Size = max size of any edge of the element on that curve.
Height is the first layer height (dimension normal to curve).
Height Ratio = multiplication factor to determine height of subsequent layers (in direction normal
to curve).

12
Figure 14. Mesh Sizes

12. Update Sizes

The "Update Sizes" tool is used to adjust the size specifications of mesh elements in a specific region
or throughout the entire mesh. This tool is crucial for refining or coarsening the mesh according to
simulation requirements and accuracy considerations.

Mesh sizes are updated in the following steps:

• Select Blocking > Pre-Mesh Params > Update Sizes.


• Keep the default of Update All (This will update distributions and node counts).
• Right click on Edges > Bunching in model tree to show node locations on all edges. Click on
Apply.

Figure 15. Update Sizes

13
13. Compute Pre-Mesh

In ICEM-ANSYS meshing, the "Compute Pre-Mesh" is used as an initial step in the mesh generation
process. It essentially prepares the geometry for meshing by creating a preliminary mesh that conforms
to the geometry's surfaces.

Pre-Mesh is computed in following way:

• Select Pre-Mesh in the model tree to turn on the Pre-mesh.


• Select Yes to “recompute” mesh.
• Right clicking on Pre-mesh will show 4 projection methods. The selected projection method
will also do all methods listed above it (except no projection) i.e., Project faces will project
faces, edges, and vertices.

Figure 16. Compute Pre-Mesh

14. Edge Parameters

In ICEM-ANSYS meshing, "Edge Parameters" are used to define specific characteristics and attributes
of edges in the geometry. These parameters play a crucial role in controlling the mesh generation
process and ensuring that the resulting mesh meets certain criteria or requirements.

Edge parameters can be created in a following way:

• Select Blocking > Pre-Mesh Params > Edge Params.


• Press the Select edge(s) button and select the edge at the far –X side.
• Set Spacing 1 = 0.2, Spacing 2 = 0.2. The arrow indicates which side has spacing/ratio 1 and
which side has spacing/ratio 2.
• Turn on Copy Parameters, with method set To All Parallel Edges.
• Use the arrows to increase the nodes until the “actual” column (right) of ratio 1 and ratio 2 meet
the requested (left) value of 1.5 (17 nodes) (The arrows will Apply the function each time, so
no need to press Apply).

14
Figure 17. Edge Parameters
• Press the Select edge(s) button and select the edge. Set Spacing 1 = 0.2, Spacing 2 = 0.2 – With
Copy Parameters ON, use the arrows to increase the nodes until the “actual” (right) column of
ratio 1 and ratio 2 meet the requested (left) value of 1.5 (12 nodes).
• Turn Pre-mesh off then on again to recompute.
• Right mouse clicks on Pre-Mesh > Solid & Wire.

Figure 18. Solid and wire geometry

15. Matching Edges

In ICEM-ANSYS meshing, the "Matching Edges" is used to ensure continuity and smooth transition
between different mesh regions or blocks, especially when dealing with structured or mapped meshing
techniques.

15
Figure 19. Matching Edges of geometry

16. Convert to Unstructured Mesh

Convert to Unstructured Mesh operation is used to transform a structured or hybrid mesh into an
unstructured mesh. Many solvers, particularly those used for complex simulations, require unstructured
meshes for computation. By converting a structured or hybrid mesh to an unstructured one, we can
make it compatible with a wider range of solvers, enabling us to choose the most appropriate solver for
our simulation requirements.

It can be generated as:

• Right mouse click on Pre-Mesh > Convert to Unstructured Mesh in the model tree.
• This writes the default name hex.uns to the working directory, then immediately loads the mesh.

Figure 20. Unstructured Mesh on geometry

16
17. Select Solver

In ICEM-ANSYS meshing, the "Select Solver" option is used to specify the solver that will be used to
perform the subsequent CFD (Computational Fluid Dynamics) simulation. This selection is crucial
because different solvers have different numerical methods, capabilities, and requirements. We are
using Ansys FLUENT Solver.

It can be selected in a following way:

• Select Output > Select Solver.


• Press the pulldown arrow next to the Output Solver and choose ANSYS Fluent.
• Click on Apply.

Figure 21. Solver setup

• Turn OFF Mesh > Shells and Geometry > Curves, and turn ON Mesh > Lines in the model tree.
• Turn OFF all Blocking entities, or just save and close the blocking since we are done with it.
• These are line element, not curves. The Line elements are the boundary elements resulting from
edge to curve associations.
• Right click on Mesh > Dot Nodes to see nodes. Now we will set boundary conditions.

17
Figure 22. Select Solver

18. Boundary Conditions

“Boundary Conditions” tool is used to assign boundary conditions to different parts of the geometry.
This step is important in setting up a computational fluid dynamics (CFD) simulation as it defines how
the flow interacts with the geometry boundaries.

Boundary Conditions Can be set in following way:

• Select Output > Boundary Conditions.


• Expand under Edges > INLET_LARGE, and press Create new.
• Select velocity-inlet, then click on Okay.
• Also select velocity inlet for INLET_SMALL.
• Expand on Edges > OUTLET, and press Create new.
• Select pressure-outlet, exhaust-fan, outlet-vent, then click on Okay.
• Expand under Surfaces > Mixed/unknown > FLUID, and press Create new.
• Select fluid for the Boundary conditions, then click on Okay.
• Click on Accept.

18
Figure 23. Selecting Boundary Conditions.

19. Write Input File

Input file can be written in a following way:

• Select Output > Write Input.


• Firstly, save the attribute file (*.atr).
• In second step, save the project.
• Select the mesh to write to the solver. Choose the project name with .uns appended.

19
Figure 24. Saving Project
• The last menu has a few options which will be different for every solver. Press Done.

Figure 25. Ansys Fluent options


File writing is important as this file can be imported in Solver to carry out the simulations. In last step
we opened Fluid flow (Fluent) and imported the mesh file.

20

You might also like