View Issue Details

IDProjectCategoryView StatusLast Update
0003783OpenFOAMFeaturepublic2022-01-14 15:05
ReporterjoegiAssigned Tohenry 
Status closedResolutionno change required 
Product Version9 
Fixed in Version 
Summary0003783: AMR OF9 inconsistent results with OF8

After running the case,


and inspecting the mesh after mesh refinement, I can see that the results are not consistent with OF8 (see attached figures).
Also, it is clear that the AMR library is not doing the right refinement.

I also see an strange dependence on the partition method and the time-step (I choose a different time-step or partition method and I get a different refinement).
Steps To ReproduceJust run the tutorial


for a couple of time steps and inspect the mesh.

If you then compare with OF8, you will see that the results are very different.
Additional InformationFor convenience, I am attaching the cases for both OF versions (9 and 8).

TagsNo tags attached.



2022-01-14 10:17


damBreakWithObstacle_of8.tar.gz (5,051 bytes)
damBreakWithObstacle_of9.tar.gz (3,405 bytes)
of8.png (50,409 bytes)
of8.png (50,409 bytes)
of9.png (50,539 bytes)
of9.png (50,539 bytes)


2022-01-14 10:42

manager   ~0012392

Try OpenFOAM-dev


2022-01-14 12:55

reporter   ~0012397

Similar problem different refinement levels (which is strange).


2022-01-14 13:07

manager   ~0012398

The refinement algorithm is different in the three versions, why do you require the results to be exactly the same?


2022-01-14 13:16

reporter   ~0012399

I would expect something like in OF8, at least during the firsts iterations. The output of OF9 and OFDEV doesn't appear to be right.

If you are asking to refine alpha.water interface, the AMR method should precisely capture the interface, like in OF8 and previous versions and any other CFD solver with AMR capabilities (Fluent for example).


2022-01-14 13:45

manager   ~0012400

It was reported that the algorithm in OpenFOAM-8 was over-refining; the refinement region extended unnecessarily far from the interface. We worked to correct this but the form in OpenFOAM-9 under-refines so I worked on it further and the final version is in OpenFOAM-dev. This version has proved satisfactory for a wide range of cases. If you require refinement further from the interface you can adjust the refinement parameters to get more refinement at the expense of more cells in the simulation. If you require the behaviour to be exactly as in OpenFOAM-8 you could re-implement that algorithm is OpenFOAM-dev and live the the serious limitations we found it had.


2022-01-14 14:03

reporter   ~0012401

OF9 under-refines a lot, OFDEV gets better but still has issues.

For example, in the attached figures, I would expect that in s1.png the AMR will also resolve the top free-surface, but it does not.

The AMR starts to capture the top free surface after many iterations (s2.png and s3.png), and this behavior does not seem right to me.

I tried adjusting many parameters with no success. In the process of doing so, I also found that different time-steps and decomposition methods give very different refinement levels.

By the way, the results in the figure were obtained with the dev version, with OF9 the situation is even worst.

I have no problem using OF8 for my specific needs, but it would be nice to fix the issue of the free surface (as in this case). The same happens using other metrics, for instance I use AMR a lot to refine the mesh according to integral length scales computed from the turbulence model, and now I am not getting a good mesh refinement level.

s1.png (52,970 bytes)
s1.png (52,970 bytes)
s2.png (56,412 bytes)
s2.png (56,412 bytes)
s3.png (58,207 bytes)
s3.png (58,207 bytes)


2022-01-14 14:08

manager   ~0012402

Would you like to fund further work on the refinement algorithm in OpenFOAM-dev or write your own which suits your purpose better?


2022-01-14 14:18

reporter   ~0012403

We are always willing to contribute financially or intellectually. To some extension we already contribute from a financial point of view.
It would be nice to have both behaviors, dynamicRefineFvMesh (OF8) and topoChanger. So you give the user the option of which approach to use.
I will try to port OF8 behavior to OF9.


2022-01-14 14:49

manager   ~0012404

> To some extension we already contribute from a financial point of view.

Are you funding CFD Direct or providing maintenance funding to the OpenFOAM Foundation?


2022-01-14 15:05

manager   ~0012408

Further development of the refinement strategy in OpenFOAM will require funding.

Issue History

Date Modified Username Field Change
2022-01-14 10:17 joegi New Issue
2022-01-14 10:17 joegi File Added: damBreakWithObstacle_of8.tar.gz
2022-01-14 10:17 joegi File Added: damBreakWithObstacle_of9.tar.gz
2022-01-14 10:17 joegi File Added: of8.png
2022-01-14 10:17 joegi File Added: of9.png
2022-01-14 10:42 henry Note Added: 0012392
2022-01-14 12:55 joegi Note Added: 0012397
2022-01-14 13:07 henry Note Added: 0012398
2022-01-14 13:16 joegi Note Added: 0012399
2022-01-14 13:45 henry Note Added: 0012400
2022-01-14 14:03 joegi File Added: s1.png
2022-01-14 14:03 joegi File Added: s2.png
2022-01-14 14:03 joegi File Added: s3.png
2022-01-14 14:03 joegi Note Added: 0012401
2022-01-14 14:08 henry Note Added: 0012402
2022-01-14 14:18 joegi Note Added: 0012403
2022-01-14 14:49 henry Note Added: 0012404
2022-01-14 15:05 henry Assigned To => henry
2022-01-14 15:05 henry Status new => closed
2022-01-14 15:05 henry Resolution open => no change required
2022-01-14 15:05 henry Note Added: 0012408
2022-01-14 15:05 henry Category Bug => Feature