Tải bản đầy đủ (.pdf) (14 trang)

ANSYS CFX-Mesh Tutorials phần 2 docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.65 MB, 14 trang )

The symbols next to the operations and features indicate their status:
MeaningSymbol
Everything is OK.
The item is suppressed i.e. not taking any effect (it can be unsuppressed later).
Something is wrong with the item e.g. you tried to generate it before you had fully specified it, or you
modified one of the features above it which makes the specifications of the item invalid. (You can see
the error messages by right-clicking on the object and selecting Show Errors and Warnings.)
The item needs to be generated or re-generated (because changes to the settings have been made since
it was last generated).
The sketch will remain visible even when not selected.
The Body has been hidden (made invisible).
• The top part of the window contains the various menus and toolbars.
DesignModeler has two main modes of operation, and you will have to switch between them as you build up
your model. In Modeling Mode, the Tree View is shown, as in the picture above. However, DesignModeler uses
sketches (collections of edges in a plane) to build up solid models, and to create these sketches, you need to be
in Sketching Mode. To switch between the two modes, the tabs (Sketching and Modeling) at the bottom of the
Tree View are used: simply click on the appropriate tab to switch between the two modes.
The area which is occupied by the Tree View when you are in Modeling Mode is taken up with the sketching
toolboxes (Draw, Modify, Constraints, Dimensions and Settings) when in Sketching Mode. To switch between
them, simply click on their names.
Recovering from Mistakes
You are certain to make mistakes as you build up your geometry, so it is important to know how to recover from
these.
Tutorial 1: Static Mixer
CFX-Mesh Tutorials . . © SAS IP, Inc.
12
If you are in Sketching Mode, then the Undo button in the Undo/Redo Toolbar towards the top of the window
can be used to undo sketching operations. The Back button (accessed by right-clicking over the Model View)
can be used to undo the selection of (for example) the last point in a polyline, whilst sketching.
If you are in Modeling Mode, and you have not yet generated your feature (such as Extrude) you can either just
make further changes in the Details View, or you can delete it by right-clicking on its name in the Tree View and


selecting Delete.
After generating a feature, you can delete it by selecting it in the Tree View and using the Delete on the right
mouse menu. If you have generated a feature e.g. Extrude and then realize (for example) that you selected the
wrong sketch to define it, you will need to use the Edit Selections feature. This is accessed by selecting right-
clicking over the name of the feature in the Tree View and selecting Edit Selections: you will then be able to
edit the selections by using the Details View as usual.
Creating the Solid
You need to start creating the Static Mixer geometry by creating a sketch to make the main body of the mixer.
1.
Click on ZXPlane in the Tree View towards the top left of the screen.
2. Click on the Sketching tab (underneath the Tree View) to work on the sketch.
Each sketch is created in a plane. By selecting the ZXPlane immediately before going into sketching mode, you
ensure that the sketch you are about to create is based on the ZXPlane.
Before starting to create your sketch, it helps to set up a grid of lines on the plane in which the sketch will be
drawn. The presence of the grid allows the precise positioning of points (when Snap is enabled).
1.
Click on Settings (in the Sketching tab) to open the Settings Toolbox.
2.
Click on Grid and turn ON Show in 2D and Snap.
3.
Click on Major Grid Spacing and set it to 1.
4.
Click on Minor-Steps per Major and set it to 2.
5.
You now need to zoom in to see the effect of changing the Minor-Steps per Major. Click the right mouse
button to the top left of the plane center in the Model View and drag a box across it to zoom into the
middle of the grid. When you release the mouse button the model will be magnified to show the selected
area.
13
CFX-Mesh Tutorials . . © SAS IP, Inc.

Section 2: Geometry Creation
You now have a grid of squares with the smallest squares being 50 cm across. Because Snap is enabled, you will
only be able to select points that are on this grid to build your geometry, and this can often help to position
objects correctly.
1. Select the Draw Toolbox from the Sketching tab.
2.
Click on Polyline and then create the shape shown below:
a. Click on the grid in the position where one of the points from the shape needs to be placed (it
doesn't matter which point).
b. Then click on each successive point to make the shape.
c. If at any point you click on the wrong place, just click with the right mouse button over the Model
View and select Back from the right mouse button menu to undo the point selection.
d. To close the polyline after selecting the last point, click with the right mouse button to bring up a
menu and choose Closed End.
Note that the longest straight line (4 m long) in the diagram below is along the z-axis (located at x = 0
m).
You will now create the main body of the mixer by revolving the new sketch around the Z-axis.
1.
Select Revolve from the 3D Features Toolbar. This toolbar is located above the Model View.
2. Details of the Revolve operation are shown in the Details View at the bottom left of the window. Leave
the name of the Revolve as the default, Revolve1.
3.
The Base Object is the name of the sketch to be revolved. It defaults to the sketch which you have just
created, Sketch1, so this setting does not need to be changed.
4.
The Axis for the rotation does not have a default setting. In the Model View, click on the grid line which
runs along the Z-axis and then click on Apply in the Details View. You should find that the text next to
Axis now changes to Selected. If instead it changes to Not Selected with a yellow background, click on
the text Not Selected and then try selecting the axis again in the Model View, remembering to press
Apply in the Details View after you have selected it.

Tutorial 1: Static Mixer
CFX-Mesh Tutorials . . © SAS IP, Inc.
14
5.
Leave Operation set to Add Material since you need to create a solid. (The other options allow you to
modify existing solids and to deal with multiple solids.)
6.
The sketch needs to be revolved by a full 360 degrees, so change Angle from 30 degrees to 360 degrees.
Leave the other settings as default.
7.
To activate the revolve operation, you need to click on
Generate. This can be selected from the
menu which appears when you click with the right mouse button almost anywhere in the window, or
from the 3D Features Toolbar towards the top of the window.
After generation, you should find you have a solid as shown below.
Now you need to create the two side pipes. This involves creating and extruding two new sketches. To make it
easier to see the grid when creating the sketches, the first step is to make the solid invisible for now.
1.
In the Tree View, click on the plus sign next to 1 Part, 1 Body to open up the tree structure.
2.
Position your cursor over the text Solid and then click with the right mouse button and select Hide Body.
3.
Select ZXPlane in the Tree View again, and create a new sketch based on this plane by using the New
Sketch ( ) button on the Active Plane/Sketch Toolbar, which is located above the Model View.
4. Select the Sketching tab.
5. Create a circle as shown in the picture below:
a. Select the Draw Toolbox.
b.
Select Circle, click on the grid at the center of the circle and then drag the mouse to define the ra-
dius.

15
CFX-Mesh Tutorials . . © SAS IP, Inc.
Section 2: Geometry Creation
Now you need to extrude this sketch to make the first side-pipe.
1.
Select Extrude from the 3D Features Toolbar. This toolbar is located above the Model View.
2.
In the Details View at the bottom left of the window, change Direction to Reversed, in order to extrude
in the opposite direction to the plane normal.
3.
Change the Depth to 3 m. The rest of the settings can be left as their default. The Add Material setting
will mean that material is added to the existing solid, rather than a new solid being created.
4.
To activate the extrude operation, you need to click on
Generate as before.
In order to see the result of this, you will have to make the solid visible again:
1.
In the Tree View, position your cursor over the text Solid and then click with the right mouse button and
select Show Body.
2. Click the middle mouse button over the middle part of the Model View and drag the mouse about with
the button held down to rotate the model. Check that the Solid looks like the picture below when rotated
into a viewing position so that the side-pipe is clearly visible.
Tutorial 1: Static Mixer
CFX-Mesh Tutorials . . © SAS IP, Inc.
16
3.
In the Tree View, position your cursor over the text Solid and then click with the right mouse button and
select Hide Body.
To create the other side pipe, the same operations are used.
1.

Select ZXPlane in the Tree View again, and create a new sketch based on this plane by using the New
Sketch (
) button on the Active Plane/Sketch Toolbar, which is located above the Model View.
2. Select the Sketching tab.
3.
Right-click over the Model View and select View>Isometric View to put the sketch back into a sensible
viewing position. Then right-click again and select Zoom to Fit to zoom into the sketch, if it appears too
small.
4.
From the Draw Toolbox, select Circle and then create the second circle shown in the picture below:
1.
Select Extrude from the 3D Features Toolbar.
2.
In the Details View, set Direction to Normal, in order to extrude in the same direction as the plane normal.
17
CFX-Mesh Tutorials . . © SAS IP, Inc.
Section 2: Geometry Creation
3.
Change the Depth to 3 m.
4.
To activate the extrude operation, you need to click on
Generate as before.
5.
In the Tree View, position your cursor over the text Solid and then click with the right mouse button and
select Show Body.
The geometry is now complete.
1.
Select File>Save and accept the default filename.
Before moving on, practise using the mouse to manipulate the model in the Model View. This is essential to be
able to move the model into positions which are good for selecting or looking closely at particular parts of the

model.
1.
Ensure that Rotate mode
is selected from the Rotation Modes Toolbar at the top of the window.
This is the default mode.
2. Click the middle mouse button over the middle part of the Model View and drag the mouse about with
the button held down to rotate the model. You have already met this way of moving the model around
(“free rotation”) earlier in the tutorial. It is the most common way to move the model.
3. Now move the mouse button towards the top left of the Model View. As you get near to the top left, the
cursor should change from to . If you now click the middle mouse button (with the new
cursor showing) and drag the mouse about with the button held down, you will be able to rotate the
model about an axis which points out of the screen (“roll”). This can be useful if you are trying to get the
model into a particular position.
4. There are two more types of rotation. Move the cursor back towards the left of the screen. Very close to
the left edge of the Model View, you will find that the cursor changes to . If you click the middle
mouse button with this cursor showing, then the rotation is constrained to be around a vertical axis in
the plane of the screen. If you move the cursor to the top of the Model View, you get the other cursor
. If you click the middle mouse button with this cursor showing, then the rotation is constrained
to be around a horizontal axis in the plane of the screen.
Which type of rotation mode you get always depends on the position of the cursor. The picture below
shows the areas of the Model View which correspond to each type of rotation. Note that the circular region
where you get free rotation will always fill the smallest dimension of the window.
Tutorial 1: Static Mixer
CFX-Mesh Tutorials . . © SAS IP, Inc.
18
5. Put the model back into the Isometric View by clicking on the cyan-colored ball in the Triad at the bottom
right of the Model View.
Now suppose that you wanted to zoom in on one of the pipe ends.
1. Right-click on the Model View to the top left of the pipe end which is visible and drag a box across it.
When you release the mouse button, the model will expand so that the contents of the box are visible

across the whole Model View.
2. Try rotating the model. You will find that the model by default rotates around the model center, so the
pipe end quickly moves out of view. You can change this as follows. Bring the pipe end back into view,
and click once with the left mouse button on the pipe end. DesignModeler will place a small red sphere
where you clicked, and then move the model so the small red sphere moves to the middle of the Model
View. If you now try rotation, you will find that the model rotates around the small red sphere, not the
model center, so the pipe end is always in view. (To change back to rotating around the model center,
click once with the left mouse button anywhere in the Model View that is away from the model itself.)
3. Zoom out again by holding down the Shift key on the keyboard, pressing the middle mouse button and
dragging the mouse downwards. You can zoom in by dragging the mouse upwards instead. An altern-
19
CFX-Mesh Tutorials . . © SAS IP, Inc.
Section 2: Geometry Creation
ative way of enabling the Zoom functionality is to select Zoom mode from the Rotation Modes
Toolbar. Once this is enabled, zooming in and out is done by clicking and dragging with the left mouse
button. If Zoom mode is selected, then most of the ways that you just tried rotating the model are no
longer available; you must select Rotate mode
again to use them.
There are two more useful ways to manipulate the model in the Model View.
1. Pan (or Translate) the model by holding down the Ctrl key on the keyboard, pressing the middle mouse
button and dragging the mouse around. An alternative way of enabling the Pan functionality is to select
Pan mode
from the Rotation Modes Toolbar. Once this is enabled, panning is done by clicking and
dragging with the left mouse button. Again, you must reselect Rotate mode to use most of the
different rotation methods.
2.
Finally, center the model in the Model View and resize it so that it is all visible by selecting Zoom to Fit
from the Rotation Modes Toolbar.
In the rest of this tutorial and all of the subsequent tutorials, you should use the functionality described above
to manipulate the model in any way which is convenient.

3. Mesh Generation
In order to set up the mesh, you must first move out of DesignModeler and into CFX-Mesh.
1.
At the top of the ANSYS Workbench window, you should be able to see two tabs: StaticMixer [Project]
and StaticMixer [DesignModeler]. Click on StaticMixer [Project] to return to the Project Page.
2.
In the left-hand column, near the top, you should now see an entry Generate CFX Mesh. Click on this.
3. CFX-Mesh will open up. At first glance it looks very similar to DesignModeler.
Tutorial 1: Static Mixer
CFX-Mesh Tutorials . . © SAS IP, Inc.
20
Overview of CFX-Mesh
CFX-Mesh is designed to have the same look and feel as DesignModeler. In particular, this means that you can
use the same mouse controls to manipulate the model.
One important difference between DesignModeler and CFX-Mesh is connected to the order of the items in the
Tree View. In DesignModeler the Tree View shows items in the order that they were created, and the order affects
the final geometry. In CFX-Mesh the order of the items in the Tree View are not important and all items of the
same type are grouped together, independent of when they were created.
You will be able to see that various items are already present in the Tree View in DesignModeler; these are the
default items and contain default settings. Some of the symbols next to items in the Tree View have slightly dif-
ferent implications in CFX-Mesh than they did in DesignModeler. In CFX-Mesh, the meanings are as follows:
MeaningSymbol
Everything is valid.
Everything is valid but the item has been automatically changed and you may wish to double-check the settings.
This may occur, for example, if you have performed a geometry update which has resulted in a face no longer
existing: if that face appeared in the location list for any mesh feature, then it will have been removed automat-
ically as part of the update and so the mesh feature will be marked with this status symbol.
This means that there is something invalid about the definition of the item or one of its sub-items (which will
also be marked with the same symbol). Often this will be because no required selection has been made.
21

CFX-Mesh Tutorials . . © SAS IP, Inc.
Section 3: Mesh Generation
MeaningSymbol
The item is suppressed (inactive).
The item is suppressed and will be invalid when it is unsuppressed.
These status symbols only apply to Preview Groups.
If the symbol underneath the yellow flash is a green tick, then the Preview Group is valid but either the mesh
has not been generated or the generated mesh is out-of-date i.e. it does not reflect the current mesh settings.
To generate an up-to-date mesh for the Preview Group, right-click over its name and choose Generate This
Surface Mesh. To generate an up-to-date mesh on all Preview Groups, right-click over Preview in the Tree View
and choose to Generate All Surface Meshes.
If the symbol shows the yellow lightning bolt but the symbol underneath it is a yellow tick, then the Preview
Group is both out-of-date (see above) and automatically changed. Refer to the table entry for a yellow tick
symbol for details of what might cause an automatic change to a Preview Group.
If the symbol shows the yellow lightning bolt but the symbol underneath it is a red exclamation mark, then the
Preview Group is both out-of-date (see above) and invalid. You must make the Preview Group valid (by making
a valid selection for its Location) before you can generate or regenerate it.
This indicates that an item contains associated sub-items . Left-click on the symbol to expand the item and
display its contents.
Left-click on the symbol to close the item so that its contents are not visible in the tree.
The generation of the surface and volume mesh is controlled by the various features that you can access in CFX-
Mesh. The type of controls available depend on the mesher used. By default, you are using the Delaunay Surface
Mesher for surface meshing and Advancing Front Volume Mesher for volume meshing.
In this first example, you will only set up the most basic features for controlling the mesh generation. Only the
basic length scale of the mesh will be specified.
Setting up the Regions
The first step is to define some regions on the geometry. Composite 2D Regions are created from the solid faces
(primitive 2D Regions) of the geometry. They can be used in CFX-Pre to assign boundary conditions, such as inlets
and outlets, to the problem. You do not need to create Composite 2D Regions at all in CFX-Mesh, but it is easier
to name and group faces into Composite 2D Regions in CFX-Mesh than it is to select the corresponding mesh

in CFX-Pre. This example uses an inlet boundary condition at the entrance to each of the two side pipes, an
outlet boundary condition on the end of the funnel outlet and a wall boundary condition for the remaining
surfaces.
Note — There is an important distinction between primitive 2D Regions and the underlying solid faces,
which applies when the model has more than one solid. This is explained in the Mesh Generation section
of the Heating Coil tutorial.
If you look at the Tree View, you can see that under Regions, one Composite 2D Region is defined already, called
Default 2D Region. This region will always contain all of the faces of the model which you have not explicitly
assigned to another Composite 2D Region.
Create the Composite 2D Region for the first inlet:
1.
Right-click over Regions in the Tree View.
Tutorial 1: Static Mixer
CFX-Mesh Tutorials . . © SAS IP, Inc.
22
2.
Select Insert>Composite 2D Region.
3.
A new object, Composite 2D Region 1, is inserted under Regions in the Tree View. In the Details View,
there will be two buttons, Apply and Cancel, next to Location, and this means that you are ready to
select the face from the Model View.
4. In the Model View, click on the circular face at the end of the side pipe which is at the position with the
lowest value of the Y-coordinate. This will turn green to show that it has been selected, as in the picture
below. You can rotate the model to make it easier to select the appropriate face by holding down the
middle mouse button and moving the mouse over the geometry.
5.
Click on Apply in the Details View.
6.
Change the name of the region to in1: right-click over the name, select Rename and then type over the
existing name.

Now create the second inlet:
1.
Right-click over Regions in the Tree View.
2.
Select Insert>Composite 2D Region.
3.
A new object, Composite 2D Region 1, is inserted under Regions in the Tree View. In the Model View,
click on the circular face at the end of the side pipe which is at the position with the highest value of the
Y-coordinate.
4.
Click on Apply in the Details View.
5.
Change the name of the region to in2 by right-clicking over the existing name.
Finally, create the region for the outlet:
1.
Right-click over Regions in the Tree View and select Insert>Composite 2D Region.
2. Select the circular face at the bottom of the mixer vessel, with the lowest value of the Z-coordinate.
3.
Click on Apply in the Details View.
4.
Change the region name to out.
It is not necessary to create a fourth Composite 2D Region for the walls of the static mixer. This is because any
remaining faces which are not explicitly assigned to a Composite 2D Region are automatically assigned to the
2D Region named Default 2D Region. You can use this region in CFX-Pre to define the location of your wall
boundary condition.
23
CFX-Mesh Tutorials . . © SAS IP, Inc.
Section 3: Mesh Generation
Setting up the Mesh
You will only set a single size for all of the elements, in this tutorial. The next tutorial will then improve upon this

coarse mesh.
1.
Click on Default Body Spacing in the Tree View, which is contained in Mesh>Spacing.
2.
In the Details View, change Maximum Spacing to 0.3 m. This is a coarse length scale for this model, but
is reasonable for a first run to generate an approximate solution and to test that the model is working
correctly.
3. Press Enter on the keyboard to set this value.
The remaining settings will be left as their default.
Generating the Surface Mesh
You will now have a look at the surface mesh to see the effect of the chosen length scale.
1.
Click on the plus sign next to Preview in the Tree View to open it up.
2.
Right-click over Default Preview Group and select Generate This Surface Mesh. The Default Preview
Group always contains all faces in the geometry, so the mesh will be generated everywhere.
During the generation of the surface mesh, the progress will be displayed using the slider bar which appears to
the bottom left of the CFX-Mesh window.
1.
You can modify the way that the mesh is displayed by clicking on Preview in the Tree View and changing
the options shown in the Details View. For example, by changing the Display Mode you can switch to
display the mesh in Wire Mesh rather than with solid faces. Simply click on the name Default Preview
Group to redisplay the surface mesh using the new settings.
It is not necessary to create the surface mesh within CFX-Mesh, since if it has not been created explicitly it will
be automatically generated when you create the volume mesh. However, in many of these tutorials, you will
create the surface mesh first, to demonstrate the effect of various mesh settings. It is generally a good idea to
check the surface mesh before creating the volume mesh, to ensure that any settings you have made have the
desired effect.
Tutorial 1: Static Mixer
CFX-Mesh Tutorials . . © SAS IP, Inc.

24
Generating the Volume Mesh
The volume mesh and all of the region information required for CFX-Pre is stored in a CFX-Pre Mesh file *.gtm.
The CFX-Pre Mesh File is read into CFX-Pre at the start of the simulation definition.
Generate the volume mesh as follows.
1.
Right-click on Mesh in the Tree View and select Generate Volume Mesh.
2.
Choose to save the CFX-Pre Mesh File as StaticMixerMesh.gtm.
During the generation of the volume mesh, the progress will be displayed using the slider bar which appears to
the bottom left of the CFX-Mesh window. When the volume mesh is complete, the slider bar will disappear and
you will be able to take control of the user interface again.
The mesh is now complete.
1.
Select File>Save to save the CFX-Mesh database as StaticMixer.cmdb in the same directory as the
other project files.
2.
At the top of the ANSYS Workbench window, you should be able to see three tabs: StaticMixer [Project],
StaticMixer [DesignModeler] and StaticMixer [CFX-Mesh]. Click on StaticMixer [Project] to return
to the Project Page.
3.
Select File>Save to save the project.
If you want to continue by working through the CFX-5 example “Tutorial 1: Flow in a Static Mixer” using the
newly-generated mesh, and have CFX-5.7.1 in ANSYS Workbench installed on your machine, then follow these
steps:
1.
On the Project Page, a new entry will have appeared when you generated the file: Advanced CFD. Under
this entry, double-click on StaticMixerMesh.gtm to open up CFX-Pre.
2.
Once CFX-Pre has opened, choose File>Save Simulation As to save the simulation as StaticMixer.

3.
Select Tools>Quick Setup Mode to enter the Quick Setup Mode that this tutorial uses.
4. Work through the CFX-5.7.1 tutorial, missing out the instructions in the section “Creating a New Simula-
tion”. Note that you do not need to copy the sample file StaticMixerMesh.gtm to your working directory
if you have just created the mesh in CFX-Mesh, since you will want to use your new mesh and not the
one supplied with CFX-5. For the “Importing a Mesh” section, the only action that you need to carry out
is to select Assembly from the Select Mesh drop-down list, as the mesh is loaded automatically when
you start CFX-Pre in the manner described above.
If you do not have CFX-5.7.1 in ANSYS Workbench installed or do not want to work through the CFX-5 example,
then:
1.
Exit from ANSYS Workbench by selecting File>Exit.
25
CFX-Mesh Tutorials . . © SAS IP, Inc.
Section 3: Mesh Generation

×