View Issue Details

IDProjectCategoryView StatusLast Update
0004117OpenFOAMBugpublic2024-07-27 17:28
Reporterblttkgl Assigned Tochris  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Product Version12 
Summary0004117: cylindricalBackground option in snappyHexMeshConfig generates invalid mesh
DescriptionWhen cylindricalBackground option is used in snappyHexMeshConfig utility, the utility generates an outer and rotatingZone searchableCylinder geometries, and projects the edges to these geometries. The bounds of the cylinders are set to be exact zMin and zMax bounds of the bounding box, and for some reason this results with an invalid mesh.
Steps To ReproduceCopy the /meshes/snappyHexMesh/pipe tutorial.

Replace the Allrun with the attached Allrun, and execute.

Visualize the "broken" and "fixed" mesh regions using paraview.
Additional InformationPossible way to remedy:

Update the zmin and zmax bounds by multiplying them with an integer at:

https://github.com/OpenFOAM/OpenFOAM-dev/blob/13044b24badcb891417102dbb91f562ecd2343fd/applications/utilities/preProcessing/snappyHexMeshConfig/blockMeshCylindricalConfiguration.C#L275
TagsNo tags attached.

Activities

blttkgl

2024-07-24 09:01

reporter  

Allrun (1,007 bytes)   
#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Copy pipe surface from resources directory
mkdir -p constant/geometry
cp $FOAM_TUTORIALS/resources/geometry/pipe*.obj.gz constant/geometry/

runApplication surfaceFeatures
runApplication snappyHexMeshConfig  -bounds '((-26 -26 -60) (26 26 84))' -cylindricalBackground -nCells '(10 20 100)'
runApplication -s broken blockMesh -region broken -dict system/blockMeshDict


foamDictionary system/blockMeshDict -entry geometry/rotatingZone/point1 -set '(0 0 -120)'
foamDictionary system/blockMeshDict -entry geometry/rotatingZone/point2 -set '(0 0 180)'
foamDictionary system/blockMeshDict -entry geometry/outer/point1 -set '(0 0 -120)'
foamDictionary system/blockMeshDict -entry geometry/outer/point2 -set '(0 0 180)'

runApplication -s fixed blockMesh -region fixed -dict system/blockMeshDict

#------------------------------------------------------------------------------
Allrun (1,007 bytes)   
pipe_blockmesh.png (768,404 bytes)

chris

2024-07-27 17:28

manager   ~0013326

Fixed by commit: https://github.com/OpenFOAM/OpenFOAM-dev/commit/2ff9df21e80d20e8730dc28b41b02f3bd04fde94
Projections in blockMesh are more reliable when the searchableCylinders extend beyond the zMin, zMax mesh bounds
I don't think there is any downside.
I extended both by the zMax - zMin span. Multiplying by factor does not work when zMin is positive or zMax is negative.

Issue History

Date Modified Username Field Change
2024-07-24 09:01 blttkgl New Issue
2024-07-24 09:01 blttkgl File Added: Allrun
2024-07-24 09:01 blttkgl File Added: pipe_blockmesh.png
2024-07-27 17:28 chris Assigned To => chris
2024-07-27 17:28 chris Status new => resolved
2024-07-27 17:28 chris Resolution open => fixed
2024-07-27 17:28 chris Note Added: 0013326