CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

OpenFOAM validation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By thg

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 1, 2011, 15:29
Default OpenFOAM validation
  #1
New Member
 
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 14
mountaineer is on a distinguished road
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) i3-2100 CPU @ 3.10GHz with 4 GB Ram.

thanks!
Attached Files
File Type: zip backward_facing_step.zip (8.4 KB, 18 views)
mountaineer is offline   Reply With Quote

Old   September 1, 2011, 16:03
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
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
l_r_mcglashan is offline   Reply With Quote

Old   September 1, 2011, 16:29
Default
  #3
thg
Member
 
Thorsten Grahs
Join Date: Oct 2009
Posts: 61
Rep Power: 16
thg is on a distinguished road
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 1e-06;
relTol 0.001;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
}
U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
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
mountaineer likes this.
thg is offline   Reply With Quote

Old   September 1, 2011, 16:57
Default
  #4
New Member
 
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 14
mountaineer is on a distinguished road
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!
Attached Images
File Type: jpg OF_velocity_streamline.jpg (17.6 KB, 98 views)
mountaineer is offline   Reply With Quote

Old   September 1, 2011, 17:12
Default
  #5
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
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 1e-10 and the convergence criteria to something much lower:

residualControl
{
p 1e-7;
U 1e-7;
"(k|epsilon|omega)" 1e-7;
}

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
l_r_mcglashan is offline   Reply With Quote

Old   September 1, 2011, 17:34
Default
  #6
thg
Member
 
Thorsten Grahs
Join Date: Oct 2009
Posts: 61
Rep Power: 16
thg is on a distinguished road
...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 z-dir (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 z-dir, converged after747 itterations
but I would also say that your residuals settings are too big.
Attached Images
File Type: jpg bfs.jpg (73.3 KB, 70 views)
thg is offline   Reply With Quote

Old   September 6, 2011, 22:13
Default
  #7
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
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 (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based 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
alberto is offline   Reply With Quote

Old   September 7, 2011, 06:01
Default
  #8
New Member
 
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 14
mountaineer is on a distinguished road
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!
mountaineer is offline   Reply With Quote

Old   September 27, 2011, 08:04
Default
  #9
Senior Member
 
Join Date: Mar 2009
Posts: 138
Rep Power: 17
camoesas is on a distinguished road
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
camoesas is offline   Reply With Quote

Old   September 27, 2011, 08:45
Default
  #10
New Member
 
Maximilian Hauser
Join Date: Sep 2011
Posts: 9
Rep Power: 14
mountaineer is on a distinguished road
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
mountaineer is offline   Reply With Quote

Old   September 27, 2011, 09:10
Default
  #11
Senior Member
 
Join Date: Mar 2009
Posts: 138
Rep Power: 17
camoesas is on a distinguished road
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.
camoesas is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 18:28
Validation of OpenFOAM for Poiseuille and Womersley Solution nobound OpenFOAM 1 September 12, 2011 09:53
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
Modified OpenFOAM Forum Structure and New Mailing-List 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


All times are GMT -4. The time now is 06:36.