Professional Documents
Culture Documents
Introduction
This tutorial illustrates the setup and solution of an unsteady manifold calculation using FLUENT. Flows within intake and exhaust manifolds are of great interest to automotive engineers. Computational uid dynamics (CFD) can provide valuable information about the nature of the manifold ow eld, including total pressure losses and ow splits for the manifold runners. Very often, the ows of interest are also unsteady. A typical example would be an exhaust manifold for which the runner inlet ows vary with the engine cycle. In this situation, the losses and ow splits vary as a function of time, and it is possible for the time-averaged unsteady ow to be dierent from a steady-state solution using average inlet/outlet conditions. The analysis of an unsteady manifold calculation will be carried out in two phases: 1. Setup and solve a steady-state solution using constant inlet or outlet boundary conditions. This solution will serve as the initial condition for the unsteady calculation. 2. Setup and solve for the unsteady solution. In this tutorial you will learn how to: Read an existing grid le into FLUENT. Setup and run a 3D steady-state problem with multiple inlets/outlets. Use tabulated prole data to apply unsteady boundary conditions. Setup and run an unsteady solution using the previous steady-state result as an initial condition.
Prerequisites
This tutorial assumes that you are familiar with the FLUENT interface and have completed Tutorial 1 from FLUENT 6.2 Tutorial Guide. Some of the basic steps in the setup and solution procedures will not be shown explicitly.
Problem Description
The manifold considered in this tutorial has two inlets for which a uniform velocity normal to the boundary will be prescribed. The outlet is at a xed pressure (0 gauge, relative to the environment). For the unsteady problem, the velocity is specied as a function of time through the use of tabulated data using the transient prole. A user-dened function (UDF) can also be used and is required to dene a varying transient prole. A 3D tetrahedral mesh containing 14184 cells was created for this problem. The mesh size was kept small in this case in order to minimize the computational eort required for the unsteady solution. However, all of the elements necessary to perform a more detailed analysis on a larger mesh are available in the present example.
Preparation
1. Copy the mesh le, manifold.msh.gz and the prole le, tab data.prof to your working directory. 2. Start the 3D version of FLUENT.
(c) Click Scale to scale the grid to millimeters. Conrm that the maximum x, y, and z values are 302.405 mm, 125.613 mm, and 17.7843 mm respectively.
The grid is now sized correctly, and the working units for length are set to millimeters. (d) Close the panel. Note: There is no need to change any other units in this problem because the default SI units will be used. The choice of millimeters for the unit of length has been made by the actions you have just taken. If you want to change the working units for length to something other than millimeters (say, inches), you would have to use the Set Units panel in the Dene pull-down menu. 4. Display the grid (Figure 1). Display Grid...
Y Z X
Grid
Extra: You can use the right mouse button to check which zone number corresponds to each boundary. If you click the right mouse button on one of the boundaries in the graphics window, its zone number, name, and type will be printed in the FLUENT console window. This feature is useful when you have several zones of the same type and you want to distinguish between them quickly.
Step 2: Models 1. Keep the default solver settings. Dene Models Solver...
In this application we assume incompressible ow. Hence we choose the segregated solver. For the initial run we calculate a steady-state solution. So all parameters take their default values. 2. Enable the energy equation. Dene Models Energy...
(a) Enable Energy Equation and click OK to close the panel. 3. Enable the standard k- turbulence model. Dene Models Viscous... 5
(a) Select k-epsilon (2 eqn) in the Model list. The original Viscous Model panel will expand when you do so.
Step 3: Materials 1. Dene the material data for the incompressible uid. Dene Materials... For this tutorial, you will model air as an incompressible uid. Assume that the kinematic and thermodynamic properties are constant. So no change is required in the materials panel.
Extra: You can modify the uid properties for the default material displayed in the Materials panel, or copy a material from the materials database. The materials database is opened by clicking Fluent Database... in the Materials panel. If the properties in the database are dierent from those you wish to use, you can still edit the values under Properties and click Change/Create to update your local copy. (The database will not be aected.) 2. Close the Materials panel.
Step 4: Boundary Conditions The manifold has two velocity inlet zones, velocity-inlet-1 and velocity-inlet-2, and a single pressure outlet zone, pressure-outlet-1. The walls of the domain are contained in the zone wall-17. You will set up the problem for a steady-state solution as described below. Dene Boundary Conditions...
1. Set the conditions for the uid. (a) Select uid-79 under Zone. (b) Click Set... to open the Fluid panel.
(c) Click OK to accept the default option, air, for Material Name. 2. Set the boundary conditions at the inlets. (a) Select velocity-inlet-1 under Zone and click the Set... button. Hint: If you are not sure of which inlet zone corresponds to the main inlet, probe the grid display with the right mouse button. The zone ID will be displayed in the FLUENT console window and the zone will automatically be selected in the Zone list. In 2D simulations, it may be helpful to return to the Grid Display panel and deselect the display of the uid and interior zones before probing with the mouse button for zone names. (b) Set the conditions for velocity-inlet-1 as shown in the Velocity Inlet panel.
(c) Click OK to select the values. 3. Repeat the above operations for velocity-inlet-2. Enter the values as shown in the panel.
4. Set the boundary conditions for pressure-outlet-1. (a) In the Boundary Conditions panel, select pressure-outlet-1. (b) Enter values as shown in the panel.
10
(c) Enter a value of 0.05 for the Backow Turbulence Intensity (fraction) and 30 mm for Backow Hydraulic Diameter. (d) Click OK. FLUENT will use the backow conditions only if the uid is owing into the computational domain through the outlet. Backow might occur at some point during the solution process. You should set reasonable backow conditions to prevent convergence from being adversely aected. 5. Keep the default boundary conditions for wall-17. This makes the assumption that there is no heat loss through the walls of the manifold. 6. Close the Boundary Conditions panel.
11
Step 5: Steady-State Solution The manifold model works best when you start from a good initial ow eld. So, rst calculate the steady-state ow eld. 1. Set the solution parameters. Solve Controls Solution...
(a) Retain the default values for the Under-Relaxation Factors. Note: For this problem, the default under-relaxation factors are satisfactory. If the solution diverges or the residuals display large oscillations, you may need to have the under-relaxation factors from their default values. See the FLUENT Users Guide for tips on how to adjust the under-relaxation parameters for dierent situations. (b) Under Discretization, choose the Standard scheme for Pressure, Second Order Upwind for Momentum, and First Order Upwind for Energy. (c) Select SIMPLE for the Pressure-Velocity Coupling. This results in better convergence behavior. (d) Click OK to accept the settings.
12
2. Enable the display of residuals during the solution process. Solve Monitors Residual...
(a) Select Plot under Options and click OK. For this calculation, the convergence tolerance of the continuity equation was kept at 0.001. You can reduce this value if necessary, depending on the behavior of the solution. 3. Dene the monitoring parameters to enable the plotting of mass ow rate and areaweighted average static temperature at the outow boundary. Solve Monitors Surface...
13
(a) Increase the value of Surface Monitors to 2. The top two rows of selections will be activated. (b) Activate the Plot, Print, and Write options for monitor-1. Note: When the Write option is selected in the Surface Monitors panel, the mass ow rate history will be written to a le. If you do not select the Write option, the history information will be lost when you exit FLUENT. (c) In the drop-down list under Every, select Iteration. (d) Click on Dene... to specify the surface monitor parameters in the Dene Surface Monitor panel.
i. Select Mass Flow Rate from the Report Type drop-down list. ii. Select pressure-outlet-1 under the Surfaces list.
14
iii. Click OK to dene the monitor. (e) In the Surface Monitors panel, activate Plot, Print, and Write options for monitor2. (f) Dene the values for the second monitor as shown in the following panel.
(g) Click OK in the Surface Monitors panel to enable the monitors. 4. Save the case le. File Write Case... (a) Enter manifold-ss.cas.gz under Case File and click OK. ! Always save your case le before beginning a calculation.
Note: While specifying the name, if you give the gz extension, FLUENT automatically saves the le in compressed format. 5. Initialize the ow eld at velocity-inlet-1. Solve Initialize Initialize... (a) Choose velocity-inlet-1 from the Compute From list and enter the values for the velocity components as shown in the following panel. (b) Click Init and close the panel.
15
The solution should be suciently converged after about 100 iterations (Figure 2, Figure 3 and Figure 4). 7. Check the mass ux balance. Report Fluxes... ! The residual history plot only indicates the solution convergence. Check the net mass uxes through the domain to ensure that mass is being conserved. (a) Select velocity-inlet-1, velocity-inlet-2 and pressure-outlet-1 under Boundaries. Keep the default Mass Flow Rate under Options and click on Compute.
16
1e+02 1e+01 1e+00 1e-01 1e-02 1e-03 1e-04 1e-05 1e-06 1e-07
Y Z X
20
40
60
80
100
120
Iterations
Scaled Residuals
Monitors monitor-1
-0.0200 -0.0250 -0.0300 -0.0350
Y Z X
20
40
60
80
100
120
Iteration
17
Monitors monitor-2
500.0000 480.0000 460.0000 440.0000 420.0000
Y Z X
20
40
60
80
100
120
Iteration
The net mass imbalance should be a small fraction (say, 0.5%) of the total ux through the system. If a signicant imbalance occurs, decrease the residual tolerances by at least an order of magnitude and continue iterating. 8. Save the data le. File Write Data... (a) Enter manifold-ss.dat.gz under Data File and click OK.
18
Step 6: Postprocessing for Steady-State Solution 1. Display lled contours of static pressure. Display Contours...
(a) Select Pressure... and Static Pressure from the Contours of drop-down lists. (b) Select Filled under Options. (c) Select all surfaces except interior-80 under Surfaces. (d) Click on Display to view the contours of static pressure (Figure 5) and close the panel. Use the left mouse button to manipulate the default view as shown in Figure 5. To know the exact value of the pressure at a particular point, click with the right mouse at that point and the values will be displayed in the FLUENT console window.
19
9.86e+02 8.94e+02 8.02e+02 7.09e+02 6.17e+02 5.25e+02 4.33e+02 3.41e+02 2.49e+02 1.57e+02 6.52e+01 -2.69e+01 -1.19e+02 -2.11e+02 -3.03e+02 -3.95e+02 -4.87e+02 -5.79e+02 -6.71e+02 -7.63e+02 -8.55e+02
Y Z X
Figure 5: Static Pressure for the Steady-State Manifold Solution 2. Display the pathlines. Display Path Lines... Pathlines are the lines traveled by neutrally buoyant particles in equilibrium with the uid motion. They are an excellent tool for visualization of complex 3D ows. (a) Select Particle Variables... and Particle ID from the Color by drop-down lists. (b) Select velocity-inlet-1 and velocity-inlet-2 under Release from Surfaces. (c) Set Step Size to 1 mm. (d) Click Display (Figure 6) and close the panel.
20
2.79e+02 2.65e+02 2.51e+02 2.37e+02 2.23e+02 2.09e+02 1.95e+02 1.81e+02 1.67e+02 1.53e+02 1.40e+02 1.26e+02 1.12e+02 9.77e+01 8.37e+01 6.98e+01 5.58e+01 4.18e+01 2.79e+01 1.39e+01 0.00e+00
Y Z X
21
Step 7: Unsteady Solution After the steady-state solution, you will now set up the unsteady manifold problem. The time dependent boundary data can be dened either by a user dened function (UDF) or by the use of a transient boundary prole. A UDF must be used if you are interested in dening spatial variations at the boundary. Two dierent transient prole data formats can be used. The tabulated format would be the simplest to read and write. 1. Create the tabulated transient prole le. For this problem the tab data.prof le is provided for you. It can be easily understood by viewing the contents of the le in a text editor. A boolean is included at the end of the rst line to denote whether or not the behavior at the boundary is periodic. 2. Read the transient prole le. (a) In the FLUENT console, click <Enter> to view the text commands list. (b) Type f or file. (c) Type read-transient-table or rtt and click <Enter>. FLUENT will prompt you to enter a lename. (d) Enter the lename, tab data.prof and click <Enter>. FLUENT will respond with a message indicating that the data is being read. The proles are shown in Figure 7. The velocity and temperature vary sinusoidally and the cycles repeat every 0.08 seconds.
22
Figure 7: (a) Inlet Velocity Versus Time for Inlet-1 and Inlet-2 (b) Inlet Temperature Versus Time for Inlet-1 and Inlet-2
23
(a) Under Time, select Unsteady. (b) Under Transient Controls, enable Non-Iterative Time Advancement. The non-iterative solver increases speed and eciency of calculations. It provides control over the maximum number of sub-iterations for each individual equation. For details about Non-Iterative Time Advancement Scheme (NITA), please refer to Section 26.3.4 of FLUENT 6.2 Users Guide. 4. Enable the proles in the velocity inlet boundary conditions. The names of the proles dened in tabulated data list can now be accessed in the boundary condition panel. Dene Boundary Conditions...
24
(a) Select velocity-inlet-1 under Zone in the Boundary Conditions panel and click the Set... button. (b) Select tab data vel1 in the Velocity Magnitude drop-down list. The data prole name will now appear to the right of the input line, indicating that the prole will be used to provide the value of the velocity magnitude rather than the input value. (c) Select tab data temp1 in the Temperature drop-down list. (d) Repeat the above two steps for velocity-inlet-2 using the appropriate data prole names tab data vel2 and tab data temp2. 5. Set the solution parameters. Solve Controls Solution...
25
(a) Retain the default setting of PISO for Pressure-Velocity Coupling. (b) Set the Relaxation Factor for Pressure, Turbulence Kinetic Energy, and Turbulence Dissipation Rate to 0.8. 6. Set up two surface monitors for the unsteady solution. (a) Open the Surface Monitors panel. Solve Monitors Surface... (b) Change the number of Surface Monitors to 4. i. Activate Plot, Print, and Write for monitor-3. ii. Change the update mode under Every to Iteration. iii. Click on the Dene... button and dene properties as shown in the panel.
26
This monitor will check the mass ow rate through the pressure outlet for each iteration. Ideally, this value should level o to a constant value prior to the next time step. iv. Activate Plot, Print, and Write for monitor-4. v. Change the update mode under Every to Time Step. vi. Click on the Dene... button and dene properties as shown in the panel.
vii. Click OK in the Surface Monitors panel. This monitor checks the average static temperature at the pressure outlet for each time step.
27
7. Save case le and data les for the unsteady calculation (at specied time step intervals) using the Autosave option. File Write Autosave...
(a) Set Autosave Data File Frequency to 10. (b) Specify the Filename as manifold.gz. By default, the lenames will have an integer appended to them indicating the time step. This gives them unique names. 8. Save the case le. File Write Case... (a) Enter manifold-unst.cas.gz under Case File and click OK. 9. Set up the calculation parameters for the unsteady solution. Solve Iterate... Select a time step based on the period of unsteadiness of the inlet conditions. From the plots presented earlier, it is observed that the period of the pulsating ow is 0.08 seconds. The time step size should be small enough to resolve the features of the unsteadiness. For this tutorial, you will use a time step size of 0.001 seconds resulting in 80 steps per period. This value is suciently small such that the number of iterations required to achieve convergence per each time step is on the order of 20 to 30. (a) Enter 0.001 sec for the Time Step Size. (b) Enter 240 for the Number of Time Steps. This will provide enough time steps to simulate three full cycles. Ideally, the number of time steps should be large enough to allow the periodic nature of the ow to be evident.
28
(c) Enter 50 for Max Iterations per Time Step. (d) Click on the Iterate button to begin the unsteady solution. Plots of the unsteady mass ow rate and averaged static temperature at the manifold outlet for approximately six cycles are shown in Figure 8 and Figure 9. Note: The solution will take some time to complete. Observe a sawtooth pattern in the residual history. It is the characteristic of the subiteration scheme used by the solver. Make sure that the solution converges before the solver advanced to the next time step. 10. Save the data le. File Write Data... (a) Enter manifold-unst.dat.gz under Data File and click OK to save the data for unsteady calculations.
29
Monitors monitor-3
0.0000 -0.0050 -0.0100 -0.0150 -0.0200
Y Z X
100
125
150
175
200
225
250
275
300
325
350
Iteration
Convergence history of Mass Flow Rate on presure-outlet-1 (Time=2.4000e-01) FLUENT 6.2 (3d, segregated, ske, unsteady)
Monitors monitor-4
700.0000
650.0000
600.0000
550.0000
500.0000
450.0000
400.0000
Y Z X
25
50
75
100
125
150
175
200
225
250
Time Step
Convergence history of Static Temperature on presure-outlet-1 (Time=2.4000e-01) FLUENT 6.2 (3d, segregated, ske, unsteady)
30
11. Perform postprocessing for the unsteady solution. (a) Display lled contours of static pressure. Display Contours...
i. Select Pressure... and Static Pressure from the Contours of drop-down lists. ii. Select Filled under Options. iii. Select all surfaces except interior-80 under Surfaces. iv. Click on Display to view the contours of static pressure (Figure 10) and close the panel. Use the left mouse button to manipulate the default view as shown in Figure 10. To know the exact value of the pressure at a particular point, click with the right mouse at that point and the values will be displayed in the FLUENT console window.
31
1.29e+03 1.19e+03 1.08e+03 9.79e+02 8.75e+02 7.71e+02 6.67e+02 5.64e+02 4.60e+02 3.56e+02 2.53e+02 1.49e+02 4.53e+01 -5.84e+01 -1.62e+02 -2.66e+02 -3.70e+02 -4.73e+02 -5.77e+02 -6.81e+02 -7.84e+02
Y Z X
Contours of Static Pressure (pascal) (Time=2.4000e-01) FLUENT 6.2 (3d, segregated, ske, unsteady)
Figure 10: Static Pressure for the Unsteady-State Manifold Solution (b) Display the pathlines. Pathlines are the lines traveled by neutrally buoyant particles in equilibrium with the uid motion. They are an excellent tool for visualization of complex 3D ows. Display Path Lines... i. Select Particle Variables... and Particle ID from the Color by drop-down lists. ii. Select velocity-inlet-1 and velocity-inlet-2 under Release From Surfaces. iii. Set Step Size to 1 mm. iv. Click Display (Figure 11) and close the panel. Postprocessing can be performed for all the time steps in which the data set was saved (as well as for the current data set). In addition, other postprocessing commands can be issued at regular intervals using Execute Commands panel. Solve Execute Commands...
32
2.79e+02 2.65e+02 2.51e+02 2.37e+02 2.23e+02 2.09e+02 1.95e+02 1.81e+02 1.67e+02 1.53e+02 1.40e+02 1.26e+02 1.12e+02 9.77e+01 8.37e+01 6.98e+01 5.58e+01 4.18e+01 2.79e+01 1.39e+01 0.00e+00
Y Z X
Figure 11: Path Lines plot for the Unsteady-State Manifold Solution
33