CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   snappyHexMesh segmentation fault (https://www.cfd-online.com/Forums/openfoam/228208-snappyhexmesh-segmentation-fault.html)

NewtonianGuy June 23, 2020 06:03

snappyHexMesh segmentation fault
 
3 Attachment(s)
Hi everyone!

I Am currently trying to model a flow over an airfoil. For that I created a BlockMesh base and i am trying to use snappyhexmesh to enter my geometry in the mesh. Everytime I try to run snappyhexmesh i get a segmentation fault (core dumped). I am new in OpenFoam and i would appreciate any help.

I have attached my snappyHexMeshDict, blockmeshDict and .stl file.

Here is also the error message :

Code:

/*---------------------------------------------------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  7
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 7-3bcbaf946ae9
Exec  : snappyHexMesh
Date  : Jun 23 2020
Time  : 11:16:22
Host  : "cheikhna"
PID    : 13290
I/O    : uncollated
Case  : /home/cheikhna/OpenFOAM/cheikhna-7/run/airFoil2D
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Read mesh in = 0.11 s

Overall mesh bounding box  : (0 0 -1) (110 20 1)
Relative tolerance        : 1e-06
Absolute matching distance : 0.000111821

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  STLLexer::lex() at ??:?
#4  Foam::triSurface::readSTLASCII(Foam::fileName const&) at ??:?
#5  Foam::triSurface::readSTL(Foam::fileName const&) at ??:?
#6  Foam::triSurface::read(Foam::fileName const&, Foam::word const&, bool) at triSurface.C:?
#7  Foam::triSurface::triSurface(Foam::fileName const&) at ??:?
#8  Foam::triSurfaceMesh::triSurfaceMesh(Foam::IOobject const&, Foam::dictionary const&) at ??:?
#9  Foam::searchableSurface::adddictConstructorToTable<Foam::triSurfaceMesh>::New(Foam::IOobject const&, Foam::dictionary const&) at ??:?
#10  Foam::searchableSurface::New(Foam::word const&, Foam::IOobject const&, Foam::dictionary const&) at ??:?
#11  Foam::searchableSurfaces::searchableSurfaces(Foam::IOobject const&, Foam::dictionary const&, bool) at ??:?
#12  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/snappyHexMesh"
#13  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#14  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/snappyHexMesh"
Segmentation fault (core dumped)

Also i do not know where I can enter the location of my STL file in the rectangular mesh that I created. For example, I want to place the geometry in the middle not far from the inlet etc... At first, I thought it was locationInMesh but I found that its used to select the region for the meshing.

Tell me if I need to submit any additional files.

Thank you

LeeRuns June 23, 2020 09:41

I would believe the segmentation fault may be a "red herring" in your debugging process. Let fix the location in mesh part first.

1. Assuming you want to simulate flow external to the geometry. The location in mesh should be a point within the rectangle, but it should NOT be within the airfoil geometry.

2. For shm to know where the airfoil stl is, use the geometry sub dictionary inside of shm. It is in the top of the file.

Also remember that shm only looks For STL files located in the case/constant/triSurface directory.

NewtonianGuy June 25, 2020 03:49

Thank you for your advice! I finally managed to find my problem. I believe it was the STL file taken out from solidworks. It was in binary and not in ASCII, I did the conversion using the surfaceConvert from OpenFoam.

Regarding the location in Mesh, it is simply the coordinates of my blockmesh that I can shift (vertices), or shit my geometry in solidworks with respect to the frame.

LeeRuns June 25, 2020 08:25

Quote:

Originally Posted by NewtonianGuy (Post 775949)
Thank you for your advice! I finally managed to find my problem. I believe it was the STL file taken out from solidworks. It was in binary and not in ASCII, I did the conversion using the surfaceConvert from OpenFoam.

Regarding the location in Mesh, it is simply the coordinates of my blockmesh that I can shift (vertices), or shit my geometry in solidworks with respect to the frame.

Can you re-phrase your last statement? I am having a hard time understanding.

NewtonianGuy June 25, 2020 08:41

Sorry...

I meant that I found a way to place my geometry in my base Mesh (generated through blockMesh). I though first that snappyHexMesh can place my geometry in a disered place but it doesnt (correct me if i am wrong). So basically, I just changed the coordinates of my base mesh to have my airfoil in the center for example.

LeeRuns June 25, 2020 12:36

Your are correct.
SnappyHexMesh does not move surface file to the background mesh

Open foam does have the "surfaceTransformPoints" function, which can be used to move, scale, and rotate surfaces.

https://www.openfoam.com/documentati...ormPoints.html


All times are GMT -4. The time now is 05:53.