39 1 1MB
Workshop 03 Mixing Tube 14.5 Release
Introduction to ANSYS CFX © 2012 ANSYS, Inc.
December 17, 2012
1
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] The fluid viscosity is set as a function of temperature using CEL Symmetry planes divide the model into ¼ of its initial size
© 2012 ANSYS, Inc.
December 17, 2012
2
Release 14.5
Mesh Checking Before setting up the simulation you will check the mesh quality in CFD-Post. It is good practice to check the quality of your mesh.
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 © 2012 ANSYS, Inc.
December 17, 2012
3
Release 14.5
Mesh Checking 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
© 2012 ANSYS, Inc.
December 17, 2012
4
Release 14.5
Mesh Checking 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)
Method = Isovolume Variable = Minimum Face Angle
Mode = Below Value Value = 15 [degree]
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
© 2012 ANSYS, Inc.
December 17, 2012
5
Release 14.5
Mesh Checking 5. Edit the object Default 2D Region (under the Mesh Regions branch in the Outline tree) 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)
© 2012 ANSYS, Inc.
December 17, 2012
6
Release 14.5
Starting the Simulation 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
© 2012 ANSYS, Inc.
December 17, 2012
7
Release 14.5
Starting the Simulation 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. 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
© 2012 ANSYS, Inc.
December 17, 2012
8
Release 14.5
Expressions for Viscosity For this workshop the default viscosity of water will be replaced with a temperature-dependent expression 1. Right-click on Expressions in the Outline tree and insert a new expression called Tlower. Enter a value of 275.0 [K] in the Definition box of the Expression editor 2. Right-click on the Expressions object in the editor to insert the following expressions:
• • • •
Tupper = 325.0 [K] VisAtTupper = 5.45E-4 [N s m^-2] VisAtTlower = 1.8E-3 [N s m^-2] VisT = VisAtTlower + (VisAtTupper VisAtTlower)*(T-Tlower)/(TupperTlower)
Expressions are case sensitive. To ensure that syntax is correct, you can use drop-down menus by right-clicking in the Definition box © 2012 ANSYS, Inc.
December 17, 2012
9
Release 14.5
Checking the Viscosity 4. Double-click the VisT expression and then select the Plot
5. To view how VisT varies with temperature, turn on the T toggle and enter a Start of Range of 275 [K] and an End of Range of 325 [K] 6. Click Plot Expression
• The expression produces sensible values of viscosity over the given range of temperatures. To confirm that the expression would be invalid at larger values of T, click Define Plot and enter higher End of Range temperatures. To protect against invalid values, you could use an expression that clips viscosity, for example: max(VisAtTupper,VisT)
© 2012 ANSYS, Inc.
December 17, 2012
10
Release 14.5
Applying Viscosity Expression Now modify the properties of Water : 1. Expand Materials in the Outline tree and doubleclick on Water 2. Click the Material Properties tab and expand the Transport Properties section. 3. Click on the expression icon. 4. Right click in the Dynamic Viscosity box and select the expression VisT 5. Click OK © 2012 ANSYS, Inc.
December 17, 2012
11
Release 14.5
Creating the Domain Next 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 ] 3. Set the following on the Fluid Models tab:
• Heat Transfer Model = Thermal Energy • Turbulence Model = k-Epsilon 4. Click OK to complete the domain specification
© 2012 ANSYS, Inc.
December 17, 2012
12
Release 14.5
Inlet Boundary Conditions 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. © 2012 ANSYS, Inc.
December 17, 2012
13
Release 14.5
Inlet Boundary Conditions 6.
On the Boundary Details tab set the Static Temperature to 298 [K]
7.
Change the option for Mass and Momentum to Cart Vel Components. The User Function, MainInlet , is automatically used
8.
Click Apply, not OK
9.
Select the Plot Options tab and enable the Boundary Contour toggle
10. Set the Profile Variable to W and click Apply •
The profile is a 1/7th power law profile, which is commonly used to describe the boundary layer
11. Turn off the Boundary Contour toggle and click OK
© 2012 ANSYS, Inc.
December 17, 2012
14
Release 14.5
Inlet Boundary Conditions 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] and click OK
© 2012 ANSYS, Inc.
December 17, 2012
15
Release 14.5
Outlet Boundary Condition 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
© 2012 ANSYS, Inc.
December 17, 2012
16
Release 14.5
Symmetry Boundary Conditions 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
© 2012 ANSYS, Inc.
December 17, 2012
17
Release 14.5
Solver Control 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
© 2012 ANSYS, Inc.
December 17, 2012
18
Release 14.5
Running the Solver 1. Save the settings by selecting File > Save Project and then close CFXPre (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
© 2012 ANSYS, Inc.
December 17, 2012
19
Release 14.5
Post-processing 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 > 100 over most 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
© 2012 ANSYS, Inc.
December 17, 2012
20
Release 14.5
Post-processing The mixing of the fluid from the different inlets will 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
© 2012 ANSYS, Inc.
December 17, 2012
21
Release 14.5
Post-processing 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
© 2012 ANSYS, Inc.
Mixing is enhanced by the large recirculation zone downstream of the restriction
December 17, 2012
22
Release 14.5
Post processing 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] © 2012 ANSYS, Inc.
December 17, 2012
23
Release 14.5
Post-processing 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 Zaxis and then a reflection in the ZX plane. This results in four copies of the original geometry
8. Turn off visbililty of the Wireframe
9. Turn off visibility of InlineMixer Default 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. © 2012 ANSYS, Inc.
December 17, 2012
24
Release 14.5
Post-processing 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. The isosurface is reasonably axisymmetric 1.5 - 2 pipe diameters downstream of the restriction, where the flow has started to recover. © 2012 ANSYS, Inc.
December 17, 2012
25
Release 14.5