
[Sponsors] 
January 25, 2013, 06:46 
Law of the wall: komega vs. SpalartAllmaras (simpleFoam)

#1 
New Member
Join Date: Jan 2013
Location: Aachen, Germany
Posts: 1
Rep Power: 0 
Hi everyone,
I'm new to OpenFOAM, and in preparation for a more complex simulation I'm currently working on evaluating some turbulence models on a simple mesh. I have a 2Dflow between two smooth noslip walls. Boundary conditions on inlet and outlet are periodic, except for a pressure jump. I'm using simpleFoam and tried out both komega SST and SpalartAllmaras turbulence models, with all default coefficients, and compared the results. This plot is for a mesh with a wall y+ of 0.5 (I get the same results using different mesh resolutions). comparison_turb_small.png I'm not sure what I'm supposed to get, but I figure the komega SST results are quite good, whereas the SpalartAllmaras results look unusable. The Spalart results can't be the way they're supposed to be, can they? I must be doing something wrong! Except for the nuTilda file, the settings are exactly the same, so here's my nuTilda file: Code:
dimensions [ 0 2 1 0 0 0 0 ]; internalField uniform 1.e5;//0.05; boundaryField { inlet { type cyclicAMI; } outlet { type cyclicAMI; } wall { type fixedValue; value uniform 0; } "sym(AB)" { type symmetryPlane; } } Are there any other configuration files that I should post here? Thank you! EDIT: Btw, this is OF 2.1 

March 22, 2013, 04:54 

#2 
Member
Valentin Wibaut
Join Date: Oct 2012
Posts: 45
Rep Power: 5 
Hi MrFourier,
Do you find something? I have a similar problem Thanks for your help 

January 22, 2014, 15:33 

#3 
Member
Ye Zhang
Join Date: Dec 2009
Location: Delft,Netherland
Posts: 92
Rep Power: 8 
Hi Valentin,
Did you find something? Best Ye 

May 29, 2014, 00:59 

#4 
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Hi.
As I am having trouble in making the SST run, could you please post the rest of your files for the setup? My solution does not converge and I cannot understand why. 

June 2, 2014, 06:49 

#5 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,296
Rep Power: 19 
Anastasios what is the problem? Post your relevant settings.
__________________
The skeleton ran out of shampoo in the shower. 

June 4, 2014, 03:42 

#6  
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Quote:
My settings are the following: Initial conditions for U Code:
dimensions [0 1 1 0 0 0 0]; internalField uniform ( 68.4 0. 0. ); boundaryField { farfield2 { type empty; } farfield1 { type empty; } inflow { type fixedValue; value uniform (68.4 0. 0.); } outflow { type zeroGradient; } symmetry { type symmetryPlane; } wall { type fixedValue; value uniform (0. 0. 0.); } top { type slip; } } Code:
dimensions [0 2 2 0 0 0 0]; internalField uniform 0.; boundaryField { farfield2 { type empty; } farfield1 { type empty; } inflow { type /*freestreamPressure;*/zeroGradient; } outflow { type zeroGradient; } symmetry { type symmetryPlane; } wall { type zeroGradient; } top { type slip; } } Code:
dimensions [0 2 2 0 0 0 0]; internalField uniform 0.001052676; boundaryField { farfield2 { type empty; } farfield1 { type empty; } inflow { type fixedValue; value uniform 0.001052676; } outflow { type zeroGradient; } symmetry { type symmetryPlane; } wall { type fixedValue; value uniform 0; } top { type slip; } } Code:
dimensions [0 0 1 0 0 0 0]; internalField uniform 8550; boundaryField { farfield2 { type empty; } farfield1 { type empty; } inflow { type fixedValue; value uniform 8550; } outflow { type zeroGradient; } symmetry { type symmetryPlane; } wall { //type fixedValue; type omegaWallFunction; //value uniform 1.581e+08; value uniform 1; } top { type slip; } } Code:
dimensions [0 2 1 0 0 0 0]; internalField uniform 0; boundaryField { farfield2 { type empty; } farfield1 { type empty; } inflow { type calculated; value uniform 0; } outflow { type calculated; value uniform 0; } symmetry { type symmetryPlane; } wall { type nutUSpaldingWallFunction; value uniform 0; } top { type slip; } } Code:
solvers { p GAMG { preconditioner DIC; mergeLevels 1; smoother GaussSeidel; agglomerator faceAreaPair; nCellsInCoarsestLevel 100; cacheAgglomeration on; tolerance 1e07; relTol 0.01; }; U GAMG { preconditioner DILU; mergeLevels 1; smoother GaussSeidel; agglomerator faceAreaPair; nCellsInCoarsestLevel 100; cacheAgglomeration on; tolerance 1e07; relTol 0.1; }; k GAMG { preconditioner DILU; mergeLevels 1; smoother GaussSeidel; agglomerator faceAreaPair; nCellsInCoarsestLevel 100; cacheAgglomeration on; tolerance 1e07; relTol 0.1; }; omega GAMG { preconditioner DILU; mergeLevels 1; smoother GaussSeidel; agglomerator faceAreaPair; nCellsInCoarsestLevel 100; cacheAgglomeration on; tolerance 1e07; relTol 0.1; }; } SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } relaxationFactors { p 0.3; //0.3 original!! U 0.7; k 0.7; omega 0.7; } Code:
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(U) Gauss linear; grad(p) Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwindV grad(U); div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; } With the above settings the solution converges but the values are strange; I have values in the flow field greater than the input velocity. 

June 4, 2014, 03:51 

#7  
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,296
Rep Power: 19 
Quote:
At your inlet you put in some constant velocity profile. Now, at the bottom wall a boundary layer develops with increasing size along the flow direction. In this boundary layer the velocity is low. But the mass flow through each vertical line (integrated) must be constant. Thus, if you have a lower velocity at the bottom you must get a higher value at some other places.
__________________
The skeleton ran out of shampoo in the shower. 

June 4, 2014, 04:40 

#8  
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Quote:


June 4, 2014, 04:47 

#9 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,296
Rep Power: 19 
Does it work if you set inlet and outlet to zerogradient and the top wall to some fixed velocity value?
__________________
The skeleton ran out of shampoo in the shower. 

June 4, 2014, 06:01 

#10 
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 

June 8, 2014, 10:58 

#11  
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Quote:
My main problem seems to be the pressure convergence. In both the very fine mesh (~2100000 cells) and the coarse presents a very oscillatory behavior. In the fine mesh after some iterations it seems to somehow blow up. Please find attached the residuals for both cases. I tried to reduced the order of the Laplacian but the same. 

June 8, 2014, 11:04 

#12 
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Also I am not sure about the accurace as the results differ significantly form NASA's. I do not so much care about the values but from the fact that my results do not follow well the law of the wall.


June 10, 2014, 03:57 

#13 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,296
Rep Power: 19 
I would try to run it with gradient limiters. Go for
Code:
default cellMDLimited Gauss linear 1.0; In my experience, the convergence of the komegasst model strongly depends on the gradient limiters.
__________________
The skeleton ran out of shampoo in the shower. 

June 10, 2014, 09:31 

#14  
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Quote:
In any case, I solved the issue with the inaccuracy. FYI, the wallShearStress DOES NOT WORK FOR LOWRE GRIDS. Calculating u_tau with the wallGradU utility resulted in correct results. 

June 10, 2014, 09:43 

#15 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,296
Rep Power: 19 
1) Did you deactivate ("//") the gradients for U and p and set all the gradients as I suggested?
2) Are you sure, you use the correct syntax for relaxation factors? I use them like http://www.openfoam.org/docs/user/fvSolution.php
__________________
The skeleton ran out of shampoo in the shower. 

June 12, 2014, 03:35 

#16  
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Quote:
If I use the gradscheme you propose for default, the result is convergence in higher values again with this small oscillation. I cannot understand why. At the moment I compromise with this as the results at least for the flat plate flow are satisfactory. To be honest I can understand the difference of the solver schemes, but I do not have the intuition. It is too mathematical for me and I have not been taught such advanced linear algebra topics. I will use some more complicated models and let you know. 

June 12, 2014, 03:41 

#17 
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,296
Rep Power: 19 
Can you upload the complete setup somewhere?
__________________
The skeleton ran out of shampoo in the shower. 

June 17, 2014, 04:08 

#18 
New Member
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 9 
Finally,
I followed your advice and changed the gradient schemes. That behaved correctly. However, the most important issue for the accuracy results was to understand that the wallShearStress utility outputs in m2/s2, which is Pa/rho and not Pa. That was a big mistake which took me a lot to understand to be honest I hadn't paid attention. Thank you very much for your help anyway. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
wall slip law for newtonian fluid  tsi07  FLUENT  0  April 19, 2012 12:13 
[ICEM] Export ICEM mesh to Gambit / Fluent  romekr  ANSYS Meshing & Geometry  1  November 26, 2011 13:11 
help with wall functions  Nick Georgiadis  Main CFD Forum  4  February 20, 2000 18:07 
Law of the wall  xavier tricot  Main CFD Forum  1  January 14, 2000 12:45 
Wall functions  Abhijit Tilak  Main CFD Forum  6  February 5, 1999 02:16 