Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

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

acknowledged
nobody
None
normal
feature
always
none
Feature Request
foam-extend-3.1
foam-3.0
other
2014-06-11
2014-05-15
No

dynamicRefinementFvMesh:

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)

Discussion

  • 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

     
  •  
    Attachments
  • Hi,

    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,
    Christiane

     
  • Dominik Christ
    Dominik Christ
    2014-06-05

     
    Attachments
  • Dominik Christ
    Dominik Christ
    2014-06-05

     
    Attachments
  • yes, works.

    (dynamic mesh refinement does not work yet)

     
  • 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

    --> FOAM FATAL ERROR:
    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)
    pointLevels:6{0}

    ŒŒŒ From function hexRef8::setRefinement(const labelList&,ŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ
    directTopoChange&)
    ŒŒŒ 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.

     
  • 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,
    Christiane