|
[Sponsors] | |||||
NACA 0012 Airfoil, simpleFoam, Spalart Allmaras |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 10 ![]() |
Hi OpenFOAM Users,
I was trying to validate NACA 0012 (at different angles of attack) simulation case using OpenFOAM (Version 5.0x). I created Mesh on Pointwise and run this simulation and compared results of (Coefficient of Lift and Drag ) with experimental results that I got from ............ " https://turbmodels.larc.nasa.gov/NAC...on_expdata.dat " The Inputs parameters were as follow: (1): Free Stream Velocity = 52.0783 m/s (2): Mach Number = 0.15 (3): Free Stream Pressure ( (101325 pa) and Temperature (300 k ) (4): Density of air = 1.1764 (5): Kinematic Viscosity = 1.57599*10^-5 (6): Reynolds Number = 6.0 *10^6 (7): Turbulence model used: Spalart-Allmaras (8): Solver : simpleFoam (9): O Grid used (Domain Size = 550 ) (10) : Wall Function used : nutUSpaldingWallFunction (11) : Vhord Length = 1.8157 with these settings , I got results for Cl and Cd which I compared with NASA results. The coefficient of Lift is very close to Experimental results and the percentage difference between Simulation and Experimental results were in the range of 1 - 3 % as I increase the angle of attack from 2 degree to 12 degrees. But Cd results were not good as compare to Experimental results. As I increase the angle of attack, the percentage difference between Simulation and Experimental results were in the range of 8 - 22 % as I increase the angle of attack from 2 degree to 12 degrees. I would like to get valuable suggestions from the OpenFOAM experts. I am struggling to get accurate results of Cd since last 2 months and I have also tried other mesh types like C type as well. I am attaching here all the input files for NACA 0012 case simulated at A.O.A = 6.09 degrees. Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 1.94e-05;
boundaryField
{
airfoil
{
type nutUSpaldingWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
farfield
{
type freestream;
freestreamValue uniform 1.94e-05;
value uniform 1.94e-05;
}
frontAndback
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nuTilda;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 7.5e-05;
boundaryField
{
airfoil
{
type fixedValue;
value uniform 0;
}
farfield
{
type freestream;
freestreamValue uniform 7.5e-05;
value uniform 7.5e-05;
}
frontAndback
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
airfoil
{
type zeroGradient;
}
farfield
{
type freestreamPressure;
value uniform 0;
}
frontAndback
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (51.7844 5.52501 0);
boundaryField
{
airfoil
{
type noSlip;
}
farfield
{
type freestream;
freestreamValue uniform (51.7844 5.52501 0);
value uniform (51.7844 5.52501 0);
}
frontAndback
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
rho [1 -3 0 0 0 0 0] 1.1764; // Interpolated Value of rho at T = 300 k or 27 degree Celcius (values calculated from P.Number =760, Fluid Mechanics by Munson, Young)
nu [0 2 -1 0 0 0 0] 1.57599456e-05; // Interpolated Value of nu at T = 300 k or 27 degree Celcius
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel SpalartAllmaras;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda);
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
tolerance 1e-06;
relTol 0.1;
smoother GaussSeidel;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-08;
relTol 0.1;
}
nuTilda
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-08;
relTol 0.1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p 1e-5;
U 1e-5;
nuTilda 1e-5;
}
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
nuTilda 0.7;
}
}
// ************************************************************************* //
Code:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 5.x-68e8507efb72
Exec : checkMesh
Date : Apr 02 2019
Time : 12:51:16
Host : "gurpreet"
PID : 5595
I/O : uncollated
Case : /home/gurpreet/Music/NACA0012-OGrid-SpalartAllmaras-differentAnglesofAttack/NACA0012AoA=6.09
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create polyMesh for time = 0
Time = 0
Mesh stats
points: 188328
internal points: 0
faces: 374262
internal faces: 185934
cells: 93366
faces per cell: 6
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 0
Overall number of cells of each type:
hexahedra: 93366
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0
Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).
Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
airfoil 798 1596 ok (non-closed singly connected)
farfield 798 1596 ok (non-closed singly connected)
frontAndback 186732 188328 ok (non-closed singly connected)
Checking geometry...
Overall domain bounding box (-507.947 -508.461 0) (509.358 508.461 1)
Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
Mesh has 2 solution (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (5.45386e-22 5.06118e-19 3.34258e-15) OK.
Max cell openness = 7.27387e-16 OK.
Max aspect ratio = 25.5172 OK.
Minimum face area = 3.72576e-07. Maximum face area = 176.546. Face area magnitudes OK.
Min volume = 3.72576e-07. Max volume = 176.546. Total volume = 812666. Cell volumes OK.
Mesh non-orthogonality Max: 13.0044 average: 0.547432
Non-orthogonality check OK.
Face pyramids OK.
***Max skewness = 4.24249, 1 highly skew faces detected which may impair the quality of the results
<<Writing 1 skew faces to set skewFaces
Coupled point location match (average 0) OK.
Failed 1 mesh checks.
End
Code:
After running the simulation , I got following values of yPlus yPlus Min =3.92176 , yPlus Max = 126.818, yPlus Ave = 53.5354 Please give me your valuable comments on this case so that I can run this case again to get the close values of Cd compare to experimental results. |
|
|
|
|
|
|
|
|
#2 |
|
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 10 ![]() |
Can anybody provide me valuable comments on this topic ?
|
|
|
|
|
|
|
|
|
#3 | |
|
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 12 ![]() |
Hello. Let me just quote myself:
Quote:
Best regards, Oskar |
||
|
|
|
||
|
|
|
#4 |
|
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 10 ![]() |
Hi Sheaker,
Thanks a lot for your valuable suggestiob on this topic. I looked number of forum question related to this topic but did not reach to conclusion. But I will work on your advice. Did You try this Turbulent model? |
|
|
|
|
|
|
|
|
#5 |
|
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 12 ![]() |
Unfortunately not.
I was trying to get right drag value without success. Then I asked my university teacher about this issue. He said that the reason is fully turbulent flow around airfoil and suggest me to use gamma re theta turbulence model. I was using openFoam 1.6ext without gamma re theta so I didn't tried it. (Now, 3years later, I am trying to use transitional model in Fluent to get drag coefficient but there are issues with mesh generation.) Best regards, Oskar |
|
|
|
|
|
|
|
|
#6 |
|
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 10 ![]() |
Thanks a lot Sheaker for your quick reply. I will work on KOmega SST turbulence model and will post my results.
|
|
|
|
|
|
|
|
|
#7 | |
|
Senior Member
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 12 ![]() |
Quote:
Best regards, Oskar |
||
|
|
|
||
|
|
|
#8 | ||
|
Member
|
Hello Gurpreet Singh,
I am working on the similar problem like you. I create the mesh with pointwise, too. I use checkmesh to make a examination, it looks fine Quote:
But when the mesh files are taken into the calcualtion case, Quote:
Thank you very much! |
|||
|
|
|
|||
|
|
|
#9 |
|
Member
Arthur
Join Date: Aug 2014
Location: Italy
Posts: 47
Rep Power: 13 ![]() |
You can also try to pass to more accurate divSchemes.
Have you tried to use Gauss linear for all div(...)? |
|
|
|
|
|
|
|
|
#10 |
|
Member
Arthur
Join Date: Aug 2014
Location: Italy
Posts: 47
Rep Power: 13 ![]() |
Remember also that if you are interested in drag it is very important to solve correctly the velocity near the wall.
You should solve viscous sublayer with k-omega or k-omegaSST (how sheaker has already mentioned). For good results I recommend to put at least 10 cells in the region with y+<1. |
|
|
|
|
|
|
|
|
#11 |
|
New Member
Ivan
Join Date: Sep 2020
Posts: 15
Rep Power: 7 ![]() |
Dear Badwalgurpreet,
I'm trying to validate the same case but I'm having great difficulties. Could you send me your code for taking as a reference, including the mesh? I wouldn't ask you in normal circumstances, but I'm getting crazy trying to running the case and always obtaining incoherent results. I think the problem is probably in the mesh because the rest of the things are quite simple, but I couldn't find it. |
|
|
|
|
|
|
|
|
#12 | |
|
New Member
Big Orange
Join Date: Mar 2016
Posts: 11
Rep Power: 11 ![]() |
Quote:
Have you succeeded in validating the drag and lift coefficients? Best, B.O. |
||
|
|
|
||
|
|
|
#13 | |
|
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 377
Rep Power: 9 ![]() |
here are my two cents for people coming across this thread:
1. there is a tutorial already in openfoam for this case: https://www.openfoam.com/documentati...irfoil-2d.html 2. acording to nasa website: Quote:
you can of course run a simulation with transition model, but then compare your result with the "untripped" airfoil. |
||
|
|
|
||
![]() |
| Tags |
| naca 0012, simplefoam, spalart allamras |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2D NACA 0012 Airfoil Validation Case (NASA) | jp3g12 | OpenFOAM Running, Solving & CFD | 24 | April 23, 2021 15:34 |
| Ffd_control_point_2d | feiyi | SU2 | 4 | September 30, 2019 13:42 |
| yPlus NACA 0012 Airfoil | badwalgurpreet | OpenFOAM Running, Solving & CFD | 7 | March 8, 2019 02:35 |
| High drag for airfoil compared to XFOIL and wind tunnel data | Ry10 | SU2 | 15 | October 30, 2016 18:27 |
| 2D FFD Optimization | RLangtry | SU2 | 2 | August 5, 2014 10:48 |