View Issue Details

IDProjectCategoryView StatusLast Update
0004042OpenFOAMBugpublic2023-12-21 16:36
ReportermaHein Assigned Tohenry  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformUnixOSOtherOS Version(please specify)
Product Versiondev 
Fixed in Versiondev 
Summary0004042: topoSet + searchableSurfaceToFaceZone = crashes
DescriptionHello,

the following combination always throws an error:

Use topoSet to create a faceZoneSet with the searchableSurfaceToFaceZone source with a specific STL geometry. OpenFOAM always complains that it cannot find the corresponding STL geometry, although everything is at its correct place. The error message reads as follow:

--> FOAM FATAL ERROR:
Cannot find triSurfaceMesh starting from "/disk7102/home/heinrich/Desktop/concrete-rheometer/mesh/annulus/constant/geometry/annulus"

But the STL geometry is located exactly there.
Steps To ReproduceAn example case is provided. Just execute the Allmesh script: First, blockMesh creates the mesh, then topoSet should create a faceZoneSet, but this crashes.

TagsNo tags attached.

Activities

maHein

2023-12-19 13:58

reporter  

annulus.zip (4,569 bytes)

henry

2023-12-19 14:04

manager   ~0013171

Can you provide maintenance funding to cover this work or a patch to resolve the issue?

maHein

2023-12-20 07:54

reporter   ~0013172

The issue is partly due to (1) a mistake in the documentation and (2) partly due to poor coding.

(1) In ./etc/caseDicts/annotated/topoSetDict, the documentation reads that one should provide the name of the geometry file with the keyword "name". In the source code and other tutorials, the required keyword is "file". This should be corrected

(2) If the keyword "file" is not found (as in my case), searchableSurfaceToFaceZone automatically looks for a default file, which is located in the folder "constant/geometry" and called like the name of the case, in my example "annulus" (without any file extension!). Now the issue is as follows: On the one hand, OpenFOAM looks for a geometry file without file extension, on the other hand OpenFOAM cannot handle geometry files without extension as it throws an error when such a file is found:

unknown file extension . Supported extensions are '.ftr', '.stl', '.stlb', '.gts', '.obj', '.ac', '.off', '.nas', '.tri' and '.vtk'

So in essence, the default behaviour, if the keyword 'file' is not found, always results in an error. Even worse, the error message does not give any indication on how to resolve this as a user.

Interestingly, exactly the same issue is found with the 'createBaffles' utility, when a triSurfaceMesh is used for creating the baffles but the 'file' keyword is not found.

Solution: Either get rid of looking for a default file or, if this is continued to be included, add a file extension in the lookupOrDefault entry.

The relevant code lines for searchableSurfaceToFaceZone are in file src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone.C, lines 212 - 216.

henry

2023-12-20 11:06

manager   ~0013174

If we remove the default file the file entry would have to be specified for all forms of searchableSurface, not just triSurfaceMesh for which it is needed.

henry

2023-12-20 11:09

manager   ~0013175

I have corrected the documentation in etc/caseDicts/annotated/topoSetDict:

commit a5939b0f0aa84678ebd5fa1dacad3fe497d2f5a3 (HEAD -> master, origin/master, origin/HEAD)
Author: Henry Weller <http://cfd.direct>
Date: Wed Dec 20 11:08:00 2023 +0000

    etc/caseDicts/annotated/topoSetDict: Updated documentation for triSurfaceMesh

henry

2023-12-20 11:40

manager   ~0013176

Try this:

commit b94ade6e61b4dc9a4235ef308f7a3540c78704a3 (HEAD -> master, origin/master, origin/HEAD)
Author: Henry Weller <http://cfd.direct>
Date: Wed Dec 20 11:38:55 2023 +0000

    triSurfaceMesh: Rationalised the handling of the now required "file" entry

Issue History

Date Modified Username Field Change
2023-12-19 13:58 maHein New Issue
2023-12-19 13:58 maHein File Added: annulus.zip
2023-12-19 14:04 henry Note Added: 0013171
2023-12-20 07:54 maHein Note Added: 0013172
2023-12-20 11:06 henry Note Added: 0013174
2023-12-20 11:09 henry Note Added: 0013175
2023-12-20 11:40 henry Note Added: 0013176
2023-12-21 16:36 henry Assigned To => henry
2023-12-21 16:36 henry Status new => resolved
2023-12-21 16:36 henry Resolution open => fixed
2023-12-21 16:36 henry Fixed in Version => dev