CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   interDyMFoam in OF 2.0.1 : seg fault during mesh refinement (

michaelb November 16, 2011 10:24

interDyMFoam in OF 2.0.1 : seg fault during mesh refinement
Hi Foamers,

I'm trying to simulate bubbles within a pipe with OF 2.0.1 compiled from sources with ThirdParty on Ubuntu 10.04 64 bits, and a Fluent mesh imported through the fluentMeshToFoam utility.

interDyMFoam seems to run fine on damBreakWithObstacle tutorial case.

Although interFoam runs fine on my case, I get a seg fault running with interDyMFoam and the following output. It looks like there is a problem during the mesh refinement process but I wouldn't be able to tell why.

Has anybody experienced similar issues ?
Any help would be much appreciated !

Thanks in advance



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

Create mesh for time = 0

Selecting dynamicFvMesh dynamicRefineFvMesh
Reading field p_rgh

Reading field alpha1

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar

Reading g
Calculating field g.h

PIMPLE: Operating solver in PISO mode

time step continuity errors : sum local = 0.00111772, global = -0.00111772, cumulative = -0.00111772
GAMGPCG:  Solving for pcorr, Initial residual = 1, Final residual = 8.93366e-05, No Iterations 36
time step continuity errors : sum local = 9.9853e-08, global = -3.79537e-10, cumulative = -0.00111772
Courant Number mean: 1.44127 max: 8.41334

Starting time loop

Interface Courant Number mean: 0 max: 0
Courant Number mean: 0.0852823 max: 0.497831
deltaT = 5.91716e-05
Time = 5.91716e-05

Selected 314 cells for refinement out of 49894.
Refined from 49894 to 52092 cells.
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/"
#1  Foam::sigSegv::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/"
#2  in "/lib/"
#3  Foam::dynamicRefineFvMesh::refine(Foam::List<int> const&) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/"
#4  Foam::dynamicRefineFvMesh::update() in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/"
 in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/bin/interDyMFoam"
#6  __libc_start_main in "/lib/"
 in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/bin/interDyMFoam"
Segmentation fault

michaelb November 17, 2011 12:14

interDyMFoam in OF 2.0.1 : seg fault during mesh refinement
Hi foamers,

I've been putting some outputs on the source code since gdb wasn't giving any info about the precise location of the seg fault.

So the seg fault occurs in dynamicRefineFvMesh.C in the function l.197 :
Foam::dynamicRefineFvMesh::refine(const labelList& cellsToRefine) during the following loop ( Update of master faces, during flux updates ) :


            // Update master faces
            forAllConstIter(labelHashSet, masterFaces, iter)
                label faceI = iter.key();

                if (isInternalFace(faceI))
                    phi[faceI] = phiU[faceI];
                    label patchI = boundaryMesh().whichPatch(faceI);
                    label i = faceI - boundaryMesh()[patchI].start();

                    const fvsPatchScalarField& patchPhiU =

                    fvsPatchScalarField& patchPhi =

                    patchPhi[i] = patchPhiU[i];

Could someone explain what are "Master Faces" in OpenFoam ? Could the seg fault be related to boundary condition specifications ? Again, this case was running fine on interFoam...

As I am not sure if this is my mistake or not yet, I didn't declare it as a bug. I'll submit to Mantis if it further reveals itself as being one.

Thanks for your help


Pedro24 May 22, 2012 10:06


I encountered the same problem in my simulations. I'm trying to simulate the drainage of a liquid phase between two walls.

The case is perfectly running with the traditionnal interFoam solver, however the simulation crashes with the same error when i use the interDyMFoam solver.

In my case, i simulate the flow in a two-dimensional geometry (i.e., with two patches "frontAndBack planes") . But I found that the simulations don't crash when i perform simulations in a 3D case.

Maybe this error is a bug and this solver doesn't work in 2D.

vonboett July 2, 2012 08:16

Hi Michael, hi Pierre,

I faced the same problem using solid-body-motion function rotatingMotion for a rotating drum half-filled with liquid, and in my case the problem was using a cellZone instead of cellSet in dynamicMeshDict. I wonder why Michels Interface Courant Number is zero, is there no alpha1 from start? Could you post maybe your dynamicMeshDict and initial U file?

All times are GMT -4. The time now is 16:25.