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

[snappyHexMesh] snappyHexMesh Segmentation Fault

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2015, 15:52
Default snappyHexMesh Segmentation Fault
  #1
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 10
avd28 is on a distinguished road
Hello all,

I'am trying to mesh a geometry shown below using snappyHexMesh.. The geometry itself is like a pipe but with internal indentations..

After I run the snappyHexMesh command I get the error message outlined in the screenshot.
It is basically a segmentation fault.

I suspect my error has something to do with the locationinmesh entry.
I'am relatively new to OpenFOAM, so please forgive any obvious newbie errors I might have committed. Could someone help out?

Sincerely,
Attached Images
File Type: jpg snapshot2.jpg (31.9 KB, 135 views)
avd28 is offline   Reply With Quote

Old   May 9, 2015, 16:26
Default
  #2
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi avd,

You would get more help if you post a picture with higher resolution or even better copy the error message in a code environment.
the snappyhexmeshdict file would be a further help to get help.
perhaps also the .stl or whatever file of your geometry.

regards
Alex
alexB is offline   Reply With Quote

Old   May 10, 2015, 12:53
Default
  #3
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 10
avd28 is on a distinguished road
Sorry for insufficient information in my first post. I have attached 2 pictures of the geometry that I'am trying to mesh. I will upload the code files ASAP
Attached Images
File Type: png geom1.png (15.3 KB, 61 views)
File Type: png geom2.png (15.8 KB, 47 views)
avd28 is offline   Reply With Quote

Old   May 10, 2015, 18:48
Default
  #4
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 10
avd28 is on a distinguished road
THis is the complete readout of the error message. I have also attached the sHMDict file
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : snappyHexMesh -overwrite
Date   : May 08 2015
Time   : 13:04:20
Host   : "linux-zbsl"
PID    : 19583
Case   : /home/avd28/OpenFOAM/OpenFOAM-2.3.0/run/Cerebrus2
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Read mesh in = 0.01 s

Overall mesh bounding box  : (-0.0006 -0.0006 -0.0012) (0.0006 0.0006 0.0024)
Relative tolerance         : 1e-06
Absolute matching distance : 3.97995e-09

Reading refinement surfaces.
Read refinement surfaces in = 0.02 s

Reading refinement shells.
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 0 s

Reading features.
Read edgeMesh Cerebrus2.eMesh
    points      : 640
    edges       : 784
    boundingBox : (-0.0003 -0.0003 0) (0.0003 0.0003 0.0012)

Refinement level according to distance to "Cerebrus2.eMesh" (640 points, 784 edges).
    level 0 for all cells within 0 metre.
Read features in = 0 s


Determining initial surface intersections
-----------------------------------------

Edge intersection testing:
    Number of edges             : 756
    Number of edges to retest   : 756
    Number of intersected edges : 0
Calculated surface intersections in = 0 s

Initial mesh : cells:216  faces:756  points:343
Cells per refinement level:
    0   216

Adding patches for surface regions
----------------------------------

Patch Type                Region                        
----- ----                ------                        
Added patches in = 0 s

Selecting decompositionMethod none
Layer thickness specified as final layer and expansion ratio.

Refinement phase
----------------

Found point (-0.0003 -0.0001 0) in cell 85 on processor 0

Feature refinement iteration 0
------------------------------

Marked for refinement due to explicit features             : 0 cells.
Determined cells to refine in = 0.01 s
Selected for feature refinement : 0 cells (out of 216)
Stopping refining since too few cells selected.


Surface refinement iteration 0
------------------------------

Marked for refinement due to surface intersection          : 0 cells.
Determined cells to refine in = 0 s
Selected for refinement : 0 cells (out of 216)
Stopping refining since too few cells selected.


Removing mesh beyond surface intersections
------------------------------------------

Found point (-0.0003 -0.0001 0) in global region 0 out of 1 regions.
Keeping all cells in region 0 containing point (-0.0003 -0.0001 0)
Selected for keeping : 216 cells.
Edge intersection testing:
    Number of edges             : 756
    Number of edges to retest   : 0
    Number of intersected edges : 0

Shell refinement iteration 0
----------------------------

Marked for refinement due to distance to explicit features : 0 cells.
Marked for refinement due to refinement shells             : 0 cells.
Determined cells to refine in = 0 s
Selected for internal refinement : 0 cells (out of 216)
Stopping refining since too few cells selected.


Dangling coarse cells refinement iteration 0
--------------------------------------------

Determined cells to refine in = 0 s
Selected for refinement : 0 cells (out of 216)
Stopping refining since too few cells selected.


Dangling coarse cells refinement iteration 0
--------------------------------------------

Determined cells to refine in = 0 s
Selected for refinement : 0 cells (out of 216)
Stopping refining since too few cells selected.


Splitting mesh at surface intersections
---------------------------------------

Introducing baffles for 0 faces that are intersected by the surface.

Edge intersection testing:
    Number of edges             : 756
    Number of edges to retest   : 0
    Number of intersected edges : 0
Created baffles in = 0 s


After introducing baffles : cells:216  faces:756  points:343
Cells per refinement level:
    0   216

Introducing baffles to block off problem cells
----------------------------------------------

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2   in "/lib64/libc.so.6"
#3  Foam::List<int>::List(int, int const&) at ??:?
#4  Foam::meshRefinement::nearestPatch(Foam::List<int> const&) const at ??:?
#5  Foam::meshRefinement::markFacesOnProblemCells(Foam::dictionary const&, bool, Foam::Field<double> const&, Foam::List<int> const&) const at ??:?
#6  Foam::meshRefinement::handleSnapProblems(Foam::snapParameters const&, bool, bool, Foam::Field<double> const&, Foam::dictionary const&, Foam::Time&, Foam::List<int> const&, Foam::List<int> const&) at ??:?
#7  Foam::meshRefinement::baffleAndSplitMesh(bool, Foam::snapParameters const&, bool, bool, Foam::Field<double> const&, bool, double, Foam::dictionary const&, Foam::Time&, Foam::List<int> const&, Foam::List<int> const&, Foam::Vector<double> const&) at ??:?
#8  Foam::autoRefineDriver::baffleAndSplitMesh(Foam::refinementParameters const&, Foam::snapParameters const&, bool, Foam::dictionary const&) at ??:?
#9  Foam::autoRefineDriver::doRefine(Foam::dictionary const&, Foam::refinementParameters const&, Foam::snapParameters const&, bool, Foam::dictionary const&) at ??:?
#10  
 at ??:?
#11  __libc_start_main in "/lib64/libc.so.6"
#12  
 at /home/abuild/rpmbuild/BUILD/glibc-2.19/csu/../sysdeps/x86_64/start.S:125
Segmentation fault
Attached Files
File Type: c snappyHexMeshDict.C (8.9 KB, 9 views)
avd28 is offline   Reply With Quote

Old   May 11, 2015, 06:39
Default
  #5
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
perhaps someone more experienced with SHM could offer better help.

But a first suggestion from me:
Is your bounding box defined in blockMesh big enough?
Your posted code says in one line (-0.0006 -0.0006 -0.0012) (0.0006 0.0006 0.0024)
and in another line (-0.0003 -0.0003 0) (0.0003 0.0003 0.0012) .
Perhaps its an error because some parts of your geometry are cut off.


regards
Alex

P.S.:
what are you trying to do with your geometry?
should something flow inside the defined cylinder? or around the whole geometry? or inside the volume defined by your .stl file ?
alexB is offline   Reply With Quote

Old   May 11, 2015, 10:27
Default
  #6
Member
 
DanielP
Join Date: Jan 2015
Posts: 33
Rep Power: 11
danielpiaget is on a distinguished road
Hello,

I notice that your STL geometry is not a close surface. To mesh sith snappyHexMesh, the domain needs to a close surface.You must generate a closed surface for your geometry.

Thanks,

Daniel
danielpiaget is offline   Reply With Quote

Old   May 11, 2015, 11:50
Default
  #7
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 10
avd28 is on a distinguished road
Quote:
Originally Posted by alexB View Post
perhaps someone more experienced with SHM could offer better help.

But a first suggestion from me:
Is your bounding box defined in blockMesh big enough?
Your posted code says in one line (-0.0006 -0.0006 -0.0012) (0.0006 0.0006 0.0024)
and in another line (-0.0003 -0.0003 0) (0.0003 0.0003 0.0012) .
Perhaps its an error because some parts of your geometry are cut off.


regards
Alex

P.S.:
what are you trying to do with your geometry?
should something flow inside the defined cylinder? or around the whole geometry? or inside the volume defined by your .stl file ?
(-0.0006 -0.0006 -0.0012) (0.0006 0.0006 0.0024) are the dimensions for my bounding box while, (-0.0003 -0.0003 0) (0.0003 0.0003 0.0012) are dimensions for my geometry. So yes, my bounding box does cover the entirety of my geometry.
I am trying to determine the characteristics of flow through the geometry. I have 2 versions, one which is closed, and this one which is open. The problem with using the closed one is I'am unsure how to name the patches after I have meshed it in sHM. sHM might be useful for flow around a geometry but I'am beginning to wonder whether I have made the correct choice for a meshing protocol in this case.
avd28 is offline   Reply With Quote

Old   May 11, 2015, 11:54
Default
  #8
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 10
avd28 is on a distinguished road
Quote:
Originally Posted by danielpiaget View Post
Hello,

I notice that your STL geometry is not a close surface. To mesh sith snappyHexMesh, the domain needs to a close surface.You must generate a closed surface for your geometry.

Thanks,

Daniel
I see what you mean. So, I should be using a geometry like the one I have attached below, right? My area of interest as I mentioned in my previous post is flow though the pipe like structure, not flow around it. If I do mesh the closed geometry using sHM do you think the interior will be meshed as well?
Attached Images
File Type: jpg Cerebrus3.jpg (7.2 KB, 50 views)
avd28 is offline   Reply With Quote

Old   May 11, 2015, 12:46
Default
  #9
Member
 
DanielP
Join Date: Jan 2015
Posts: 33
Rep Power: 11
danielpiaget is on a distinguished road
Hello again,

SHM builds the Castellated mesh in the following way:

-All the edges of the initial mesh (generate with blockMesh I assume) are tested for intersection with the STL surface.
-A Castellated mesh (made up of cubes) is generated with the specified refinements base on the surface\regions specified in the snappyHexMeshdict. The final mesh is generated by removing the undesired elements. This is base on the locationInMesh point and the STL surface. If you wish to keep only the mesh inside the STL surface, the locationInMesh point must be inside the surface.But the point cannot be on an edge or a face after the refinement is completed, or else snappyHexMesh will stop.

But to answer your question, the locationInMesh must be inside the STL surface. Add some extra decimals to the three coordinate to avoid having the point lie on a face or edge. You can split the geometry, and view the STL surface in Paraview to pick an adequate location.

Thanks,

Daniel
danielpiaget is offline   Reply With Quote

Old   May 11, 2015, 16:47
Default
  #10
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi avd,

If you want to simulate the flow through the pipe your geometry has to look like the volume where your fluid can flow.
You don't have to print the geometry of the walls... just the volume confined from the walls.

But here is a goog video tutorial for your problem...
https://www.youtube.com/watch?v=ObsFQUiVi1U
Currently I am also working with it.

regards
Alex
avd28 likes this.
alexB is offline   Reply With Quote

Old   May 11, 2015, 16:58
Default
  #11
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 10
avd28 is on a distinguished road
Yeah, Iam doing the same too. Thanks for your help
avd28 is offline   Reply With Quote

Old   May 11, 2015, 20:32
Default
  #12
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 10
avd28 is on a distinguished road
Hi All,

The issue was resolved successfully. I had left some keywords empty in the snap section.

Thanks again for all your help.
avd28 is offline   Reply With Quote

Reply

Tags
openfoam 2.3.0, snappy hex mesh, snappyhesmeshdict


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
snappyHexMesh in parallel leads to segmentation fault ChrisHa OpenFOAM Pre-Processing 1 January 14, 2019 10:04
[snappyHexMesh] SnappyHexMesh multioprocessor run causes segmentation fault MarcusNHofer OpenFOAM Meshing & Mesh Conversion 5 June 11, 2015 08:06
Segmentation fault when running in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 8, 2015 08:12
[snappyHexMesh] SnappyHexMesh segmentation Fault nithishgupta OpenFOAM Meshing & Mesh Conversion 1 December 18, 2014 04:03
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 15:06


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