Tutorial 19. Modeling Cavitation Introduction This tutorial examines the pressure-driven cavitating flow of water through a sharpedged orifice. This is a typical configuration in fuel injectors, and brings a challenge to the physics and numerics of cavitation models, because of the high pressure differentials involved and the high ratio of liquid to vapor density. Using the multiphase modeling capability of ANSYS FLUENT, you will be able to predict the strong cavitation near the orifice after flow separation at a sharp edge. This tutorial demonstrates how to do the following: Set boundary conditions for internal flow. Use the mixture model with cavitation effects. Calculate a solution using the pressure-based coupled solver. Prerequisites This tutorial is written with the assumption that you have completed Tutorial 1, and that you are familiar with the ANSYS FLUENT navigation pane and menu structure. Some steps in the setup and solution procedure will not be shown explicitly. Problem Description The problem considers the cavitation caused by the flow separation after a sharp-edged orifice. The flow is pressure driven, with an inlet pressure of 5 10 5 Pa and an outlet pressure of 9.5 10 4 Pa. The orifice diameter is 4 10 3 m, and the geometrical parameters of the orifice are D/d = 2.88 and L/r = 8, where D, d, and L are the inlet diameter, orifice diameter, and orifice length respectively. The geometry of the orifice is shown in Figure 19.1. Release 12.0 c ANSYS, Inc. March 12, 2009 19-1
Figure 19.1: Problem Schematic Setup and Solution Preparation 1. Download cavitation.zip from the User Services Center to your working folder (as described in Tutorial 1). 2. Unzip cavitation.zip. The file cav.msh can be found in the cavitation folder created after unzipping the file. 3. Use FLUENT Launcher to start the 2D version of ANSYS FLUENT. For more information about FLUENT Launcher, see Section 1.1.2 in the separate User s Guide. 4. Enable Double Precision. Note: The Display Options are enabled by default. Therefore, after you read in the mesh, it will be displayed in the embedded graphics window. Step 1: Mesh 1. Read the mesh file cav.msh. File Read Mesh... As ANSYS FLUENT reads the mesh file, it will report the progress in the console. You can disregard the warnings about the use of axis boundary conditions, as you will make the appropriate change to the solver settings in the next step. 19-2 Release 12.0 c ANSYS, Inc. March 12, 2009
Step 2: General Settings General 1. Check the mesh. General Check ANSYS FLUENT will perform various checks on the mesh and will report the progress in the console. Ensure that the reported minimum volume is a positive number. 2. Check the mesh scale. General Scale... (a) Retain the default settings. (b) Close the Scale Mesh dialog box. 3. Examine the mesh (Figure 19.2). Figure 19.2: The Mesh in the Orifice Release 12.0 c ANSYS, Inc. March 12, 2009 19-3
As seen in Figure 19.2, half of the problem geometry is modeled, with an axis boundary (consisting of two separate lines) at the centerline. The quadrilateral mesh is slightly graded in the plenum to be finer toward the orifice. In the orifice, the mesh is uniform with aspect ratios close to 1, as the flow is expected to exhibit two-dimensional gradients. When you display data graphically in a later step, you will mirror the view across the centerline to obtain a more realistic view of the model. Since the bubbles are small and the flow is high speed, gravity effects can be neglected and the problem can be reduced to axisymmetrical. If gravity could not be neglected and the direction of gravity were not coincident with the geometrical axis of symmetry, you would have to solve a 3D problem. 4. Specify an axisymmetric model. General (a) Retain the default selection of Pressure-Based in the Type list. The pressure-based solver must be used for multiphase calculations. (b) Select Axisymmetric in the 2D Space list. Note: A computationally intensive, transient calculation is necessary to accurately simulate the irregular cyclic process of bubble formation, growth, filling by water jet re-entry, and break-off. In this tutorial, you will perform a steadystate calculation to simulate the presence of vapor in the separation region in the time-averaged flow. 19-4 Release 12.0 c ANSYS, Inc. March 12, 2009
Step 3: Models Models 1. Enable the multiphase mixture model. Models Multiphase Edit... (a) Select Mixture in the Model list. The Multiphase Model dialog box will expand. (b) Disable Slip Velocity in the Mixture Parameters group box. In this flow, the high level of turbulence does not allow large bubble growth, so gravity is not important. Therefore, there is no need to solve for the slip velocity. (c) Click OK to close the Multiphase Model dialog box. Release 12.0 c ANSYS, Inc. March 12, 2009 19-5
2. Enable the standard k-ɛ turbulence model with standard wall functions. Models Viscous Edit... (a) Select k-epsilon in the Model list. (b) Select Realizable in the k-epsilon Model list. (c) Retain the default selection of Standard Wall Functions in the Near-Wall Treatment list. (d) Click OK to close the Viscous Model dialog box. 19-6 Release 12.0 c ANSYS, Inc. March 12, 2009
Step 4: Materials Materials 1. Create a new material to be used for the primary phase. Materials Fluid Create/Edit... (a) Enter water for Name. (b) Enter 1000 kg/m 3 for Density. (c) Enter 0.001 kg/m s for Viscosity. (d) Click Change/Create. A Question dialog box will open, asking if you want to overwrite air. Click Yes. Release 12.0 c ANSYS, Inc. March 12, 2009 19-7
2. Copy water vapor from the materials database and modify its properties. Materials Fluid Create/Edit... (a) Click the FLUENT Database... button to open the FLUENT Database Materials dialog box. i. Select water-vapor (h2o) from the FLUENT Fluid Materials selection list. Scroll down the list to find water-vapor (h2o). ii. Click Copy to include water vapor in your model. iii. Close the FLUENT Database Materials dialog box. 19-8 Release 12.0 c ANSYS, Inc. March 12, 2009
(b) Enter 0.02558 kg/m 3 for Density. (c) Enter 1.26e-06 kg/m s for Viscosity. (d) Click Change/Create and close the Create/Edit Materials dialog box. Step 5: Phases Phases Release 12.0 c ANSYS, Inc. March 12, 2009 19-9
1. Specify liquid water as the primary phase. Phases phase-1 Edit... (a) Enter liquid for Name. (b) Retain the default selection of water from the Phase Material drop-down list. (c) Click OK to close the Primary Phase dialog box. 2. Specify water vapor as the secondary phase. Phases phase-2 Edit... (a) Enter vapor for Name. (b) Select water-vapor from the Phase Material drop-down list. (c) Click OK to close the Secondary Phase dialog box. 19-10 Release 12.0 c ANSYS, Inc. March 12, 2009
3. Enable the cavitation model. Phases Interaction... (a) Click the Mass tab. i. Set Number of Mass Transfer Mechanisms to 1. ii. Ensure that liquid is selected from the From Phase drop-down list in the Mass Transfer group box. iii. Select vapor from the To Phase drop-down list. iv. Select cavitation from the Mechanism drop-down list. The Cavitation Model dialog box will open to show the cavitation inputs. A. Retain the default settings. B. Retain the value of 3540 Pa for Vaporization Pressure. The vaporization pressure is a property of the working liquid, which depends mainly on the liquid temperature. The default value is the vaporization pressure of water at a temperature of 300 K. Release 12.0 c ANSYS, Inc. March 12, 2009 19-11
C. Click OK to close the Cavitation Model dialog box. (b) Click OK to close the Phase Interaction dialog box. Step 6: Boundary Conditions Boundary Conditions For the multiphase mixture model, you will specify conditions for the mixture (i.e., conditions that apply to all phases) and the conditions that are specific to the primary and secondary phases. In this tutorial, boundary conditions are required only for the mixture and secondary phase of two boundaries: the pressure inlet (consisting of two boundary zones) and the pressure outlet. The pressure outlet is the downstream boundary, opposite the pressure inlets. 19-12 Release 12.0 c ANSYS, Inc. March 12, 2009
1. Set the boundary conditions at inlet 1 for the mixture. Boundary Conditions inlet 1 Edit... (a) Enter 500000 Pa for Gauge Total Pressure. (b) Enter 449000 Pa for Supersonic/Initial Gauge Pressure. If you choose to initialize the solution based on the pressure-inlet conditions, the Supersonic/Initial Gauge Pressure will be used in conjunction with the specified stagnation pressure (the Gauge Total Pressure) to compute initial values according to the isentropic relations (for compressible flow) or Bernoulli s equation (for incompressible flow). Otherwise, in an incompressible flow calculation the Supersonic/Initial Gauge Pressure input will be ignored by ANSYS FLUENT. In this problem the velocity will be initialized based on the difference between these two values. (c) Retain the default selection of Normal to Boundary from the Direction Specification Method drop-down list. (d) Retain the default selection of K and Epsilon from the Specification Method drop-down list in the Turbulence group box. (e) Enter 0.02 m 2 /s 2 for Turbulent Kinetic Energy. (f) Retain the value of 1 m 2 /s 3 for Turbulent Dissipation Rate. (g) Click OK to close the Pressure Inlet dialog box. Release 12.0 c ANSYS, Inc. March 12, 2009 19-13
2. Set the boundary conditions at inlet-1 for the secondary phase. Boundary Conditions inlet 1 (a) Select vapor from the Phase drop-down list. (b) Click Edit... to open the Pressure Inlet dialog box. i. Click the Multiphase tab and retain the default value of 0 for Volume Fraction. ii. Click OK to close the Pressure Inlet dialog box. 3. Copy the boundary conditions defined for the first pressure inlet zone (inlet 1) to the second pressure inlet zone (inlet 2). Boundary Conditions inlet 1 (a) Select mixture from the Phase drop-down list. (b) Click Copy... to open the Copy Conditions dialog box. i. Select inlet 1 from the From Boundary Zone selection list. ii. Select inlet 2 from the To Boundary Zones selection list. iii. Click Copy. A Warning dialog box will open, asking if you want to copy inlet 1 boundary conditions to inlet 2. Click OK. 19-14 Release 12.0 c ANSYS, Inc. March 12, 2009
iv. Close the Copy Conditions dialog box. 4. Set the boundary conditions at outlet for the mixture. Boundary Conditions outlet Edit... (a) Enter 95000 Pa for Gauge Pressure. (b) Retain the default selection of K and Epsilon from the Specification Method drop-down list in the Turbulence group box. (c) Enter 0.02 m 2 /s 2 for Backflow Turbulent Kinetic Energy. (d) Retain the value of 1 m 2 /s 3 for Backflow Turbulent Dissipation Rate. (e) Click OK to close the Pressure Outlet dialog box. 5. Set the boundary conditions at outlet for the secondary phase. Boundary Conditions outlet (a) Select vapor from the Phase drop-down list. (b) Click Edit... to open the Pressure Outlet dialog box. Release 12.0 c ANSYS, Inc. March 12, 2009 19-15
i. Click the Multiphase tab and retain the default value of 0 for Volume Fraction. ii. Click OK to close the Pressure Outlet dialog box. Step 7: Operating Conditions Boundary Conditions 1. Set the operating pressure. Boundary Conditions Operating Conditions... (a) Enter 0 Pa for Operating Pressure. (b) Click OK to close the Operating Conditions dialog box. 19-16 Release 12.0 c ANSYS, Inc. March 12, 2009
Step 8: Solution 1. Set the solution parameters. Solution Methods (a) Select Coupled from the Scheme drop-down list in the Pressure-Velocity Coupling group box. (b) Select PRESTO! from the Pressure drop-down list in the Spatial Discretization group box. (c) Select QUICK for Momentum, Volume Fraction, Turbulent Kinetic Energy, and Turbulent Dissipation Rate. Release 12.0 c ANSYS, Inc. March 12, 2009 19-17
2. Set the solution controls. Solution Controls (a) Enter 0.5 for Vaporization Mass. (b) Enter 0.95 for Volume Fraction. Note: Typically, for more complex cases with very high pressure drops or large liquid-vapor density ratios, the under-relaxation factors may need to be reduced to between 0.1 and 0.2. For the Vaporization Mass, it is generally advised to use a value of 0.1, though this under-relaxation factor can be between 0.001 to 1 as necessary. 19-18 Release 12.0 c ANSYS, Inc. March 12, 2009
3. Enable the plotting of residuals during the calculation. Monitors Residuals Edit... (a) Ensure that Plot is enabled in the Options group box. (b) Enter 1e-07 for the Absolute Criteria of continuity. (c) Enter 1e-05 for the Absolute Criteria of x-velocity, y-velocity, k, and epsilon. Decreasing the criteria for these residuals will improve the accuracy of the solution. (d) Click OK to close the Residual Monitors dialog box. Release 12.0 c ANSYS, Inc. March 12, 2009 19-19
4. Initialize the solution from either of the pressure inlet zones (inlet 1 or inlet 2). Solution Initialization (a) Select inlet 1 or inlet 2 from the Compute from drop-down list. (b) Select Absolute in the Reference Frame list. (c) Click Initialize to initialize the solution. 5. Save the case file (cav.cas.gz). File Write Case... 19-20 Release 12.0 c ANSYS, Inc. March 12, 2009
6. Start the calculation by requesting 500 iterations. Run Calculation (a) Enter 500 for Number of Iterations. (b) Click Calculate. The solution will converge in approximately 450 iterations. 7. Save the data file (cav.dat.gz). File Write Data... Step 9: Postprocessing 1. Plot the pressure in the orifice (Figure 19.3). Graphics and Animations Contours Set Up... Release 12.0 c ANSYS, Inc. March 12, 2009 19-21
(a) Enable Filled in the Options group box. (b) Retain the default selection of Pressure... and Static Pressure from the Contours of drop-down lists. (c) Click Display and close the Contours dialog box. 4.99e+05 4.74e+05 4.50e+05 4.25e+05 4.00e+05 3.75e+05 3.50e+05 3.26e+05 3.01e+05 2.76e+05 2.51e+05 2.27e+05 2.02e+05 1.77e+05 1.52e+05 1.27e+05 1.03e+05 7.79e+04 5.31e+04 2.83e+04 3.54e+03 Contours of Static Pressure (mixture) (pascal) FLUENT 12.0 (axi, dp, pbns, mixture, rke) Figure 19.3: Contours of Static Pressure Note the dramatic pressure drop at the flow restriction in Figure 19.3. Low static pressure is the major factor causing cavitation. Additionally, turbulence contributes to cavitation due to the effect of pressure fluctuation (Figure 19.4) and turbulent diffusion (Figure 19.5). 2. Mirror the display across the centerline (Figure 19.4). Graphics and Animations Views... Mirroring the display across the centerline gives a more realistic view. 19-22 Release 12.0 c ANSYS, Inc. March 12, 2009
Figure 19.4: Mirrored View of Contours of Static Pressure (a) Select symm 2 and symm 1 from the Mirror Planes selection list. (b) Click Apply and close the Views dialog box. 3. Plot the turbulent kinetic energy (Figure 19.5). Graphics and Animations Contours Set Up... (a) Select Turbulence... and Turbulent Kinetic Energy (k) from the Contours of drop-down lists. (b) Click Display. Figure 19.5: Contours of Turbulent Kinetic Energy In this example, the mesh used is fairly coarse. However, in cavitating flows the pressure distribution is the dominant factor, and is not very sensitive to mesh size. Release 12.0 c ANSYS, Inc. March 12, 2009 19-23
4. Plot the volume fraction of water vapor (Figure 19.6). Graphics and Animations Contours Set Up... (a) Select Phases... and Volume fraction from the Contours of drop-down lists. (b) Select vapor from the Phase drop-down list. (c) Click Display and close the Contours dialog box. Figure 19.6: Contours of Vapor Volume Fraction Summary The high turbulent kinetic energy region near the neck of the orifice in Figure 19.5 coincides with the highest volume fraction of vapor in Figure 19.6. This indicates the correct prediction of a localized high phase change rate. The vapor then gets convected downstream by the main flow. This tutorial demonstrated how to set up and resolve a strongly cavitating pressuredriven flow through an orifice, using multiphase mixture model of ANSYS FLUENT with cavitation effects. You learned how to set the boundary conditions for an internal flow. A steady-state solution was calculated to simulate the formation of vapor in the neck of the flow after the section restriction at the orifice. A more computationally intensive transient calculation is necessary to accurately simulate the irregular cyclic process of bubble formation, growth, filling by water jet re-entry, and break-off. Further Improvements This tutorial guides you through the steps to reach an initial solution. You may be able to obtain a more accurate solution by using an appropriate higher-order discretization scheme and by adapting the mesh. Mesh adaption can also ensure that the solution is independent of the mesh. These steps are demonstrated in Tutorial 1. 19-24 Release 12.0 c ANSYS, Inc. March 12, 2009