#219 dynamic mesh refinement on a wedge geometry tries to refine cells at the axis

Feature Request


dynamic mesh refinement in foam-extend-3.0 on a wedge geometry tries
to refine cells at the axis and crashes (as they have less than 8 vertices).

Changes as in commit ee3aa1dd0a840edea97992d084f842e027a0694e
from Feb. 5 2014 in OF v 2.2.x would fix that.
(concerns dynamicRefinementFvMesh.H and dynamicRefinementFvMesh.C)


  • Henrik Rusche

    Henrik Rusche - 2014-06-03

    Dear chrle,

    can you please provide a small test case to reproduce this issue so that we can test that you fix actually fixes the problem.

    Fix needs to go into foma-exend-3.1

  • Christiane Lechner


    I uploaded a test case demo.tar.gz: a bubble that is advected by a uniform flow in axial symmetry to be run with interDyMFoam.

    I also attach the dynamicRefineFvMesh.C and dynamicRefineFvMesh.H that work for me. I had only copied those parts of the above mentioned commit, that seemed relevant to the problem.

    The best thing for a simulation like this would be to take out the axis anyway.

    Best regards,

  • Dominik Christ

    Dominik Christ - 2014-06-05
  • Christiane Lechner

    yes, works.

    (dynamic mesh refinement does not work yet)

  • Christiane Lechner

    There might have been a misunderstanding here?

    The utility 'refineMesh' could do refinement in specified directions before.
    This was not a problem.

    _Dynamic_ mesh refinement however always refines in all 3 directions, as far as I know, and can only refine hexahedra. When running the 'demo' case with interDyMFoam the simulation terminates because there is an attempt to refine the prisms at the axis. The error message is

    cell 1600 of level 0 does not seem to have 8 points of equal or lower level
    cellPoints:6(3810 3208 3209 3409 3609 3610)

    ŒŒŒ From function hexRef8::setRefinement(const labelList&,ŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ
    ŒŒŒ in file directTopoChange/directTopoChange/directActions/hexRef8.C atŒŒŒ
    line 3460.

    FOAM aborting

    This also occurs in foam-extend-3.1 nextRelease

  • Dominik Christ

    Dominik Christ - 2014-06-11

    Hi chrle, indeed, we had a misunderstanding here:

    The current implementation of dynamic mesh refinement is 3D only. For 2D, a different implementation is required. This is known and therefore not a bug.

    I will change this bug-report to feature-request.

    In the meantime, if you require dynamic mesh refinement for your work/research, please consider to implement this feature yourself and contribute it to the project.

  • Christiane Lechner

    Hi Dominik,

    again a misunderstanding.

    I did not request dynamic mesh refinement to refine in 2D (although that would be great and actually what would be best in 2D and axial symmetry), but I reported, that dynamicRefineFvMesh crashes on a wedge geometry if the axis is not taken out. This is not a feature this is a bug.

    The reason why it crashes is, that it tries to refine the prisms at the axis, which is not allowed, as only hexahedra can be refined. The prisms seem to be marked as 'protected', nevertheless there is the attempt to refine them.
    See also http://www.cfd-online.com/Forums/openfoam-solving/129403-protected-cells-dynamicrefinementfvmesh.html

    This has been fixed in commit ee3aa1dd0a840edea97992d084f842e027a0694e
    from Feb. 5 2014 in OF version 2.2.x, as mentioned above.

    I had attached the files dynamicRefineFvMesh.C and dynamicRefineFvMesh.H with the relevant changes, that work for me. If they are correct these changes could just be implemented?

    On the other hand the problem can be avoided if the axis is excluded from the domain (-> only hexaheder). This (taking out the axis) is better than being left with a stripe of unrefined prisms anyway.

    So, for me it is fine if this is not resolved but instead converted into a feature request for dynamic mesh refinement in 2D.

    Best regards,


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks