View Issue Details

IDProjectCategoryView StatusLast Update
0000917OpenFOAMBugpublic2013-07-18 09:28
Reporteruser503Assigned Tohenry  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSUbuntuOS Version13.04
Summary0000917: compressibleInterDyMFoam crash in depthCharge2D tutorial case
DescriptionWhen I attempt to use compressibleInterDyMFoam on the depthCharge2D test case (adding the attached dynamicMeshDict to 'constant') I get the a crash immediately after it refines some cells (running in full Debug, the error message is below).

Steps To ReproduceAdd the attached dynamicMeshDict to the depthCharge2D case and change the solver to compressibleInterDyMFoam.
Additional InformationSelected 288 cells for refinement out of 12800.
Refined from 12800 to 14816 cells.


--> FOAM FATAL ERROR:
attempt to access element from zero sized list

    From function UList<T>::checkIndex(const label)
    in file /home/tyler/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/UListI.H at line 103.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/printStack.C:221
#1 Foam::error::abort() at ~/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/error.C:249
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/errorManip.H:85 (discriminator 3)
#3 Foam::UList<double>::checkIndex(int) const at ~/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/UListI.H:103
#4 Foam::UList<double>::operator[](int) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/UListI.H:168
#5 Foam::dynamicRefineFvMesh::refine(Foam::List<int> const&) at ~/OpenFOAM/OpenFOAM-2.2.x/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C:415 (discriminator 1)
#6 Foam::dynamicRefineFvMesh::update() at ~/OpenFOAM/OpenFOAM-2.2.x/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C:1195
#7
 at ~/OpenFOAM/OpenFOAM-2.2.x/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C:94
#8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9
 at ??:?
Aborted (core dumped)



When running in normal (non-Debug) mode, the output is:

Selected 288 cells for refinement out of 12800.
Refined from 12800 to 14816 cells.
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::dynamicRefineFvMesh::refine(Foam::List<int> const&) at ??:?
#4 Foam::dynamicRefineFvMesh::update() at ??:?
#5
 at ??:?
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
 at ??:?
Segmentation fault (core dumped)
TagsNo tags attached.

Activities

user503

2013-07-13 22:37

 

dynamicMeshDict (2,084 bytes)   
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   dynamicRefineFvMesh; 
//dynamicFvMesh   staticFvMesh;

dynamicRefineFvMeshCoeffs
{
    // How often to refine
    refineInterval  1;

    // Field to be refinement on
    field           alphawater;

    // Refine field inbetween lower..upper
    lowerRefineLevel 0.01;
    upperRefineLevel 0.99;

    // Unrefine when refinementField < this number
    unrefineLevel    10.0;

    // Have slower than 2:1 refinement
    nBufferLayers   1;

    // Refine cells only up to maxRefinement levels
    maxRefinement   2;

    // Stop refinement if maxCells reached
    maxCells        5000000;

    // Flux field and corresponding velocity field. Fluxes on changed
    // faces get recalculated by interpolating the velocity. Use 'none'
    // on surfaceScalarFields that do not need to be reinterpolated.
    //
    // The first argument is the flux (surface scalar)
    // The second argument is the volume vector used to calculate the flux
    //
    correctFluxes
    (
        (phi U)
        (phi_0 U_0)
        (phiAbs U)
        (phiAbs_0 U_0)
        (nHatf none)
        (rho*phi none)
        (ghf none)
    );

    // Write the refinement level as a volScalarField
    dumpLevel       true;
}


// ************************************************************************* //
dynamicMeshDict (2,084 bytes)   

user503

2013-07-13 22:47

  ~0002324

I realized after submitting that this is because the empty patches in the 2D case cannot be refined.

user4

2013-07-18 09:27

  ~0002336

Thanks for letting us know. The dynamicRefineFvMesh uses a 2x2x2 cell splitting so is indeed incompatible with 2D meshes.

I'll close this report. Open a new one if the 3D mesh fails.

Issue History

Date Modified Username Field Change
2013-07-13 22:37 user503 New Issue
2013-07-13 22:37 user503 File Added: dynamicMeshDict
2013-07-13 22:47 user503 Note Added: 0002324
2013-07-14 09:08 henry Status new => closed
2013-07-14 09:08 henry Assigned To => henry
2013-07-14 09:08 henry Resolution open => no change required
2013-07-18 09:27 user4 Note Added: 0002336
2013-07-18 09:28 user4 Status closed => resolved