A finite volume is considered bad, if:
• | the volume is negative, or less than a minimum volume |
• | the mass or the energy of the volume is negative |
For both cases, the bad volume is merged with its neighbors. This merge is iterative as the neighbors could also be a bad volume.
To determine the minimum volume, two approaches are used:
1. | The mean volume, of all the active volume is calculated and a first minimum volume is a fraction of this one: |
Where, Cgmerg is the "Factor for global merging” defined by you.
The flag Igmerg determines if the mean volume to use is the current mean volume (Igmerg =1) or the initial mean volume calculated at the first cycle.
2. | The mean volume, of all the neighbors of the current one is calculated. A second minimum volume is a fraction of the previous one: |
Where, Cnmerg is the “Factor for neighborhood merging” defined by you.
Finally, the volume minimum used is: