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

NACA0012 validation with OF v4 and OF v2006

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2021, 11:28
Default NACA0012 validation with OF v4 and OF v2006
  #1
New Member
 
Ivan
Join Date: Sep 2020
Posts: 15
Rep Power: 6
Ivangzp is on a distinguished road
Hello,

I’m trying to validate the case NACA0012, incompressible at hight Reynolds number (6 Millions) at different angles of attacks.
I will focus on the case of 3 degrees, although the kind of errors that I’m getting are much the same for the rest (i.e. 6º,9º,12º).

I got the validation with OpenFoamversion v4.
Turbulence model: Spalart Allmaras
nu = 1.6666666666666668e-07;
U = 1m/s
Re = 6*10^6

Real Value for lift coefficient
Cl(3º) = 0,32341
Value obtained
Cl(3º) version OF4 = 0,32863

I want to insist on it, it happen the same for the rest of de AoA, the error is very short when I use OF4. So I can conclude I validate it with that OF version.

I tried to do the same with other version of OpenFOAM (OF v2006), and the values are deviated around 10%.

Real Value for lift coefficient
Cl(3º) = 0,32341
Value obtained
Cl(3º) version v2006 = 0,29336

As you can see, between both calculated, Cl(3º) = 0,32863 and Cl(3º) = 0,29336, there is an "appreciable" difference.

Same mesh, FvSchemes, FvControlDict, FvSolution, Initial Conditions, I mean every file is the same. (Find attached a picture of that mesh. Mesh1).

I tried other mesh (Find attached a picture of that mesh. Mesh2), probably with better quality (I tried dozens of them, but this is a good one), and the issue persists.
In that case I had to change the boundary conditions (Change from OGrid-Mesh to CGrid-Mesh), but phisically are exactly the same problem.
Real Value for lift coefficient
Cl(3º) = 0,32341
Value obtained
Cl(3º) version 4 = 0,32889
Cl(3º) version v2006 = 0,29693


I have been a long time with that problem and I couldn’t find a solution. I’m not sure if it is merely a difference between both version or whether I can change something to get closer results.

Each mesh has different boundary conditions and the results are pretty close, so the problem is not in the mesh or in the BC. The problem should be in FvSolution and FvSchemes which are identicall in both cases. For that reason, I copy it there here:

--------------------------------------------------------------------------------------
FvScheme:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}


snGradSchemes{
default corrected;
}


laplacianSchemes{
default Gauss linear corrected;
}


fluxRequired{
p ;
}


gradSchemes{
default Gauss linear;
}


interpolationSchemes{
default 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;
}


ddtSchemes{
default steadyState;
}


wallDist {
method meshWave;
}


----------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------
Fv Solution:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}


SIMPLE{
pRefPoint (-1.000000 4.990000 0.500000);
pRefValue 0;
nNonOrthogonalCorrectors 1;

residualControl{
p 1e-07;
U 1e-07;
}

}


relaxationFactors{

fields{
p 0.7;
}


equations{
U 0.7;
k 0.3;
omega 0.5;
nut 0.8;
nuTilda 0.8;
}

}


potentialFlow{
PhiRefPoint (0.000000 14.990000 0.500000);
nNonOrthogonalCorrectors 20;
PhiRefValue 0;
pRefPoint (0.000000 14.990000 0.500000);
pRefValue 0;
}


solvers{

U{
relTol 0.1;
preconditioner DILU;
tolerance 1e-10;
solver PBiCG;
}


nut{
relTol 0.1;
preconditioner DILU;
tolerance 1e-10;
solver PBiCG;
}


nuTilda{
relTol 0.1;
preconditioner DILU;
tolerance 1e-10;
solver PBiCG;
}


p{
relTol 0.1;
preconditioner DIC;
maxIter 10000;
tolerance 1e-10;
solver PCG;
}

Phi
{
solver GAMG;
smoother DIC;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;

tolerance 1e-10;
relTol 0.01;
}
}



----------------------------------------------------------------------------------------

Annotations:
- The y+ number of both meshes is less than 1 in the wall.
- Force calculation is donde considering Lift in axis (0 1 0) and Drag (1 0 0). In order to have real values of Lift and Drag I rotate the axis to consider the angle of attack of 3 degrees after getting the results.
- The results are obtained after 2.000 iterations.
- The value of "Real Value for lift coefficient " it's from the NASA : https://turbmodels.larc.nasa.gov/naca0012_val.html
- I checked the official source, for that case https://www.openfoam.com/documentation/guides/latest/doc/verification-validation-naca0012-airfoil-2d.html , It didn't help me.
- I tried also with the version v2012 and the results are pretty similiar to the version v2006.
- Files (with the mesh and log files) can be find here in that link:
https://drive.google.com/drive/folders/1myUIeofFi-6YVKu9eMQrwIzhRoj5n4PA?usp=sharing

- Find attached the 0 and system folders for the case of Mesh2.

Any kind of help would be very appreciated.
Attached Images
File Type: jpg Mesh1_1.jpg (192.5 KB, 80 views)
File Type: jpg Mesh1_2.jpg (200.5 KB, 74 views)
File Type: jpg Mesh2_1.jpg (191.0 KB, 69 views)
Attached Files
File Type: zip 0.zip (1.8 KB, 19 views)
File Type: zip system.zip (2.3 KB, 19 views)
Ivangzp is offline   Reply With Quote

Old   February 20, 2021, 18:17
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
I will definitely look at it in the coming of weeks.

I am sure that your observation is correct, yet I have recently completed the incompressible/compressible VV for the full polar of the NASA-NACA0012 case and for the full polar of the full aircraft with nacelle and pylon of the NASA's 3rd High-Lift workshop by using v2006 and v2012. Everything seemed fine enough.

Many thanks for sharing it. I will come back to you as soon as possible.
HPE is offline   Reply With Quote

Old   February 20, 2021, 20:54
Default
  #3
New Member
 
Ivan
Join Date: Sep 2020
Posts: 15
Rep Power: 6
Ivangzp is on a distinguished road
Thank you for message.
If there is something that I could clear up or postto make it easier for you, don't hesitate to write me.
Ivangzp is offline   Reply With Quote

Old   March 2, 2021, 16:03
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
still pending from my side. I'm sorry for the delay.
HPE is offline   Reply With Quote

Old   March 28, 2021, 13:13
Default
  #5
New Member
 
Ivan
Join Date: Sep 2020
Posts: 15
Rep Power: 6
Ivangzp is on a distinguished road
I have tried everything, did you recommend me to search in a particular place?
Ivangzp is offline   Reply With Quote

Old   March 30, 2021, 12:37
Default
  #6
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
  • Still not ready. But as far as I remember, good results were obtained for "SpalartAllmaras" with these setups.
  • And I am sorry for this.
  • Also, I had to remove the lengthy README files as well as compressible and/or transient setups (for now).
  • You need to download the NASA meshes into `resources/geometry` directory: e.g. this mesh https://turbmodels.larc.nasa.gov/NAC...-129.p3dfmt.gz
  • Execute `incompressible/Allrun` script to create setups for the selected angles of attacks.
    • By default, this script will create "simpleFoam-PLOT3D" directory, and its subdirectories, "0-aoa", "2-aoa", ..., "20-aoa" etc.
  • For AoA=0[deg], navigate into "0-aoa", and execute "./Allrun-parallel"
  • Each run script has its own "input settings" at the header.
    • For example, you can remove the RANS models there other than "SpalartAllmaras", or you can change the number of processors to be used etc etc.
  • After the runs, the plot script "incompressible/simpleFoam-PLOT3D/plot" can be used to plot some of the results.


Hope this helps.
Attached Files
File Type: zip 2DN00-NACA0012.zip (74.3 KB, 115 views)
zhutaihang and saladbowl like this.
HPE is offline   Reply With Quote

Old   April 13, 2021, 16:40
Default
  #7
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Did it help, hopefully?

Any feedback is very appreciated.
HPE is offline   Reply With Quote

Old   September 18, 2022, 05:29
Default
  #8
New Member
 
Jack Sun
Join Date: Sep 2022
Posts: 1
Rep Power: 0
Jack Sun is on a distinguished road
Quote:
Originally Posted by HPE View Post
  • Still not ready. But as far as I remember, good results were obtained for "SpalartAllmaras" with these setups.
  • And I am sorry for this.
  • Also, I had to remove the lengthy README files as well as compressible and/or transient setups (for now).
  • You need to download the NASA meshes into `resources/geometry` directory: e.g. this mesh https://turbmodels.larc.nasa.gov/NAC...-129.p3dfmt.gz
  • Execute `incompressible/Allrun` script to create setups for the selected angles of attacks.
    • By default, this script will create "simpleFoam-PLOT3D" directory, and its subdirectories, "0-aoa", "2-aoa", ..., "20-aoa" etc.
  • For AoA=0[deg], navigate into "0-aoa", and execute "./Allrun-parallel"
  • Each run script has its own "input settings" at the header.
    • For example, you can remove the RANS models there other than "SpalartAllmaras", or you can change the number of processors to be used etc etc.
  • After the runs, the plot script "incompressible/simpleFoam-PLOT3D/plot" can be used to plot some of the results.


Hope this helps.
Hi,
I am new to OpenFOAM and CFD in general. Lately, I've been following OpenFOAM: User Guide (https://www.openfoam.com/documentati...irfoil-2d.html) to learn how to set up cases for some wing designs.I saw your post and followed your steps, but there were some problems in the execution of the code ("./Allrun-parallel"). Looking forward to your reply!
Here's a hint from OpenFOAM, sorry for my English, thank you!
Quote:
./Allrun-parallel: 18: [[: not found
Running ./Allrun.pre on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa

# Computations for the RAS model: SpalartAllmaras

cp: cannot stat 'SpalartAllmaras.orig/system/{fvSchemes,fvSolution}': No such file or directory
./Allrun-parallel: 30: restore0Dir: not found
## Angle of attack = 0 [degree]
./Allrun-parallel: 56: cannot create 0/U: Directory nonexistent
Running decomposePar on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa
Running simpleFoam in parallel on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa using 2 processes
Running redistributePar in parallel on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa using 2 processes
Running foamLog on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa
# Collecting results
mv: cannot stat '': No such file or directory
mv: cannot stat 'postProcessing': No such file or directory
cp: cannot stat 'system/fv*': No such file or directory
cp: cannot stat '0': No such file or directory
./Allrun-parallel: 83: cleanTimeDirectories: not found

# Computations for the RAS model: kOmegaSST

cp: cannot stat 'kOmegaSST.orig/system/{fvSchemes,fvSolution}': No such file or directory
./Allrun-parallel: 30: restore0Dir: not found
## Angle of attack = 0 [degree]
./Allrun-parallel: 56: cannot create 0/U: Directory nonexistent
Running decomposePar on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa
Running simpleFoam in parallel on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa using 2 processes
Running redistributePar in parallel on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa using 2 processes
Running foamLog on /home/dyfluid/OpenFOAM/dyfluid-9/run/0012/2DN00-NACA0012/incompressible/simpleFoam-PLOT3D/0-aoa
# Collecting results
mv: cannot stat '': No such file or directory
mv: cannot stat 'postProcessing': No such file or directory
cp: cannot stat 'system/fv*': No such file or directory
cp: cannot stat '0': No such file or directory
./Allrun-parallel: 83: cleanTimeDirectories: not found
Jack Sun is offline   Reply With Quote

Reply

Tags
naca0012, ofv2006, ofv4, turbulent


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



All times are GMT -4. The time now is 22:00.