|
[Sponsors] |
November 26, 2020, 00:56 |
topoSet with surfaceToCell
|
#1 |
Member
Sunag R A
Join Date: Jul 2019
Location: Bangalore, India
Posts: 82
Rep Power: 7 |
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. |
|
November 26, 2020, 04:35 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello Sunag,
I think you have to give the path to file : Code:
file "constant/triSurface/duct_cadquery_heat.stl"; Cheers, Yann |
|
November 29, 2020, 04:28 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
Code:
file "<constant>/triSurface/file.stl"; file "<case>/constant/triSurface/file.stl"; file "$FOAM_CASE/constant/triSurface/file.stl"; Code:
file "<system>/file"; file "<case>/file"; file "$FOAM_CASE/system/file"; // other examples #includeEtc "someFile" #include "<etc>/someFile" #sinclude "<etc>/optionalFile" |
||
November 29, 2020, 06:48 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
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"; file "<constant>/triSurface/file.stl"; |
|
November 29, 2020, 07:15 |
|
#5 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
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. |
||
November 29, 2020, 09:19 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
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! |
|
November 30, 2020, 01:22 |
|
#7 |
Member
Sunag R A
Join Date: Jul 2019
Location: Bangalore, India
Posts: 82
Rep Power: 7 |
Thank you for the reply Mark and Yann.
The solution worked and helped me. |
|
Tags |
snappy hex mesh, stl file, surfacetocell, toposet, trisurface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Error: topoSet – create patch from .stl – searchableSurfaceToFaceZone | carl_r | OpenFOAM Meshing & Mesh Conversion | 1 | November 18, 2022 18:06 |
fail to run series of runApplication topoSet -dict | jiahui_93 | OpenFOAM Programming & Development | 1 | May 25, 2022 13:56 |
[snappyHexMesh] TopoSet does not select all faces | Mondal131211 | OpenFOAM Meshing & Mesh Conversion | 3 | July 24, 2019 10:39 |
[snappyHexMesh] Porous Media using TopoSet | RobertoCirolini | OpenFOAM Meshing & Mesh Conversion | 3 | August 30, 2016 09:34 |
[Other] cellLevel field not readable by topoSet | blaise | OpenFOAM Meshing & Mesh Conversion | 0 | June 30, 2015 05:35 |