[Fluent Inc. Logo] return to home search
next up previous contents index

31.5.4 Partitioning the Grid Manually

Automatic partitioning in the parallel solver (described in Section  31.5.3) is the recommended approach to grid partitioning, but it is also possible to partition the grid manually in either the serial solver or the parallel solver. After automatic or manual partitioning, you will be able to inspect the partitions created (see Section  31.5.6) and optionally repartition the grid, if necessary. Again, you can do so within the serial or the parallel solver, using the Partition Grid panel. A partitioned grid may also be used in the serial solver without any loss in performance.



Guidelines for Partitioning the Grid


The following steps are recommended for partitioning a grid manually:

1.   Partition the grid using the default bisection method ( Principal Axes) and optimization ( Smooth).

2.   Examine the partition statistics, which are described in Section  31.5.6. Your aim is to achieve small values of Interface ratio variation and Global interface ratio while maintaining a balanced load ( Cell variation). If the statistics are not acceptable, try one of the other bisection methods.

3.   Once you determine the best bisection method for your problem, you can turn on Pre-Test (see Section  31.5.5) to improve it further, if desired.

4.   You can also improve the partitioning using the Merge optimization, if desired.

Instructions for manual partitioning are provided below.



Using the Partition Grid Panel


For grid partitioning, you need to select the bisection method for creating the grid partitions, set the number of partitions, select the zones and/or registers, and choose the optimizations to be used. For some methods, you can also perform pretesting to ensure that the best possible bisection is performed. Once you have set all the parameters in the Partition Grid panel to your satisfaction, click the Partition button to subdivide the grid into the selected number of partitions using the prescribed method and optimization(s). See above for recommended partitioning strategies.

You can set the relevant inputs in the Partition Grid panel (Figure  31.5.3 in the parallel solver, or Figure  31.5.4 in the serial solver) in the following manner:

Parallel $\rightarrow$ Partition...

Figure 31.5.3: The Partition Grid Panel in the Parallel Solver
figure

Figure 31.5.4: The Partition Grid Panel in the Serial Solver
figure

1.   Select the bisection method in the Method drop-down list. The choices are the techniques described in Section  31.5.5.

2.   Set the desired number of grid partitions in the Number integer number field. You can use the counter arrows to increase or decrease the value, instead of typing in the box. The number of grid partitions must be an integral multiple of the number of processors available for parallel computing.

3.   You can choose to independently apply partitioning to each cell zone, or you can allow partitions to cross zone boundaries using the Across Zones check button. It is recommended that you not partition cells zones independently (by turning off the Across Zones check button) unless cells in different zones will require significantly different amounts of computation during the solution phase (e.g., if the domain contains both solid and fluid zones).

4.   You can select Encapsulate Grid Interfaces if you would like the cells surrounding all non-conformal grid interfaces in your mesh to reside in a single partition at all times during the calculation. If your case file contains non-conformal interfaces on which you plan to perform adaption during the calculation, you will have to partition it in the serial solver, with the Encapsulate Grid Interfaces and Encapsulate for Adaption options turned on.

5.   If you have enabled the Encapsulate Grid Interfaces option in the serial solver, the Encapsulate for Adaption option will also be available. When you select this option, additional layers of cells are encapsulated such that transfer of cells will be unnecessary during parallel adaption.

6.   You can activate and control the desired optimization methods (described in Section  31.5.5) using the items under Optimizations. You can activate the Merge and Smooth schemes by turning on the Do check button next to each one. For each scheme, you can also set the number of Iterations. Each optimization scheme will be applied until appropriate criteria are met, or the maximum number of iterations has been executed. If the Iterations counter is set to 0, the optimization scheme will be applied until completion, without limit on the maximum number of iterations.

7.   If you have chosen the Principal Axes or Cartesian Axes method, you can improve the partitioning by enabling the automatic testing of the different bisection directions before the actual partitioning occurs. To use pretesting, turn on the Pre-Test option. Pretesting is described in Section  31.5.5.

8.   In the Zones and/or Registers lists, select the zone(s) and/or register(s) for which you want to partition. For most cases, you will select all Zones (the default) to partition the entire domain. See below for details.

9.   You can assign selected Zones and/or Registers to a specific partition ID by entering a value for the Set Selected Zones and Registers to Partition ID. For example, if the Number of partitions for your grid is 2, then you can only use IDs of 0 or 1. If you have three partitions, then you can enter IDs of 0, 1, or 2. This can be useful in situations where the gradient at a region is known to be high. In such cases, you can mark the region or zone and set the marked cells to one of the partition IDs, thus preventing the partition from going through that region. This in turn will facilitate convergence. This is also useful in cases where mesh manipulation tools are not available in parallel. In this case, you can assign the related cells to a particular ID so that the grid manipulation tools are now functional.

If you are running the parallel solver, and you have marked your region and assigned an ID to the selected Zones and/or Registers, click the Use Stored Partitions button to make the new partitions valid.

Refer to the example described later in this section for a demonstration of how selected registers are assigned to a partition.

10.   Click the Partition button to partition the grid.

11.   If you decide that the new partitions are better than the previous ones (if the grid was already partitioned), click the Use Stored Partitions button to make the newly stored cell partitions the active cell partitions . The active cell partition is used for the current calculation, while the stored cell partition (the last partition performed) is used when you save a case file.

12.   When using the dynamic mesh model in your parallel simulations, the Partition panel includes an Auto Repartition option and a Repartition Interval setting. These parallel partitioning options are provided because FLUENT migrates cells when local remeshing and smoothing is performed. Therefore, the partition interface becomes very wrinkled and the load balance may deteriorate. By default, the Auto Repartition option is selected, where a percentage of interface faces and loads are automatically traced. When this option is selected, FLUENT automatically determines the most appropriate repartition interval based on various simulation parameters. Sometimes, using the Auto Repartition option provides insufficient results, therefore, the Repartition Interval setting can be used. The Repartition Interval setting lets you to specify the interval (in time steps or iterations respectively) when a repartition is enforced. When repartitioning is not desired, then you can set the Repartition Interval to zero.

figure   

Note that when dynamic meshes and local remeshing is utilized, updated meshes may be slightly different in parallel FLUENT (when compared to serial FLUENT or when compared to a parallel solution created with a different number of compute nodes), resulting in very small differences in the solutions.

Example of Setting Selected Registers to Specified Partition IDs

1.   Start FLUENT in parallel. The case in this example was partitioned across two nodes.

2.   Read in your case.

3.   Display the grid with the Partitions option enabled in the Display Grid panel (Figure  31.5.5).

Figure 31.5.5: The Partitioned Grid
figure

4.   Adapt your region and mark your cells (see Section  26.7.3). This creates a register.

5.   Open the Partition Grid panel.

figure

6.   Keep the Set Selected Zones and Registers to Partition ID set to 0 and click the corresponding button. This prints the following output to the FLUENT console window:

>> 2 Active Partitions:
   ----------------------------------------------------------------------
   Collective Partition Statistics:        Minimum   Maximum   Total     
   ----------------------------------------------------------------------
   Cell count                              459       459       918       
   Mean cell count deviation               0.0%      0.0%      
   Partition boundary cell count           11        11        22        
   Partition boundary cell count ratio     2.4%      2.4%      2.4%      

   Face count                              764       1714      2461      
   Mean face count deviation               -38.3%    38.3%     
   Partition boundary face count           13        13        17        
   Partition boundary face count ratio     0.8%      1.7%      0.7%      

   Partition neighbor count                1         1         
   ----------------------------------------------------------------------
   Partition Method                        Principal Axes                       
   Stored Partition Count                  2                                    
Done.

7.   Click the Use Stored Partitions button to make the new partitions valid. This migrates the partitions to the compute-nodes. The following output is then printed to the FLUENT console window:

Migrating partitions to compute-nodes.
>> 2 Active Partitions:
       P   Cells I-Cells Cell Ratio   Faces I-Faces Face Ratio Neighbors
       0     672      24      0.036    2085      29      0.014         1
       1     246      24      0.098     425      29      0.068         1

   ----------------------------------------------------------------------
   Collective Partition Statistics:        Minimum   Maximum   Total     
   ----------------------------------------------------------------------
   Cell count                              246       672       918       
   Mean cell count deviation               -46.4%    46.4%     
   Partition boundary cell count           24        24        48        
   Partition boundary cell count ratio     3.6%      9.8%      5.2%      

   Face count                              425       2085      2461      
   Mean face count deviation               -66.1%    66.1%     
   Partition boundary face count           29        29        49        
   Partition boundary face count ratio     1.4%      6.8%      2.0%      

   Partition neighbor count                1         1         
   ----------------------------------------------------------------------
   Partition Method                        Principal Axes                       
   Stored Partition Count                  2                                    
Done.

8.   Display the grid (Figure  31.5.6).

Figure 31.5.6: The Partitioned ID Set to Zero
figure

9.   This time, set the Set Selected Zones and Registers to Partition ID to 1 and click the corresponding button. This prints a report to the FLUENT console.

10.   Click the Use Stored Partitions button to make the new partitions valid and to migrate the partitions to the compute-nodes.

11.   Display the grid (Figure  31.5.7). Notice now that the partition appears in a different location as specified by your partition ID.

Figure 31.5.7: The Partitioned ID Set to 1
figure

figure   

Although this example demonstrates setting selected registers to specific partition IDs in parallel, it can be similarly applied in serial.

Partitioning Within Zones or Registers

The ability to restrict partitioning to cell zones or registers gives you the flexibility to apply different partitioning strategies to subregions of a domain. For example, if your geometry consists of a cylindrical plenum connected to a rectangular duct, you may want to partition the plenum using the Cylindrical Axes method, and the duct using the Cartesian Axes method.

If the plenum and the duct are contained in two different cell zones, you can select one at a time and perform the desired partitioning, as described in Section  31.5.4. If they are not in two different cell zones, you can create a cell register (basically a list of cells) for each region 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 Chapter  26 for information about marking cells for adaption. Section  26.11.1 provides information about manipulating different registers to create new ones. Once you have created a register, you can partition within it as described above.

figure   

Note that partitioning within zones or registers is not available when Metis is selected as the partition Method.

For dynamic mesh applications (see item 11 above), FLUENT stores the partition method used to partition the respective zone. Therefore, if repartitioning is done, FLUENT uses the same method that was used to partition the mesh.

Reporting During Partitioning

As the grid is partitioned, information about the partitioning process will be printed in the text (console) window. By default, the solver will print the number of partitions created, the number of bisections performed, the time required for the partitioning, and the minimum and maximum cell, face, interface, and face-ratio variations. (See Section  31.5.6 for details.) If you increase the Verbosity to 2 from the default value of 1, the partition method used, the partition ID, number of cells, faces, and interfaces, and the ratio of interfaces to faces for each partition will also be printed in the console window. If you decrease the Verbosity to 0, only the number of partitions created and the time required for the partitioning will be reported.

You can request a portion of this report to be printed again after the partitioning is completed. When you click the Print Active Partitions or Print Stored Partitions button in the parallel solver, FLUENT will print the partition ID, number of cells, faces, and interfaces, and the ratio of interfaces to faces for each active or stored partition in the console window. In addition, it will print the minimum and maximum cell, face, interface, and face-ratio variations. In the serial solver, you will obtain the same information about the stored partition when you click Print Partitions. See Section  31.5.6 for details.

figure   

Recall that to make the stored cell partitions the active cell partitions you must click the Use Stored Partitions button. The active cell partition is used for the current calculation, while the stored cell partition (the last partition performed) is used when you save a case file.

Resetting the Partition Parameters

If you change your mind about your partition parameter settings, you can easily return to the default settings assigned by FLUENT by clicking on the Default button. When you click the Default button, it will become the Reset button. The Reset button allows you to return to the most recently saved settings (i.e., the values that were set before you clicked on Default). After execution, the Reset button will become the Default button again.


next up previous contents index Previous: 31.5.3 Partitioning the Grid
Up: 31.5 Partitioning the Grid
Next: 31.5.5 Grid Partitioning Methods
© Fluent Inc. 2006-09-20