CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Segmentation fault in layerAdditionRemoval Foam-extend 3.1

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2016, 13:30
Default Segmentation fault in layerAdditionRemoval Foam-extend 3.1
  #1
New Member
 
Joao Bettencourt
Join Date: Feb 2016
Posts: 4
Rep Power: 7
jbettencourt is on a distinguished road
Dear all,

I am testing a model of a heaving disk in waves using GGI interfaces and layer addition removal, similar to the moving cylinders case that is distributed in the tutorial.

I am testing the mesh motion with the moveDynamicMesh utility and I am getting a segmentation fault on the first layer addition event.

The original mesh in the layer addition/removal cell zones is rectangular with cell thickness in the direction of the motion of 0.01. The layer removal threshold is 0.005 and the addition threshold is 0.015.

I am animating the mesh with an oscillating motion defined by:
Code:
            solidBodyMotionFunction   linearOscillation;
            linearOscillationCoeffs
            {
                amplitude   (0 0 0.08);
                period      2;
            }
The time step is 0.0002 s and the mesh courant number is

Mesh Courant Number mean: 0.00136134113 max: 0.865961662

The output at the moment of the crash and at the previous time step is the following:
Code:
Time = 0.0202
bool layerAdditionRemoval::changeTopology() const  for object topLayerDiskLayerHeavingDisk : 
Layer thickness: min: 0.01490439482 max: 0.01490439482 avg: 0.01490439482 old thickness: 1e+15
Removal threshold: 0.005 addition threshold: 0.015
Modifier 0 named topLayerDiskLayerHeavingDisk unchanged
bool layerAdditionRemoval::changeTopology() const  for object botLayerDiskLayerHeavingDisk : 
Layer thickness: min: 0.01499046168 max: 0.01499046168 avg: 0.01499046168 old thickness: 0.01494029638
Removal threshold: 0.005 addition threshold: 0.015
Modifier 1 named botLayerDiskLayerHeavingDisk unchanged
Local mesh update: 0 global update: 0
Executing mesh motion
volume continuity errors : volume = 6.285, old volume = 6.285, max error = 5.973089608e-13, sum local = 6.372386702e-20, global = 5.531128242e-24
Mesh Courant Number mean: 0.00136134113 max: 0.865961662
    Point usage OK.
    Upper triangular ordering OK.
    Topological cell zip-up check OK.
    Face vertices OK.
    Face-face connectivity OK.
    Mesh topology OK.
    Boundary openness (1.708629482e-17 -2.389890301e-18 1.256910151e-16) Threshold = 1e-06 OK.
    Max cell openness = 2.186977911e-16 OK.
    Max aspect ratio = 887.4390306 OK.
    Minumum face area = 2.317114e-07. Maximum face area = 0.001605357027.  Face area magnitudes OK.
    Min volume = 2.317114e-08. Max volume = 1.504062498e-05.  Total volume = 6.285.  Cell volumes OK.
    Mesh non-orthogonality Max: 28.30781727 average: 1.558811389 Threshold = 70
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.497720423 OK.
    Mesh geometry OK.
Mesh OK.
ExecutionTime = 505.64 s  ClockTime = 506 s

Time = 0.0204
bool layerAdditionRemoval::changeTopology() const  for object topLayerDiskLayerHeavingDisk : 
Layer thickness: min: 0.01485423152 max: 0.01485423152 avg: 0.01485423152 old thickness: 0.01490439482
Removal threshold: 0.005 addition threshold: 0.015
Modifier 0 named topLayerDiskLayerHeavingDisk unchanged
bool layerAdditionRemoval::changeTopology() const  for object botLayerDiskLayerHeavingDisk : 
Layer thickness: min: 0.01504062498 max: 0.01504062498 avg: 0.01504062498 old thickness: 0.01499046168
Removal threshold: 0.005 addition threshold: 0.015
bool layerAdditionRemoval::changeTopology() const  for object botLayerDiskLayerHeavingDisk : Triggering layer addition
Modifier 1 named botLayerDiskLayerHeavingDisk morphing
Local mesh update: 1 global update: 1
void layerAdditionRemoval::addCellLayer(polyTopoChange& ref) const for object botLayerDiskLayerHeavingDisk : Adding cell layer
void layerAdditionRemoval::addCellLayer(polyTopoChange& ref) const  for object botLayerDiskLayerHeavingDisk : Using edges for point insertion
void layerAdditionRemoval::addCellLayer(polyTopoChange& ref) const  for object botLayerDiskLayerHeavingDisk : Finished adding cell layer
layerAdditionRemoval::setRefinement(polyTopoChange& ref)  for object botLayerDiskLayerHeavingDisk : Clearing addressing after layer addition. 
polyTopoChanger::changeMesh
(
    const polyTopoChange& ref
) : started executing topological change.

Added untouched points. Point count = 1044606
Added live points: modified = 0 added = 1002.  Point count = 1045608
Added retired points: modified = 0 added = 0.  Point count = 1045608
Added all points.  Final point count = 1045608

Inserted untouched faces into cells
Inserted modified faces into cells
Inserted added faces into cells
Added internal faces.  Face count = 1077764
Patch 0: added faces: untouched = 292 modified = 0 added = 0.  Face count = 1078056
Patch 1: added faces: untouched = 292 modified = 0 added = 0.  Face count = 1078348
Patch 2: added faces: untouched = 292 modified = 0 added = 0.  Face count = 1078640
Patch 3: added faces: untouched = 292 modified = 0 added = 0.  Face count = 1078932
Patch 4: added faces: untouched = 1150 modified = 0 added = 0.  Face count = 1080082
Patch 5: added faces: untouched = 1118292 modified = 1000 added = 1000.  Face count = 2200374
Patch 6: added faces: untouched = 349 modified = 1 added = 1.  Face count = 2200725
Patch 7: added faces: untouched = 349 modified = 1 added = 1.  Face count = 2201076
Patch 8: added faces: untouched = 1584 modified = 0 added = 0.  Face count = 2202660
An image of the mesh is attached: the mesh is 2d and the moving zone is the
triangular element zone. This zone slides along the quad zone to the left of the picture and the layer addition occurs in the quad zone below the tri zone.

A backtrace from the crash is below

Code:
*** Error in `moveDynamicMesh': free(): invalid pointer: 0x00000000017f5002 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7d023)[0x7fd1b6b83023]
/home/jbettencourt/foam/foam-extend-3.1/lib/linux64GccDPOpt/libfiniteVolume.so(_ZN4Foam4ListIiEaSERKS1_+0x29)[0x7fd1ba3f1899]
/home/jbettencourt/foam/foam-extend-3.1/lib/linux64GccDPOpt/libdynamicMesh.so(_ZN4Foam15polyTopoChanger10changeMeshERNS_8polyMeshERKNS_14polyTopoChangeE+0x138f)[0x7fd1b91dec0f]
/home/jbettencourt/foam/foam-extend-3.1/lib/linux64GccDPOpt/libdynamicMesh.so(_ZN4Foam15polyTopoChanger10changeMeshEv+0x367)[0x7fd1b91e5927]
/home/jbettencourt/foam/foam-extend-3.1/lib/linux64GccDPOpt/libtopoChangerFvMesh.so(_ZN4Foam19multiTopoBodyFvMesh6updateEv+0x16b)[0x7fd1b495fbab]
moveDynamicMesh[0x40d887]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fd1b6b27b15]
moveDynamicMesh[0x40e975]
======= Memory map: ========
Can anyone help me solving this problem?

Thanks,
Joao


Attached Images
File Type: jpg forum.jpg (121.4 KB, 16 views)
jbettencourt is offline   Reply With Quote

Old   March 9, 2016, 13:40
Default Additional information on the subject above
  #2
New Member
 
Joao Bettencourt
Join Date: Feb 2016
Posts: 4
Rep Power: 7
jbettencourt is on a distinguished road
Dear all,

I have run the problem use a debug version of foam-extend 3.1 and got this additional
message:

Code:
--> FOAM FATAL ERROR: 
index 2205745 out of range 0 ... 2205744

    From function UList<T>::checkIndex(const label)
    in file /home/jbettencourt/foam-debug/foam-extend-3.1/src/foam/lnInclude/UListI.H at line 124.

FOAM aborting
Thanks in advance for any help you can give me.

Kind regards,
Joao
jbettencourt is offline   Reply With Quote

Old   March 9, 2016, 15:22
Default
  #3
Senior Member
 
Join Date: Sep 2013
Posts: 269
Rep Power: 16
Bloerb will become famous soon enough
Just to check. The orientation of the faceZone is correct? Try inverting it and check directly in the faceZone file.
Bloerb is offline   Reply With Quote

Old   March 10, 2016, 05:53
Default
  #4
New Member
 
Joao Bettencourt
Join Date: Feb 2016
Posts: 4
Rep Power: 7
jbettencourt is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
Just to check. The orientation of the faceZone is correct? Try inverting it and check directly in the faceZone file.
Thanks for the advice, Bloerb. I think so. I created the faceZone with setSet utility:

Code:
cellSet Disk new boxToCell (6.5 0 -0.475) (11.5 0.1 0.125)
cellSet TopDisk new boxToCell (6.5 0 0.125) (11.5 0.1 1.5)
cellSet BotDisk new boxToCell (6.5 0 -2) (11.5 0.1 -0.475)

faceSet topLayerDisk new cellToFace Disk all
faceSet topLayerDisk subset cellToFace TopDisk all
cellSet topLayerDiskMasterCells new cellToCell TopDisk

faceSet botLayerDisk new cellToFace Disk all
faceSet botLayerDisk subset cellToFace BotDisk all
cellSet botLayerDiskMasterCells new cellToCell BotDisk

cellSet TopDisk delete
cellSet BotDisk delete
TopDisk and BotDisk are cellSets that contain the cells layers above and below the moving mesh cells. The faceZones are created by getting the common faces between these cellSets and the moving cell set Disk.

Here's the thing: I have the model working now, it seems. The problem, as far as I can tell was that after this operation I wasn't deleting the TopDisk and BotDisk cell Sets.
Now that I've added

Code:
cellSet TopDisk delete
cellSet BotDisk delete
the model is running without problems (so far). Additionally, I did some runs in the debug version, before making this modification, and I was getting fatal error messages related to a face being modified twice.

So the origin of the problem seemed to be these additional cell sets that were not being deleted and causing some kind of repeated operation in the same face.
jbettencourt is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 12 December 12, 2011 04:16
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 14:24.