- **OpenFOAM**
(*https://www.cfd-online.com/Forums/openfoam/*)

- - **Natural Convection Simulation - buoyantSimpleRadiation - Convergence Problem**
(*https://www.cfd-online.com/Forums/openfoam/76698-natural-convection-simulation-buoyantsimpleradiation-convergence-problem.html*)

Natural Convection Simulation - buoyantSimpleRadiation - Convergence ProblemHello,
I am trying to simulate natural convection inside a square cavity with radiation effects using OpenFOAM-1.6.x. The simulation geometry is a simple 2D square, left and right side has constant temperature of 373 K and 323 K respectively and top and bottom are adiabatic. I am facing difficulty to get converged results. I have reduced the under relaxation factor and currently using 0.1 and 0.5 respectively for pressure and U but still not getting converged solutions. After 1,00,000 iterations, the final residual for Ux = 0.0032839, Uy = 0.003738 and for p = 0.008235. These residuals are not reducing more than that and the results (velocity distribution inside cavity) does not look reasonable. Anyone has any suggestions to tackle this problem? Any help would be very much appreciated. Thanks and Regards M. Sarkar |

I have had similar problems with simpleFoam. If the mesh cells are too small in zones with flow separation, those regions don't converge. Without changing the geometry, make a very coarse mesh (large cells) and see if that converges. If it does, then gradually refine the mesh. When you get to a cell size that starts to have convergence problems, you have found the resolution limit of the solution. Good luck,
Alan |

Thank you Alan for your reply. I tried with coarse mesh as you suggested but it did not solve my problem. In my simulation the domain is 1m x 1m and the coarsest mesh I tried 50 x 50 i.e the element size is 0.02 m (2 cm). Do you think that is enough coarse mesh to resolve this issue? give me some idea how coarse I should use. I was wondering if I use coarser mesh than this then the Y+ value may be in buffer region. Could you please tell me how to check Y+ value in OenFOAM and what is suggested range of it?
I do not know the reason but I got good converged results with same set up and same mesh (100 x 100 with mesh gradation towards wall) with buoyantSimpleFoam solver. However I did not get any good results with buoyantSimpleRadiationFoam solver for same case. I think only change between these two solvers is the radiation part inclusion. I am wondering it is making big difference in convergence and results? If anybody has any clue, please help me. Thanks! |

Hi msarkar,
I have very similar problems to you but with fireFoam, which is a Large eddy simulation fire solver. The flow is also driven by buoyancy. I noticed different things. First, yes the cells sizes have a big influence, and it is not easy to setup. a too coarse mesh does not necessary leads to an easier convergence because the turbulence/sgs model must be used in its validity domain. The numerical schemes have also a big influence, and the error message when the code stops and the analysis of the solution given by the solver at that instant can give you clues on what to modify. Are you using a steady state solver ? if yes, are you sure that it makes sense to look for a steady solution to your problem ? Because natural convection can lead to "hot air bubbles" detachment form the ground in different places depending on the time, which is completely unsteady. If you have any idea to share on these subjects, I would appreciate them ! Cheers, Francois |

I think the mesh you tried should be coarse enough. I have not worked with the solvers you are using. You can search the forum for people with similar problems, or on the solver name for ideas. There's a yplus utility that will give yplus values for your mesh. I haven't used it, but it's widely used and often discussed in the forum.
Good luck, sorry I can't offer more help. Alan |

Quote:
Still I did not get converge results and I did not get any discussions for this particular solver I am using. However, thanks a lot for your reply regarding yplus value. I found yplus utility and used it. You mentioned that you had similar convergence problem with SimpleFoam solver, your problem is solved? Are you using OpenFOAM-1.6.x or other version of OF? Regards M Sarkar |

Quote:
In my case it is not giving any error message, it is running fine but not converging. The final residuals are greater than 10e-2 for pressure and velocities and the results (velocity field) does not look reasonable to me. I did not get any clues yet how to solve this problem and still I am trying some tricks. If you have suggestions, please let me know. Your problem is already solved with fireFOAM? Are you using OF-1.6.x or any other version? Yes, I am using steady state solver. I think this is appropriate for this case. This problem is natural convection inside a closed cavity with radiation. So, essentially it will reach steady state. I simulated same case using OF-1.5 previously using same solver (buoyantSimpleRadiationFOAM) and I got good results. I do not know the exact reason but I am facing problem with OF-1.6.x version to get good results. I tried the same case using buoyantSimpleFOAM (i.e. with out radiation) that is also giving reasonable results. I am thinking there may be problem with inclusion of radiation but I am not sure what problem is there. Anyway, if you have any comments/suggestions, please let me know. Thanks and Regards M Sarkar |

M Sarkar,
I solved my convergence problems by adjusting the mesh - I my case, increasing the cell size in blockMesh made the difference. I'm still trying to improve my mesh generation to refine cells exactly where I need them and not everywhere on the surface. I'm using OF 1.6.x. Alan |

Thank you Alan for your reply.
Regards M. Sarkar |

Quote:
first thing to do is switch off all second order schemes. Switch them on after some time with may be restart . In the start i would switch off radiation too and try to get some velocity profile. Plus natural convection simulations greatly benefit from fine meshes. I remember one of my friend was working on natural convection problem and after 2 months of efforts he had nothing. Then he told me that he probably won't be able to finish his msc on time because of this. Anyway i asked him to let me try. I checked his mesh was very coarse, we created new refined mesh and next day morning he had results he used to finish his project. |

Quote:
Thank you for your reply. I tried various mesh sizes (50 x 50 to 200 x 200) with mesh gradation towards the wall. In my simulation, the coarsest mesh size is 0.02 m (2 cm) and the finest mesh is 0.0003125m (0.03125 cm) but did not get any converged/reasonable results yet. I am trying the tricks you suggested like initially turning off radiation/second order scheme terms with my finest mesh i.e. 200 x 200 with 1/16 mesh gradation towards wall. If I get any good results, I will let you know. If you think I need to make further finer mesh, please let me know. However, you mentioned about your friend's problem and you resolved it. Did you use OpenFOAM-1.6.x or any other version? Which solver did you use, is it same as mine (buoyantSimpleRadiationFoam)? Actually, I simulated same cavity problem before using OpenFOAM-1.5 and got good results with mesh size: 100 x 100. I don't know what are the changes they made in this new version (OF-1.6.x), it is not converging and velocity field does not look reasonable. Still I am trying various tricks to resolve this issue. Any comments/suggestions would be very much appreciated. Thanks M. Sarkar |

Hi msarkar,
I also noticed that the grid size had a big influence on the results, but I could not give any advice, because as you I tried many configurations without obtaining good results. There is just the standard idea that the numerical precision of the schemes must be in accordance with the refinement of the mesh, and first order schemes are usually easier to make converge in RANS. You said that you achieved these simulations with OF 1.5, you know that the formulation of the PISO solver has changed in 1.6 and the pd formulation has been abandoned. The pressure field must be really good because of the structure of the PISO loop otherwise the velocity will be degraded. Also the boundary conditions must be properly set up and I had problems with the hydrostatic pressure gradient, which drives the buoyancy. Are you sure that the boundary conditions that you set on the orthogonal walls to the gravity for the pressure field allow the hydrostatic gradient to be computed correctly ? Have you tried for example to swich off the buoyancy by setting all the walls temperatures to the same value and checked that your solver gives you a pressure field like p(z)=p0+rho*g*z ? Then could you gives us a screenshot of the topology of your mesh ? Good luck Francois |

5 Attachment(s)
Hello Francois,
Yes, I tried several mesh sizes. The screen shot of meshes are attached below. I tried the following meshes: (1) 50 x 50 (1/5 mesh gradation towards wall), (2) 60 x 60 (no mesh gradation), (3) 100 x100 (1/5 mesh gradation), (4) 200 x 200 (1/16 mesh gradation) and (5) 200 x 200 (1/5 mesh gradation that is not attached here). However none of the cases give me good results, somehow it is over predicting the velocity and velocity field does not seems to be correct. I am sure about my temperature boundary condition but not very sure about pressure. I am attaching my pressure and temperature boundary condition files. If you think something is wrong there, please let me know. I just attached the temperature file to give an idea about temperature variation. In my simulation gravity is acting in -Y direction. Currently I am checking the pressure field you suggested and I will update on that. any comments/suggestions would be very helpful. Thanks and Regards M. Sarkar |

1 Attachment(s)
Hello Francois,
I could not attach temperature boundary condition with my previous reply, it is attached here. |

Quote:
you forgot to mention the dimensions of your case and direction of gravity. If you mentioned it, i might have tried to run with another software and see how it works. PS: My friend used Fluent 6.18 (i belive). |

Hi Arjun,
Thanks a lot for your help. Dimension of of my simulation domain is 1m x 1m. Gravity is acting in -Y (negative Y) direction. I think I mentioned it in my previous post. However, I also simulated the same problem using FLUENT previously and got reasonably good results with a mesh size of 120 x 120 with 1/5 mesh gradation towards the wall using standard K-Omega turbulence model. I had difficulty of getting converged results using standard K-Epsilon and Realizable K-Epsilon turbulence model. Using both K-E methods, the continuity residual was greater than 1 where as for K-Omega method the same residual was well below 10^-5. Anyway If you reproduce this simulation please share your findings. Thanks and Regards M. Sarkar |

Hello msarkar,
I also had problems like you when using buoyantPressure everywhere, in my slover there was a particular treatment when the case is "closed" in pressure. Could you try a fixedValue 100 000 of pressure at the bottom and a zeroGradient condition at the top ? That solved my problem. Your mesh topology seems ok. Do you use wall functions in the correct y+ area? If you have a convergence, it will be interresting to compute y+. Good luck francois |

@msarkar I am too busy at the moment trying to finalize some documents. But i can confirm you this one thing. I did try one set up as you mentioned that is 1m x 1m square 2D mesh. With temperature as you mentioned, plus k-epsilon model on. Without radiation and beta = 2.1E-4, density = 1.225.
In my 20 iterations run on Fluent there was no convergence issues, no warnings. After 20 iterations continuity , k, epsilon were already in 1E-3 in terms of residuals. |

2 Attachment(s)
Hello Francois,
I tried to switch off the buoyancy by setteing all the walls temperatures to the same value and checked the pressure field. It does not seems to be correct. The pressure field is attached below (P.png). I was expecting the pressure field should look like the attachment P2.png that one I got using other solver (buyantSimpleFoam). I am thinking there may be some bug with pressure calculation. Anyway I am trying the pressure boundary conditions you suggested fixedValue at bottom and zeroGradient at the top. I will update on it. Thanks and Regards Mita Have you tried for example to swich off the buoyancy by setting all the walls temperatures to the same value and checked that your solver gives you a pressure field like p(z)=p0+rho*g*z ? |

1 Attachment(s)
Quote:
wrongly I attached the same pressure diagram twice but did not attach the one I wanted to show you. The pressure diagram is attached here, that one I got from buoyantSimpleRadiationFoam solver which on which I am interested. This pressure field does not seems to be correct. The above attached pressure field was expected to me but I did not get it using this solver. |

All times are GMT -4. The time now is 09:41. |