CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Adaptive Mesh refinement for steady state solver (

yhaomin2007 July 17, 2013 12:35

Adaptive Mesh refinement for steady state solver
Hey, all,

I have a problem about adaptive mesh refinement. I looked around all the solver, it seems all the solver that can do AMR is transient solver. Does anyone know if there is a existing AMR steady solver?
I also tried to implement AMR into rhoSimplecFoam solver. The procedure was simple, but I met error. I added mesh.update() in the solver.
The error info is :

Time = 10

Selected 455 cells for refinement out of 112000.
Refined from 112000 to 115185 cells.
Selected 0 split points out of a possible 455.
Execution time for mesh.update() = 8.01 s
time step continuity errors : sum local = 379.765, global = -189.418, cumulative = -212.852

field does not correspond to level 0 sizes: field = 115185 level = 112000

From function void GAMGAgglomeration::restrictField(Field<Type>& cf, const Field<Type>& ff, const label fineLevelIndex) const
in file lnInclude/GAMGAgglomerationTemplates.C at line 47.

FOAM aborting
It seems the solver can find the cells that need to refine, but it fails to find the split point. The refinement is not success. Does anyone have experience on this?

thank you in advance~

Akshay July 18, 2013 00:55


Is your cacheAgglomeration off? Try that.

yhaomin2007 July 18, 2013 11:07

Yes, this is the problem. I worked it out.
thank you

atoof August 20, 2013 03:11

Dear Haomin,

Did you just add mesh.update() in your solver? Is it sufficient to have adaptive mesh refinement for any steady state solver?



yhaomin2007 August 20, 2013 10:47

Hi, you also have to use "dynamicMesh" class to construct mesh. You can easily find examples in solvers that used dynamicMesh.
And, yes, the sentence that make difference is "mesh.update()".

verboomj April 12, 2017 06:35


I'm also trying to implement adaptive meshing in my simpleFoam solver, but I seem to get the following error when I include mesh.update(); in my Simple Loop.

error: 'class Foam::fvMesh' has no member named 'update'

I've been trying to look at pimpleDyMFoam and use this as a starting point for my simpleFoam solver.

Any ideas how I can tackle this problem?

All times are GMT -4. The time now is 23:20.