Chapter 3: Simulating Flow in A Static Mixer Using Workbench
Chapter 3: Simulating Flow in A Static Mixer Using Workbench
This tutorial simulates a static mixer consisting of two inlet pipes delivering water into a mixing vessel;
the water exits through an outlet pipe. A general workflow is established for analyzing the flow of fluid
into and out of a mixer using ANSYS Workbench.
This tutorial includes:
3.1.Tutorial Features
3.2. Overview of the Problem to Solve
3.3. Before You Begin
3.4. Setting Up the Project
3.5. Defining the Case Using CFX-Pre
3.6. Obtaining the Solution Using CFX-Solver Manager
3.7. Viewing the Results Using CFD-Post
For introductory information about ANSYS Workbench, see ANSYS CFX in ANSYS Workbench in the CFX
Introduction.
Feature
Details
CFX-Pre
User Mode
Analysis Type
Steady State
Fluid Type
General Fluid
Domain Type
Single Domain
Turbulence Model
k-Epsilon
Heat Transfer
Thermal Energy
Boundary Conditions
Inlet (Subsonic)
Outlet (Subsonic)
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
41
Feature
Details
Wall: No-Slip
Wall: Adiabatic
Timestep
Animation
Keyframe
Plots
CFD-Post
42
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Use your operating system's tools to create a directory for your project's files.
The directory you create will be referred to as the working directory.
2.
2.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
43
Note
You use a CFX component system because you are starting with a mesh. If you wanted
to create the geometry and mesh, you would start with a Fluid Flow (CFX) analysis
system.
2.
Right-click on the blue CFX cell (A1) and select Rename. Change the name of the system to Static
Mixer.
3.
In ANSYS Workbench, enable View > Files and View > Progress so that you can see the files that are
written and the time remaining to complete operations.
4.
In the Workbench Project Schematic, double-click the Setup cell of the CFX component system. CFXPre opens.
5.
Optionally, change the background color of the viewer in CFX-Pre for improved viewing:
a.
b.
Adjust the color settings under CFX-Pre > Graphics Style. For example, you could set the Background > Color Type to Solid and the Color to white.
c.
44
Click OK.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
In CFX-Pre, select Tools > Quick Setup Mode. The Quick Setup Wizard opens, enabling you to define
this single-phase simulation.
2.
Under Working Fluid > Fluid select Water. This is a fluid already defined in the library of materials as
water at 25C.
3.
5.
6.
Click Open.
The mesh loads, which enables you to apply physics.
7.
Click Next.
1.
Under Model Data, note that the Reference Pressure is set to 1 [atm].
All other pressure settings are relative to this reference pressure.
2.
3.
4.
Click Next.
Delete Inlet and Outlet from the list by right-clicking each and selecting Delete Boundary.
2.
Right-click in the blank area where Inlet and Outlet were listed, then select Add Boundary.
3.
45
Click OK.
The boundary is created and, when selected, properties related to the boundary are displayed.
2.
3.
Set the Flow Specification > Option to Normal Speed and set Normal Speed to: 2 [m s^-1]
4.
Set the Temperature Specification > Static Temperature to 315 [K] (note the units).
Under the Boundary Definition panel, right-click in the selector area and select Add Boundary.
2.
Value
Inlet
in2
Normal Speed
2 [m s^-1]
285 [K]
Outlet
out
46
Value
0 [Pa]
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Click Next.
2.
Click Finish.
The three boundary conditions are displayed in the viewer as sets of arrows at the boundary surfaces.
Inlet boundary arrows are directed into the domain. Outlet boundary arrows are directed out of
the domain.
2.
3.
4.
1.
Click Rotate
2.
Click and drag within the geometry repeatedly to test the rotation of the geometry.
The geometry rotates based on the direction of movement.
Notice how the mouse cursor changes depending on where you are in the viewer:
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
47
3.
Right-click a blank area in the viewer and select Predefined Camera > View From -X.
4.
Right-click a blank area in the viewer and select Predefined Camera > Isometric View (Z Up).
A clearer view of the mesh is displayed.
1.
2.
On the Basic Settings tab, set Advection Scheme > Option to Upwind.
3.
Set Convergence Control > Fluid Timescale Control > Timescale Control to Physical Timescale
and set the physical timescale value to 2 [s].
4.
Click OK.
48
Double-click on the ANSYS Workbench Solution cell. The CFX-Solver Manager appears with the Define
Run dialog box displayed.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
49
Note
Once the second iteration appears, data begins to plot. Plotting may take a long time
depending on the amount of data to process. Let the process run.
When CFX-Solver is finished, a message is displayed and the final line in the .out file (which you can
see in the CFX-Solver Manager) is:
50
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
2.
When the refresh is complete, double-click on the Results cell. CFD-Post appears.
When CFD-Post starts, the viewer and Outline workspace are displayed. Optionally, change the background color of the viewer for improved viewing:
1.
In CFD-Post, select Edit > Options. The Options dialog box appears.
2.
Adjust the color settings under CFD-Post > Viewer. For example, you could set the Background >
Color Type to Solid and the Color to white.
3.
Click OK.
The viewer displays an outline of the geometry and other graphic objects. You can use the mouse or
the toolbar icons to manipulate the view, exactly as in CFX-Pre.
The tutorial follows this general workflow for viewing results in CFD-Post:
3.7.1. Setting the Edge Angle for a Wireframe Object
3.7.2. Creating a Point for the Origin of the Streamline
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
51
2.
Right-click a blank area anywhere in the viewer, select Predefined Camera from the shortcut menu,
and select Isometric View (Z up).
Tip
While it is not necessary to change the view to set the edge angle for the wireframe,
doing so enables you to explore the practical uses of this feature.
3.
In the Wireframe details view, under Definition, click in the Edge Angle box.
An embedded slider is displayed.
4.
5.
52
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
6.
Drag the embedded slider to set the Edge Angle value to approximately 45 [degree].
7.
8.
9.
Select Insert > Location > Point from the main menu.
You can also use the toolbars to create a variety of objects. Later modules and tutorials will explore
this further.
2.
Click OK.
This accepts the default name.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
53
4.
5.
Click Apply.
The point appears as a symbol in the viewer as a crosshair symbol.
2.
Click OK.
3.
Tip
To create streamlines originating from more than one location, click the Ellipsis
icon
to the right of the Start From box. This displays the Location Selector dialog box,
where you can use the Ctrl and Shift keys to pick multiple locators.
4.
5.
6.
7.
8.
Click Apply.
The streamline shows the path of a zero mass particle from Point 1. The temperature is initially
high near the hot inlet, but as the fluid mixes the temperature drops.
54
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Tip
In this module, you may choose to display various views and zooms from the Predefined
Camera option in the shortcut menu (such as Isometric View (Z up) or View From -X) and
by using Zoom Box
1.
2.
3.
Click Apply.
The point is moved and the streamline redrawn.
4.
and ensure that the adjacent toolbar icon is set to Single Select
.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
55
While in select mode, you cannot use the left mouse button to re-orient the object in the viewer.
5.
In the viewer, drag Point 1 (appears as a yellow addition sign) to a new location within the mixer.
The point position is updated in the details view and the streamline is redrawn at the new location.
The point moves normal in relation to the viewing direction.
6.
Click Rotate
Tip
You can also click in the viewer area, and press the space bar to toggle between Select
and Viewing Mode. A way to pick objects from Viewing Mode is to hold down Ctrl +
Shift while clicking on an object with the left mouse button.
7.
8.
Click Apply.
The point appears at its original location.
9.
Right-click a blank area in the viewer and select Predefined Camera > View From -X.
An exception occurs when one or more bands in a contour plot represent values beyond the legends range. In this case, such bands
are colored using a color that is extrapolated slightly past the range of colors shown in the legend. This can happen only when a
user-specified range is used for the legend.
56
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Tip
When editing values, you can restore the values that were present when you began editing
by clicking Reset. To restore the factory-default values, click Default.
1.
2.
Value
Definition
Title Mode
User Specified
Title
Streamline Temp.
Horizontal
(Selected)
Setting
Bottom
Click Apply.
The appearance and position of the legend changes based on the settings specified.
4.
Modify various settings in Definition and click Apply after each change.
5.
Select Appearance.
6.
Modify a variety of settings in the Appearance and click Apply after each change.
7.
Click Defaults.
8.
Click Apply.
9.
Under Outline, in User Locations and Plots, clear the check boxes for Point 1 and
Streamline 1.
Since both are no longer visible, the associated legend no longer appears.
57
From the main menu, select Insert > Location > Plane or click Location > Plane.
2.
3.
Click OK.
The details view for the plane appears; the Geometry, Color, Render, and View tabs enable you
to configure the characteristics of the plane.
2.
3.
4.
5.
Click Apply.
Slice appears under User Locations and Plots. Rotate the view to see the plane.
Right-click a blank area in the viewer and select Predefined Camera > Isometric View (Z up).
The slice is now visible in the viewer.
58
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
2.
3.
4.
5.
Click Rotate
6.
Click and drag the mouse pointer down slightly to rotate the geometry towards you.
7.
2.
3.
4.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
59
6.
Click Apply.
7.
8.
The line segments show where the slice plane intersects with mesh element faces. The end points
of each line segment are located where the plane intersects mesh element edges.
9.
Right-click a blank area in the viewer and select Predefined Camera > View From +Z.
The image shown below can be used for comparison with Flow in a Static Mixer (Refined
Mesh) (p. 71) (in the section Creating a Slice Plane (p. 80)), where a refined mesh is used.
Setting
Value
Color
Mode
Variable
Variable
Temperature
Show Faces
(Selected)
Render
60
[1]
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Setting
Value
(Cleared)
Footnote
1. You can specify the variable (in this case, temperature) used to color the graphic element.
The Constant mode allows you to color the plane with a fixed color.
2.
Click Apply.
Hot water (red) enters from one inlet and cold water (blue) from the other.
Right-click a blank area in the viewer and select Predefined Camera > Isometric View (Z up) from the
shortcut menu.
2.
3.
4.
Click and drag the plane to a new location that intersects the domain.
As you drag the mouse, the viewer updates automatically. Note that Point updates with new settings.
5.
6.
Click Apply.
7.
Click Rotate
8.
Turn off the visibility for Slice by clearing the check box next to Slice in the Outline tree view.
Right-click a blank area in the viewer and select Predefined Camera > Isometric View (Z up) from the
shortcut menu.
2.
Select Insert > Contour from the main menu or click Contour
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
61
4.
Click OK.
5.
Setting
Value
Geometry
Locations
Slice
Variable
Temperature
(Selected)
Render
6.
Click Apply.
Important
The colors of 3D graphics object faces are slightly altered when lighting is on. To view
colors with highest accuracy, go to the Render tab and, under Show Faces, clear
Lighting and click Apply.
The graphic element faces are visible, producing a contour plot as shown.
62
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Note
Make sure that the visibility of Slice (in the Outline tree view) is turned off.
2.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
63
Right-click a blank area in the viewer and select Predefined Camera > Isometric View (Z up).
2.
In the Outline, under User Locations and Plots, turn off the visibility of Slice Contour
and turn on the visibility of Slice.
3.
A new keyframe named KeyframeNo1 is created. This represents the current image displayed in
the viewer.
64
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
2.
3.
Click Apply.
The slice plane moves to the bottom of the mixer.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
65
Select KeyframeNo1 so that you can set the number of frames to be interpolated between the two
keyframes.
6.
7.
Press Enter.
The Frame # column shows the frame in which each keyframe appears. KeyframeNo1 appears
at frame 1 since it defines the start of the animation. KeyframeNo2 is at frame 22 since you have
20 intermediate frames (frames 2 to 21) in between KeyframeNo1 and KeyframeNo2.
66
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Click To Beginning
This ensures that the animation will begin at the first keyframe.
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
67
The animation plays from frame 1 to frame 22. It plays relatively slowly because the slice plane
must be updated for each frame.
Value
Geometry
Point
0, 0, 1.99
Color
Mode
Variable
Variable
Temperature
Range
User Specified
Min
295 [K]
Max
2.
Setting
305 [K]
Click Apply.
The slice plane moves to the top of the static mixer.
Note
Do not double-click in the next step.
3.
In the Animation dialog box, single click (do not double-click) KeyframeNo1 to select it.
If you had double-clicked KeyFrameNo1, the plane and viewer states would have been redefined
according to the stored settings for KeyFrameNo1. If this happens, click Undo
to select the keyframe.
4.
The image in the viewer replaces the one previously associated with KeyframeNo1.
5.
Double-click KeyframeNo2.
The object properties for the slice plane are updated according to the settings in KeyFrameNo2.
6.
68
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Setting
Value
Color
Mode
Variable
Variable
Temperature
Range
User Specified
Min
295 [K]
Max
305 [K]
7.
Click Apply.
8.
9.
The Loop and Bounce radio buttons determine what happens when the animation reaches the
last keyframe. When Loop is selected, the animation repeats itself the number of times defined by
Repeat. When Bounce is selected, every other cycle is played in reverse order, starting with the
second.
2.
3.
4.
Click Browse
5.
6.
If required, set the path location to a different directory. You may want to set the directory to your
working directory so that the animation will be in the same location as the project files.
7.
Click Save.
The movie file name (including path) has been set, but the animation has not yet been produced.
8.
Click To Beginning
9.
.
.
69
70
Release 14.5 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.