28.9.2. Patching Values in Selected Cells

Once you have initialized (or calculated) the entire flow field, you may patch different values for particular variables into different cells. If you have multiple fluid zones, for example, you may want to patch a different temperature in each one. You can also choose to patch a custom field function (defined using the Custom Field Function Calculator Dialog Box) instead of a constant value. If you are patching velocities, you can indicate whether the specified values are absolute velocities or velocities relative to the cell zone’s velocity. All patching operations are performed with the Patch Dialog Box (Figure 28.14: The Patch Dialog Box).

 Solution → Initialization Patch...

 Solution →   Initialization → Patch...

Figure 28.14:  The Patch Dialog Box

The Patch Dialog Box

  1. Select the variable to be patched in the Variable list.


    Note:  For species transport cases with a single phase flow, you can select boundary species to be displayed in the Variable list using the Select Boundary Species dialog box (see Figure 14.3: The Select Boundary Species Dialog Box) that can be accessed by clicking the Species button in the Solution Initialization task page.


  2. In the Zones to Patch and/or Registers to Patch lists, choose the zone(s) and/or register(s) for which you want to patch a value for the selected variable.


    Important:  When a shell zone has been created (that is, by enabling shell conduction for a wall and running the calculation), the name of the shell zone will be listed in the Zones to Patch list as shell : <wall-name>, where <wall-name> is the name of the wall in which shell conduction has been enabled. Only temperature can be patched into the cells of a shell, and the same value or field function will be patched into every layer of the shell.


  3. If you want to patch a constant value, simply enter that value in the Value field. If you want to patch a previously-defined field function, enable the Use Field Function option and select the appropriate function in the Field Function list.

  4. If you selected a velocity in the Variable list, and your problem involves moving reference frames or sliding meshes, indicate whether the patched velocities are absolute velocities or velocities relative to the motion of each cell zone by selecting Absolute or Relative to Cell Zone under Reference Frame. (If no zone motion occurs in the problem, the two options are equivalent.) The default reference frame for velocity patching in ANSYS Fluent is relative. If the solution in most of your domain is rotating, using the relative option may be better than using the absolute option.

  5. Click the Patch button to update the flow-field data. (Note that patching will have no effect on the iteration or time-step count.)


Important:  If you apply a patch when setting up an ANSYS Fluent simulation from ANSYS Workbench, the patch will not be automatically performed during future automatic solution updates from Workbench. If you need to apply the patch each time the solution is updated from Workbench, you can do so by adding the text command /solve/patch (with appropriate arguments) to the Original Settings command list in the Case Modification tab of the Automatic Solution Initialization and Case Modification dialog box. See Automatic Initialization of the Solution and Case Modification in this manual and Case Modification Strategies with Fluent and Workbench in the Fluent in Workbench User's Guide for more details on automatic case modification.


28.9.2.1. Using Registers

The ability to patch values in cell registers gives you the flexibility to patch different values within a single cell zone. For example, you may want to patch a certain value for temperature only in fluid cells with a particular range of concentrations for one species. You can create a cell register (basically a list of cells) using the functions that are used to mark cells for adaption. These functions allow you to mark cells based on physical location, cell volume, gradient or isovalue of a particular variable, and other parameters. See Adapting the Mesh for information about marking cells for adaption. Manipulating Adaption Registers provides information about manipulating different registers to create new ones. Once you have created a register, you can patch values in it as described above.

28.9.2.2. Using Field Functions

By defining your own field function using the Custom Field Function Calculator Dialog Box, you can patch a non-constant value in selected cells. For example, you may want to patch varying species mass fractions throughout a fluid region. To use this feature, simply create the function as described in Custom Field Functions, and then perform the function-patching operation in the Patch Dialog Box, as described above.

28.9.2.3. Using Patching Later in the Solution Process

Since patching affects only the variables for which you choose to change the value, leaving the rest of the flow field intact, you can use it later in the solution process without losing calculated data. (Initialization, on the other hand, resets all data to the initial values). For example, you might want to start a combustion calculation from a cold-flow solution. You can simply read in (or calculate) the cold-flow data, patch a high temperature in the appropriate cells, and continue the calculation.

Patching can also be useful when you are solving a problem using a step-by-step technique, as described in Step-by-Step Solution Processes.


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