topoSet with surfaceToCell
Dear all,
I have created a mesh using snappyHexmesh with two different regions specified. Now, I have one stl file which needs to be inside my existing geometry for which I have imported to triSurface folder and meshed using snappyHexMesh. For me, this new stl file should be another region for me for which I am trying to use surfaceToCell in topoSetDict. But when I run topoSet, it shows that it is unable to read the stl file. Below is the topoSet assignment. I want to create cellSet, later from cellSet I want to create cellZone using cellSet. actions ( { name duct; type cellSet; action new; source surfaceToCell; sourceInfo { file "duct_cadquery_heat.stl"; outsidePoints ((0 0.01 0)); includeCut true; includeInside true; includeOutside false; nearDistance -1; curvature -100; useSurfaceOrientation false; } } ); Error: --> FOAM FATAL ERROR: Cannnot read "duct_cadquery_heat.stl" The stl file is present in constant/triSurface folder. The mesh works fine in snappyHexmesh but problem is with the topoSet. Let me know any leads related to this. Regards, Sunag R A. |
Hello Sunag,
I think you have to give the path to file : Code:
file "constant/triSurface/duct_cadquery_heat.stl"; Cheers, Yann |
Quote:
Code:
file "<constant>/triSurface/file.stl"; Code:
file "<system>/file"; |
Thanks Mark for the tips.
If you don't mind, can you elaborate on the "<directory>" syntax? What is the difference between these two lines? Code:
file "constant/triSurface/file.stl"; |
Quote:
https://www.openfoam.com/documentati...41778898bea3ba If you use the first version, it resolves to a relative path with "constant/..." in the second version it resolves to an absolute path "/path/mycase/constant/..." This difference can be essential if you run with the -case option. Most utilities in OpenFOAM will do the right thing and know to treat the relative path as relative to the case, but there are some that handle it as relative to your CWD. So better safe than sorry. |
Thanks for the clarification, I did not know about this.
Despite I usually don't use the -case option, it might come handy in some cases, especially when working on automatized workflow. As you said, better safe than sorry! |
Thank you for the reply Mark and Yann.
The solution worked and helped me. |
All times are GMT -4. The time now is 15:51. |