Wrong curvature at finite area boundary
Curvature computation at finite area boundaries is wrong.
Steps to reproduce
To visualize the curvature field, one can modify for instance the checkFaMesh utility. A volScalarField can be added and the aMesh.faceCurvatures() can be written out on its boundary corresponding to the faMesh.
volScalarField curvVf ( IOobject ( "curvVf", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar(dimless/dimLength, Zero) ); // Create volume-to surface mapping object volSurfaceMapping vsm(aMesh); vsm.mapToVolume(aMesh.faceCurvatures(), curvVf.boundaryFieldRef()); curvVf.write();
Consider the surface of half a sphere, this is represented by a finite area mesh with a boundary, the circumference at the equator. The curvature of the sphere is known; in this case the radius of the sphere is 1 m, thus the curvature should be -2.
What is the current bug behaviour?
The figures below show the local curvature and the error in its computation on half a sphere for which the analytical curvature is known.
Note that the error persists when refining the mesh or using different cell/face shapes.
What is the expected correct behavior?
Relevant logs and/or images
Curvature: min = min(faceCurvatures) [0 -1 0 0 0 0 0] -2.0005 max = max(faceCurvatures) [0 -1 0 0 0 0 0] -1.48813
- OpenFOAM version : v1912 (problem present also in older versions)
- Operating system :
- Hardware info :
- Compiler :
A correction for the faces having a point on the boundary of the finite area mesh has to be included. The curvature computation depends on the pointAreaNormals and at the boundary of the finite area mesh these normals introduce the error. A solution for cases where the mesh is not being highly deformed close to the boundary may be possible.