CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   simpleFOAM NACA0012 (α=8°) cL, cD not matching published data (https://www.cfd-online.com/Forums/openfoam-solving/99177-simplefoam-naca0012-8-cl-cd-not-matching-published-data.html)

jferrari March 27, 2012 20:48

simpleFOAM NACA0012 (α=8°) cL, cD not matching published data
 
I'm looking to model a NACA0012 airfoil using simpleFOAM. Abbot and Von Doenhoff (p462) report a lift coefficient of about 0.9 and a drag coefficient of about 0.01. I am calculating a lift coefficient of 0.710 and a drag coefficient of 0.0242 - values that are significantly off, especially the drag. I get the same results when I double the cells in the x and y directions. My y+ on the finer of the two meshes is about 6.5. I'm not really sure what to look for to debug this - can anyone point me in the right direction?

kid March 28, 2012 01:41

Hi,
Which turbulence model are you using?
And what are the values of epslion and k you have used if using RANs?

NOTE: pasting the patch of epslion and k would give a clear idea.

Regards
CFDkid

jferrari March 28, 2012 11:20

Thanks for the reply CFDkid. I'm using the Spalart-Allmaras turbulence model, so I'm specifying boundary conditions for nuTilda and nut.


My nut boundary conditions are:
boundaryField
{
frontAndBack
{
type empty;
}

topAndBottom
{
type advective;
}

left
{
type inletOutlet;
inletValue uniform 1e-06;
}

right
{
type advective;
}

airfoil
{
type nutUSpaldingWallFunction;
value uniform 1e-10;
}
}

nuTilda:

boundaryField
{
frontAndBack
{
type empty;
}

topAndBottom
{
type advective;
}

left
{
type inletOutlet;
inletValue uniform 3e-06;
}

right
{
type advective;
}

airfoil
{
type nutUSpaldingWallFunction;
value uniform 1e-10;
}
}

pressure:

boundaryField
{
frontAndBack
{
type empty;
}

topAndBottom
{
type outletInlet;
outletValue uniform 0;
}

left
{
type outletInlet;
outletValue uniform 0;
}

right
{
type outletInlet;
outletValue uniform 0;
}

airfoil
{
type zeroGradient;
}
}

velocity:

boundaryField
{
topAndBottom
{
type inletOutlet;
inletValue uniform (29.7081 4.1751 0);
}

frontAndBack
{
type empty;
}

left
{
type inletOutlet;
inletValue uniform (29.7081 4.1751 0);
}

right
{
type inletOutlet;
inletValue uniform (29.7081 4.1751 0);
}

airfoil
{
type fixedValue;
value uniform (0 0 0);
}
}

jferrari March 29, 2012 12:45

http://www.cfd-online.com/Forums/ope...-get-help.html


Just saw this thread. When I get home this evening I'll post everything to do with my case.

jferrari March 29, 2012 16:32

CheckMesh output: http://dl.dropbox.com/u/62138912/checkMeshLog
fvSchemes: http://dl.dropbox.com/u/62138912/fvSchemes
fvSolution: http://dl.dropbox.com/u/62138912/fvSolution


Complete mesh:
http://dl.dropbox.com/u/62138912/mesh00.png

Zoomed in some:
http://dl.dropbox.com/u/62138912/mesh01.png

I'm a bit concerned about this - the gridlines aren't really normal to the surface and I'm getting cells with very large aspect ratios near the surface.
http://dl.dropbox.com/u/62138912/mesh04.png


Thanks again.

jferrari March 30, 2012 08:18

Long story short - I was looking at a NACA 0020 airfoil and comparing the results to those published for a NACA 0012 airfoil. I'm very embarassed by this. My advisor made me aware of this yesterday evening. I will rerun with the correct geometry this afternoon.

kid April 2, 2012 00:36

Hello,
Can you share the NACA0012 paper with me. I was doing NACA4412, the one validation study that comes with Fluent.
https://confluence.cornell.edu/displ...ver+an+Airfoil

But it would be better doing NACA0012.
Please help regarding the resources to carry out this study.

Regards
CFDkid

jferrari April 2, 2012 08:23

Quote:

Can you share the NACA0012 paper with me
I'm comparing to Abbot and Von Doenhoff's Theory of Wing Sections (page 462-463, reproduced below).

http://www.boatdesign.net/forums/att...-naca-0012.jpg


After fixing my geometry (NACA 0012 vs 0020), I reran under the same conditions. I'm calculating lift that's slightly higher, but my drag is still double what it should be. I may still have something fishy going on with my mesh - I'm using a rounded trailing edge who's radius looks to be too large, so my trailing edge isn't tangent to the rest of the airfoil. I would expect this to cause my drag to increase, but would this make it double what it should be?

mihaipruna April 2, 2012 21:00

I have a similar problem, I am trying to analyze the NACA 5012 airfoil and getting a Cl of 0.52 at 0 degrees AOA and 15 at 5 degrees AOA! I am hoping that with the low airspeed we are still in the laminar regime.

Here are my forcecoeffs


Airfoil 5 degree:

forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches (
"vol1face1"
"vol1face2"
"vol1face3"
"vol1face4"
);
pName p;
UName U;
rhoName rhoInf; // Indicates incompressible
log true;
rhoInf 1; // Redundant for incompressible
liftDir (-0.087 0.996 0);
dragDir (0.996 0.087 0);
CofR (0.72 0 0); // Axle midpoint on ground
pitchAxis (0 0 1);
magUInf 20.0;
lRef 1.0;
Aref 10.0;
}


0 degrees:

forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches (
"vol1face1"
"vol1face2"
"vol1face3"
"vol1face4"
);
pName p;
UName U;
rhoName rhoInf; // Indicates incompressible
log true;
rhoInf 1; // Redundant for incompressible
liftDir (0 1 0);
dragDir (1 0 0);
CofR (0.72 0 0); // Axle midpoint on ground
pitchAxis (0 0 1);
magUInf 20.0;
lRef 1.00;
Aref 10.0;
}

jferrari April 2, 2012 21:30

Mikhail, the first thing to catch my attention is that you are looking at a 5012 airfoil. This could just be a typo, but if your point of maximum camber is at your leading edge that would be an awkward airfoil. What kinematic viscosity are you using? I see you have a reference length of 1 and reference area of 10. From this is see that your chord is 1 m and your span (even if this is 2D) is 10 m. Is this the case in your geometry? If not this could cause your results to off by an order of magnitude. Also, one of your notes States that the density is not needed for incompressible flow - I'm not sure if this is true because to get the lift and drag coefficients you would need to get the force then divide by the area (like I mentioned earlier) and the dynamic pressure (where density shows up).


Forgive any grammatical errors, I'm typing on my cell phone so it's tough to gather my thoughts properly. Also forgive if I'm flat out wrong, I'm still very new to openFOAM.

kid April 3, 2012 00:05

Jferrari,
Thank you for sharing those plots. I came across this paper which seems to be good,
"Evaluation of the turbulence models for the simulation of the flow over a National Advisory Committee for Aeronautics (NACA) 0012 airfoil "
Douvi C. Eleni*, Tsavalos I. Athanasios and Margaris P. Dionissios

Would follow this to run a case. Also, i will look at your plots and get back with some results if possible.

Regards,
CFDkid

vkrastev April 3, 2012 07:48

If you are interested in NACA0012 validation, just take a look at this:

http://turbmodels.larc.nasa.gov/naca0012_val.html

There you can find also some indications for useful experimental databases.

Regards

V.

kid April 3, 2012 07:59

True, had gone to that site before. thanks even the paper we discussed have Aboot's experimental data. But yes the link of naca has around 4 to 5 experimental data, which is good.

Can you help me on how to calulate Lift Force and Drag Force . Which i suppose
could be implemented directly in OpenFOAM, but i do not no the implementation. How to
go about it?

Regards
CFDkid

vkrastev April 3, 2012 08:24

Quote:

Originally Posted by kid (Post 352887)
True, had gone to that site before. thanks even the paper we discussed have Aboot's experimental data. But yes the link of naca has around 4 to 5 experimental data, which is good.

Can you help me on how to calulate Lift Force and Drag Force . Which i suppose
could be implemented directly in OpenFOAM, but i do not no the implementation. How to
go about it?

Regards
CFDkid

The calculation of aerodynamic forces or force coefficients in OF is quite straightforward. You just have to add at the end of your controlDict file something like this:

functions
{
totalDrag
{
// rhoInf - reference density
// CofR - Centre of rotation
// dragDir - Direction of drag coefficient
// liftDir - Direction of lift coefficient
// pitchAxis - Pitching moment axis
// magUinf - free stream velocity magnitude
// lRef - reference length
// Aref - reference area
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (nose body slant back);
rhoName rhoInf;
rhoInf 1.184;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 1);
magUInf 40;
lRef 0.288;
Aref 0.0561;

outputControl timeStep;
outputInterval 50;
}
}

The above syntax allows the code to activate force coefficients calculation at run time and to print the values every 50 steps. The same syntax applies for the forces, but in that case the type should be forces instead of forceCoeffs. Just some additional details:

1) This EXACT syntax applies to the OF-1.7.x family: there could be some small formal differences for the 2.x.x releases which I'm not aware of;

2) For incompressible runs, the rhoInf value is used for absolute forces calculation (not for force coefficients), while for compressible runs you have to use the actual rho value (rhoName becomes rho)

3) For an airfoil, lref is the chord length, while Aref should be the actual spanwise section (remember that in OF 2D grids are physically 3D), which is the chord length multiplied by the grid width.

Hope this helps

V.

mihaipruna April 3, 2012 09:29

Quote:

Originally Posted by jferrari (Post 352803)
Mikhail, the first thing to catch my attention is that you are looking at a 5012 airfoil. T

Hi Joe, I used the example here:
http://www.dur.ac.uk/g.l.ingram/down...ofoilGuide.pdf

I was assuming that since the static pressure is set to 0 and the flow is incompressible, the value of the density doesn't matter as it factors out.

Indeed,I have a 10m wing span and 1 m chord.

Thanks for the feedback.

I am mainly concerned about the discrepancy that a 5 degrees angle of attack seems to cause in Cl.

vkrastev April 3, 2012 09:46

Quote:

Originally Posted by mihaipruna (Post 352905)
I was assuming that since the static pressure is set to 0 and the flow is incompressible, the value of the density doesn't matter as it factors out.
.

It doesn't matter for force coefficients (adimensional), as OF solves incompressible flows directly for p/rho, but it do matters if you need forces (dimensional).

Regards

V.

mihaipruna April 3, 2012 10:20

Quote:

Originally Posted by vkrastev (Post 352908)
It doesn't matter for force coefficients (adimensional), as OF solves incompressible flows directly for p/rho, but it do matters if you need forces (dimensional).

Regards

V.

That is understood, and I'm only looking for a reasonably accurate Cl and Cd.

jferrari April 3, 2012 17:15

Mihai, you mentioned that you were looking to stay in the laminar flow regime, but you're posting in this thread about simpleFoam. This is a turbulent solver. The laminar solver is icoFoam. Which solver are you using? What Reynolds number are you using? If you're using simpleFoam, what turbulence model are you using?

kid April 4, 2012 00:35

Hi jferrari,

SimpleFOAM is turbulent solver, but we can use it for laminar flow calculation with little modification. One needs to edit RASProperties file and switch off turbulence (control/RASProperties).

icoFoam: Transient solver for incompressible, laminar flow of Newtonian fluids.( PISO algorithm)
simpleFoam: Steady-state solver
for incompressible, turbulent flow. (SIMPLE algorithm).

Hope the difference is clear now.

regards,
CFDkid.

kid April 4, 2012 00:38

Vesselin Krastev,
Thanks, will share results after i am done.

regards
CFDkid

Ralph M April 4, 2012 03:33

Maybe you guys tried to switch from SA turbulence modelling to something like K-Omega or K-epsilon? If all turbulence models give the same answer your source of problem has to be somewhere else :)

jferrari April 4, 2012 05:44

Quote:

SimpleFOAM is turbulent solver, but we can use it for laminar flow calculation with little modification. One needs to edit RASProperties file and switch off turbulence (control/RASProperties).
Thanks for pointing this out.

mihaipruna April 4, 2012 09:13

Quote:

Originally Posted by jferrari (Post 352999)
Mihai, you mentioned that you were looking to stay in the laminar flow regime, but you're posting in this thread about simpleFoam. This is a turbulent solver. The laminar solver is icoFoam. Which solver are you using? What Reynolds number are you using? If you're using simpleFoam, what turbulence model are you using?

Joe, I need to use simpleFoam but I would like to compare my results with,preferably, published laminar airfoil data for validation.
Alternatively, I can use xfoil to get more realistic turbulent data.

Regardless, my numbers with OF are not even in the ballpark, and was hoping I made some silly mistake easily spotted by the sharp eyes here. Looks like the Cl is off by a factor of 10 for the 5 degree AOA study!

jferrari April 4, 2012 09:39

Quote:

Maybe you guys tried to switch from SA turbulence modelling to something like K-Omega or K-epsilon? If all turbulence models give the same answer your source of problem has to be somewhere else
I hadn't thought of this. I'll try a different turbulence model and compare results. I have a SA run going on now.... I assume it should be to 20,000 iterations by the time I get out of work, it was at about 13,000 when I checked it before work this morning. After that finishes I'll try k-epsilon and compare with SA.

jferrari April 4, 2012 09:46

Quote:

Regardless, my numbers with OF are not even in the ballpark, and was hoping I made some silly mistake easily spotted by the sharp eyes here. Looks like the Cl is off by a factor of 10 for the 5 degree AOA study!
If you're off by a factor of 10, based on the only information you've provided, I think your span is the issue.

mihaipruna April 4, 2012 13:10

that would be nice, but if you look at the two files, the L and A ref are the same.

sail April 4, 2012 15:10

---edit: i got confused by the many type of foils this thread is about---

jferrari April 4, 2012 18:51

So I sort of had some success. I'm not calculating a lift coefficient of 0.9226 and a drag coefficient of 0.0089670 - agreeing very well with Abbot and Von Doenhoff. However, my nuTilda field looks kind of strange - check it out:

http://dl.dropbox.com/u/62138912/nuTilda.png

There are two patches meeting where all that turbulence has gathered. On the right patch nuTilda has a zeroGradient boundary condition and nut has a calculated boundary condition with value set to $internalField. On the upper patch nuTilda has a fixed value of zero and nut has a nutUSpaldingWallFunction boundary condition.

Does anybody know what's going on with nuTilda and nut here?

Ivanet April 5, 2012 10:43

Hi JFerrari,
are you doing the mesh with blockMesh? You could use splines instead of straight edges when defining your blocks . This would allow you to have a better control on the orthogonality of your cells (specially in the boundary layer).
By the way, why do you use an O-Grid for this profile? Usually C-Grids are better for sharp trailing edges.
Greetings
Ivan

jferrari April 5, 2012 11:38

Hi Ivan,

I am meshing with blockMesh - though I hadn't thought using splines to make the block boundaries - I'll try that. The reason I'm using an O-grid is because ultimately I want to dynamically pitch the airfoil to study dynamic stall. I figure that my first step is to get accurate results for the steady case - then rotate the O-grid for the unsteady case.

Or at least that's my plan... Is this the best way to go about pitching the airfoil?

Ivanet April 5, 2012 12:14

Hi Joe,
Interesting, actually I am trying to do exactly the same like you: dynamic stall studies on a pitching blade. My plan is also getting first decent results on a static case and then go for the rotating case.
The alternative to the O-Grid would be a C-Grid embedded in an O-Grid.
Greetings
Ivan

jferrari April 8, 2012 12:30

Quote:

Hi Joe,
Interesting, actually I am trying to do exactly the same like you: dynamic stall studies on a pitching blade. My plan is also getting first decent results on a static case and then go for the rotating case.
The alternative to the O-Grid would be a C-Grid embedded in an O-Grid.
Greetings
Ivan
Interesting to find someone else working on exactly this, Ivan.

It's been a busy Easter weekend - I haven't gotten anything done since I last posted.

Currently I'm revisiting my mesh, trying to make it better.

ehsan April 17, 2012 04:39

Force coefficient
 
Hello

Once we try to calculate lift and drag coefficient with force command inside the controlDict of simplefoam, I encountered the error that force.c could not find rho. I like to know how I could get forces for incompressible flow solutions (done with simplefoam).

Thanks

Ivanet April 17, 2012 05:09

Quote:

Originally Posted by ehsan (Post 355079)
Hello

Once we try to calculate lift and drag coefficient with force command inside the controlDict of simplefoam, I encountered the error that force.c could not find rho. I like to know how I could get forces for incompressible flow solutions (done with simplefoam).

Thanks

Try it again including this in your controlDict
rhoName rhoInf;
rhoInf 1.225; //density of your fluid

Good luck
Ivan

ehsan April 17, 2012 08:53

Thanks a lot

jferrari April 17, 2012 09:26

A friend of mine has provided me with a beautiful structured mesh of a NACA 0012 airfoil in an O-grid I'll post a link to it when I'm home and have access to my files). He built it in gridgen and converted it to openfoam format, which created all boundaries as a single patch. I'm currently working to get this mesh more usable - using autoPatch and/or createPatch.


I just wanted to keep this thread updated for anyone following.

Farshad585 April 17, 2012 17:53

lift & drag coefficients
 
Hi
I'm a new user in OpenFOAM. I've run NACA0012 by using simpleFoam. I used a common file to compute lift and drag coefficients. but my lift and drag coefficients are too low. I think it is related to Aref & lref in computing the coefficients. could anyone tell me what should i do for Aref & lref?
thanks alot

jferrari April 17, 2012 19:53

Farshad, not sure what you mean by common file. You should be using the forces library that's already in OpenFOAM. If you think that the problem is with lref or Aref, you can compare those values to those that you have in your geometry.

wangqiangele April 18, 2012 00:52

Dear vkrastev,

My model is a 3D twisted and tapered blade. How could I get the Cl, Cd at specific section?


Best regards,
Qiang Wang

Ivanet April 18, 2012 06:58

Quote:

Originally Posted by wangqiangele (Post 355283)
Dear vkrastev,

My model is a 3D twisted and tapered blade. How could I get the Cl, Cd at specific section?


Best regards,
Qiang Wang

You should do a patch for the specific section you are interested in and then use the forces lib.
Greets
Ivan


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