Load balancing

Load imbalance can be monitored in the log.dsmcFoam+ logfile at writeTime.

Time = 0.14

    Collisions                      = 8948

    Number of DSMC particles        = 775997
    Number of stuck particles       = 0
    Number of free particles        = 775997
    Average linear kinetic energy   = 7.404581292e-19
    Average rotational energy       = 2.317800406e-20
    Average vibrational energy      = 4.740872058e-22
    Average electronic energy       = 0
    Total energy                    = 1583.643485

Stage 1.0  ExecutionTime = 20600.77 s  ClockTime = 21680 s  Iteration 20000 (7.67 s)

    Maximum imbalance = 6.174121807%

In the system/loadBalanceDict dictionary, the maximum imbalance that is tolerated is prescribed using the key maximumAllowableImbalance and it is a scalar ranging between 0 and 1. 0.1 thus means a 10% imbalance and in the log shown above, domain repartitioning would not have been triggered.

enableBalancing                true;

maximumAllowableImbalance       0.1;

balanceUntilTime               0.01; // in seconds

weightField       dsmcNMean_mixture;

limitTimeDirBackups               2; 

Once steady-state is reached, it is recommended to perform domain repartitioning one last time and balanceUntilTime could be set to match the value of resetAtOutputUntilTime in fieldPropertiesDict (see F.2 Sampling/Steady-state simulations). The field used as a weight for domain repartitioning is called weightField and limitTimeDirBackups is an optional entry to limit the number of concurrent time directory backups (the default value is -1 meaning there is no restriction on the total number of stored directories).

Finally, the Stage number in log.dsmcFoam+ is incremented every time domain repartitioning is called

Stage 2.0  ExecutionTime = 28.47 s  ClockTime = 33 s  Iteration 50 (0.59 s)