View Issue Details

IDProjectCategoryView StatusLast Update
0004069OpenFOAMBugpublic2024-04-11 12:44
Reportercgoessni Assigned Tohenry  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionsuspended 
Product Versiondev 
Summary0004069: mesh mover uses wrong pointZones from constant/polyMesh instead of $TIME/polyMesh
DescriptionIf pointZones exist in the constant/polyMesh folder, the multiValveEngine mover would erronously use those zones for frozen pointZones for a different meshing instance, if this meshing instance does not have a pointZone file. This leads to wrong mesh motion, or a crash, depending on the pointZones file in constant/polyMesh
Steps To ReproduceAdd this to Allrun in tutorials/XiFluid/kivaTest:

diff --git a/tutorials/XiFluid/kivaTest/Allrun b/tutorials/XiFluid/kivaTest/Allrun
index 8217a8e..f7ea3b7 100755
--- a/tutorials/XiFluid/kivaTest/Allrun
+++ b/tutorials/XiFluid/kivaTest/Allrun
@@ -11,6 +11,9 @@ runApplication kivaToFoam -file otape17
 
 runApplication createEngineZones -cylinderHead -pistonBowl
 
+runApplication cp -R -- constant/polyMesh -180
+runApplication rm -- -180/polyMesh/pointZones
+
 runApplication $application
 
 #------------------------------------------------------------------------------

Now, run the simulation.

Expected: Since there are no pointZones in the new mesh, none should be used.
Actual: pointZone cylinderHead is still used according to the log file.

To make the simulation crash, edit one of the labels of the constant/polyMesh/pointZones->cylinderHead pointZone to a very large value: It would crash due to out-of-bounds access.
Additional InformationIf I add a pointZones file which does not contain any pointZone to -180/polyMesh, the simulation works as expected.
TagsNo tags attached.

Activities

henry

2024-04-11 11:37

manager   ~0013223

Zones are considered topological with their own instance, not tied to the faces or anything else, thus if the zone files do not exist in the time directory the directory tree is scanned back to find them and uses the most recent, in this case the constant directory. So the behaviour you have reproduced in the example is the current designed behaviour.

cgoessni

2024-04-11 12:31

reporter   ~0013224

But how would this work with meshToMesh, espc. in conjunction with this commit: https://github.com/OpenFOAM/OpenFOAM-dev/commit/f9046e6ec422d5d2d9e8a7603ebe7171a9f4c560 ?

What if one meshing instance has no pointZones file, it would just use the pointZones from the previous instance / the previous instance that had pointZones? This will lead in 99.99% of the cases to either wrong mesh motion (freezing the wrong points) or a crash (when the mesh without the pointZones file has less points than expected in the previous pointZones file)...

Aren't the zones (independent of type) tightly coupled to the meshing instance? It wouldn't make sense to me using zone files from a different mesh instance...

henry

2024-04-11 12:43

manager   ~0013225

It may make sense for zones to behave differently for different users for different purposes. We are planning a complete rewrite of zones and looking for funding to undertake this work, please contact CFD Direct to discuss these plans, particularly if you can contribute to funding.

henry

2024-04-11 12:44

manager   ~0013226

Pending funding.

Issue History

Date Modified Username Field Change
2024-04-10 11:00 cgoessni New Issue
2024-04-11 11:37 henry Note Added: 0013223
2024-04-11 12:31 cgoessni Note Added: 0013224
2024-04-11 12:43 henry Note Added: 0013225
2024-04-11 12:44 henry Assigned To => henry
2024-04-11 12:44 henry Status new => closed
2024-04-11 12:44 henry Resolution open => suspended
2024-04-11 12:44 henry Note Added: 0013226