Introduction to CFX
WS3-1
Introduction
Workshop Supplement
In this workshop you will be analyzing the effect of computers and workers on the temperature distribution in an office. In the first stage airflow through the supply air ducts will be simulated and the outlet conditions for the duct will be used to set the inlet conditions for the room. Although both components could be analyzed together, separating the two components allows different room configurations to be analyzed without solving the duct flow again.
WS3-2
Duct Simulation
The operating conditions for the flow are: The working fluid is Air Ideal Gas Fluid Temperature = 21 [C] Inlet: 0 [atm] Total Pressure Outlet: 0.225 [kg/s] (per vent)
Workshop Supplement
vent2 Inlet
vent1
WS3-3
Workshop Supplement
1. Open Workbench 2. Drag CFX into the Project Schematic from the Component Systems toolbox 3. Change the name of the system to duct 4. Save the project as RoomStudy.wbpj in an appropriate directory 5. Double-click Setup
WS3-4
Import Mesh
Workshop Supplement
The first step is to import the mesh that has already been created: 1. Right-click on Mesh in the Outline tree and select Import Mesh > ICEM CFD 2. Select the file duct_mesh.cfx5 3. Make sure Mesh Units are in m and click Open to import the mesh
WS3-5
Create Domain
You can now create the computational domain:
Workshop Supplement
1. Double-click on Default Domain in the Outline tree to edit the domain 2. On the Basic Settings tab, set the Fluid 1 Material setting to Air Ideal Gas 3. Switch to the Fluid Models tab 4. Set the Heat Transfer Option to Isothermal
Heat Transfer is not modeled, but since the working fluid is an ideal gas we need to provide a temperature so its properties can be calculated
5. Set the Fluid Temperature to 21 [C] 6. Change the Turbulence Model Option to Shear Stress Transport 7. Click OK to commit the changes to the domain
WS3-6
Workshop Supplement
WS3-7
Solver Control
1. Double click on Solver Control from the Outline tree 2. Enable the Conservation Target toggle
Workshop Supplement
The default Conservation Target is 1%. This means that the global imbalance for each equation must be less than 1% (i.e. (flux in flux out)/flux in < 1%). The solver will not stop until both the Residual Target and the Conservation Target have been met (or Max. Iterations is reached).
WS3-8
Monitor Point
Workshop Supplement
Monitor points are used to monitor quantities of interest during the solution. They should be used to help judge convergence. In this case you will monitor the velocity of the air that exits through the vent. One measure of a converged solution is when this air has reached a steadystate velocity. 1. 2. 3. 4. 5. Double click on Output Control from the Outline tree Switch to the Monitor tab and enable the Monitor Options toggle Under Monitor Points and Expressions, click the New icon Keep the default name Monitor Point 1 Set the Option to Expression
WS3-9
Monitor Point
6. In the Expression Value field, type in:
areaAve(Velocity w)@VENT1
Workshop Supplement
WS3-10
Workshop Supplement
You can now save the project and proceed to write a definition file for the solver: 1. 2. 3. 4. Close CFX-Pre to return to Project window Save the project Right-click on Solution and select Edit Choose Start Run
WS3-11
Workshop Supplement
1. Examine the residual plots for Momentum and Mass and Turbulence 2. Examine the User Points plot
3. When the run finished close the Solver Manager 4. View the results in CFD-Post by double-clicking Results in the Project window
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.
WS3-12
CFD-Post
Workshop Supplement
Now we will export a Boundary Condition profile from the outlet regions for use in the next simulation. 1. Select File > Export 2. Change the file name to vent1.csv 3. Use the browse icon to set an appropriate directory 4. Set Type as BC Profile and Locations as VENT1 5. Leave Profile Type as Inlet Velocity and click Save 6. Similarly export a BC profile of VENT2 to the file named vent2.csv 7. Quit CFD-Post and return to the Project Schematic
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002599
WS3-13
Operating Conditions
The operating conditions for the flow in the room are:
Workshop Supplement
The working fluid is Air Ideal Gas Computer Monitor Temperature = 30 [C] Computer Vent Flow Rate: 0.033 [kg/s] @ 40 [C] (per computer) Ceiling Vents: Profile Data, Temperature=21 [C]
vent2 outlet
vent1
WS3-14
Workshop Supplement
1. Drag CFX into the Project Schematic from the Component Systems toolbox 2. Change the name of the system to room 3. Double-click Setup in the room system
WS3-15
Import Mesh
Workshop Supplement
The first step is to import the mesh that has already been created: 1. Right-click on Mesh in the Outline tree and select Import Mesh > ICEM CFD 2. Select the file room.cfx5 3. Make sure the Mesh Units are in m and click Open to import the mesh
WS3-16
Create Domain
You can now create the computational domain:
Workshop Supplement
1. Edit Default Domain from the Outline tree 2. On the Basic Settings tab, set the Fluid 1 Material setting to Air Ideal Gas 3. Set the Buoyancy Option to Buoyant. Set the Buoyancy settings as shown: Gravity X Dirn. = 0 [ m s^-2 ] Gravity Y Dirn. = 0 [ m s^-2 ] Gravity Z Dirn. = -g (first, click the Enter Expression icon ) Buoy. Ref. Density = 1.185 [ kg m^-3 ]
Enabling Buoyancy allows for natural convection due to density variations. The buoyancy force is a function of density variations relative to the buoyancy reference density. Since density variations can be very small, using a reference density help avoid round-off errors. The reference density should be a typical fluid density in the domain.
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.
WS3-17
Create Domain
4. 5. 6. 7. 8. 9.
Workshop Supplement
Switch to the Fluid Models tab Change the Heat Transfer Option to Thermal Energy Change the Turbulence Model Option to Shear Stress Transport Switch to the Initialisation tab Check the Domain Initialisation box Set the Temperature Option to Automatic with Value. Set the Temperature to 21 [C]
For most cases, setting an initial condition for domain temperature is not necessary since the solver can automatically calculate initial conditions. However, if you input a value that is closer to the final solution than what the solver would automatically calculate, you will reach a converged solution faster.
WS3-18
Workshop Supplement
WS3-19
Workshop Supplement
On the Boundary Details tab check that the expressions make sense Heat Transfer Option: Static Temperature Static Temperature: 21 [C]
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.
WS3-20
Workshop Supplement
Name: vent2 Boundary Type: Inlet Location: VENT2 Select Use Profile Data and choose VENT2 as the Profile Name Click Generate Values
The Mass and Momentum Option will be automatically updated
Workshop Supplement
Workshop Supplement
WS3-23
Workshop Supplement
This enforces a uniform mass flow across the entire boundary region, rather than letting a natural velocity profile develop. It is used here to make sure the flow rate through each intake is the same.
WS3-24
Solver Control
1. Edit Solver Control from the Outline tree
Workshop Supplement
Due to nature of this flow it will take a long time for a steady-state condition to be reached
2. Increase the Max. Iterations to 750 3. Change the Timescale Control to Physical Timescale 4. Set a Physical Timescale of 2 [s] 5. Enable the Conservation Target toggle 6. Click OK to commit the settings
WS3-25
Monitor Point
Workshop Supplement
Monitor points are used to monitor quantities of interest during the solution. They should be used to help judge convergence. In this case you will monitor the temperature of the air that exits through the outlet. One measure of a converged solution is when this air has reached a steady-state temperature.
1. 2. 3. 4. 5.
Edit Output Control from the Outline tree Switch to the Monitor tab and enable the Monitor Options toggle Under Monitor Points and Expressions, click the New icon Enter the Name as temp Set the Option to Expression
WS3-26
Monitor Point
6. In the Expression Value field, type in:
massFlowAve(Temperature)@outlet
Workshop Supplement
WS3-27
Workshop Supplement
You can now save the project and proceed to write a definition file for the Solver: 1. Close CFX-Pre to return to the Project window and save the project The solution will take several hours to solve on one processor. To save time, a results file is provided with this workshop. The Project Schematic shows that the room Solution has not been completed, so you cannot view the results in CFD-Post yet. To view the results for the file provided youll need to add the results to the project. 2. 3. 4. 5. Select File > Import from the main menu in Workbench Set the file filter to CFX-Solver Results File Select the results file provided with this workshop, room_001.res Change the name of the system to room results
WS3-28
Project Schematic
Workshop Supplement
WS3-29
Workshop Supplement
1. Right-click on Solution in the room results system and select Display Monitors 2. Examine the residual plots for Momentum and Mass, Heat Transfer and Turbulence
The Residual Target of 1e-4 was met at about 270 iterations, but the solver did not stop because the Conservation Target had not been met
WS3-30
Workshop Supplement
Residual plot
Monitor points
WS3-31
Workshop Supplement
6. Check the Domain Imbalances at the end of the .out file for each equation
You can right click in the text monitor, select Find and search for Domain Imbalance to find the appropriate section An imbalance is given for the U-Mom, V-Mom, W-Mom, P-Mass and HEnergy equations It took 653 iterations to satisfy the Conservation Target of 1% for the HEnergy equation see the Plot Monitor 1 tab
7. Close the Solver Manager 8. View the results in CFD-Post by double-clicking Results in the Project Schematic from the room system
WS3-32
CFD-Post
Start by creating a ZX Plane at Y = 1.2 [m] 1. Select Location > Plane from the toolbar
Workshop Supplement
2. In the Details windows on the Geometry tab, set the Definition Method to ZX Plane 3. Set Y to 1.2 [m] 4. On the Colour tab set Mode to Variable 5. Set Variable to Temperature 6. Set Range to Local and click Apply
Observe the temperature distribution (for example, how the warm air collects under the table)
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.
WS3-33
CFD-Post
Workshop Supplement
Using the same procedure, create several other planes displaying the temperature profile: 1. ZX Plane at Y = 2 [m] 2. ZX Plane at Y = 5.1 [m] 3. XY Plane at Z = 0.25 [m] 4. When finished observing the temperature distribution, uncheck the visibility boxes of the planes that you created
WS3-34
CFD-Post
Plot vector plots on the planes that you created: 1. Click Insert > Vector from the main menu
Workshop Supplement
2. In the Details windows on the Geometry tab, set Location to Plane 2 and Symbols Size to 3.0 in Symbol tab 3. Click Apply 4. After observing the flow behavior on Plane 2, switch the Location to Plane 4
WS3-35
Workshop Supplement
You may want to adjust the values on the Limits tab (Max. Segments)
4. Create an isosurface based on different temperatures (e.g., 22 [C], 24 [C], etc.) 5. Calculate the areaAve of Wall Heat Flux on the workers
Click Tools > Function Calculator
ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.
WS3-36