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

Airfoil 2D cfd simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2015, 16:59
Default Airfoil 2D cfd simulation
  #1
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
Hi everyone,

I'm working on an exam project consisting on find aerodinamics coefficients and pressure trend around a 2D airfoil using gambit and openfoam.

almost every parameter is given by the professor and I should use the openfoam 2d incompressible airfoil tutorial as a base for the simulation, so the only thing I can really tweak is the mesh in gambit....

my airfoil is a NACA 2415 (chord=4,875m, -2°angle) and other parameters are:

Re= 6 x 10^6

freestreamvelocity=18 m/s

cinematic viscosity= 1.5 x 10^-5

nut= 1.2 and nuTilda= 2.2 (both calculated with Spalart equations)

the turbulent model is Spalart-Almaras and wall function is nutUSpaldingWallFunction

talking about the mesh, I had to put the airfoil in a domain sizing (given values) 5xchord from airfoil on front,top and bottom sides, while 10xchord on the backside

I used a boundary layer around the airfoil and the wake and triangle pavè outside it......

talking about first cell size, we were asked to keep y+ in a range from 30 to 300, that correspond to a first cell height from 1mm to 10mm....

so i cretated the boundary layer with a 2mm first size and a 1.1 grow factor


then i extracted the mesh and put it on openfoam, it extruded the 2d mesh with a 2m cell in z direction....

after this I changed all the tutorial parameters with my initial conditions, just replacing values


I started the simulation but here are the problems:

1)aerodinamic coefficients differ from tabulate ( Theory of
Wing Sections) values, Cl seems preety accurate (-0.018) but Cd is extremely inaccurate, should be +0.01 and I get 0.045.....why this?


2)talking about the referement Area to calculate the coefficients, I put Aref = 2 x chord cause when I try to chekMesh, it gives that domain in z goes from -1 to +1.......am I doing this right?

3)my simulation doesn't reach convergence, I have a tollerance of E^-5 but the minimum I could reach with initial residuals is E^-3, why this?


I think that my problems lie on the mesh (given the fact that al conditions have been provided by the professor)......so I would like to know some tips such as:

what is a good interval size for the airfoil meshing?

what is a good far field cell size? and what a good growing factor?

thanks

Last edited by Cocorito90; October 25, 2015 at 18:00.
Cocorito90 is offline   Reply With Quote

Old   October 25, 2015, 17:15
Default
  #2
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
here is my mesh in gambit:

http://imgur.com/a/AkyMY

here the checkMeshlog:
Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.3.1-bcfaaa7b8660
Exec : checkMesh
Date : Oct 26 2015
Time : 01:29:30
Host : "CFDbuntu"
PID : 21874
Case : /home/cfdbuntu/OpenFOAM/cfdbuntu-2.3.1/run/airfoil/airFoil2D
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 195606
internal points: 0
faces: 564051
internal faces: 252149
cells: 155416
faces per cell: 5.25171
boundary patches: 4
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 39120
prisms: 116296
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
outlet 219 440 ok (non-closed singly connected)
inlet 651 1304 ok (non-closed singly connected)
walls 200 400 ok (non-closed singly connected)
frontAndBackPlanes 310832 195606 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-24.375 -24.375 -0.999959) (48.75 24.375 0.999959)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (6.01645e-18 -2.86033e-17 -3.63655e-21) OK.
Max cell openness = 6.45774e-16 OK.
Max aspect ratio = 25.2868 OK.
Minimum face area = 9.77088e-05. Maximum face area = 0.798075. Face area magnitudes OK.
Min volume = 0.00019541. Max volume = 0.112467. Total volume = 7124.54. Cell volumes OK.
Mesh non-orthogonality Max: 24.9031 average: 4.60433
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.566838 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End
here fVsolution:

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / 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;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}

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;
}
}


// ************************************************** *********************** //
here fVschemes:

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / 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*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}


// ************************************************** *********************** //

Last edited by Cocorito90; October 25, 2015 at 19:36.
Cocorito90 is offline   Reply With Quote

Old   October 25, 2015, 19:41
Default
  #3
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
here initial conditions:

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / 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.2;

boundaryField
{
outlet
{
type freestream;
freestreamValue uniform 1.2;
value uniform 1.2;
}
inlet
{
type freestream;
freestreamValue uniform 1.2;
value uniform 1.2;
}
walls
{
type nutUSpaldingWallFunction;
value uniform 0;
}
frontAndBackPlanes
{
type empty;
}
}


// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / 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 2.2;

boundaryField
{
outlet
{
type freestream;
freestreamValue uniform 2.2;
value uniform 2.2;
}
inlet
{
type freestream;
freestreamValue uniform 2.2;
value uniform 2.2;
}
walls
{
type fixedValue;
value uniform 0;
}
frontAndBackPlanes
{
type empty;
}
}


// ************************************************** *********************** //
Quote:
--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / 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
{
outlet
{
type freestreamPressure;
}
inlet
{
type freestreamPressure;
}
walls
{
type zeroGradient;
}
frontAndBackPlanes
{
type empty;
}
}


// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / 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 (18.45 -0.64 0);

boundaryField
{
outlet
{
type freestream;
freestreamValue uniform (18.45 -0.64 0);
value uniform (18.45 -0.64 0);
}
inlet
{
type freestream;
freestreamValue uniform (18.45 -0.64 0);
value uniform (18.45 -0.64 0);
}
walls
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBackPlanes
{
type empty;
}
}


// ************************************************** *********************** //
Cocorito90 is offline   Reply With Quote

Old   October 26, 2015, 05:26
Default
  #4
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
I solved the drag problem by myself , I put wrong formulas for nut e nuTilda, now I get much more correct drag coefficient...

anyway, I still have 2 problems:

1) with new nut e nuTilda I now get a lift coefficient that is still close to zero, but positive....comparing with the data graph I can't understand if it should be positive or negative (-2°), so could this be still corrrect?

2) as I've previously stated, after 500 iterations my residuals don't reach convergence, even if coefficients don't change by much in the last part of the simulation, could this be normal?

my residuals plot in 500 iterations: http://imgur.com/0SYY9KY

Last edited by Cocorito90; October 26, 2015 at 06:44.
Cocorito90 is offline   Reply With Quote

Old   October 27, 2015, 05:33
Default
  #5
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

500 iterations is not a lot, just continue running for more iterations, the plot looks ok up to this point. Just try and see what happens. It may be that they will flatten, or they will continue to get to a very low level. A couple of 1000 iterations is nothing unusual.

Regards,
Tom
tomf is offline   Reply With Quote

Old   October 27, 2015, 08:11
Default
  #6
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
ok now I have another problem, I have found the graphs for NACA 2415 on the website http://airfoiltools.com/ and it says that at -2 degrees I should get Cl=0.0256 (this is different from the graph I've shown you before, don't know why)........anyway, now I've made a rougher mesh and it converges in about 700 iterations, bu there' s a weird thing happening:

if I widen the mesh in the boundary layer on the trail (in x direction) Cl grows susbstantially, and with an interval size of about 200, I can get Cl=0.0255....

but this seems like a trick for me, why is this happening? what phisical explanation for this?
Cocorito90 is offline   Reply With Quote

Old   October 27, 2015, 09:04
Default
  #7
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I do not know what you mean by this:

Quote:
Originally Posted by Cocorito90 View Post
if I widen the mesh in the boundary layer on the trail
I think you mean coarser resolution in chord direction?

Or this:
Quote:
Originally Posted by Cocorito90 View Post
Cl grows susbstantially, and with an interval size of about 200
What is "substantially" and what is an interval size of about 200? What units, what is your chord, what are you comparing?

If you are changing the resolution in chord direction I think you may be altering the separation point (if any) near the trailing edge, or modifying the discrete geometry with respect to the actual geometry (maybe even changing the camber line).

I guess pictures would help a lot...
tomf is offline   Reply With Quote

Old   October 27, 2015, 09:35
Default
  #8
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
this is my mesh and what I mean for 200 interval size: http://imgur.com/a/pZtN9

my chord is 4,875m (4875 in gambit size)

increasing that 200 to (let's say) 250 make the Cl pass from 0.0255 to 0.0285....and reducing it to (let's say) 100 make the Cl go to 0.014 or something like that....

why this?
Cocorito90 is offline   Reply With Quote

Old   October 27, 2015, 10:19
Default
  #9
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
I would suggest to look at the pressure distribution on the airfoil as a function of your interval size. It seems like the pressure distribution is very sensitive to this and it should not be like that. You need to find the resolution you need where a further refinement does not significantly change the result. This is called a mesh sensitivity study, which you need to perform to find a grid independent solution. If the terms in bold are not clear, please look for some more literature on them. The area where you are changing the resolution is the pressure recovery area in the wake of your airfoil. It is very important in the pressure distribution on the airfoil and by that the lift and drag. This is one of the difficulties of CFD I would say.

Regards,
Tom
tomf is offline   Reply With Quote

Old   October 27, 2015, 12:03
Default
  #10
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
I found that refining the mesh (interval size) on the boundary layer trail stabilize the Cl around 0.0034, but according to this graph I should get small and negative number....
Cocorito90 is offline   Reply With Quote

Old   October 27, 2015, 12:30
Default
  #11
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Well small and negative or small and positive is just a small absolute error. It may well be within the experimental uncertainty (maybe they actually measured at -2.1 degree) so I would say that your result is rather good. Best option would be to take a couple of different angles of attack and try to match the slope of the lift curve. I would never expect to be spot-on to a single point of an experiment and around zero small absolute errors are big relative errors, but I would not be too worried about that, since there are always small discrepancies that are hard to account for. Also try to compare the pressure coefficient on the airfoil surfaces with the experiment. If they are similar I think you would have a good simulation result. In my opinion it makes more sense to compare this than a single point on a graph. Since the pressure distribution should tell you if you have (approximately) the correct value because you solved correctly the flow around the airfoil or if you happen to find two errors that cancel each other.
tomf is offline   Reply With Quote

Old   October 27, 2015, 15:04
Default
  #12
New Member
 
Filippo
Join Date: Oct 2015
Posts: 9
Rep Power: 10
Cocorito90 is on a distinguished road
I'm really a retarded, I could've tried before with another angle......tried +2°, it should be 0.4, mine is 0.42
Cocorito90 is offline   Reply With Quote

Old   December 8, 2016, 03:21
Default Naca2415
  #13
New Member
 
H salem
Join Date: Nov 2016
Posts: 4
Rep Power: 9
hsalem is on a distinguished road
Hello Dear Foamers,
I am trying to simulate the NACA2415 at 0 angle of attack. I checked my boundary conditions and Mesh several time and the solution will converge, but I can not take the right Cl, Cd from post processing. I am using the openfoam recommendation for calculating the Cl from its user guide but the Cl will be two times the real one. It should be 0.2 but my results shows the 0.4. what should I do????? I am really exhausted. the whole my setup and BC's are attached here. please let me know the right answer.
Attached Files
File Type: gz Naca2415SAnasa.tar.gz (58.7 KB, 15 views)
hsalem is offline   Reply With Quote

Old   December 12, 2016, 17:23
Default
  #14
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9
Joshua14 is on a distinguished road
Quote:
Originally Posted by hsalem View Post
Hello Dear Foamers,
I am trying to simulate the NACA2415 at 0 angle of attack. I checked my boundary conditions and Mesh several time and the solution will converge, but I can not take the right Cl, Cd from post processing. I am using the openfoam recommendation for calculating the Cl from its user guide but the Cl will be two times the real one. It should be 0.2 but my results shows the 0.4. what should I do????? I am really exhausted. the whole my setup and BC's are attached here. please let me know the right answer.
I don't see anything immediately off from your BC's and setup. Check and make sure your geometry length/area in "forceCoeffsIncompressible" are correct with your actual airfoil geometry.

Hope this helps!

Joshua
Joshua14 is offline   Reply With Quote

Old   December 19, 2016, 03:43
Smile polt cl ,cd
  #15
New Member
 
Join Date: Dec 2016
Posts: 1
Rep Power: 0
sajad69 is on a distinguished road
hi.how to draw (cl,cd -alpha )plot for airfoil by fluent?
sajad69 is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD Design...The CFD Future John C. Chien Main CFD Forum 20 November 19, 2015 23:40
Simulation of 0021 airfoil at 120,000 Reynolds number AUCH FLUENT 0 September 24, 2013 23:05
flow over an airfoil 3d ( Geometry on icem cfd ) dfmona Main CFD Forum 0 April 13, 2010 23:32
Airfoil simulation using moving wall Alejandro Fidelity CFD 9 November 4, 2008 02:00
Compressible transonic airfoil RAE2822 simulation Stefano Siemens 9 June 21, 2006 10:47


All times are GMT -4. The time now is 21:40.