0% found this document useful (0 votes)
409 views69 pages

CFX GetStart1 19.0 WS01 Mixing Tee

This document provides an overview of the steps involved in setting up and running a CFD simulation of fluid mixing in a tee junction using ANSYS CFX. It describes importing the geometry, generating an inflation layer mesh, defining boundary conditions such as inlet and outlet faces, launching the solver, and post-processing the results to analyze mixing effectiveness. The goal is to evaluate how well the cold and hot water streams mix by examining the exit temperature profile.

Uploaded by

Mun Jiwon
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)
409 views69 pages

CFX GetStart1 19.0 WS01 Mixing Tee

This document provides an overview of the steps involved in setting up and running a CFD simulation of fluid mixing in a tee junction using ANSYS CFX. It describes importing the geometry, generating an inflation layer mesh, defining boundary conditions such as inlet and outlet faces, launching the solver, and post-processing the results to analyze mixing effectiveness. The goal is to evaluate how well the cold and hot water streams mix by examining the exit temperature profile.

Uploaded by

Mun Jiwon
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/ 69

19.

0 Release

Workshop 1: Mixing Tee


ANSYS CFX Getting Started - Part 1

1
Problem Description

• Mixing tees are commonly used for static mixing of two


fluid streams
• In this problem, a mixing tee is used to mix two water
streams, one at 10 °C and the other at 90 °C
• The goal of the simulation is to evaluate how effectively
the two streams are mixed by examining temperature
profile on the cross-section of the tee's exit
− A more uniform profile indicates more effective mixing

2
Problem Description

Water
3 m/s
90 °C
Water
5 m/s
10 °C

3
19.0 Release

Workshop 1.1: Geometry


ANSYS CFX Getting Started - Part 1

4
Introduction

Background
• This workshop assumes little or no prior
experience of ANSYS SpaceClaim

Objectives
• Importing the geometry in ANSYS
SpaceClaim
• Changing the display style to see more
clearly inside the geometry

5
Start Workbench
• Start Workbench either from
the desktop icon or from
– Start > All Programs > ANSYS
19.0 > Workbench 19.0

• In Workbench, go to File >


Save As… and save the
project as, e.g.,
WS01-Mixing-Tee in a
folder of your choice

6
Geometry Import

Create the Project

• Drag and drop a Mesh component


system into the Project Schematic
• Right click on the Geometry cell (A2) and
select Import Geometry  Browse
• Locate the file “pipe-tee-r20mm.stp” in
the Meshing Workshops Input Files and
select it. The geometry cell will show a
check mark indicating it is up to date

7
Open Geometry in ANSYS SpaceClaim

Start ANSYS SpaceClaim


• Double click on the Geometry cell to open it in SpaceClaim
– Note: right click and edit the geometry in SpaceClaim is similar
• ANSYS SpaceClaim will start and load the geometry

8
Display Options in ANSYS SpaceClaim (1)

• Make yourself familiar with the Orient group in the Design tab

• Test all the different view options and controls; spin, pan, home etc.

• Click on the display tab

• Test the different ‘Graphics’ options

9
Display Options in ANSYS SpaceClaim (2)

• Put the ‘Graphics’ back to shaded


• Select the body from the tree object
• Click on the second button as shown and
make it transparent

10
Display Options in ANSYS SpaceClaim (3)

• Select the following face, right click and


choose > face > hide face

• You can hide as many faces as you wish


to look inside the geometry

• Right click anywhere and show all

• Close SpaceClaim

11
19.0 Release

Workshop 1.2: Meshing


ANSYS CFX Getting Started - Part 1

12
Launching ANSYS Meshing

Start Meshing
• On the Mesh cell right click and select Edit
– Note: Double clicking on the Mesh cell can also startup Meshing
• ANSYS Meshing will start up

13
Units

Set Units
• It’s good practice to first check and, if required, set the units.
• From the main menu select Units and, if it is not already set, specify
Metric (m...).

14
Defaults

Set Defaults
• We’ll demonstrate how a basic
mesh can quickly be generated
with the minimum of input.
• Click Mesh in the Outline
• This will display the Details of
“Mesh” panel which contains
Global Mesh Control settings.

15
Mesh Settings

Set Defaults
• In the Details of Mesh panel expand Defaults
and click in the box to the right of Physics
Preference to activate the drop down box
– Select CFD
– Set the Solver Preference to Fluent
• Under Sizing set the following.
– Use Size Function: Curvature

• Click the “Update” button located in the


toolbar

16
View the Mesh

Mesh
• Check that the generated mesh matches
that shown
– This is a fully automatic tetrahedron mesh
– Appropriate sizing and parameters have been set
and calculated based upon the selected physics
preference and geometry characteristics

17
Named Selections (1)

Add Named Selections


• From the top toolbar select the Face
Selection Filter

• Select the face as shown by left clicking over


it (will turn green)
• With the face selected, right click and select
Create Named Selection from the Context
Menu that appears

• The Named Selection Dialog Box will appear

18
Named Selections (2)

Add Named Selections (Continued)


• In the Named Selections Dialog Box enter the
name “inlet-z” as shown
• Click OK
• The Named Selection you have just created will
be listed under the Named Selections object in
the Outline

• Selecting it will highlight the corresponding faces

19
Named Selections (3)

Add Named Selections (Continued)


outlet
• Use exactly the same procedure to create
two more Named Selections “inlet-y” &
“outlet”

inlet - z

inlet - y
• These Named Selections will be used to
define boundary conditions in the fluid
solver
20
Inflation
Mesh with Inflation Layers
• The fluid simulation will concern a wall bounded
turbulent flow. To adequately resolve flow gradients
near the wall we need smaller mesh cells near the wall
• An efficient way to achieve this is by ‘inflating’ the wall
surface mesh to produce layers of thin prismatic cells
called Inflation Layers
• In the Outline, click mesh to display the Details of Mesh
panel
• Expand the Inflation Section and set Use Automatic
Inflation to Program Controlled
– Click Update
• The mesh will be regenerated with the new settings

21
Inflated Mesh
Review the Inflated Mesh
• The program controlled inflation has
automatically excluded the Named Selection
faces creating layers on the unnamed wall faces

22
Save Project and Close Meshing
Review
• The same basic steps followed here are used to mesh
most models
• Set physics preference to CFD
• Provide basic inputs and generate mesh
• Add Named Selections
• Generate mesh with inflation layers

• Since the mesh is complete, close meshing and return to


Workbench

23
19.0 Release

Workshop 1.3: CFD


ANSYS CFX Getting Started - Part 1

24
Introduction
• Model set-up, solution and post-processing.
• Mixing of cold and hot water in a T-piece.
– How well do the fluids mix?
– What are the pressure drops?

It’s a good idea to identify the key


simulation outcomes from the
start. You can use these to monitor
progress of solution.

25
Pre-processing steps

• Launch CFX-Pre from Workbench. • Launch CFD-Post from an existing


• Use pre-defined materials. CFX simulation in Workbench.
• Rotate, zoom and pan the view.
• Define the fluid models in a domain.
• Create contour plots.
• Create & edit objects in CFX-Pre.
• Create a plane for use as a locator.
• Define boundary conditions. • Create a velocity vector plot.
• Set up monitor points using simple • Use pre-defined views.
expressions. • Create streamlines of velocity.
• Launch the CFX Solver Manager from • Create an isosurface, coloured by
Workbench. a separate variable.
• Monitor convergence.

26
Workbench Project
• If you have completed Workshop 1.1: Geometry, and
Workshop 1.2: Meshing continue working with the
workbench project you created
• If you wish to start from an existing mesh, or did not
complete Workshop 1.1: Geometry, and Workshop
1.2: Meshing
− Start Workbench
• Start > All Programs > ANSYS 19.0 > Workbench 19.0
− Restore archive MixingTee_GeomMeshReady.wbpz provided
with the inputs of this workshop
• File > Restore Archive…
– Browse to MixingTee_GeomMeshReady.wbpz
– Save project with name MixingTee.wbpj in a working folder of your
choice

27
Creating the CFX Component System

• In the Workbench project page:


– Left click on a CFX Component System
– Without releasing the left mouse button,
drag the mouse onto the Mesh cell
– When the border of the cell turns red and
Transfer A3 appears, release the mouse
button

28
Creating the CFX Component System

• Right-click on the Mesh cell and select Update.


– This will convert the mesh format to one that is
compatible with ANSYS CFX.
– The lightning symbol will change to a green tick.

• Next double-click on Setup to open CFX-Pre.

29
CFX-Pre GUI Overview - Useful Shortcuts
Icons on Viewer Toolbar Shortcuts to functions

Rotate

Pan + CTRL

Zoom + SHIFT

(Hold while tracing


Box Zoom
a box)

Rotate + CTRL
(on screen plane)

30
CFX-Pre Mesh and Regions

Expand the Mesh The Mesh is


object to see all represented in
3D & 2D mesh Wireframe
regions listed. format in the
Viewer.

A domain named Default Domain is automatically created from all 3-D regions in the mesh file(s).
A boundary named Default Domain Default is automatically created from all 2D regions for each
domain.

31
CFX-Pre – Domain settings
The Default Domain contains all imported 3D mesh
regions. If you create new domains, those regions
are automatically removed from the Default
Domain. The Default Domain is automatically
deleted if no unassigned 3D regions remain.
The first step is to change the domain name to
something more meaningful.
• Right-click on Default Domain in the Outline
tree.
• Select Rename.
− The domain name can now be edited.
• Change the domain name to junction.
32
CFX-Pre – Domain settings (continued)
• Double-click on the
domain junction.
The Domain panel contains three tabs
named Basic Settings, Fluid Models and
Initialization. For more complex simulations
additional tabs may appear.
• Set the Material to Water.
• The available materials can be found in the
drop-down menu.
– Note that CFX has a comprehensive library of
materials. These can be accessed by using the
icon and then selecting the Import Library
Data icon.
Note that the default Reference Pressure is set to 1 [atm]
33
CFX-Pre – Domain settings (continued)
• Click the Fluid Models tab.
• In the Heat Transfer section, change
Option to Thermal Energy.
− Heat transfer will be modelled. This model is
suitable for incompressible flows.
• Leave all other settings as they are
− The k-Epsilon turbulence model will be used,
which is the default.
• Click OK to apply the new settings and
close the domain form.

34
Boundary Conditions

The next step is to create the boundary conditions. You will


create a cold inlet, a hot inlet and an outlet. The remaining
faces will be set to adiabatic walls. Currently all external 2D
regions are assigned to the junction Default boundary
condition.

Each domain has an automatic default boundary condition for


external surfaces. The default boundary condition is a No Slip,
Smooth, Adiabatic wall. As you create new boundary
conditions, those regions are automatically removed from the
default boundary condition.

35
CFX-Pre – Inlet boundary conditions
Now that the domain is set up, boundary conditions can be added.

Cold Inlet
• Right-click on the junction domain.
• Select Insert > Boundary.
• Set the Name to inlety.
• Click OK.

36
CFX-Pre – Inlet boundary conditions
• Click on the drop-down menu for
Boundary Type to see the options
available. Leave the field set to Inlet.

• Set Location to inlet y *


− The available locations can be found in the
drop-down menu.

* In the Meshing tool (slides 19, 20)


Named Selections (NS) inlet-y, inlet-z
were created. These were automatically
passed on as 2D Regions inlet y, inlet z in
the imported Mesh in CFX-pre. In this
slide a Boundary with name inlety is
created. Note that NS, 2D Regions and
Boundaries need not be identical. More
on this in Workshop 03.
37
CFX-Pre – Inlet boundary conditions
This inlet will have a normal speed of 5m/s
and temperature of 10°C.
• Click the Boundary Details tab.
• Enter a value of 5 for Normal Speed. The
default units are [m s^-1].
• Enter a value of 10 for Static Temperature.
− You might need to change the units.
• Use the drop-down menu to the right of
the field to change the units to C (Celsius).
• Click OK to apply the boundary and close
the form.

38
CFX-Pre – Inlet boundary conditions
Hot Inlet

• Repeating the steps used for the


previous boundary condition, create a
new Inlet boundary called inletz,
located on inlet z.

• The Normal Speed will be 3 [m s^-1]


and the Static Temperature, 90 [C].

39
CFX-Pre – Outlet boundary conditions
• Create an Outlet boundary called outlet
and located on outlet.
• Click the Boundary Details tab.
• Set Relative Pressure to 0 [Pa].
– This is relative to the domain Reference
Pressure, which is 1 [atm] (set as default value
in a previous slide).
• Leave all other settings at their default
values.
• Click OK.
The Average Static Pressure boundary condition allows pressure to float locally on the
boundary while preserving an specified average pressure. If Static Pressure had been chosen a
fixed pressure would be applied at every nodal location on the outlet boundary.
40
CFX-Pre – Wall boundary conditions
The default boundary condition, junction Default, comprises all the 2D regions
not yet assigned to a boundary condition.
• Right-click junction Default, select Rename and change the boundary name to
wall.
The default boundary type is an
adiabatic wall, which is appropriate
here. To check, double-click on wall
and select the Boundary Details tab.

41
Initialization
• Initial values must be provided for all solved variables. This gives the solver a
starting point for the solution.
• There are two options when setting an initial value for a variable:
– Automatic: This will use a previous solution if provided. Otherwise the solver will generate an initial guess
based on the boundary conditions.
– Automatic with Value: This will use a previous solution if provided. Otherwise the value you specify will be
used.

The solver-generated initial conditions are often good enough as a starting point.
However, in some cases you will need to provide a better starting point to avoid
solver failure.
• Initial conditions can be set on a per-domain basis or on a global basis. Those set
per domain take precedence.
• You will use Automatic initial conditions and so there is no need to set any values.
Click the Initialization icon to view the settings, and then close the form.

43
Solver Control
• The Solver Control options set various parameters that are used by the solver
and can affect the speed of convergence and the accuracy of the results. For this
model the default settings are reasonable but will not be suitable for all
simulations.

• Double-click on Solver Control from the Outline tree.


– The solver will stop after Max. Iterations regardless of the convergence level.

– Advection Scheme and Timescale Control will be discussed in a later module. You will
not normally need to change the Advection Scheme from the default option of High
Resolution.

– Residuals are a measure of how well the equations have been solved. In this case the
solver will stop when the RMS (Root Mean Squared) residuals have reached 1.E-4.
Tighter convergence is achieved with lower residuals.

44
CFX-Pre – Monitor points
In all engineering flows there are specific variables or quantities of interest.
Sometimes they do not reach a satisfactory value by the time the overall solution
has reached the convergence criteria. So it is always a good idea to monitor them
as the solution progresses. For a steady-state simulation we want the monitors to
settle to a constant value. Variation, particularly if it follows a repeated pattern,
can indicate time dependency. In this simulation pressure will be monitored at
both inlets.
• Double-click Output Control from the
Outline tree.
• On the Output Control form, select the
Monitor tab.
• Check the Monitor Objects box.
• Click the New icon.
• Set the Name to p inlety and click OK.

45
CFX-Pre – Monitor points (continued)
• An expression will be used to define the monitor point.
Expressions are written using CFX Expression Language,
CEL, which is covered in a later module.

• Set Option to Expression so that you can enter the


following expression in the Expression Value field :
areaAve(Pressure)@inlety
– The expression calculates the area-weighted average of pressure at
the boundary inlety.
– Click Apply
Note that expressions are case sensitive.
• To avoid syntax errors, right-click in the box to obtain drop-down menus.
• areaAve is a locator-based function
• Pressure is a variable
• inlety is a physics locator
46
CFX-Pre – Monitor points (continued)
• A second monitor point will be used to monitor
the pressure at the second inlet, inletz.
• Click the New icon.
• Set the Name to p inletz and click OK.
• Set Option to Expression.
• For Expression Value enter:
areaAve(Pressure)@inletz

• Click OK. This will apply the settings and will


close the Output Control form.

The monitor points can be viewed during the solution.

47
Solution steps

• Launch CFX-Pre from Workbench. • Launch CFD-Post from an existing


• Use pre-defined materials. CFX simulation in Workbench.
• Rotate, zoom and pan the view.
• Define the fluid models in a domain.
• Create contour plots.
• Create & edit objects in CFX-Pre.
• Create a plane for use as a
• Define boundary conditions. locator.
• Set up monitor points using simple • Create a velocity vector plot
expressions. • Use pre-defined views.
• Create streamlines of velocity.
• Launch the CFX Solver Manager from
Workbench. • Create an isosurface, coloured by
a separate variable.
• Monitor convergence.

48
Obtaining a solution
• Close CFX-Pre.
– The CFX-Pre case will be saved automatically.
• In Workbench save the project
• Note that now the physics set-up is complete,
the symbol in the Solution cell of the
Analysis System indicates that it is ready to be
refreshed.
• Double-click Solution to launch the CFX-Solver
Manager.
The CFX-Solver Manager will start with the
simulation ready to run.
• Click Start Run to begin the solution process.

49
Obtaining a solution
Approximately 60 iterations are required to reduce the RMS residuals to below the
target of 1.0x10-4. The pressure monitor points approach steady values.
• Click on the tabs to view the plots of RMS residuals for each equation and the User
Points tab to see the monitor plot.

Constant

50
Obtaining a solution
It is good practice also to check the global
imbalances, i.e. the differences between flows
into and out of the domain. They can be viewed
as plot lines.
• To view plots of imbalances
– Select the New Monitor icon.
– Click on OK in the pop-up.
– In the Monitor Properties menu that appears, click
on the Plot Lines tab.
– Expand the IMBALANCE object.
– Check each of the boxes in the tree to switch on the
lines for each equation.
– Click on OK to create the monitor plot.
51
Obtaining a solution
• To view plots of imbalances, continued
– To see the plots at the end of the run in more detail, right-click in the window and select Monitor Properties.
– On the Range Settings tab set Timestep Range Mode to Most Recent & Timestep Window Size to 10.
– The Energy Imbalance is still decreasing but is of the order of 0.15 % (quite small)

52
Post-processing Steps

• Launch CFX-Pre from Workbench. • Launch CFD-Post from an existing


• Use pre-defined materials. CFX simulation in Workbench.
• Rotate, zoom and pan the view.
• Define the fluid models in a domain.
• Create contour plots.
• Create & edit objects in CFX-Pre.
• Create a plane for use as a locator.
• Define boundary conditions. • Create a velocity vector plot.
• Set up monitor points using simple • Use pre-defined views.
expressions. • Create streamlines of velocity.
• Launch the CFX Solver Manager from • Create an isosurface, coloured by
Workbench. a separate variable.
• Monitor convergence.

53
Launching CFD-Post

• Close the CFX-Solver Manager.


• Save the project.
• Double-click Results to launch CFD-Post.
• The layout is similar to that of CFX-Pre.
• The model is displayed in wireframe.
54
CFD-Post Overview
• Outline Window
– Lists currently-defined graphics objects,
including boundary conditions and Mesh
Regions.
– To edit an object, double-click or right-click
on the icon.
– The check boxes next to each object turn
the visibility on or off in the Viewer.

• Details Window
– When you edit an object the Details
window shows the current status of the
object.

55
CFD-Post

• As in CFX-Pre, in CFD-Post the Viewer toolbar


buttons allow you to manipulate the view.
Shortcut
• Rotate
• Pan Ctrl +
• Zoom Shift +
• Box zoom
• Fit to view
• Rotate on screen plane Ctrl +

56
CFD-Post

• You can create many different objects


in CFD-Post. The Insert menu shows a
full list but there are toolbar shortcuts
for all items.
• Some common object are:
– Location: Points, Lines, Planes, Surfaces,
Volumes
– Vector Plots
– Contour Plots
– Streamline Plots
– Particle Track (for results including
Lagrangian Particle Tracking)

57
CFD-Post – Temperature contour plot
In the first step you will plot contours of
temperature on the exterior walls of the
model.
• Click the Contour icon from the
toolbar.
• Click OK to accept the default name,
Contour 1.
• Set Locations to wall.

58
CFD-Post – Temperature contour plot
• Set the Variable to Temperature.
− The drop-down menu provides a list of common variables. Use the “…” icon to
access a full list.
• Leave the other settings unchanged.
• Click Apply to generate the plot.

59
CFD-Post - Temperature contour plot
A temperature contour plot on the walls is
now visible.
• Try changing the view using rotate, zoom
and pan. You may find it easier to use the
middle mouse button in combination with
<Ctrl> and <Shift>.
• Try clicking on the axes in the bottom right
corner of the Viewer.
• Right-click in the Viewer window, outside
the model, to see the options available for
Predefined Camera and Projection.
• See what happens if you use the X, Y and Z
keys with and without Shift (make sure that
you have clicked in the Viewer first).
• Use the arrow keys with Shift and with Ctrl.

60
CFD-Post – Creating a plane at x = 0
• First hide the previously created
contour plot by un-checking the
associated box in the tree view.

• Click the Location button on the


toolbar and select Plane from the
drop-down menu.

• Click OK, accepting the default


name of Plane 1.

61
CFD-Post – Creating a plane at x = 0
• Set Method to YZ Plane.
• Leave X set to 0 [m].
• Click Apply to generate the plane.

62
CFD-Post – Creating a velocity vector plot

The plane will be used as a locator for a vector plot.

• Hide the plane Plane 1 by


un-checking the
associated box in the tree
view.

• Click the Vector icon from


the toolbar.

• Click OK, accepting the


default name of Vector 1.

63
CFD-Post – Velocity vector plot
• Set Locations to Plane 1.
• Leave the Variable field set to Velocity.
• Click Apply.

64
CFD-Post – Aligning the view
Given that the vector plot is on a Y-Z plane, you might want to view the plot along
the X axis.
• Click on the red x-axis in the
bottom right corner of the
Viewer to orient the view.

65
Summary
In this tutorial you have learned the basic steps for CFD analysis with ANSYS CFX
• Start with a CAD file of your geometry
– This geometry must be the fluid volume
• Create a Meshing Component System in Workbench and import your CAD file
• Connect a CFX component system to the Mesh cell
– Set Domain parameters, Boundary conditions and Solver settings
– Run the simulation whilst monitoring quantities of interest
– Post-process the results in CFD-Post

One of the important things to remember in your own work is, before even starting the ANSYS
software, is to think WHY you are performing the simulation:
– What information are you looking for?
– What do you know about the inlet conditions?
In this case we were interested in checking the pressure drop, and assessing the amount of mixing
present around this T-piece.
66
Optional Exercise 1
If you have sufficient time available, you could investigate the effect of changes in the
set-up on the pressure drop.
Increase the velocity on inletz to 5 [m s^-1].
• First make a copy of Analysis System B.
– Right-click on the first cell and select Duplicate.
• Next rename the new system, C.
– Right-click on the first cell and select Rename.
– Type the name, velocity, in the box.
• Now double-click on Setup in the new system so that you can edit inletz in CFX-Pre.
• Run the CFX-Solver and check the User Points to see that the values have increased.

67
Optional Exercise 2
Change to a more viscous fluid
• Make a copy of Analysis System B and rename it glycerol.
• Open CFX-Pre and double-click on junction in the Outline tree to edit the domain.
• Click on the ‘…’ button for Material and then on to access the list of Library Data.
• Select Glycerol C3H8O3 from Constant Property Liquids and click on OK and OK again to set it as the Material.
• Click on OK for the domain.

68
Optional Exercise 2 continued
• In the Outline tree expand
Materials and open up the details
for Glycerol CH8O3.
• On the Material Properties tab
expand the Transport Properties
section to see the Dynamic
Viscosity.
• It is 1.495 [Pa s] compared with
0.0008899 [Pa s] for water.
• Close CFX-Pre and run the CFX-
Solver.
• Check the plot of User Points to
see the pressure drop.
69
Further work
There are many ways the simulation in this workshop could be extended.

•Better inlet profiles


– current boundary conditions (velocity inlets) assume uniform profiles
– specify profiles (of velocity, turbulence, etc), or
– extend the geometry so that inlets and outlets are further from junction

•Mesh independence
– check that results do not depend on mesh
– run with the Upwind advection scheme (first order) to see how much the solution differs
– re-run simulations with finer mesh(es)

•Temperature-dependent physical properties


– Density
– Viscosity, etc
70

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy