28.14.1. User Inputs for Time-Dependent Problems

To solve a transient problem, you will follow the procedure outlined below:

  1. Enable the Transient option in the General task page (Figure 28.25: The General Task Page for a Transient Calculation).

     Setup →   General

    Figure 28.25:  The General Task Page for a Transient Calculation

    The General Task Page for a Transient Calculation

  2. Define all relevant models and boundary conditions. Note that any boundary conditions specified using user-defined functions can be made to vary in time. See the Fluent Customization Manual for details.

  3. Specify the desired parameters in the Solution Methods task page (Figure 28.26: The Solution Methods Task Page for a Transient Calculation).

     Solution →   Methods

    Figure 28.26:  The Solution Methods Task Page for a Transient Calculation

    The Solution Methods Task Page for a Transient Calculation

    If you are using the pressure-based solver, select PISO from the Scheme drop-down list in the Pressure-Velocity Coupling group box. To increase the speed of the calculations, you may need to modify the parameters related to the PISO scheme from their default values. See PISO for more information about the optimal use of the PISO algorithm.


    Important:  If you are using the LES turbulence model with small time steps, the PISO scheme may be too computationally expensive. It is therefore recommended that you select SIMPLE or SIMPLEC instead of PISO.



    Important:  It is best to select the Coupled pressure-velocity coupling scheme if you are using large time steps to solve your transient flow, or if you have a poor quality mesh.


    Next, specify the desired Transient Formulation. The First Order Implicit formulation is sufficient for most problems. If you need improved accuracy, you can either use Second Order Implicit or Bounded Second Order Implicit. The Bounded Second Order Implicit formulation would provide better stability, since time discretization would always ensure the bounds for variables, if available.


    Important:  Note that while the Bounded Second Order Implicit formulation provides the same accuracy as the Second Order Implicit formulation, it actually provides better stability.



    Important:  The Bounded Second Order Implicit formulation is available only for the pressure-based solver, and not for the density-based solver.


    The Explicit formulation (available only for the density-based solver) is used primarily to capture the transient behavior of moving waves, such as shocks. For details, see Temporal Discretization in the Theory Guide.

    When using the pressure-based solver, you have the additional options of selecting Non-Iterative Time Advancement and Frozen Flux Formulation for your time-dependent flow calculations (see Time-Advancement Algorithm and Steady-State Iterative Algorithm in the Theory Guide, respectively). Note that the latter option is only available for single-phase transient problems that do not use a moving/deforming mesh model.

  4. If you have selected Second Order Implicit or Bounded Second Order Implicit for the Transient Formulation for a case with a fixed or sliding mesh, you can enable a variable time step size formulation that accounts for the time step size variation in the evaluation of the time derivative. The default second-order time integration schemes assume a fixed time step size; any change in the time step size will introduce an error proportional to change in the time step size ratio. Therefore, the variable time step size formulation should be used to reduce errors in the time derivative evaluation when you plan to introduce arbitrary time step size variation with the second-order time integration schemes. To enable this formulation, use the following text command:

    solve → set → second-order-time-options


    Important:  The following are not supported with the variable time step size formulation:

    • dynamic meshes

    • adaptive time stepping


    For more details, see Second-Order Time Integration Using a Variable Time Step Size in the Theory Guide.

  5. (optional) If you are using the explicit transient formulation with specified Courant number or if you are using the adaptive time stepping method (described in a later step and in Adaptive Time Stepping) it is recommended that you enable the printing of the current time (for the explicit transient formulation) or the current time step size (for the adaptive time stepping method) at each iteration, using Figure 28.34: Report File for 'flow-time', 'delta-time', and 'iters-per-timestep'.

     Solution → Monitors → Statistic  Edit...

    Make sure that the desired item is selected from the Statistics selection list (time for the current time or delta_time for the current time step size) and enable the Print option. When ANSYS Fluent prints the residuals to the console at each iteration, it will include a column with the current time or the current time step size.

  6. (optional) Use the Drag Report Definition Dialog Box, the Lift Report Definition Dialog Box, the Moment Report Definition Dialog Box, or the Surface Report Definition Dialog Box to monitor (and/or save to a file) time-varying force coefficient values or a report of a field variable or function on a surface as it changes with time. See Monitoring Solution Convergence for details.

  7. Set the initial conditions (at time ) using the Solution Initialization task page.

     Solution →   Initialization

    You can also read in a steady-state data file to set the initial conditions.

     File → Read → Data...

  8. Use the Autosave dialog box to specify the file name and frequency with which case and data files should be saved during the solution process. To open the Autosave dialog box, click the Edit... button next to Autosave Every in the Calculation Activities task page.

     Solution → Calculation Activities → Autosave On

    See Automatic Saving of Case and Data Files for details about automatic file saving.

    The Calculation Activities task page also allows you to export solution and particle history data during the transient calculation. See Exporting Data During a Transient Calculation for details.

    If you want to create a graphical animation of the solution over time, you can use Figure 28.43: The Animation Definition Dialog Box to set up the graphical displays that you want to use in the animation. See Animating the Solution for details.

    You may also want to request automatic execution of other commands using the Execute Commands Dialog Box. See Executing Commands During the Calculation for details.

  9. (optional) You can improve the convergence of the transient calculations by enabling the Extrapolate Variables option in the Run Calculation Task Page. This option instructs ANSYS Fluent to predict the solution variable values for the next time step using a Taylor series expansion, and then inputs that predicted value as an initial guess for the inner iterations of the current time step. As a result, the absolute residual levels are lowered.

    Note that the Extrapolate Variables option is not available if you are employing either the NITA scheme with the pressure-based solver or the explicit formulation with the density-based solver.


    Important:  If you use the Extrapolate Variables option when modeling an incompressible flow with the density-based solver, it is recommended that you disable the extrapolation of pressure values. After you have enabled the Extrapolate Variables option, type the following text command in the console:


    > solve/set/extrapolate-eqn-vars/pressure
    
    Extrapolate Pressure? [yes] no
    
  10. (optional) If you want ANSYS Fluent to gather data for time statistics (that is, time-averaged, root-mean-square, and root-mean-square-error values for solution variables) during the calculation, follow these steps:

    1. Create a custom field function for the each of the variables for which you want to postprocess unsteady statistics (for example, P*|V|), using the Custom Field Function Calculator. For detailed instructions, see Creating a Custom Field Function. Note that you do not need to take the extra step of creating custom field functions for the flow shear stresses, flow heat fluxes, wall statistics, or discrete phase variables as there are options for selecting these variables directly in a later step.

       Parameters & Customization → Custom Field Functions New...


      Important:  The maximum number of custom field functions that can be calculated and postprocessed for unsteady statistics is 50.


    2. Enable the Data Sampling for Time Statistics option in the Run Calculation Task Page.

       Solution →   Run Calculation →   Data Sampling for Time Statistics

      Enabling this option will allow you to display and report the mean, the root-mean-square (RMS), and the root-mean-square-error (RMSE) values, as described in Postprocessing for Time-Dependent Problems.

      To specify the sampling interval, enter a value for Sampling Interval.

      The Time Sampled displays the time period over which data has been sampled for the postprocessing of the mean, RMS, and RMSE values. For most quantities, as long as the time step size has been constant, dividing this by the time step size yields the number of data sets that have been collected. However, special consideration is required in the case of discrete phase quantities. As noted in Reporting of Unsteady DPM Statistics, sampling of DPM quantities occurs only when parcels pass through a cell, not necessarily at each specified sampling interval. Therefore, the number of samples of the DPM quantities taken during the sampled time period is stored in the separate postprocessing variable, Accum DPM Parcels in Cell. If the time step size is varied, every contribution of data sets sampled is automatically weighted by the current time step size.

      To select the variables (which may be represented as custom field functions) for which you want to collect statistics, click the Sampling Options... button and make selections from the Sampling Options dialog box that opens (Figure 28.27: The Sampling Options Dialog Box). Note that no custom field functions are selected by default.

       Solution →   Run Calculation → Sampling Options...

      Figure 28.27:  The Sampling Options Dialog Box

      The Sampling Options Dialog Box


      Important:  Note that gathering data for time statistics is not meaningful inside a moving cell zone (for example, a sliding zone in a sliding mesh problem, a moving zone in a dynamic mesh problem).


    3. Initialize the flow statistics.

       Solution → Initialization Reset Statistics

      Note that you can also reset the flow statistics after you have gathered some data for time statistics. If you perform, say, 10 time steps with the Data Sampling for Time Statistics option enabled, check the results, and then continue the calculation for 10 more time steps, the time statistics will include the data gathered in the first 10 time steps unless you reinitialize the flow statistics.

  11. Specify time-dependent solution parameters and start the calculation as described below for the implicit and explicit transient formulations:

    • If you have chosen the First Order Implicit, Second Order Implicit, or Bounded Second Order Implicit formulation, the procedure is as follows:

      1. Set the time-dependent solution parameters in the Run Calculation Task Page (see Figure 28.28: The Run Calculation Task Page for Implicit Transient Calculations).

         Solution →   Run Calculation

        Figure 28.28:  The Run Calculation Task Page for Implicit Transient Calculations

        The Run Calculation Task Page for Implicit Transient Calculations

        Solution parameters for the implicit transient formulations are as follows:

        • Max Iterations/Time Step: When ANSYS Fluent solves the time-dependent equations using the implicit formulation, multiple iterations may be necessary at each time step. This parameter sets a maximum for the number of iterations per time step. If the convergence criteria are met before this number of iterations is performed, the solution will advance to the next time step.

        • Time Step Size: The time step size is the magnitude of . Since the ANSYS Fluent formulation is fully implicit, there is no stability criterion that must be met in determining . However, to model transient phenomena properly, it is necessary to set at least one order of magnitude smaller than the smallest time constant in the system being modeled. A good way to judge the choice of is to observe the number of iterations ANSYS Fluent needs to converge at each time step. The ideal number of iterations per time step is 5–10. If ANSYS Fluent needs substantially more, the time step is too large. If ANSYS Fluent needs only a few iterations per time step, should be increased. Frequently a time-dependent problem has a very fast “startup” transient that decays rapidly. Therefore, it is often wise to choose a conservatively small for the first 5–10 time steps. may then be gradually increased as the calculation proceeds.

          For time-periodic calculations, you should choose the time step based on the time scale of the periodicity. For a rotor/stator model, for example, you might want 20 time steps between each blade passing. For vortex shedding, you might want 20 steps per period.

          To verify that your choice for was proper after the calculation is complete, you can plot contours of the Courant number within the domain. To do so, select Velocity... and Cell Convective Courant Number from the Contours of drop-down lists in the Contours dialog box. For a stable, efficient calculation, the Courant number should not exceed a value of 20–40 in most sensitive transient regions of the domain.

        • Time Stepping Method: By default, the size of the time step is fixed (as indicated by the selection of Fixed).

          To have ANSYS Fluent modify the size of the time step as the calculation proceeds, select Adaptive and click the Settings... button to specify the parameters in the Adaptive Time Step Settings dialog box. See Adaptive Time Stepping for details.

          For transient volume of fluid (VOF) or Eulerian Multiphase calculations you can select the Variable time stepping method. The parameters set through the Parameters... button are in many ways the same as for the adaptive time stepping method, with the exception of specifying a global Courant number (see Variable Time Stepping).

          Note that with the Adaptive or Variable time stepping method, the value you specify for the Time Step Size will be the initial size of the time step. As the calculation proceeds, the Time Step Size shown in the Run Calculation task page will be the size of the current time step.

      2. Specify the desired Number of Time Steps in the Run Calculation task page and click Calculate.

        As it calculates a solution, ANSYS Fluent will print the current time at the end of each time step.

    • If you choose the Explicit transient formulation, you have two input options available for specifying the transient solution advancement. You can specify the transient advancement either directly by specifying a time step size () or indirectly via entering a Courant number value ().

      1. Under the Solution Control panel , if the default option Specified Time Step is selected, you will be required to specify the time step size and the Number of Time Steps in the Run Calculation task page.

        Alternatively, if you do not select the Specified Time Step option, you will be required to specify the Courant Number under the Solution Control task page and the Number of Iterations in the Run Calculation task page. In this option the () value is used to calculate the time step size () using Equation 28–1:

        (28–1)

        where, is the volume of the cell, is the face area, and is the maximum local eigenvalue defined in Equation 21–80 in the Fluent Theory Guide.

      2. Under the Run Calculation task page:

        • If the Specified Time Step option is selected in the Solution Control panel, you need to specify the Time Step Size and the Number of Time Steps.

          • Time Step Size: For this option, you have to set the magnitude of .


            Note:  The stability of an explicit formulation is limited by the Courant-Fredrichs-Lewy condition. Fluent checks the specified time step against the stability limit. The stability limit is the maximum allowable time step size calculated based on in Equation 28–1. The stability limit is also the minimum of all local time steps in the domain. If the specified time step size is larger than the maximum allowable time step, Fluent displays a warning during the calculation.


          • Number of Time Steps: Specify the desired number of time steps and click Calculate

        • If the Specified Time Step option is not selected in the Solution Control panel then you need to specify the desired Number of Iterations and click Calculate.

        For explicit transient formulations, every iteration is a time step. The output for results in the Fluent console will include a column indicating the current time (if you have enabled the printing of the current time under adaptive time stepping method).

    • You can access the information saved in a data file, which includes a standard set of quantities that were computed during the calculation, by clicking the Data File Quantities... button. More information about this feature is available in Setting Data File Quantities.

  12. Save the final data file (and case file, if you have modified it) so that you can continue the transient calculation later, if desired.

     File → Write → Data...

28.14.1.1. Additional Inputs

The procedures for setting the reporting interval, updating user-defined function profiles, interrupting iterations, and resetting data are the same as those for steady-state calculations. See Performing Steady-State Calculations for details.


Important:  If you are using a user-defined function in your time-dependent calculation, note that, in addition to being updated after every iterations (where is the value of the Profile Update Interval), the function will also be updated at the first iteration of each time step.



Release 18.2 - © ANSYS, Inc. All rights reserved.