
[Sponsors] 
December 21, 2013, 17:09 
SimpleFoam Converge too fast?

#1 
New Member
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 6 
Hi, I am running a simulation of a rearwing (3 elements) in free flow at 20m/s using SimpleFoam. The goal of this is to compare with the values of StarCCM+. I successfully managed to get a converging solution with simpleFoam and the kepsilon turbulence model, but the values for lift are way off the ones I get from StarCCM+ (340N in OpenFOAM and 500 in StarCCM+). Also, I get convergence (tolerence 1e5) with only 127 iterations, which seems to be fairly low. I will put my cases files here if someone want to take a look. I am fairly new to OpenFoam and if someone would tell me if my case is set up correctly, it would help me.
0/U Code:
internalField uniform (20 0 0); boundaryField { inlet { type fixedValue; value uniform (20 0 0); } outlet { type zeroGradient; } wall { type fixedValue; value uniform (0 0 0); } wing_patch0 { type fixedValue; value uniform (0 0 0); } } Code:
boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } wall { type zeroGradient; } wing_patch0 { type zeroGradient; } } Code:
boundaryField { inlet { type fixedValue; value uniform 0.375; } outlet { type zeroGradient; } wall { type kqRWallFunction; value uniform 0.375; } wing_patch0 { type kqRWallFunction; value uniform 0.375; } } Code:
boundaryField { inlet { type fixedValue; value uniform 0.14; } outlet { type zeroGradient; } wall { type epsilonWallFunction; value uniform 0.14; } wing_patch0 { type epsilonWallFunction; value uniform 0.14; } } Code:
functions { forces2 { type forces; functionObjectLibs ("libforces.so"); outputControl timeStep; outputInterval 1; patches (wing_patch0); pName p; UName U; rhoName rhoInf; rhoInf 1; // Reference density, fluid CofR ( 0 0 0 ); } forces { type forceCoeffs; functionObjectLibs ( "libforces.so" ); outputControl timeStep; outputInterval 1; patches ( wing_patch0 ); pName p; UName U; rhoName rhoInf; log true; rhoInf 1; liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 1); magUInf 5; lRef 0.6; Aref 0.54; } } Code:
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian((1A(U)),p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } Code:
solvers { p { solver PCG; preconditioner DIC; tolerance 1e05; relTol 0.001; } U { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } k { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } epsilon { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } R { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } nuTilda { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; residualControl { p 1e2; U 1e3; "(kepsilonomega)" 1e3; } } relaxationFactors { fields { p 0.3; } equations { U 0.5; k 0.5; epsilon 0.5; R 0.5; nuTilda 0.5; } } Code:
# Time forces(pressure, viscous) moment(pressure, viscous) 125 ((141.343 340.987 0.392246),(3.10142 0.809334 0.00135019)) ((212.161 87.7299 85.3783),(0.506275 1.93118 0.553894)) 126 ((141.337 341.417 0.393058),(3.10202 0.808603 0.00137183)) ((212.43 87.7248 85.5695),(0.505819 1.9315 0.553189)) 127 ((141.332 341.844 0.393627),(3.10264 0.807873 0.0013929)) ((212.698 87.7208 85.7586),(0.505364 1.93184 0.552492)) Thank you 

Sponsored Links 
December 23, 2013, 05:31 

#2 
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 213
Blog Entries: 1
Rep Power: 11 
Hi,
I think the result will change if you add the boundary layer mesh as you wrote. 1. What is the value of y+? If you use the standard kepsilon model, the y+ should be greater than about 30. 2. Is the density value rhoInf=1 is the same as that used in StarCCM+? Best regards, Fumiya 

December 23, 2013, 06:18 

#3 
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 14 
You can only compare both methods if you use the same mesh. It does not make much sense to compare the output of both tools if you also change the mesh. Also, you say the results are way of with the ones from StarCCM. But which, if any, of them is correct?


December 23, 2013, 14:36 

#4 
New Member
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 6 
Hi, thank you for the answer. I guess you are right, it doesn't make much sense comparing both with different meshes. Other than that, I use all the same values for density and everything.
My yplus for openFOAM is min: 18.1881 max: 210.765 average: 92.1105 but I don't have boundary layers. Now I plan to try both meshes in both tools and compare the results. We might have access to a wind tunnel so we can confirm our results later. For now, I just want to get more familiar with OpenFOAM. But now I have a problem with boundary layers with sHM. When I run my case without them, it runs ok and the solution converge to realistic values. But when I have boundary layers, the solution (laminar first) oscillates like crazy and blow up. When I look at the solution on Paraview, I can see that there is clearly something wrong since the is a really small high pressure zone (surrealistically high) near the trailing edge of the second element. I have around 1000 highly skewed (max: 9) faces in the mesh when I add layers, and I haven't find a way to get rid of them yet. I looked in Paraview to see where they are because I thought that maybe it was the problem, but they are upstream and nowhere near the wing, so I don't think they are the problem. I understand that I should use the same mesh for both software, but the thing is, if I cannot reproduce the same results independently of the other software (whichever gives the right values), is one of them better than the other? If both of them are good, I should be able to get close to the actual value of lift and drag with both software regardless of the path taken to get there. Thank you 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
simpleFoam crash fast!  izna  OpenFOAM Running, Solving & CFD  28  February 3, 2017 14:24 
Laminar simpleFoam and inviscid simpleFoam  herenger  OpenFOAM Running, Solving & CFD  7  July 11, 2013 06:27 
interFoam vs. simpleFoam channel flow comparison  DanM  OpenFOAM Running, Solving & CFD  11  January 5, 2013 07:21 
Trying to run a benchmark case with simpleFoam  spsb  OpenFOAM  3  February 24, 2012 10:07 
converge condition for simpleFoam  EmadTandis  OpenFOAM Running, Solving & CFD  8  December 17, 2011 12:23 
Sponsored Links 