-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Hello dear TwoPhaseFlow community,
I appreciate the TwoPhaseFlow library very much and would like to contribute to its development.
The use of periodic boundaries in the computational domain leads to the interFlow solver producing numerical solutions that violate the conservation of mass and momentum, often resulting in the divergence of a simulation. To the best of my knowledge, there are three reasons why this occurs:
- Periodic boundaries were initially not considered in the solution of the advection equation, leading to a violation of mass conservation.
- Periodic boundaries were initially not considered in the implementation of the plicRDF algorithm.
- Periodic boundaries were initially not considered in the implementation of curvature calculation.
The issues 1) and 2) have been reported and resolved by Johan Roenby and David Mueller in the GitLab project of the ESI version of OpenFOAM in issues #2457 and #3279, respectively. All the bug fixes presented in these issues have already been implemented in the development version of ESI-OpenFOAM. However, to the best of my knowledge, the bug fixes have not been ported to the VoF library within the TwoPhaseFlow code yet. I have recently ported the bug fixes by Johan Roenby and David Mueller to the VoF library within the TwoPhaseFlow code, and would like to share it with this community.
Additionally, I have addressed issue 3) and corrected the curvature calculation for the "fitParaboloid" method at periodic boundaries, employing some recently updated functionalities of the "zoneDistribute" class, which Johan Roenby and David Mueller also introduced.
To validate my implementation, I have performed a simulation of a disc in an initially uniform flow field. The computational domain is a two-dimensional square with periodic boundaries along each edge and empty boundary conditions in the third dimension. In the test case, advection, momentum, and pressure equations are all solved, i.e., there is no frozen flow field. The temporal development of the dimensionless curvature field is shown in Figs. 1 and 2 with and without a corrected calculation of curvature, respectively. The curvature is made dimensionless with theoretical curvature

Fig. 1: Disc in constant flow with corrected curvature calculation.

Fig. 2: Disc in constant flow without corrected curvature calculation.
In Fig. 2, it is shown how the droplet interface is distorted due to the transport across a cyclic boundary, even leading to negative values of curvature. In Fig. 1, the dimensionless curvature remains close to unity in the vicinity of the droplet interface. The transport of the droplet across the periodic boundary does not affect the convergence of the momentum and pressure equations, as documented in the simulation log file, which is part of the archive attached to this post.
Please find the following archive attached to my post here:
The archive includes the test case of a disc in constant flow presented in Figs. 1 and 2, as well as an updated version of the TwoPhaseFlow library. I have included only the files that I have changed, and I have highlighted all sections that I have changed using dashed lines. Replacing the files I have provided with the existing ones and recompiling the TwoPhaseFlow library should be sufficient to apply the bug fixes. I strongly recommend using the latest development version of ESI-OpenFOAM to reproduce my results, as the TwoPhaseFlow code utilizes both the "geometricVoF" library and the "zoneDistribute" class of OpenFOAM. Please note that the bug fix will also work in parallel, but it requires the use of the "preservePatch" constraint for decomposing the domain.
I would greatly appreciate any feedback, comments, or questions regarding this post. Also thanks again to Johan Roenby and David Mueller.
Best regards and have a nice weekend
Mario Hermes
Mario Hermes, M. Sc.
Wissenschaftlicher Mitarbeiter
Lehrstuhl für Hydraulische Strömungsmaschinen – Prof. Dr.-Ing. Romuald Skoda
Ruhr-Universität Bochum - Universitätsstraße 150 - 44801 Bochum - IC3 / 77
Tel.: +49 (0)234 / 32-28527 | E-Mail: Mario.Hermes@rub.de | Internet: www.hsm.rub.de