61
© 2014 ANSYS, Inc. April 11, 2014 1 Release 15.0 15.0 Release Introduction to ANSYS CFX Workshop 01 Fluid Flow and Heat Transfer in a Mixing Tee

CFX-Intro 15.0 WS01 Mixing-Tee

Embed Size (px)

DESCRIPTION

CFX-Intro 15.0 WS01 Mixing-Tee

Citation preview

Page 1: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 1 Release 15.0

15.0 Release

Introduction to ANSYS CFX

Workshop 01 Fluid Flow and Heat Transfer in a Mixing Tee

Page 2: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 2 Release 15.0

Introduction

• Introductory tutorial for CFX

• Starting from existing mesh – Mesh generated in earlier tutorial during the DM / Meshing session, if available

• 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.

Page 3: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 3 Release 15.0

Pre-processing steps

• Launch CFX-Pre from Workbench

• Use pre-defined materials

• Define the fluid models in a domain

• Create & edit objects in CFX-Pre

• Define boundary conditions

• Set up monitor points using simple expressions

• Launch CFD-Post from an existing CFX simulation in Workbench

• Rotate, zoom and pan the view

• Create contour plots

• Create a plane for use as a locator

• Create a velocity vector plot

• Use pre-defined views

• Create streamlines of velocity

• Create an isosurface, coloured by a separate variable

• Launch the CFX Solver Manager from Workbench

• Monitor convergence

Page 4: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 4 Release 15.0

Start Workbench

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

Before proceeding further with this workshop, we will take a look at the Workbench interface and how a project is constructed

Page 5: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 5 Release 15.0

ANSYS Workbench - Overview

•The options visible in the Toolbox show all the products (systems) you have licenses for.

•TIP: If this list appears empty, you have a problem with your licensing!

“Analysis Systems” are ready-made stencils that include all the individual systems (applications) needed for common analyses (e.g. Geometry + Mesh + Solver + Post-Processor)

“Design Exploration” provides tools for optimising designs and understanding the parametric response.

“Component Systems” are the individual building-blocks for each stage of the analysis

“Custom Systems” are ready-made combinations of systems, e.g. for fluid structure interaction, FSI

“External Connection Systems” allows integration of external processes & customisation

Page 6: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 6 Release 15.0

ANSYS Workbench - Basic Workflow

•Dragging an Analysis System on to the Project Schematic lays out a workflow, comprising all the steps needed for a typical analysis.

•Workflow is from top to bottom. As each stage is complete, the icon at the right-hand side changes

Page 7: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 7 Release 15.0

ANSYS Workbench - Alternative Workflow

•An analysis can also be prepared by selecting the individual Component Systems and linking them together with connectors. •TIP: There are two ways to create the connectors between the systems: 1) Use the mouse to draw a line (eg A2 to B2, B3 to C2 etc) 2) Or drop the new system on the cell of the upstream one - the

link will be generated automatically.

Page 8: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 8 Release 15.0

Your Workbench project – existing project

• If you have attended the ANSYS Meshing course then you can use the mixing tee mesh from the first workshop of that course (if not then skip to the slide headed Your Workbench Project – new project)

– Open the existing project

– Drag a CFX Component System on to the Mesh cell

Page 9: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 9 Release 15.0

Your Workbench project – existing project

• 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

Page 10: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 10 Release 15.0

Your Workbench project – new project

• If you do not already have a mesh then you will need to import one into Workbench – From the Analysis Systems toolbox, drag a Fluid Flow (CFX) Analysis System into

the Project Schematic

Page 11: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 11 Release 15.0

• Right-click on Mesh and select Import Mesh File

• Select mixing_tee.msh (workshop_input_files\WS_01_Mixing Tee)

– Note: Change the filter on the right side of the file selection box to read Fluent Files (*.cas,*.msh)

• You can now double-click Setup to open CFX-Pre

Your Workbench project – new project

Page 12: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 12 Release 15.0

CFX-Pre GUI Overview

• Outline Tree – To define your simulation, follow

the Outline tree from top to bottom

– Double-click to edit existing object

– Some items are optional, depending on your simulation

– New objects are inserted by right-clicking in the Outline tree

• Message Window – Warnings, errors and messages

appear here

Page 13: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 13 Release 15.0

CFX-Pre GUI Overview - Useful Shortcuts Icons on Viewer Toolbar

Rotate

Pan + CTRL

Zoom + SHIFT

Box Zoom

Rotate

(on screen plane)

+ CTRL

(Hold while

tracing a box)

Shortcuts to functions

Page 14: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 14 Release 15.0

CFX-Pre Mesh and Regions

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 2-D regions for each domain

The Mesh is represented in Wireframe format in the Viewer

Expand the Mesh object to see all 3D & 2D mesh regions listed

Page 15: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 15 Release 15.0

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

Page 16: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 16 Release 15.0

CFX-Pre – Domain settings (continued)

• Double-click on the domain junction

• 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.

The Domain panel contains three tabs named Basic Settings, Fluid Models and Initialization. For more complex simulations additional tabs may appear

Page 17: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 17 Release 15.0

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

Page 18: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 18 Release 15.0

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.

Page 19: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 19 Release 15.0

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

Page 20: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 20 Release 15.0

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

Page 21: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 21 Release 15.0

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 will 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

Page 22: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 22 Release 15.0

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]

Page 23: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 23 Release 15.0

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

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]

• Leave all other settings at their default values

• Click OK

Page 24: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 24 Release 15.0

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

Page 25: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 25 Release 15.0

CCL at a Glance • Before proceeding you will now take a quick look at CCL (CFX Command

Language). CCL will be covered in detail in a later lecture.

• CCL describes objects in a command language format. You will come across CCL in all CFX modules. CCL allows you to perform batch processing and scripting. You can also use it to make changes to your set-up more quickly.

• Right-click on inlety and select Edit in Command Editor

• Close the Command Editor after taking a quick look at the CCL definition of the inlet boundary condition

Page 26: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 26 Release 15.0

Initialisation • 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

Page 27: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 27 Release 15.0

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 lecture. 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

Page 28: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 28 Release 15.0

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

Page 29: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 29 Release 15.0

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 lecture.

• 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.

• 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

Page 30: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 30 Release 15.0

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 to apply the settings and close the Output Control form

The monitor points can be viewed during the solution

Page 31: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 31 Release 15.0

Solution steps

• Launch CFX-Pre from Workbench

• Use pre-defined materials

• Define the fluid models in a domain

• Create & edit objects in CFX-Pre

• Define boundary conditions

• Set up monitor points using simple expressions

• Launch CFD-Post from an existing CFX simulation in Workbench

• Rotate, zoom and pan the view

• Create contour plots

• Create a plane for use as a locator

• Create a velocity vector plot

• Use pre-defined views

• Create streamlines of velocity

• Create an isosurface, coloured by a separate variable

• Launch the CFX Solver Manager from Workbench

• Monitor convergence

Page 32: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 32 Release 15.0

Obtaining a solution • Close CFX-Pre

– The CFX-Pre case will be saved automatically

• In Workbench save the project to MixingTee.wbpj in your working directory

• 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

Page 33: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 33 Release 15.0

Obtaining a solution 46 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.

Page 34: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 34 Release 15.0

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

Page 35: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 35 Release 15.0

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. So we would need to continue the run to improve accuracy

Page 36: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 36 Release 15.0

Post-processing Steps

• Launch CFX-Pre from Workbench

• Use pre-defined materials

• Define the fluid models in a domain

• Create & edit objects in CFX-Pre

• Define boundary conditions

• Set up monitor points using simple expressions

• Launch CFD-Post from an existing CFX simulation in Workbench

• Rotate, zoom and pan the view

• Create contour plots

• Create a plane for use as a locator

• Create a velocity vector plot

• Use pre-defined views

• Create streamlines of velocity

• Create an isosurface, coloured by a separate variable

• Launch the CFX Solver Manager from Workbench

• Monitor convergence

Page 37: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 37 Release 15.0

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

Page 38: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 38 Release 15.0

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

Page 39: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 39 Release 15.0

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 +

Page 40: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 40 Release 15.0

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 (if Lagrangian Particle tracking has been enabled in CFX-Pre)

Page 41: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 41 Release 15.0

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

Page 42: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 42 Release 15.0

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

Page 43: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 43 Release 15.0

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

Page 44: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 44 Release 15.0

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

Page 45: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 45 Release 15.0

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

Page 46: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 46 Release 15.0

CFD-Post – Creating a velocity vector plot

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

• Hide the plane 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

Page 47: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 47 Release 15.0

CFD-Post – Velocity vector plot • Set Locations to Plane 1

• Leave the Variable field set to Velocity

• Click Apply

Page 48: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 48 Release 15.0

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 orientate the view

Page 49: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 49 Release 15.0

CFD-Post – Creating velocity streamlines

• Hide the previously created vector plot, by un-checking the associated box in the tree view

• Click the Streamline icon from the toolbar

• Click OK, accepting the default name of Streamline 1

Page 50: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 50 Release 15.0

CFD-Post – Velocity streamlines • In the Start From field select both inlety and inletz. Use the ‘…’ icon to

the right of the field and select both locations using the CTRL key

• Leave the Variable field set to Velocity

Page 51: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 51 Release 15.0

CFD-Post – Velocity streamlines

• Click the Symbol tab

• Change the Stream Type to Ribbon

• Click Apply

• Examine the streamlines from different views using rotate, zoom and pan

– The ribbons give a 3-D representation of the flow direction

– Their colour indicates the velocity magnitude

– Velocity streamlines may be coloured using other variables e.g. temperature

Page 52: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 52 Release 15.0

CFD-Post – Creating a velocity isosurface

• Hide the previously created streamlines by un-checking the associated box in the tree view

• Click the Location button on the toolbar and select Isosurface from the drop-down menu

• Click OK, accepting the default name of Isosurface 1

Page 53: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 53 Release 15.0

CFD-Post – Velocity isosurface

• Set the Variable to Velocity (magnitude used in this context)

• Enter a value of 7.5 [m s^-1] in the Value field (this is an arbitrary value)

• Click Apply

– The speed is > 7.5 m/s inside the isosurface and < 7.5 m/s outside. Isosurfaces in general are useful for showing pockets of high velocity, temperature, turbulence, etc.

– Try values above and below 7.5 m/s

Page 54: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 54 Release 15.0

CFD-Post – Velocity isosurface (continued) By default an isosurface is coloured according with the variable used to create it (speed in this case) but a different variable can be used

• Click the Color tab

• Set the Mode to Variable

• Set Variable to Temperature

• Set the Range to Local

• Click Apply

Page 55: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 55 Release 15.0

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 A – Right-click on the first cell and select Duplicate

• Next rename the new system, B – 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

Page 56: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 56 Release 15.0

Optional Exercise 2 Change to a more viscous fluid

• Make a copy of Analysis System A and re-name 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

Page 57: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 57 Release 15.0

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

Page 58: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 58 Release 15.0

Optional Exercise 3

If you have attended the ANSYS DesignModeler and Meshing courses then you can see the effect of extending the outlet 16 inches further downstream

• In ANSYS DesignModeler you can use the high-y face as the base object for an extrusion and use the face normal to define the direction

Page 59: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 59 Release 15.0

Optional Exercise 3 continued

• In ANSYS Meshing you will need to re-apply the Named Selection called outlet

• One you have re-generated and updated the mesh, you can refresh the Setup cell to replace the old mesh with the new one and then re-run the CFX-Solver. It will initialise the run with the previous results and should take about 34 iterations to converge

• Open the new results in CFD-Post and view the plots

Page 60: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 60 Release 15.0

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

Page 61: CFX-Intro 15.0 WS01 Mixing-Tee

© 2014 ANSYS, Inc. April 11, 2014 61 Release 15.0

Wrap-up • This workshop has shown the basic steps that are applied in all CFD

simulations:

– Defining Material Properties

– Setting Boundary Conditions and Solver settings

– Running a simulation whilst monitoring quantities of interest

– Postprocessing 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.

• Knowing your aims from the start will help you make sensible decisions of how much of the part to simulate, the level of mesh refinement needed, and which numerical schemes should be selected.