CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] OpenFoam Fatal error : "Cannot find triSurfaceMesh at "" (https://www.cfd-online.com/Forums/openfoam-meshing/228020-openfoam-fatal-error-cannot-find-trisurfacemesh.html)

Eva Stardust June 17, 2020 10:46

OpenFoam Fatal error : "Cannot find triSurfaceMesh at ""
 
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!

Rango June 18, 2020 19:14

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,

Eva Stardust June 19, 2020 02:58

1 Attachment(s)
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!

john myce June 19, 2020 04:51

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

Eva Stardust June 19, 2020 05:15

1 Attachment(s)
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,

john myce June 19, 2020 05:31

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 June 19, 2020 05:37

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?

john myce June 19, 2020 05:50

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.

Rango June 19, 2020 07:46

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 June 19, 2020 08:12

3 Attachment(s)
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,

Rango June 19, 2020 11:27

1 Attachment(s)
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

Eva Stardust June 19, 2020 15:11

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!


All times are GMT -4. The time now is 11:17.