
[Sponsors] 
September 1, 2011, 15:29 
OpenFOAM validation

#1 
New Member
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 7 
Hi all,
I am new to OpenFOAM and CFD and for studying myself I want to compare OpenFOAM with Ansys CFX. In the Ansys CFX Help i found this case. At first I've created the Mesh with blockMesh. Now I want to run the case without the heat transfer at the bottom with simpleFoam. I am using the same settings as in the pitzDaily tutorial. I've calculated k and epsilon with the formula 2.9 and 2.10 in the OpenFOAM help. The problem now is, the calculation does converge after 432 iterations but takes a very long time. About 1871 seconds. The system is a Intel(R) Core(TM) i32100 CPU @ 3.10GHz with 4 GB Ram. thanks! 

September 1, 2011, 16:03 

#2 
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 16 
Hi,
1) Are the results what you expect? 2) Your mesh is 3D and has 416,000 cells. Fluent used a 2D one with 7,381 cells. That might explain why it's slower...
__________________
Laurence R. McGlashan :: Website 

September 1, 2011, 16:29 

#3 
Member
Thorsten Grahs
Join Date: Oct 2009
Posts: 57
Rep Power: 9 
From an iterative pint of view you could use fi. an PBiCG or Multigrid
as solver, i.e. using in fvSolutions f.i. "p" { solver GAMG; agglomerator faceAreaPair; mergeLevels 1; cacheAgglomeration true; nCellsInCoarsestLevel 200; tolerance 1e06; relTol 0.001; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; } U { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } ... If you also want to compare comutation time I woul skip the functionObject entries in the controlDIct. AND... you chanel is 33.8 km long...that changes the scales OF base length scale is meter. change convertToMeters 1; in the blockMeshDict. thg 

September 1, 2011, 16:57 

#4 
New Member
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 7 
Ok, these are really some bad beginner mistakes...
I've changed the mesh to 27000 cells and the converttometers to 1, but now the solution won't converge. The results bevor I do these changings looks goot (in my point of view ) thanks a lot! 

September 1, 2011, 17:12 

#5 
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 16 
Try something like this for your blocks:
blocks ( hex (0 10 14 3 4 13 15 7) (10 40 1) simpleGrading (0.1 10 1) hex (10 1 2 14 13 5 6 15) (100 40 1) simpleGrading (10 10 1) hex (8 9 1 10 11 12 5 13) (100 20 1) simpleGrading (10 0.1 1) ); In fvSolution, set tolerances to 1e10 and the convergence criteria to something much lower: residualControl { p 1e7; U 1e7; "(kepsilonomega)" 1e7; } In fvSchemes, use Gauss linear on div(phi,U). You can try using other schemes on the other variables later. In controlDict, set the endTime to 2000 or later. That will work. Also, it's all very well the solution 'looking good', but have you got something more quantitative to compare it with, and is the case actually converging?
__________________
Laurence R. McGlashan :: Website 

September 1, 2011, 17:34 

#6 
Member
Thorsten Grahs
Join Date: Oct 2009
Posts: 57
Rep Power: 9 
...don't be too hard to yourself.
We all have started... Laurence already mentioned the important thinks: You compare to a 2d test case, you already have empty patches into you blockMesh which is used for 2d calculation, so why dont you choose only 1 cell in zdir (see block def. by laurence). The numerics are essential. How you could choose them again Laurence gave the essential hints. btw. your settings, 1 cell in zdir, converged after747 itterations but I would also say that your residuals settings are too big. 

September 6, 2011, 22:13 

#7 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
Use the same mesh you use in CFX, and import it into OpenFOAM with fluentMeshToFoam or equivalent tool, depending on the format. You find the name of the boundary conditions in constant/polyMesh/boundary.
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. Last edited by alberto; September 6, 2011 at 22:14. Reason: Corrected 

September 7, 2011, 06:01 

#8 
New Member
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 7 
Hi,
I've changed the mesh and also the settings for residualControl and div(phi,U). The case converged after 1701 iterations with a good performance. Before checking the results, I want build up the case with a heated bottom wall as it is descriped in the link of my first post. The problem now is, I can't find a suitable solver. In the buoyantBoussinesqSimpleFoam I can only define a temperature gradient, but no heat transfer trough the wall. thanks! 

September 27, 2011, 08:04 

#9 
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 10 
HI Maximilian,
At the moment I am also trying to validate Vogels' Paper with OpenFoam. Maybe we can exchange some experiences. I am using SST Model and for heat transfer I am using rhoSimpleFoam. I have a few questions regarding your setup: Why are u using U_inlet = 0.7 m/s? According to the paper its 11.3m/s I am also getting different values for k and epsilon when calculating with a turbulent intensity of 0.2%. What turbulent length scale do you have used? Regards Camoesas 

September 27, 2011, 08:45 

#10 
New Member
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 7 
Hi Camoesas,
I didn't use the values from Vogel and Eaton. I've used the Reynolds number as it is descriped in the verification manual of Ansys CFX. According to this, the Reynolds number is 28.000. If i use the kinematic viscosity of the fluid with nu=1e^4 and a inlet height of 4 m i get 0,7 m/s an the inlet. I used the turbulent intensity of 5 %, because these are the default settings in AnsysCFX. For calculating epsilon I've used the turbulent length scale of 20 % of the inlet. How did you set the wall heat transfer? At the moment I try to validate my analytic solution of a forced convection of a crosswise flow to an heated cylinder. For this case, I've also decided to use the rhoSimpleFoam solver. Sorry but I didn't have the orginal paper of Vogel and Eaton. Do have any clue where can I get this paper? thanks! regards Mountaineer 

September 27, 2011, 09:10 

#11 
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 10 
HI,
I see its not clear enough in the CFX Case. In the paper Re_H is the Reynoldsnumber build with step height! (The paper also has a heat transfer of 270 W/mē instead of 1000 W/mē in the CFX Case) send me a PM with your mail, I`ll send you the paper! (I have copied it from a book I guess its not freely available in the world wide web) Camoesas edit: Till now I dont have Heat Transfer implemented, I have started cold and then added constant temperature... Last edited by camoesas; September 27, 2011 at 11:40. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Validation of OpenFOAM for Poiseuille and Womersley Solution  nobound  OpenFOAM  1  September 12, 2011 09:53 
OpenFOAM  Validation of Results  Ahmed  OpenFOAM Running, Solving & CFD  9  June 22, 2011 18:59 
Crosscompiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingww64  wyldckat  OpenFOAM Announcements from Other Sources  3  September 8, 2010 06:25 
Modified OpenFOAM Forum Structure and New MailingList  pete  Site News & Announcements  0  June 29, 2009 05:56 
Adventure of fisrst openfoam installation on Ubuntu 710  jussi  OpenFOAM Installation  0  April 24, 2008 14:25 