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

- - **2D differentially heated cavity, which is appropriate solver?**
(*https://www.cfd-online.com/Forums/openfoam/82728-2d-differentially-heated-cavity-appropriate-solver.html*)

2D differentially heated cavity, which is appropriate solver?Hello folks,
I am learning OpenFOAM and want to simulate a 2D differentially heated cavity problem for Rayleigh numbers in the range of 10^3 to 10^6, so the flow can be considered laminar for sure but how do I know if it will steady or unsteady? I am unable to decide which solver to use among the three 1) IcoFoam : but I found that the application file icoFoam.c solves only momentum equation so this is not appropriate solver. 2) buoyantBoussinesqPisoFoam : Assuming the flow will be unsteady (even if the flow attains steady state with this solver we observe that after certain number of time steps there will not be much change in the results) this seems appropriate solver but this is written for turbulent case so can I simply comment out the k, epsilon and R parts in fvSolution file to get the results for laminar case? 3) buoyantBoussinesqSimpleFoam : Assuming the flow will reach steady state (in case the flow turns out to be unsteady this is wring choice) this seems appropriate but again this is written for turbulent case. So, I feel that I should go for option 2 (can I comment out the turbulent part and go ahead??), please tell me your suggestions/opinions. Thanks a lot |

Hi,
You can very easily switch off turbulence in any solver. You have to mention this in file "$constant/turbulenceProperties". More details can be found in User Guide in Section 7. As for your specific case, the choice of correct solver can only be advised, if you provide some more details about your case. |

Thanks for the reply Nakul, I will definitely try this. I am also considering to add energey equation to icoFoam (I have found a tutorial by Jassac where he shows how to add a scalar equation in icoFoam, so I am going to follow the same steps to add energy equation) and then run the same problem.
Regarding my case, it is just a two dimensional square cavity with differential heating, top and bottom walls are insulated, left wall is maintained at Th and the right wall is maintained at Tc where Th > Tc. Initially the fluid is at rest, so when this differential heating is applied the motion takes only due to buoyancy effects. Can you now suggest me how do I decide whether I have to consider a Transient or steady state solver. Thank you again |

Hi,
I would advice you to use a transient state solver because then you would be able to view many useful changes that happen as the flow tends to steady state. Although transient solvers take longer time to solve but for your simple case time penalty won't be much. Since gravity would also play an important role in your solution, hence I think that icoFoam may not be a suitable choice. But I am not sure about this point. It would be better if you first seriously go through icoFoam's code and determine whether it is a suitable solver or not. |

1 Attachment(s)
Hello nakul,
So I selected buoynatBoussinesqPimpleFoam for this problem, and in constant/RASProperties I switched the turbulence off, the problem is even though I change the temperature difference between the walls I don't see changes in the flow field. The fluid properties are in transportProperties. I considered a Courant number of 0.1, and the velocity scale is taken as ratio of thermal diffusivity to characteristic length (0.1 m), I did the calculations for Ra = 10^4 and 10^5, and the flow field appears same for both the values at the end of 3000 time steps. I am attaching the case, so please suggest me what can go wrong. Thank you |

Quote:
Hi, dear vetnav, cheering. in the private message you sent to me, you said that you tried two cases Rayleighnumber 10^4 (temperature difference between the walls ~ 4 degrees) and 10^5 ( temperature difference between the walls ~ 45 degrees). Did you calculate the cases with only different Rayleigh numbers, or with both different Rayleigh numbers and temperatures? If you calculated them with only different Rayleigh numbers, I guess maybe the results are not large different, for the reason that both them are under or over the critical limit. You know, Rayleigh number is a parameter that determines when convection may occur, and convection occurs when the Rayleigh number exceeds a critical limit. Best regards, Chiven |

Hello Chiven,
Thank you for the reply, I used different temperature differences also, as shown in the paper by De Vahl Davis titled "Natural convection of air in a square cavity: A benchmark numerical solution", Intl. J. for Nume. methods in fluids, 3, 249 (1983), if everything goes fine I should see the different patterns for stream function (figure 3 in the paper), but with my OpenFOAM case I can not see any differences. Reagrds |

Quote:
I look through your case and find nothing wrong this time. would you please send the paper to me? Best regards, Chiven |

1 Attachment(s)
Thank you for your time Chiven, the pdf file size is 1.3 MB so I can not attach it here, but I am sending the figure from the paper which shows the stream function.
I can send you the paper if you can give me your email id. Thank you |

Quote:
Hi, vetnav, you are welcome anytime. I am not sure I can help you in the end, but I shall try the best. I used buoyantBoussinesq-Foam last year, and I am still working in OF. My email is chiven77@hotmail.com Best regards, Chiven |

Hi Naveen,
Can you please also send me the paper. I am not sure, but if I get time I will try to model the case and would inform you of results. My email id is nakulthemaster@gmail.com |

Hi all
I know this is a very old post. But could you mail the paper to me too? DeVahl Davis? My ID is: srivathsan.iitm@gmail.com Many thanks! |

All times are GMT -4. The time now is 04:11. |