CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] OpenFoam Fatal error : "Cannot find triSurfaceMesh at ""

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By john myce
  • 1 Post By john myce
  • 1 Post By Rango
  • 1 Post By Rango

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2020, 09:46
Default OpenFoam Fatal error : "Cannot find triSurfaceMesh at ""
  #1
New Member
 
Anonymous
Join Date: Jun 2020
Posts: 6
Rep Power: 5
Eva Stardust is on a distinguished road
Hi,
I am a beginner at OpenFOAM and I am trying to run CFD external wind around buildings. hence, I used the tutorial Case of "WindAroundBuildings" and replaced the buildings.obj file in triSurface with a new file named buildings.obj that I had created in Rhinoceros3D.

After doing this the snappyHexMesh generates an error :

--> FOAM FATAL ERROR:
Cannot find triSurfaceMesh at ""

From function static Foam::fileName Foam::triSurfaceMesh::checkFile(const Foam::regIOobject&, const Foam::dictionary&, bool)
in file searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C at line 106.

FOAM exiting

I am not able to rectify it. It would be helpful to know how to resolve it.
Thanks!
Eva Stardust is offline   Reply With Quote

Old   June 18, 2020, 18:14
Default
  #2
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 5
Rango is on a distinguished road
Hi,

Are you sure the problem isn't just due to a syntax error in your snappyHexMeshDict (e.g. a missing ";")? Posting the file (or the test case) could help spotting the possible errors...

Cheers,
Rango is offline   Reply With Quote

Old   June 19, 2020, 01:58
Default
  #3
New Member
 
Anonymous
Join Date: Jun 2020
Posts: 6
Rep Power: 5
Eva Stardust is on a distinguished road
Hi,

Thank you for your response! I have attached the test case.
Although I did not make any changes to the case files. Hopefully, it should not be a syntax error, but since I have just started with OpenFOAM it is likely I might have skipped something.

Thank you!
Attached Files
File Type: zip Test_case.zip (172.3 KB, 9 views)
Eva Stardust is offline   Reply With Quote

Old   June 19, 2020, 03:51
Default
  #4
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 7
john myce is on a distinguished road
Hi !

When you ran surfaceFeatureExtract OpenFOAM cannot read the file buildings.obj by looking at the log.surfaceFeatureExtract. It is because in your actual path you have an invalid syntax for the folder "winAroundBuildings - Original" so you have to remove the space

Cheers
john myce is offline   Reply With Quote

Old   June 19, 2020, 04:15
Default
  #5
New Member
 
Anonymous
Join Date: Jun 2020
Posts: 6
Rep Power: 5
Eva Stardust is on a distinguished road
Hi,

Thank you for pointing out. I have corrected the file path and now snappyhexmesh has generated another error. Since the test case is now exceeding the file upload limit, I have attached the log files only.

Thanks,
Attached Files
File Type: zip case_2.zip (6.7 KB, 7 views)
Eva Stardust is offline   Reply With Quote

Old   June 19, 2020, 04:31
Default
  #6
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 7
john myce is on a distinguished road
Code:
--> FOAM Warning : 
    From function Foam::layerParameters::layerParameters(const Foam::dictionary&, const Foam::polyBoundaryMesh&)
    in file snappyHexMeshDriver/layerParameters/layerParameters.C at line 266
    Reading "F:/gkspl/CFD/CFD_run/OpenFOAM/testcase2/system/snappyHexMeshDict.addLayersControls.layers" from line 79 to line 79
    Layer specification for "CAD.*" does not match any patch.
Valid patches are 
5
(
inlet
outlet
ground
frontAndBack
buildings
)
the patch "CAD" doesn't exist.
Eva Stardust likes this.
john myce is offline   Reply With Quote

Old   June 19, 2020, 04:37
Default
  #7
New Member
 
Anonymous
Join Date: Jun 2020
Posts: 6
Rep Power: 5
Eva Stardust is on a distinguished road
addLayersControls
{
layers
{
"CAD.*"
{
nSurfaceLayers 2;
}
}

relativeSizes true;
expansionRatio 1.2;
finalLayerThickness 0.5;
minThickness 1e-3;
}


this text is being quoted from the tutorial case, I believe I do not have a "cad*" patch in my buildings.
please suggest what changes in the script are required to do to the tutorial case to make it run for my building blocks?
Eva Stardust is offline   Reply With Quote

Old   June 19, 2020, 04:50
Default
  #8
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 7
john myce is on a distinguished road
Yes you are right there is 5 patches known :
Code:
Valid patches are 
5
(
inlet
outlet
ground
frontAndBack
buildings
)
So you have to choose on which patch do you want to add the layers.
For instance you can replace "CAD.*" by buildings.

When you have an issue with snappy try to see if there is a readable error message in the logs so you can have a clue where is the problem.
Eva Stardust likes this.
john myce is offline   Reply With Quote

Old   June 19, 2020, 06:46
Default
  #9
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 5
Rango is on a distinguished road
Hi,


You can safely make the layers keyword empty in order to turn off the warning since "addLayers" option is off anyway, i.e.:
layers
{
}


Cheers,
Eva Stardust likes this.
Rango is offline   Reply With Quote

Old   June 19, 2020, 07:12
Default
  #10
New Member
 
Anonymous
Join Date: Jun 2020
Posts: 6
Rep Power: 5
Eva Stardust is on a distinguished road
hi,
Thank you for your valuable feedback.
I re-ran the simulation for both, the tutorial and the test case.
As a result, I observed that

1 )In the tutorial case, snappyhexmesh generates the same warning "not having a CAD patch " but runs irrespective. which I have attached as tutorial_log.

2) After replacing cad with buildings, snappyhexmesh is no longer producing an error but I do not get the " buildings" region in my results, i.e there is no "buildings" named checkbox in the paraview mesh regions and the results are only showing the blockmesh.
attached the test case logs and the paraview screenshot.

thanks,
Attached Images
File Type: jpg test_case_result.jpg (75.4 KB, 10 views)
Attached Files
File Type: zip testcase4.zip (6.4 KB, 2 views)
File Type: zip tutorial_log.zip (9.6 KB, 0 views)
Eva Stardust is offline   Reply With Quote

Old   June 19, 2020, 10:27
Default
  #11
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 5
Rango is on a distinguished road
Hi,


The reason for not having the "builidings" patch is that "buildings.obj" is located outside the background mesh, therefore not being captured by sHM. Please see attached the updated case.


Cheers
Attached Files
File Type: zip Test_case.zip (13.4 KB, 6 views)
Eva Stardust likes this.
Rango is offline   Reply With Quote

Old   June 19, 2020, 14:11
Default
  #12
New Member
 
Anonymous
Join Date: Jun 2020
Posts: 6
Rep Power: 5
Eva Stardust is on a distinguished road
Hi,

Thank you so much for your time and efforts. This worked, I realized that the rhino was remapping the geometry coordinates, which was the probable cause of this.

Cheers!
Eva Stardust is offline   Reply With Quote

Reply

Tags
beginner, buildings, snappyhexmesh


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"FOAM FATAL IO ERROR: Cannot find patchField entry for NACA6409_patch24311" Pavlidis Chariton OpenFOAM Running, Solving & CFD 0 October 7, 2019 04:57
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 05:40
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 03:18
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30


All times are GMT -4. The time now is 23:38.