Chapter 5: Fluid Flow and Heat Transfer in a Mixing Elbow

5.1. Introduction

This tutorial illustrates the setup and solution of a three-dimensional turbulent fluid flow and heat transfer problem in a mixing elbow. The mixing elbow configuration is encountered in piping systems in power plants and process industries. It is often important to predict the flow field and temperature field in the area of the mixing region in order to properly design the junction.

This tutorial demonstrates how to do the following:

  • Use the Watertight Geometry guided workflow to:

    • Import a CAD geometry

    • Generate a surface mesh

    • Describe the geometry

    • Generate a volume mesh

  • Launch Ansys Fluent.

  • Read an existing mesh file into Ansys Fluent.

  • Use mixed units to define the geometry and fluid properties.

  • Set material properties and boundary conditions for a turbulent forced-convection problem.

  • Create a surface report definition and use it as a convergence criterion.

  • Calculate a solution using the pressure-based solver.

  • Visually examine the flow and temperature fields using the postprocessing tools available in Ansys Fluent.

  • Change the solver method to coupled in order to increase the convergence speed.

  • Adapt the mesh based on the temperature gradient to further improve the prediction of the temperature field.

5.2. Prerequisites

This tutorial assumes that you have little or no experience with Ansys Fluent, and so each step will be explicitly described.

5.3. Problem Description

The problem to be considered is shown schematically in Figure 5.1: Problem Specification. A cold fluid at 20° C flows into the pipe through a large inlet, and mixes with a warmer fluid at 40° C that enters through a smaller inlet located at the elbow. The pipe dimensions are in inches and the fluid properties and boundary conditions are given in SI units. The Reynolds number for the flow at the larger inlet is 50,800, so a turbulent flow model will be required.


Note:  Since the geometry of the mixing elbow is symmetric, only half of the elbow must be modeled in Ansys Fluent.


Figure 5.1: Problem Specification

Problem Specification

5.4. Setup and Solution

To help you quickly identify graphical user interface items at a glance and guide you through the steps of setting up and running your simulation, the Ansys Fluent Tutorial Guide uses several type styles and mini flow charts. See Typographical Conventions Used In This Manual for detailed information.

5.4.1. Preparation

  1. Download the introduction.zip file here .

  2. Unzip introduction.zip to your working directory.

  3. The SpaceClaim CAD file elbow.scdoc can be found in the folder. In addition, the elbow.pmdb file is available for use on the Linux platform.

  4. Use the Fluent Launcher to start Ansys Fluent.

  5. Select Meshing in the top-left selection list to start Fluent in Meshing Mode.

  6. Enable Double Precision under Options.

  7. Set Meshing Processes and Solver Processes to 4 under Parallel (Local Machine).

5.4.2. Meshing Workflow

  1. Start the meshing workflow.

    1. In the Workflow tab, select the Watertight Geometry workflow.

    2. Review the tasks of the workflow.

      Each task is designated with an icon indicating its state (for example, as complete, incomplete, etc. All tasks are initially incomplete and you proceed through the workflow completing all tasks. Additional tasks are also available for the workflow.

  2. Import the CAD geometry (elbow.scdoc).

    1. Select the Import Geometry task.

    2. For Units, select in from the drop-down list.

    3. For File Name, enter the path and file name for the CAD geometry that you want to import (elbow.scdoc).


      Note:  The workflow only supports *.scdoc (SpaceClaim), Workbench (.agdb), and the intermediary *.pmdb file formats.


    4. Select Import Geometry.

      This will update the task, display the geometry in the graphics window, and allow you to proceed onto the next task in the workflow.


      Note:  Alternatively, you can use the ... button next to File Name to locate the CAD geometry file, after which, the Import Geometry task automatically updates, displaying the geometry in the graphics window, and the workflow automatically progresses to the next task.


      Throughout the workflow, you are able to return to a task and change its settings using either the Edit button, or the Revert and Edit button.

  3. Add local sizing.

    1. In the Add Local Sizing task, you are prompted as to whether or not you would like to add local sizing controls to the faceted geometry.

    2. For the purposes of this tutorial, you can keep the default setting of no.

    3. Click Update to complete this task and proceed to the next task in the workflow.

  4. Generate the surface mesh.

    1. In the Generate the Surface Mesh task, you can set various properties of the surface mesh for the faceted geometry.

    2. Specify 0.3 for Maximum Size.


      Note:  The red boxes displayed on the geometry in the graphics window are a graphical representation of size settings. These boxes change size as the values change, and they can be hidden by using the Clear Preview button.


    3. Click Generate the Surface Mesh to complete this task and proceed to the next task in the workflow.

  5. Describe the geometry.

    When you select the Describe Geometry task, you are prompted with questions relating to the nature of the imported geometry.

    1. Since the geometry defined the fluid region. Select The geometry consists of only fluid regions with no voids for Geometry Type.

    2. Click Describe Geometry to complete this task and proceed to the next task in the workflow.

  6. Update Boundaries Task

    1. For the Selection Type field, select label.

    2. For the wall-inlet boundary, change the Boundary Type field to wall.

    3. Click Update Boundaries to complete this task and proceed to the next task in the workflow.

  7. Update your regions.

    1. Select the Update Regions task, where you can review the names and types of the various regions that have been generated from your imported geometry, and change them as needed.

    2. Keep the default settings, and click Update Regions.

  8. Add Boundary Layers.

    1. Select the Add Boundary Layers task, where you can set properties of the boundary layer mesh.

    2. Keep the default settings, and click Add Boundary Layers.

  9. Generate the volume mesh.

    1. Select the Generate the Volume Mesh task, where you can set properties of the volume mesh.

    2. Select the poly-hexcore for Fill With.

    3. Click Generate the Volume Mesh.

      Ansys Fluent will apply your settings and proceed to generate a volume mesh for the manifold geometry. Once complete, the mesh is displayed in the graphics window and a clipping plane is automatically inserted with a layer of cells drawn so that you can quickly see the details of the volume mesh.

  10. Check the mesh.

     Mesh CheckPerform Mesh Check

  11. Save the mesh file (elbow.msh.h5).

     File Write Mesh...

  12. Switch to Solution mode.

    Now that a high-quality mesh has been generated using Ansys Fluent in meshing mode, you can now switch to solver mode to complete the set up of the simulation.

    We have just checked the mesh, so select Yes when prompted to switch to solution mode.

5.4.3. Setting Up Domain

In this step, you will perform the mesh-related activities using the Domain ribbon tab (Mesh group box).

  1. Check the mesh.

     Domain Mesh Check Perform Mesh Check

    Ansys Fluent will report the results of the mesh check in the console.

      Domain Extents:
       x-coordinate: min (m) = -2.000000e-01, max (m) = 2.000000e-01
       y-coordinate: min (m) = -2.250000e-01, max (m) = 2.000000e-01
       z-coordinate: min (m) = 0.000000e+00, max (m) = 4.992264e-02
     Volume statistics:
       minimum volume (m3): 1.541854e-11
       maximum volume (m3): 5.483098e-07
         total volume (m3): 2.500657e-03
     Face area statistics:
       minimum face area (m2): 3.010069e-08
       maximum face area (m2): 7.873946e-05
     Checking mesh.....................................
    Done.

    The mesh check will list the minimum and maximum x, y, and z values from the mesh in the default SI unit of meters. It will also report a number of other mesh features that are checked. Any errors in the mesh will be reported at this time. Ensure that the minimum volume is not negative, since Ansys Fluent cannot begin a calculation when this is the case.


    Note:  The minimum and maximum values may vary slightly when running on different platforms.


  2. Set the working units for the mesh.

     Domain Mesh Scale...

     

    1. Select in from the View Length Unit In drop-down list to set inches as the working unit for length.

    2. Confirm that the domain extents are as shown in the previous dialog box.

    3. Close the Scale Mesh dialog box.

    The working unit for length has now been set to inches.


    Note:  Because the default SI units will be used for everything except length, there is no need to change any other units in this problem. The choice of inches for the unit of length has been made by the actions you have just taken. If you want a different working unit for length, other than inches (for example, millimeters), click Units... in the Domain ribbon tab (Mesh group box) and make the appropriate change in the Set Units dialog box.


5.4.4. Setting Up Physics

In the steps that follow, you will select a solver and specify physical models, material properties, and zone conditions for your simulation using the Physics ribbon tab.

  1. In the Solver group box of the Physics ribbon tab, retain the default selection of the steady pressure-based solver.

     Physics Solver General

  2. Set up your models for the CFD simulation using the Models group box of the Physics ribbon tab.


    Note:  You can also use the Models task page, which can be accessed from the tree by expanding Setup and double-clicking the Models tree item.


    1. Enable heat transfer by activating the energy equation.

      In the Physics ribbon tab, enable Energy (Models group box).

       Physics Models Energy


      Note:  You can also double-click the Setup/Models/Energy tree item and enable the energy equation in the Energy dialog box.


    2. Enable the - turbulence model.

       Physics Models Viscous...

      1. Retain the default selection of k-omega from the Model list.

      2. Retain the default selection of SST in the k-omega Model group box.

      3. Enable the Production Limiter check box in the Options group.

      4. Click OK to accept all the other default settings and close the Viscous Model dialog box.

        Note that the Viscous... label in the ribbon is displayed in blue to indicate that the Viscous model is enabled. Also Energy and Viscous appear as enabled under the Setup/Models tree branch.


        Note:  While the ribbon is the primary tool for setting up and solving your problem, the tree is a dynamic representation of your case. The models, materials, conditions, and other settings that you have specified in your problem will appear in the tree. Many of the frequently used ribbon items are also available via the right-click functionality of the tree.


  3. Set up the materials for the CFD simulation using the Materials group box of the Physics ribbon tab.

    Create a new material called water using the Create/Edit Materials dialog box.

    1. In the Physics ribbon tab, click Create/Edit... (Materials group box).

       Physics Materials Create/Edit...

    2. Click the Fluent Database... button to access pre-defined materials.

    3. Select water-liquid (h2o < l >) from the Fluent Fluid Materials selection list and click Copy, then close the Fluent Database Materials dialog box.

    4. Ensure that there are now two materials (water-liquid and air) defined locally by examining the Fluent Fluid Materials drop-down list.

      Both the materials will also be listed under Fluid in the Materials task page and under the Materials tree branch.

    5. Close the Create/Edit Materials dialog box.

  4. Set up the cell zone conditions for the fluid zone (fluid) using the Zones group box of the Physics ribbon tab.

    1. In the Physics tab, click Cell Zones (Zones group box).

       Physics Zones Cell Zones

      This opens the Cell Zone Conditions task page.

    2. Double-click fluid in the Zone list to open the Fluid dialog box.


      Note:  You can also double-click the Setup/Cell Zone Conditions/fluid tree item in order to open the corresponding dialog box.


    3. Select water-liquid from the Material Name drop-down list.

    4. Click Apply and close the Fluid dialog box.

  5. Set up the boundary conditions for the inlets, outlet, and walls for your CFD analysis using the Zones group box of the Physics ribbon tab.

    1. In the Physics tab, click Boundaries (Zones group box).

       Physics Zones Boundaries

      This opens the Boundary Conditions task page where the boundaries defined in your simulation are displayed in the Zone selection list.


      Note:  To display boundary zones grouped by zone type (as shown previously), click the Toggle Tree View button ( ) in the upper right corner of the Boundary Conditions task page and select Zone Type under Group By.


      Here the zones have names that were previously given during the meshing process. It is good practice to give boundaries meaningful names in a meshing application to help when you set up the model. You can also change boundary names in Fluent by simply editing the boundary and making revisions in the Zone Name text box.

    2. Set the boundary conditions at the cold inlet (cold-inlet).


      Tip:  If you are unsure of which inlet zone corresponds to the cold inlet, you can probe the mesh display using the right mouse button or the probe toolbar button ( ) as described previously in this tutorial. The information will be displayed in the Ansys Fluent console, and the zone you probed will be automatically selected from the Zone selection list in the Boundary Conditions task page.


      1. Double-click cold-inlet to open the Velocity Inlet dialog box.

      2. Retain the default selection of Magnitude, Normal to Boundary from the Velocity Specification Method drop-down list.

      3. Enter 0.4 [m/s] for Velocity Magnitude.

      4.  In the Turbulence group box, select Intensity and Hydraulic Diameter from the Specification Method drop-down list.

      5. Retain the default value of 5 [%] for Turbulent Intensity.

      6. Enter 4 [inches] for Hydraulic Diameter.

        The hydraulic diameter is defined as:

        where is the cross-sectional area and is the wetted perimeter.

      7. Click the Thermal tab.

      8. Enter 293.15 [K] for Temperature.

      9. Click Apply and close the Velocity Inlet dialog box.


      Note:  You can also access the Velocity Inlet dialog box by double-clicking the Setup/Boundary Conditions/cold-inlet tree item.


    3. In a similar manner, set the boundary conditions at the hot inlet (hot-inlet), using the values in the following table:

      Setting Value
      Velocity Specification Method Magnitude, Normal to Boundary
      Velocity Magnitude 1.2 [m/s]
      Specification MethodIntensity and Hydraulic Diameter
      Turbulent Intensity 5 [%]
      Hydraulic Diameter 1 [inch]
      Temperature 313.15 [K]
    4. Double-click outlet in the Boundary Condition selection list and set the boundary conditions at the outlet, as shown in the following figure.


      Note:
      • You do not need to set a backflow temperature in this case (in the Thermal tab) because the material properties are not functions of temperature. If they were, a flow-weighted average of the inlet conditions would be a good starting value.

      • Ansys Fluent will use the backflow conditions only if the fluid is flowing into the computational domain through the outlet. Since backflow might occur at some point during the solution procedure, you should set reasonable backflow conditions to prevent convergence from being adversely affected.


    5. For the wall of the elbow (wall-elbow) and the wall of the hot inlet (wall-inlet), retain the default value of 0 W/m2 for Heat Flux in the Thermal tab.

5.4.5. Solving

In the steps that follow, you will set up and run the calculation using the Solution ribbon tab.


Note:  You can also use the task pages listed under the Solution tree branch to perform solution-related activities.


  1. Select a solver scheme.

    1. In the Solution ribbon tab, click Methods... (Solution group box).

       Solution Solution Methods...

      Retain the default settings.

  2. Enable the plotting of residuals during the calculation.

    1. In the Solution ribbon tab, click Residuals... (Reports group box).

       Solution Reports Residuals...


      Note:  You can also access the Residual Monitors dialog box by double-clicking the Solution/Monitors/Residual tree item.


    2. Ensure that Plot is enabled in the Options group box.

    3. Retain the default value of 0.001 for the Absolute Criteria of continuity.

    4. Click OK to close the Residual Monitors dialog box.


    Note:  By default, the residuals of all of the equations solved for the physical models enabled for your case will be monitored and checked by Ansys Fluent as a means to determine the convergence of the solution. It is a good practice to also create and plot a surface report definition that can help evaluate whether the solution is truly converged. You will do this in the next step.


  3. Create a surface report definition of average temperature at the outlet (outlet).

     Solution Reports Definitions New Surface Report Mass-Weighted Average...


    Note:  You can also access the Surface Report Definition dialog box by right-clicking Report Definitions in the tree (under Solution) and selecting New/Surface Report/Mass-Weighted Average... from the menu that opens.


    1. Enter outlet-temp-avg for the Name of the report definition.

    2. Enable Report File, Report Plot, and Print to Console in the Create group box.

      During a solution run, Ansys Fluent will write solution convergence data in a report file, plot the solution convergence history in a graphics window, and print the value of the report definition to the console.

    3. Set Frequency to 3 by clicking the up-arrow button.

      This setting instructs Ansys Fluent to update the plot of the surface report, write data to a file, and print data in the console after every 3 iterations during the solution.

    4. Select Temperature... and Static Temperature from the Field Variable drop-down lists.

    5. Select outlet from the Surfaces selection list.

    6. Click OK to save the surface report definition and close the Surface Report Definition dialog box.

      The new surface report definition outlet-temp-avg will appear under the Solution/Report Definitions tree item. Ansys Fluent also automatically creates the following items:

      • outlet-temp-avg-rfile (under the Solution/Monitors/Report Files tree branch)

      • outlet-temp-avg-rplot (under the Solution/Monitors/Report Plots tree branch)

  4. Examine the report file settings of the created report definition (outlet-temp-avg-rfile).

     Solution Monitors Report Files outlet-temp-avg-rfile  Edit...

    The Edit Report File dialog box is automatically populated with data from the outlet-temp-avg report definition.

    1. Verify that outlet-temp-avg is in the Selected Report Definitions list.

      If you had created multiple report definitions, the additional ones would be listed under Available Report Definitions , and you could use the Add>> and <<Remove buttons to manage which were written in this particular report definition file.

    2. (optional) Edit the name and location of the resulting file as necessary using the File Name field or Browse... button.

    3. Click OK to close the Edit Report File dialog box.

  5. Create a convergence condition for outlet-temp-avg.

     Solution Reports Convergence...

    1. Click the Add button.

    2. Enter con-outlet-temp-avg for Conditions.

    3. Select outlet-temp-avg from the Report Definition drop-down list.

    4. Enter 1e-5 for Stop Criterion.

    5. Enter 20 for Ignore Iterations Before.

    6. Enter 15 for Use Iterations.

    7. Enable Print.

    8. Set Every Iteration to 3.

    9. Click OK to save the convergence condition settings and close the Convergence Conditions dialog box.

    These settings will cause Fluent to consider the solution converged when the surface report definition value for each of the previous 15 iterations is within 0.001% of the current value. Convergence of the values will be checked every 3 iterations. The first 20 iterations will be ignored, allowing for any initial solution dynamics to settle out. Note that the value printed to the console is the deviation between the current and previous iteration values only.

  6. Initialize the flow field using the Initialization group box of the Solution ribbon tab.

     Solution Initialization

    1. Retain the default selection of Hybrid from the Method list.

    2. Click Initialize.

  7. Save the case file (elbow1.cas.h5).

     File Write Case...

  8. Start the calculation by requesting 150 iterations in the Solution ribbon tab (Run Calculation group box).

     Solution Run Calculation

     

    1. Enter 150 for No. of Iterations.

    2. Click Calculate.


      Note:  By starting the calculation, you are also starting to save the surface report data at the rate specified in the Surface Report Definition dialog box. If a file already exists in your working directory with the name you specified in the Edit Report File dialog box, then a Question dialog box will open, asking if you would like to append the new data to the existing file. Click No in the Question dialog box, and then click OK in the Warning dialog box that follows to overwrite the existing file.


      As the calculation progresses, the surface report history will be plotted in the outlet-temp-avg-rplot tab in the graphics window (Figure 5.2: Convergence History of the Mass-Weighted Average Temperature).

      Figure 5.2: Convergence History of the Mass-Weighted Average Temperature

      Convergence History of the Mass-Weighted Average Temperature

      Similarly, the residuals history will be plotted in the Scaled Residuals tab in the graphics window (Figure 5.3: Residuals).

      Figure 5.3: Residuals

      Residuals


      Note:  You can monitor the two convergence plots simultaneously by right-clicking a tab in the graphics window and selecting SubWindow View from the menu that opens. To return to a tabbed graphics window view, right-click a graphics window title area and select Tabbed View.


      Since the residual values vary slightly by platform, the plot that appears on your screen may not be exactly the same as the one shown here.

      The solution will be stopped by Ansys Fluent when any of the following occur:

      • the surface report definition converges to within the tolerance specified in the Convergence Conditions dialog box

      • the residual monitors converge to within the tolerances specified in the Residual Monitors dialog box

      • the number of iterations you requested in the Run Calculation task page has been reached

      In this case, the solution is stopped when the convergence criterion on outlet temperature is satisfied. The exact number of iterations for convergence will vary, depending on the platform being used. An Information dialog box will open to alert you that the calculation is complete. Click OK in the Information dialog box to proceed.

  9. Examine the plots for convergence (Figure 5.2: Convergence History of the Mass-Weighted Average Temperature and Figure 5.3: Residuals).


    Note:  There are no universal metrics for judging convergence. Residual definitions that are useful for one class of problem are sometimes misleading for other classes of problems. Therefore it is a good idea to judge convergence not only by examining residual levels, but also by monitoring relevant integrated quantities and checking for mass and energy balances.

    There are three indicators that convergence has been reached:

    • The residuals have decreased to a sufficient degree.

      The solution has converged when the Convergence Criterion for each variable has been reached. The default criterion is that each residual will be reduced to a value of less than 10–3, except the energy residual, for which the default criterion is 10–6.

    • The solution no longer changes with more iterations.

      Sometimes the residuals may not fall below the convergence criterion set in the case setup. However, monitoring the representative flow variables through iterations may show that the residuals have stagnated and do not change with further iterations. This could also be considered as convergence.

    • The overall mass, momentum, energy, and scalar balances are obtained.

      You can examine the overall mass, momentum, energy and scalar balances in the Flux Reports dialog box. The net imbalance should be less than 0.2 % of the net flux through the domain when the solution has converged. In the next step you will check to see if the mass balance indicates convergence.


  10. Examine the mass flux report for convergence using the Results ribbon tab.

     Results Reports Fluxes...

    1. Ensure that Mass Flow Rate is selected from the Options list.

    2. Select cold-inlet, hot-inlet, and outlet from the Boundaries selection list.

    3. Click Compute.

      The individual and net results of the computation will be displayed in the Results and Net Results boxes, respectively, in the Flux Reports dialog box, as well as in the console.

      The sum of the flux for the inlets should be very close to the sum of the flux for the outlets. The net results show that the imbalance in this case is well below the 0.2% criterion suggested previously.

    4. Close the Flux Reports dialog box.

  11. Save the data file (elbow1.dat.h5).

     File Write Data...

    In later steps of this tutorial you will save additional case and data files with different suffixes.

5.4.6. Displaying the Preliminary Solution

In the steps that follow, you will visualize various aspects of the flow for the preliminary solution using the Results ribbon tab.

  1. Display filled contours of velocity magnitude on the symmetry plane (Figure 5.4: Predicted Velocity Distribution after the Initial Calculation).

     Results Graphics Contours New...

    1. Enter contour-vel for Contour Name.

    2. Ensure that Filled is enabled in the Options group box.

    3. Ensure that Node Values and Boundary Values are enabled in the Options group box.

    4. Select Banded in the Coloring group box.

    5. Select Velocity... and Velocity Magnitude from the Contours of drop-down lists.

    6. Select symmetry-xyplane from the Surfaces selection list.

    7. Click Save/Display to display the contours in the active graphics window. Clicking the blue z-axis arrow in the axis triad will orient the view with the z-axis, and clicking the Fit to Window icon ( ) will cause the object to fit exactly and be centered in the window.


      Note:  If you cannot see the velocity contour display, select the appropriate tab in the graphics window.


    8. Close the Contours dialog box.

    Figure 5.4: Predicted Velocity Distribution after the Initial Calculation

    Predicted Velocity Distribution after the Initial Calculation


    Note:  When you probe a point in the displayed domain with the right mouse button or the probe tool, the level of the corresponding contour is highlighted in the colormap in the graphics window, and is also reported in the console.


  2. Create and display a definition for temperature contours on the symmetry plane (Figure 5.5: Predicted Temperature Distribution after the Initial Calculation).

     Results Graphics Contours New...

    You can create contour definitions and save them for later use.

    1. Enter contour-temp for Contour Name.

    2. Select Temperature... and Static Temperature from the Contours of drop-down lists.

    3. Select symmetry-xyplane from the Surfaces selection list.

    4. Click Save/Display and close the Contours dialog box.

      The new contour-temp definition appears under the Results/Graphics/Contours tree branch. To edit your contour definition, right-click it and select Edit... from the menu that opens.

    Figure 5.5: Predicted Temperature Distribution after the Initial Calculation

    Predicted Temperature Distribution after the Initial Calculation

  3. Display velocity vectors on the symmetry plane (Figure 5.8: Magnified View of Resized Velocity Vectors).

     Results Graphics Vectors New...

    1. Enter vector-vel for Vector Name.

    2. Select symmetry-xyplane from the Surfaces selection list.

    3. Click Save/Display to plot the velocity vectors.

      Figure 5.6: Velocity Vectors Colored by Velocity Magnitude

      Velocity Vectors Colored by Velocity Magnitude

      The Auto Scale option is enabled by default in the Options group box. This scaling sometimes creates vectors that are too small or too large in the majority of the domain. You can improve the clarity by adjusting the Scale and Skip settings, thereby changing the size and number of the vectors when they are displayed.

    4. Enter 4 for Scale.

    5. Set Skip to 2.

    6. Click Save/Display again to redisplay the vectors.

      Figure 5.7: Resized Velocity Vectors

      Resized Velocity Vectors

    7. Close the Vectors dialog box.

    8. Zoom in on the vectors in the display.

      Figure 5.8: Magnified View of Resized Velocity Vectors

      Magnified View of Resized Velocity Vectors

    9. Zoom out to the original view.

      Clicking the Fit to Window icon,  , will cause the object to fit exactly and be centered in the window.

  4. Create a line at the centerline of the outlet. For this task, you will use the Surface group box of the Results tab.

     Results Surface Create Iso-Surface...

     

    1. Enter z=0_outlet for New Surface Name.

    2. Select Mesh... and Z-Coordinate from the Surface of Constant drop-down lists.

    3. Click Compute to obtain the extent of the mesh in the z-direction.

      The range of values in the z-direction is displayed in the Min and Max fields.

    4. Retain the default value of 0 inches for Iso-Values.

    5. Select outlet from the From Surface selection list.

    6. Click Create.

      The new line surface representing the intersection of the plane z=0 and the surface outlet is created, and its name z=0_outlet appears in the From Surface selection list.


      Note:
      • After the line surface z=0_outlet is created, a new entry will automatically be generated for New Surface Name, in case you would like to create another surface.

      • If you want to delete or otherwise manipulate any surfaces, click Manage... to open the Surfaces dialog box.


    7. Close the Iso-Surface dialog box.

  5. Display and save an XY plot of the temperature profile across the centerline of the outlet for the initial solution (Figure 5.9: Outlet Temperature Profile for the Initial Solution).

     Results Plots XY PlotNew...

     

    1. Enter xy-outlet-temp for XY Plot Name.

    2. Select Temperature... and Static Temperature from the Y Axis Function drop-down lists.

    3. Select the z=0_outlet surface you just created from the Surfaces selection list.

    4. Click Save/Plot.

    5. Enable Write to File in the Options group box.

      The button that was originally labeled Save/Plot will change to Write....

    6. Click Write....

      1. In the Select File dialog box, enter outlet_temp1.xy for XY File.

      2. Click OK to save the temperature data and close the Select File dialog box.

    7. Close the Solution XY Plot dialog box.

    Figure 5.9: Outlet Temperature Profile for the Initial Solution

    Outlet Temperature Profile for the Initial Solution

  6. Define a custom field function for the dynamic head formula ().

     User Defined Field Functions Custom...

     

    1. Select Density... and Density from the Field Functions drop-down lists, and click the Select button to add density to the Definition field.

    2. Click the X button to add the multiplication symbol to the Definition field.

    3. Select Velocity... and Velocity Magnitude from the Field Functions drop-down lists, and click the Select button to add |V| to the Definition field.

    4. Click y^x to raise the last entry in the Definition field to a power, and click 2 for the power.

    5. Click the / button to add the division symbol to the Definition field, and then click 2.

    6. Enter dynamic-head for New Function Name.

    7. Click Define and close the Custom Field Function Calculator dialog box.

      The dynamic-head tree item will appear under the Parameters & Customization/Custom Field Functions tree branch.

  7. Display filled contours of the custom field function (Figure 5.10: Contours of the Dynamic Head Custom Field Function).

     Results Graphics Contours New...

     

    1. Enter contour-dynamic-head for Contour Name.

    2. Select Banded in the Coloring group box.

    3. Disable Boundary Values in the Options group.

    4. Select Custom Field Functions... and dynamic-head from the Contours of drop-down lists.


      Tip:   Custom Field Functions... is at the top of the upper Contours of drop-down list.


    5. Select symmetry-xyplane from the Surfaces selection list.

    6. Click Save/Display and close the Contours dialog box.

    Figure 5.10: Contours of the Dynamic Head Custom Field Function

    Contours of the Dynamic Head Custom Field Function


    Note:  You may need to change the view by zooming out after the last vector display, if you have not already done so.


  8. Save the settings for the custom field function by writing the case and data files (elbow1.cas.h5 and elbow1.dat.h5).

     File Write Case & Data...

    1. Ensure that elbow1.cas.h5 is entered for Case/Data File.


      Note:  When you write the case and data file at the same time, it does not matter whether you specify the file name with a .cas or .dat extension, as both will be saved.


    2. Click OK to save the files and close the Select File dialog box.

    3. Click OK to overwrite the files that you had saved earlier.

5.4.7. Adapting the Mesh

For the first run of this tutorial, you have solved the elbow problem using a fairly coarse mesh. The elbow solution can be improved further by refining the mesh to better resolve the flow details. Ansys Fluent provides a built-in capability to easily adapt (locally refine) the mesh according to solution gradients. In the following steps you will adapt the mesh based on the temperature gradients in the current solution and compare the results with the previous results.

  1. Define Cell Registers to adapt the mesh in the regions of high temperature gradient.

     Solution Cell Registers  New Field Variable...

    1. Select Cells More Than from the Type drop-down list.

    2. Select Curvature from the Derivative Option drop-down list.

    3. Select Temperature... and Static Temperature from the Curvature of drop-down list.

    4. Click Compute.

      Ansys Fluent will update the Minimum and Maximum values to show the minimum and maximum temperature gradient. The Average temperature gradient and Standard Deviation will also be displayed.

    5. Enter a value of 0.0015 for the Cells having value more than.

      A general rule is to use about 10% of the maximum gradient when setting the value for refinement.

    6. Click Save and close the Field Variable Register dialog box.

  2. Set up mesh adaption using the Cell Registers. For this task, you will use the Adapt group box in the Domain ribbon tab.

     Domain Adapt Manual...

    1. Select the previously defined curvature_0 cell register from the Refinement Criterion drop-down lists.

      Ansys Fluent will not coarsen beyond the original mesh for a 3D mesh. Hence, it is not necessary to select the Coarsening Criterion in this instance.

    2. Click Adapt.

    3. Click Display.

      Ansys Fluent will display the cells marked for adaption in the graphics window (Figure 5.11: Cells Marked for Adaption).

      Figure 5.11: Cells Marked for Adaption

      Cells Marked for Adaption

      Extra  —  You can change the way Ansys Fluent displays cells marked for adaption (Figure 5.12: Alternative Display of Cells Marked for Adaption) by performing the following steps:

      1. Click Display Options... in the Manual Mesh Adaption dialog box to open the Display Options - Adaption dialog box.

      2. Enable Draw Mesh in the Options group box.

        The Mesh Display dialog box will open.

      3. Ensure that only the Edges option is enabled in the Options group box.

      4. Select All from the Edge Type list.

      5. Select all of the items except z=0_outlet from the Surfaces selection list.

      6. Click Display and close the Mesh Display dialog box.

      7. Click OK to close the Display Options - Adaption dialog box.

      8. Click Display in the Manual Mesh Adaption dialog box.

      9. Rotate the view and zoom in to get the display shown in Figure 5.12: Alternative Display of Cells Marked for Adaption.

        Figure 5.12: Alternative Display of Cells Marked for Adaption

        Alternative Display of Cells Marked for Adaption

      10. After viewing the marked cells, rotate the view back and zoom out again.

      11. Click Close to close the Manual Mesh Adaption dialog box.

  3. Display the adapted mesh (Figure 5.13: The Adapted Mesh).

     Domain Mesh Display...

     

    1. Disable Faces in the Options group box.

    2. Select All from the Edge Type list.

    3. Deselect all of the highlighted items from the Surfaces selection list except for symmetry-xyplane.


      Tip:  To deselect all surfaces, click the Deselect All Shown button ( ) at the top of the Surfaces selection list. Then select the desired surface from the Surfaces selection list.


    4. Click Display and close the Mesh Display dialog box.

      Figure 5.13: The Adapted Mesh

      The Adapted Mesh

  4. Request an additional 150 iterations.

     Solution Run Calculation Calculate

    The solution will converge as shown in Figure 5.14: The Complete Residual History and Figure 5.15: Convergence History of Mass-Weighted Average Temperature.

    Figure 5.14: The Complete Residual History

    The Complete Residual History

    Figure 5.15: Convergence History of Mass-Weighted Average Temperature

    Convergence History of Mass-Weighted Average Temperature

  5. Save the case and data files for the solution with an adapted mesh (elbow2.cas.h5 and elbow2.dat.h5).

     File Write Case & Data...

    1. Enter elbow2.cas.h5 for Case/Data File.

    2. Click OK to save the files and close the Select File dialog box.

    The files elbow2.cas.h5 and elbow2.dat.h5 will be saved in your default folder.

  6. Display the temperature distribution (using node values) on the revised mesh using the temperature contours definition that you created earlier (Figure 5.16: Filled Contours of Temperature Using the Adapted Mesh).

    Right-click the Results/Graphics/Contours/contour-temp tree item and select Display from the menu that opens.

     Results Graphics Contours contour-temp  Display

    Figure 5.16: Filled Contours of Temperature Using the Adapted Mesh

    Filled Contours of Temperature Using the Adapted Mesh

  7. Display and save an XY plot of the temperature profile across the centerline of the outlet for the adapted solution (Figure 5.17: Outlet Temperature Profile for the Adapted Coupled Solver Solution).

     Results Plots XY Plotxy-outlet-temp  Edit...

    1. Click Save/Plot to display the XY plot.

      Figure 5.17: Outlet Temperature Profile for the Adapted Coupled Solver Solution

      Outlet Temperature Profile for the Adapted Coupled Solver Solution

    2. Enable Write to File in the Options group box.

      The button that was originally labeled Save/Plot will change to Write....

    3. Click Write....

      1. In the Select File dialog box, enter outlet_temp2.xy for XY File.

      2. Click OK to save the temperature data.

    4. Close the Solution XY Plot dialog box.

  8. Display the outlet temperature profiles for both solutions on a single plot (Figure 5.18: Outlet Temperature Profiles for the Two Solutions).

    1. Open the Plot Data Sources dialog box.

       Results Plots Data Sources...

    2. Click the Load File... button to open the Select File dialog box.

      1. Select outlet_temp1.xy and outlet_temp2.xy.

        Each of these files will be listed with their folder path in the bottom list to indicate that they have been selected.


        Tip:  If you select a file by mistake, simply click the file in the bottom list and then click Remove.


      2. Click OK to save the files and close the Select File dialog box.

    3. Select the folder path ending in outlet_temp1.xy from the Curve Information selection list (Curves group box).

    4. Enter Before Adaption in the lower-right text-entry box.

    5. Click the Change Legend Entry button.

      The item in the Legend Entries list for outlet_temp1.xy will be changed to Before Adaption. This legend entry will be displayed in the upper-left corner of the XY plot generated in a later step.

    6. In a similar manner, change the legend entry for the folder path ending in outlet_temp2.xy to be Adapted Mesh.

    7. Click Plot and close the Plot Data Sources dialog box.

    Figure 5.18: Outlet Temperature Profiles for the Two Solutions shows the two temperature profiles at the centerline of the outlet. It is apparent by comparing both the shape of the profiles and the predicted outer wall temperature that the solution is highly dependent on the mesh and solution options. Specifically, further mesh adaption should be used in order to obtain a solution that is independent of the mesh.

    Figure 5.18: Outlet Temperature Profiles for the Two Solutions

    Outlet Temperature Profiles for the Two Solutions

5.5. Summary

A comparison of the convergence speed for the SIMPLE and Coupled pressure-velocity coupling schemes indicates that the latter converges much faster. With more complex meshes, the difference in speed between the two schemes can be significant.