Checker board effect with pimpleFoam and interfaceTracking
Summary
The library interfaceTrackingFvMesh produces wrong fluxes through the interface when adding gravity, resulting in a checkerboard flow. This makes the library unusable when simulating a liquid bridge or a drop in 2D and in 2D axisymmetric.
Steps to reproduce
I attached two test cases. The effect can be reproduced with a tutorial case:
- Starting from
$FOAM_TUTORIALS/incompressible/pimpleFoam/contactAngleCavity
- adding gravitation in positive (or negative) x direction
- fixing the edge points, otherwise the liquid bridge is overflowing, by setting
fixedFreeSurfacePatches (left right);
inconstant/dynamicMeshDict
Example case
Test case 1
This is the tutorial case described above. Here you see the checkboard effect in the velocity field U_y:
Test case 2:
This test case models a silicon liquid bridge. The resulting free surface shape is physical for this height, however the checkboard effect makes the velocity unusable. Because of the higher density the checkboard effect ist more pronounced.
I have spend a considarable amount searching for the issue. The effect is visible, even when turning rigidSurface, i.e. no moving interface.
- Both boundary conditions (freeSurfacePressure and freeSurfaceVelocity) produce this effect. The influence of the pressure boundary condition is higher
- changing the motion direction to normalMotionDir does not help
- any other correction available in the library does not help
- The image shows the cnoverged result, i.e. there is no residual mesh movement
- the effect is there for 2D or 2D axisymmetric (wedge) cases
- I tried many different schemes with similar results
- The contact angle boundary condition has no influence
- This issue persist for v2112 and v2212
What is the current bug behaviour?
Wrong fluxes are calculated through the free surface with the interfaceTrackingFvMesh library. The fluxes are changing sing for each cell and are discontinuous (see image of fsNetPhi below).
What is the expected correct behavior?
The fluxes through the interface should be continuous. No checkboard should be visible
Environment information
- OpenFOAM version : v2412
- Operating system : ubuntu
- Hardware info :
- Compiler :
Possible fixes
I have narrowed done the issue to a badly calculated aMesh().faceCurvatures()
.
In this image you can see the faceCurvature internal field after convergence of case 2. The fsNetFlux field through the surface is also shown. This produces the checkboard effect directly.
This would imply an issue in the finite Area Method. faceCurvatures() is calculated in $FOAM_SRC/finiteArea/faMesh/faMesh.C
The issue might be related to #1611.