cfd pro 14.5 ws07 inline mixer cfx

27
© 2013 ANSYS, Inc. December 12, 2013 1 Release 14.5 14.5 Release Workshop 07 Inline Mixer Introduction to ANSYS CFD Professional

Upload: mahir-soyer

Post on 04-Dec-2015

294 views

Category:

Documents


15 download

DESCRIPTION

cfd

TRANSCRIPT

Page 1: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 1 Release 14.5

14.5 Release

Workshop 07 Inline Mixer

Introduction to ANSYS CFD Professional

Page 2: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 2 Release 14.5

Overview

This workshop simulates an inline static mixing device. Two side inlets inject hot fluid into the main flow just before a restriction in the pipe, designed to enhance mixing

A Profile Boundary Condition is used for the velocity main inlet, for which the temperature is set at 298 [K]

Fluid enters the side inlets at 325 [K] and 5 [m/s]

Symmetry planes divide the model into ¼ of its initial size

We will create an Additional Variable to mark the flow from the side inlet and another to indicate the Fluid Age

Page 3: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 3 Release 14.5

Mesh Checking Before setting up the simulation you will check the mesh quality in CFD-Post. This can be useful when assessing whether mesh quality is the cause of problems in the solution.

1. Start ANSYS Workbench and save the project to your working directory (File > Save As…)

2. Drag and drop a Results component system into the Project Schematic. Open CFD-Post by double clicking on the Results cell or right clicking to select Edit

3. In CFD-Post select File > Load Results and browse to the directory containing the mesh file Inline_Mixer_Mesh.gtm (workshop_input_files\WS_03_Mixing Tube). Make sure Files of type is set to All Readable Files or CFX so that you can select the file. Then click on Open

Page 4: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 4 Release 14.5

3. Click on the Calculators tab and highlight Mesh Calculator

4. Examine the results for each of the functions. Guidelines from the Help documentation (search for “Mesh Visualization Advice”) have been copied below

Mesh Checking

Page 5: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 5 Release 14.5

Two metrics fall outside the recommended values: • Minimum Face Angle < 10°

• Element Volume Ratio > 30

Now create some plots to view these mesh regions:

• Create a Volume object (Location > Volume)

There are very few elements of this quality

• Create a second Volume object using the Isovolume Method with the variable Element Volume Ratio above a Value of 30. Check the Inclusive box to include elements at that value so that the isovolume is visible. On the Colour tab change the Colour to something that will stand out

• There are few elements with high Element Volume Ratios

• They overlap the elements with poor face angles

Mesh Checking

Method = Isovolume

Variable = Minimum Face Angle

Mode = Below Value

Value = 15 [degree]

Page 6: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 6 Release 14.5

5. Edit the object Default 2D Region (under the Mesh Regions branch in the Outline tree)

Mesh Checking

6. View the mesh on this object by editing its Render properties to Show Mesh Lines

A finer mesh in the area of the isovolumes would improve the mesh quality. A coarse mesh was used to minimise solution times

7. Close CFD-Post (File > Close CFD-Post)

Page 7: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 7 Release 14.5

1. Drag and drop a CFX Component System into the Project Schematic and edit the Setup cell to open CFX-Pre

2. Right click on Mesh in the Outline tree and select Import Mesh > CFX Mesh. You can then browse to the directory containing Inline_Mixer_Mesh.gtm and select it

– The mesh represents one quarter of the full geometry

3. Click on Open to import the mesh

Starting the Simulation

Page 8: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 8 Release 14.5

The next step is to prepare the profile boundary data so that they can be used to define the velocity components on the main inlet. The data are contained in a file called Inline_Mixer_BC_Profile.csv. Files such as this can be created by exporting solution data from CFD-Post.

Starting the Simulation

4. Select Tools > Initialise Profile Data

5. Select the Data File as Inline_Mixer_BC_Profile.csv

The profiles for the velocity components are listed

6. Click OK. The User Function, MainInlet, is added to the Outline tree

Page 9: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 9 Release 14.5

We will create two Additional Variables, one will serve as a marker for fluid entering through the side inlet and the other will be an indicator of fluid age, i.e. the time taken for the fluid to reach a given point. It is defined as D(Fluid Age)/Dt = 1, which provided by a unit source term.

Creating the Additional Variables

• Right-click on Additional Variables in the Outline Tree and select Insert > Additional Variable

• Name it Side and leave the Variable Type as Specific and the Units as [ ]

• Repeat the above steps to create a Volumetric AV called Fluid Age with units of [s]

Page 10: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 10 Release 14.5

Now create the fluid domain:

1. Right-click on Default Domain in the Outline and rename it InlineMixer

2. Double-click on InlineMixer to edit it and set the following on the Basic Settings:

• Material = Water

• Reference Pressure = 1 [ atm ]

Creating the Domain

Page 11: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 11 Release 14.5

Select the Fluid Models tab:

1. Set the following:

• Heat Transfer Model = Thermal Energy

• Turbulence Model = k-Epsilon

2. In the Additional Variables section highlight Fluid Age and ensure that the Option is set to Transport Equation

3. Do the same for Side

4. Click on OK to complete the specification of the domain

Creating the Domain

Page 12: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 12 Release 14.5

1. Insert a new boundary by right-clicking on the domain InlineMixer in the Outline tree

2. Set the Name to Main Inlet and click OK

3. On the Basic Settings tab, set Boundary Type to Inlet, and Location to Main Inlet

4. Turn on the Use Profile Data toggle

• The previously initialised profile MainInlet is displayed

5. Click Generate Values and switch to the Boundary Details tab

Generate Values automatically enters appropriate expressions that refer to the selected profile.

Inlet Boundary Conditions

Page 13: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 13 Release 14.5

6. On the Boundary Details tab set the Static Temperature to 298 [K]

7. If necessary, change the option for Mass and Momentum to Cart Vel Components. The User Function, MainInlet , is automatically used

8. Give Fluid Age a Value of 0 [s] and Side a value of 0 [ ]

9. Click Apply, not OK

10. Select the Plot Options tab and enable the Boundary Contour toggle

11. Set the Profile Variable to W and click Apply The profile is a 1/7

th power law profile, which is commonly used to describe the boundary layer

12. Turn off the Boundary Contour toggle and click OK

Inlet Boundary Conditions

Page 14: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 14 Release 14.5

Now create the side inlet boundary condition:

1. Insert a new boundary named Side Inlet

2. On the Basic Settings tab, set Boundary Type to Inlet, and Location to Side Inlet

3. On the Boundary Details tab set the Mass and Momentum Option to Normal Speed with a value of 5 [m s^-1]

4. Set Static Temperature to 325 [K]

5. Set the Value of Side to 1 [ ] and Fluid Age to 0 [s]

6. Click OK

Inlet Boundary Conditions

Page 15: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 15 Release 14.5

Next, create the outlet boundary condition:

1. Insert a new boundary named Outlet

2. On the Basic Settings tab set Boundary Type to Outlet and Location to Outlet

3. Click the Boundary Details tab and set the Mass and Momentum Option to Average Static Pressure with a value of 0 [ Pa ]

4. Click OK

Outlet Boundary Condition

Page 16: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 16 Release 14.5

Lastly create the symmetry boundary conditions:

1. Insert a new boundary named Sym 1

2. On the Basic Settings tab set Boundary Type to Symmetry and Location to Sym1

3. Click OK

4. Insert a new boundary named Sym 2

5. On the Basic Settings tab, set Boundary Type to Symmetry and Location to Sym2

6. Click OK

Symmetry Boundary Conditions

Page 17: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 17 Release 14.5

A unit source is needed in the transport equation for Fluid Age. To include this source we need to create a Subdomain.

Source for Fluid Age

1. Right-click on InlineMixer in the Outline Tree and select Insert > Subdomain and leave the name as the default

2. On the Basic Settings tab pick the solid B7 as the Location

3. Switch to the Sources tab and activate Sources

4. In the list of Equation Sources, highlight Fluid Age, click in the check box and give it a value of 1

Page 18: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 18 Release 14.5

1. Double-click Solver Control in the Outline tree

2. Set Timescale Control to Physical Timescale, and set the Physical Timescale to 5 [ s ]

3. Click OK

Solver Control

Page 19: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 19 Release 14.5

1. Save the settings by selecting File > Save Project and then close CFX-Pre (File > Close CFX-Pre)

2. To write the definition file, the input file for the CFX-Solver, and start up the CFX Solver Manager, double-click on the Solution cell in the CFX component system in the Project Schematic

3. When the CFX-Solver Manager opens, click Start Run

4. The run should finish after about 40 iterations. When it does so, close the CFX-Solver Manager (File > Close CFX-Solver Manager)

5. In the Project Schematic double-click on the Results cell of the CFX component system to open CFD-Post

Running the Solver

Page 20: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 20 Release 14.5

One of the variables written to the results file is Yplus. This variable gives the dimensionless distance between a wall and the first node from the wall. This is an important quantity for turbulence models since the turbulent wall functions are valid only below certain Yplus values. For the k-epsilon model Yplus should be < 100. Note that you can only plot Yplus on walls.

Colour the InlineMixer Default boundary using Yplus (to select Yplus use the … button)

• Yplus is > 200 over most of the area of the walls

• The thickness of the first inflation layer from the wall should be reduced to obtain more accurate results. To maintain good mesh quality when reducing the first layer thickness, you will often have to include more inflation layer and/or use a finer mesh

For turbulent flows you should always check the Yplus values in your results

Post-processing

Page 21: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 21 Release 14.5

The mixing of the fluid from the different inlets can be visualised with a plot of temperature distribution

1. Double-click on Sym 1 in the Outline tree to edit

2. Set the following on the Colour tab:

• Mode to Variable

• Variable to Temperature

• Range to User Specified

• Min to 298 [ K ]

• Max to 302.5 [ K ]

The temperature profile appears well mixed within 3 pipe diameters downstream of the flow restriction

Post-processing

Page 22: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 22 Release 14.5

We can also visualise mixing by plotting contours of the variable Side. This will be done on a series of planes downstream from Side Inlet. The definition of the planes will be imported from a state file.

Post-processing

3. File > Load State. Select proceed and browse to the file called planes.cst. State Option = Add to Current State.

4. Create a contour plot located on Planes 1 - 7, PlaneSideInlet and Out (…).

5. Set a User Specified Range of 0 – 0.15. At perfect mixing the concentration would be 0.107, which can be checked with expression:

massFlow()@Side Inlet /(massFlow()@Side Inlet + massFlow()@Main Inlet )

Page 23: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 23 Release 14.5

The variable Fluid Age would reveal regions where fluid is not being flushed through.

Post-processing

6. Change the plot variable to Fluid Age and the Range to Local

7. Colour Sym 1 with Fluid Age

The value of Fluid Age is generally increasing towards the outlet, without any hot spots that would concern us

Page 24: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 24 Release 14.5

The flow is viewed by means of a vector plot

4. Turn off visibility for Sym 1

5. Create a Vector plot on the location Sym 1

Mixing is enhanced by the large recirculation zone downstream of the restriction

Post-processing

Page 25: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 25 Release 14.5

The full geometry can be displayed by means of an instance transform

1. Turn off visibility of all plots

2. Colour the InlineMixer Default boundary with Temperature, using a Local Range

3. In the Outline tree edit the User Locations and Plots > Default Transform object

4. Turn off Instancing Info From Domain, change Number of Graphical Instances to 2 and then turn on Apply Rotation

5. Change the Angle From setting to Value, enter an Angle of 180 [degree]

Post processing

Page 26: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 26 Release 14.5

6. Turn on Apply Reflection and set the Method to ZX Plane with a Y value of 0 [ m ]

7. Click Apply

Two transforms are performed: a rotation of 180 degrees about the Z- axis and then a reflection in the ZX plane. This results in four copies of the original geometry

8. Turn off visibility of the Wireframe

9. Turn off visibility of InlineMixer Default

Post-processing

The Default Transform applies to all existing and new objects by default. You can create new transforms and apply them to selected objects as necessary.

Page 27: CFD Pro 14.5 WS07 Inline Mixer CFX

© 2013 ANSYS, Inc. December 12, 2013 27 Release 14.5

Now create an Isosurface of Temperature:

1. Select Location > Isosurface

2. Accept the default name by clicking OK

3. Set Variable to Temperature

4. Set Value to 301.5 [K], a little above the mass-flow averaged temperature on the outlet. Use the Function Calculator to evaluate this.

Post-processing

The isosurface is reasonably axisymmetric 1.5 - 2 pipe diameters downstream of the restriction, where the flow has started to recover.