CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

2D NACA 0012 Airfoil Validation Case (NASA)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 2 Post By FelixL
  • 1 Post By FelixL
  • 1 Post By jp3g12
  • 1 Post By FelixL

Reply
 
LinkBack Thread Tools Display Modes
Old   May 21, 2013, 18:48
Default 2D NACA 0012 Airfoil Validation Case (NASA)
  #1
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
Hello,

I am new to OpenFOAM (I have been using it for about two weeks now) and I decided to start learning the software by trying to simulate a simple case such as a NACA 0012 airfoil at an angle of attack of zero degrees. The specification of the problem can be found here: http://turbmodels.larc.nasa.gov/naca0012_val.html

I used the mesh they provide (I converted it to OpenFOAM format using pointwise).

I have been working for a number of days on this problem without much success. I have attached the residuals and the force coefficients. As it can be seen, the lift is pretty much converged after 6000 iterations. However, I have been experiencing difficulties with drag convergence. In essence, it is going down but it is taking forever to do so! Moreover, the residuals are not that great either (ignore the xlabel, the number of iterations should be 6000).

I am not sure what is wrong with my set up. I stumbled upon this thread Convergence/flow development airfoil and I modified some of the files on the system folder accordingly but it did not help with convergence of results.

I suspect there may be a mistake or something wrong with the settings on the 0 folder. As I said, I am new to OpenFOAM and I am not used to this environment at all. I am using the Spalart-Allmaras. I have attached the system folder and the 0 folder, and perhaps someone can take a look and tell me possible mistakes or things you would do differently. On the nuTilda folder I am using a value that is suggested by Spalart and Rumsey for external aerodynamics calculations based on the velocity that I am using (52 m/s -- Reynolds number = 6,000,000). Spalart and Rumsey suggest a value of nuTilda/nut = 3.

Any help is very much appreciated, especially if someone has attempted the same NASA problem before!

Thank you very much for the help,

JP
Attached Images
File Type: jpg Forces.jpg (26.4 KB, 120 views)
File Type: jpg residuals.jpg (20.6 KB, 101 views)
Attached Files
File Type: gz 0.tar.gz (926 Bytes, 55 views)
File Type: gz system.tar.gz (1.2 KB, 45 views)
jp3g12 is offline   Reply With Quote

Old   May 21, 2013, 23:22
Default
  #2
Member
 
Eric R
Join Date: Jul 2012
Posts: 83
Rep Power: 5
msuaeronautics is on a distinguished road
As you may know, it's generally quite difficult regardless to accurately capture drag in a stable manner. The NASA grids look fine to me- though my eyes aren't quite trained- so I cannot comment on that.

I have run a 0012 sim and noticed that this parameter definitely depends on how you set nut and nuTilda for the SA model. Thus, I also suggest you try other models, out of curiosity, to observe the turbulence init cond. effects. Otherwise, it's worth waiting for.
msuaeronautics is offline   Reply With Quote

Old   May 22, 2013, 04:55
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,207
Rep Power: 18
immortality is on a distinguished road
hi
Send me your case to test it.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 22, 2013, 05:56
Default
  #4
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
I have tried also the SST with similar results (convergence wise in drag and residuals). I am assuming that the grids NASA provides are good; as far as I could see, the mesh looked fine to me, although I don't know if the conversion from pointwise to OpenFOAM can cause any problems.
jp3g12 is offline   Reply With Quote

Old   May 22, 2013, 08:22
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,207
Rep Power: 18
immortality is on a distinguished road
Hi
as I replied you the file is too big to download for me.delete all files in polyMesh folder except to blockMeshDict(they can be created later by blockMesh command),and also all time folders except to 0 folder so that i can run a test.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 3, 2013, 02:54
Default
  #6
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello James,


your boundary conditions seem incorrect. This may cause the errorenous results.

Two critical things:

a.) your simulation is incompressible - therefore using dirichlet bcs (fixedValue) for both velocity and pressure at the same boundary is inconsistent. You should set

u -> fixedValue
p -> zeroGradient

at the inlet and

u -> zeroGradient
p -> fixedValue

at the outlet.

b.) nut is derived from the turbulent quantity nuTida, so setting it to zero at all boundaries may lead to inconsistencies. Especially at the outlet this setting is wrong, because in the wake (which usually is turbulent), nut is clearly non-zero. You can solve this by setting nut to calculated everywhere.


I hope this helps,


Greetings
Felix
immortality and jp3g12 like this.
FelixL is offline   Reply With Quote

Old   June 3, 2013, 06:01
Default
  #7
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
Felix,

Thank you very much for your input. I will try your suggestions and I will let you know the outcome. I have another question: I have observed that the meshes NASA provides have very large AR in the wake of the airfoil. Should I be concerned about this? can this lead to trouble?

Thank you very much for the help,

James
jp3g12 is offline   Reply With Quote

Old   June 3, 2013, 09:26
Default
  #8
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello James,


grid aspect ratio is not really critical in regions, where the flow is highly anisotropic (e.g. boundary layers or the wake). Ideally, the high aspect ratio grid region is aligned to the local streamlines - but this is usually the case in boundary layer meshes.

I recommend you to perform studies on a simple case (flat plate, for example) or have a look in the literature if you want to find out, when high aspect ratios become important.


Greetings
Felix
immortality likes this.
FelixL is offline   Reply With Quote

Old   June 3, 2013, 13:18
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,207
Rep Power: 18
immortality is on a distinguished road
Hi Felix
could you explain a bit that when a flow is anisotropic?
I knew that but I have forgotten the subject.thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 3, 2013, 18:52
Default
  #10
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
Hello Felix,

So I have managed to do a simulation with your suggestions and here are the results (find attached a plot of the Residuals and the Force Coefficients). Looking at the residuals I'd say the solution is pretty much converged as confirmed by the force coefficient plot. However, as it can be seen, the drag value is very very large (about 1.39764) and the lift coefficient is (0.00033) which is higher than what I would expect from a NACA 0012. I am forwarding you a link where I have posted my case (0, constant and system folder) in case you want to take a look at my setup.

https://www.dropbox.com/sh/ylxws1mx6w3ki9f/2mDt6r0CHw

To give you some background as to what I am doing, I am testing the NACA 0012 for a Reynolds number of 6,000,000 and zero AOA using the SA turbulence model. I am using the grid with 2 x 449 x 129 (2 x 257 points on airfoil surface) mesh NASA provides (the middle one). I am using standard values for rho and nut and I calculated my speed based on the Re number. The nutilda value I obtained from a paper from Spalart and Rumsey where they advise using nutilda/nut = 3 to 5. I think I am using in this particular case 5.

On the system folder I am using two different methods for the fvSchemes. First I ran it with the divSchemes as:
Code:
 div(phi,U)      Gauss upwind;
    div(phi,nuTilda) Gauss upwind;
Once the residuals have dropped significantly I switch to
Code:
     div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,nuTilda) Gauss linearUpwind grad(nuTilda);
Can you spot anything fundamentally wrong that would cause the solution to be so far from the values that can be expected?? Can it be that the domain is GIGANTIC?

Any help is appreciated!!! Thank you very much!

James
Attached Images
File Type: jpg Residuals.jpg (23.9 KB, 45 views)
File Type: jpg Forces.jpg (20.5 KB, 34 views)
teo2070 likes this.
jp3g12 is offline   Reply With Quote

Old   June 4, 2013, 07:09
Default
  #11
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello James,


for further comments, can you please provide us with your checkMesh results?


Greetings
Felix
FelixL is offline   Reply With Quote

Old   June 4, 2013, 07:57
Default
  #12
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
Hi Felix,

Here is the checkMesh results... As I said, it complains about high aspect ratio cells. They are mostly located on the wake of the airfoil towards the outlet. Also high aspect ratio cells can be found near the airfoil surface but I suppose that is unavoidable.
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec   : checkMesh
Date   : Jun 04 2013
Time   : 12:51:58
Host   : "lyceum2"
PID    : 1883
Case   : /home/jp3g12/OpenFOAM/jp3g12-2.1.1/run/sa/airfoil-med
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create polyMesh for time = 0
Time = 0
Mesh stats
    points:           461056
    internal points:  0
    faces:            918656
    internal faces:   457600
    cells:            229376
    boundary patches: 4
    point zones:      0
    face zones:       0
    cell zones:       0
Overall number of cells of each type:
    hexahedra:     229376
    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                  
    frontAndBack        458752   461056   ok (non-closed singly connected)  
    inlet               896      1794     ok (non-closed singly connected)  
    outlet              512      1026     ok (non-closed singly connected)  
    wall                896      1792     ok (non-closed singly connected)  
Checking geometry...
    Overall domain bounding box (-484.457 -1 -507.807) (501 0 507.807)
    Mesh (non-empty, non-wedge) directions (1 0 1)
    Mesh (non-empty) directions (1 0 1)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-1.61899e-20 -4.24013e-16 -2.5902e-19) OK.
 ***High aspect ratio cells found, Max aspect ratio: 3.17847e+07, number of cells 29164
  <<Writing 29164 cells with high aspect ratio to set highAspectRatioCells
    Minumum face area = 9.5796e-11. Maximum face area = 843.777.  Face area magnitudes OK.
    Min volume = 9.5796e-11. Max volume = 843.777.  Total volume = 875558.  Cell volumes OK.
    Mesh non-orthogonality Max: 19.7377 average: 1.63527
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.201756 OK.
    Coupled point location match (average 0) OK.
Failed 1 mesh checks.
End
Thanks for the Help!!
jp3g12 is offline   Reply With Quote

Old   June 4, 2013, 14:21
Default
  #13
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello James,


your boundary Definition is wrong. Your mesh is not stitched together in the wake behind the airfoil. You have some kind of long flat plate with a tiny airfoil at the leading edge. I found out about this, because the boundary file says 896 faces for patch wall instead of 256, as the nada description of the mesh suggests.

Please correct this and everything should be fine now, I double checked everything else.

A hint for the future: always take a look at the mesh and boundaries using paraFoam before running a case. In 50% of all problematic cases its the mesh or boundary definition, in 30% its the boundary conditions, 15% numerical settings and 5% its OpenFOAM


Greetings
Felix
jp3g12 likes this.
FelixL is offline   Reply With Quote

Old   June 4, 2013, 15:37
Default
  #14
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
Hi Felix,

OH DAMN!!! Yep you are very much correct . I just inspected the mesh in pointwise (everything seemed to be Ok in paraview) and it looks like the airfoil has a flat plate coming out of the trailing edge and it extends all the way to the outlet.

Even though this question is a bit off topic, how the heck am I supposed to define the boundary condition at the airfoil if it is attached to this flat plate?? It appears as though the airfoil and that "flat plate extension" are just one part so that whenever you select the airfoil to prescribe the wall BC you are also selecting the flat plate. Clearly setting wall BC does not work. how did you do it when you attempted this problem?

Nice catch!!! Cheers,

James
jp3g12 is offline   Reply With Quote

Old   June 5, 2013, 03:56
Default
  #15
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello James,


you can see you individual boundary patches in paraView by selecting and deselecting them in the patch-tree (don't know how it's called right now) in paraView. Then you should see the mishap with the boundary patch definition.

As for resolving the problem: that's up to you or someone, who is familiar with pointwise. I used the OF Tools plot3dToFoam and autoPatch to convert the NASA meshes, but the procedure is difficult to explain. Just play with the OF provided tools and you'll find your own procedure. Since you are a beginner with OF, it doesn't hurt to get to know the mesh utilities.


Greetings
Felix
FelixL is offline   Reply With Quote

Old   June 5, 2013, 05:37
Default
  #16
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
Thanks a lot for the help Felix!!!

I think I have figured out how to isolate the airfoil geometry from the flat plate extension in pointwise (crossing fingers)... I am running a simulation right now, and I will post the outcomes of that once I am done!! Hopefully the issues are resolved now !

Cheers,

James
jp3g12 is offline   Reply With Quote

Old   June 5, 2013, 10:06
Default
  #17
Member
 
JP
Join Date: May 2013
Location: United Kingdom
Posts: 31
Rep Power: 4
jp3g12 is on a distinguished road
Felix,

All the changes you suggested WORKED perfectly (at least for the zero angle of attack case)!!! Now I get values for the lift and drag that are very close to what NASA gives!!!

Thank you very much for taking the time to help me out! Now, on to attempt the same problem with different turbulence models !!

Thanks a lot

James
jp3g12 is offline   Reply With Quote

Old   September 29, 2013, 17:25
Default
  #18
Member
 
Join Date: Sep 2013
Posts: 38
Rep Power: 4
Combas is on a distinguished road
Hello James,

I am also trying to validate OpenFoam on an airfoil, and my first results are not very good on the drag coefficient.

Since you say that you got good results with the NACA0012, would it be possible that:
- you give the Cd you get at AoA = 0
- you share the input files of your case (folders "0", "system" and "constant")

Thank you in advance for your help!
Laurent
Combas is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with a simple 2D case: flow over an airfoil samiam1000 OpenFOAM 4 April 30, 2013 12:13
Validation case for rhoSimplecFoam hannes OpenFOAM Running, Solving & CFD 3 April 1, 2013 07:47
Problem with a simple 2D case: flow over an airfoil samiam1000 SU2 1 March 23, 2013 23:58
Turbulent Flat Plate Validation Case Jonas Larsson Main CFD Forum 0 April 2, 2004 10:25
flow over naca 0012 Frederic Felten Main CFD Forum 6 May 23, 2001 11:45


All times are GMT -4. The time now is 20:58.