2D airfoil simulation
Moderator: oliveroxtoby
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
2D airfoil simulation
I'm struggling to get a working 2D airfoil simulation, this is how I set it up but it does not converge and even worse the graph for the lift coefficient shows negative values, can anybody give me pointers on what I'm doing wrong?
Also if I use gmsh for the meshing it's always very pointy:
-
- Veteran
- Posts: 3129
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: 2D airfoil simulation
Here is a 2D-example, NACA2412 airfoil (still used in Cessnas, I believe).
The airfoil was tested long ago, see NACA Report 586, Page 233:
http://www.ae.metu.edu.tr/tuncer/ae443/ ... All-Re.pdf
With the report-function you can plot the drag-lift forces, you must divide the values
by the mesh-thickness (not the windtunnel extrusion!), to get the forces/m wing-length.
Done with bluecfd and
The airfoil was tested long ago, see NACA Report 586, Page 233:
http://www.ae.metu.edu.tr/tuncer/ae443/ ... All-Re.pdf
With the report-function you can plot the drag-lift forces, you must divide the values
by the mesh-thickness (not the windtunnel extrusion!), to get the forces/m wing-length.
Done with bluecfd and
Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods:
* BIM
* CfdOF 1.17.6
* Curves 0.3.0
* Defeaturing_WB
* dodo
* Fasteners
* FEM_FrontISTR 0.1.0
* Manipulator 1.4.3
* Plot
* Reinforcement
* WorkFeature
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: 2D airfoil simulation
Thanks! I'll look into it, can you explain the rationale behind the boundary conditions? I addded a force coefficient reporting function to your file and after running it the lift coefficient is still shown as a small negative number is this functionality broken?
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: 2D airfoil simulation
@thschrader for your force reporting function you use 1.9 kPa as reference pressure, can you explain where this comes from? AFAICS your boundary conditions set 0 Pa as reference pressure.
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: 2D airfoil simulation
how do I determinate what values I should use for the inlet turbulence parameters?
-
- Veteran
- Posts: 3129
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: 2D airfoil simulation
@adrianinsaval:
please see my case definition
After case writing have a look at the p/controldict files.
In this case openfoam calculates a "normalized" pressure, p/rho.
To get the real pressure (and forces) you must multiply the calculated pressure field with the fluid density (paraview!)
OR multiply it with the reference pressure in cfdof report function (the reference pressure contains the density).
Otherwise your forces are too low.
See also unit definition in openfoam:
https://doc.cfd.direct/openfoam/user-gu ... ile-format
At 55 m/s inlet speed the reference pressure q is approx 1900 N/m^2=Pa
When changing the inlet speed, you must recalculate the pressure for the report function.
Simplefoam-solver calculates differential pressures, no need to define pressure at the inlet.
When you look at the results in paraview, the pressure on top of the wing is negativ, which is not possible
in reality. The total lift comes from the pressure difference. When adding pressure at the inlet,
the difference (and the lift) is the same.
Often people talk about air "suction", which is not correct.
See Otto von Guericke, Magdeburger spheres, proof of the existence of the air pressure.
The sphere is empty, nothing can suc...
https://de.wikipedia.org/wiki/Magdeburger_Halbkugeln
please see my case definition
After case writing have a look at the p/controldict files.
In this case openfoam calculates a "normalized" pressure, p/rho.
To get the real pressure (and forces) you must multiply the calculated pressure field with the fluid density (paraview!)
OR multiply it with the reference pressure in cfdof report function (the reference pressure contains the density).
Otherwise your forces are too low.
See also unit definition in openfoam:
https://doc.cfd.direct/openfoam/user-gu ... ile-format
At 55 m/s inlet speed the reference pressure q is approx 1900 N/m^2=Pa
When changing the inlet speed, you must recalculate the pressure for the report function.
Simplefoam-solver calculates differential pressures, no need to define pressure at the inlet.
When you look at the results in paraview, the pressure on top of the wing is negativ, which is not possible
in reality. The total lift comes from the pressure difference. When adding pressure at the inlet,
the difference (and the lift) is the same.
Often people talk about air "suction", which is not correct.
See Otto von Guericke, Magdeburger spheres, proof of the existence of the air pressure.
The sphere is empty, nothing can suc...
https://de.wikipedia.org/wiki/Magdeburger_Halbkugeln
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: 2D airfoil simulation
Thanks, some things are making more sense now (others are still confusing), It seems there is a bug in the graph for the coefficients reporting function though, even with those reference pressures it is always showing very small values for the CL reporting function, but looking at the results in the case folder it is calculating the CL correctly from the force. @oliveroxtoby can you take a look?
- Attachments
-
- functionObjectProperties.txt
- (3.57 KiB) Downloaded 68 times
-
- force.png (35.86 KiB) Viewed 2689 times
-
- coefficients.png (30.94 KiB) Viewed 2689 times
-
- Veteran
- Posts: 3129
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: 2D airfoil simulation
Which ones?adrianinsaval wrote: ↑Thu Sep 01, 2022 6:49 pm Thanks, some things are making more sense now (others are still confusing),
- oliveroxtoby
- Posts: 810
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: 2D airfoil simulation
Try now?adrianinsaval wrote: ↑Thu Sep 01, 2022 6:49 pm Thanks, some things are making more sense now (others are still confusing), It seems there is a bug in the graph for the coefficients reporting function though, even with those reference pressures it is always showing very small values for the CL reporting function, but looking at the results in the case folder it is calculating the CL correctly from the force. @oliveroxtoby can you take a look?
The output formatting unfortunately varies a lot between the different OpenFOAM versions and forks...
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: 2D airfoil simulation
now it works thanks for the quick fix! I can imagine it's a pain to support so many variations. After looking at the output file I got curious, where can I read on what all the variations of Cd and Cl in the output mean?oliveroxtoby wrote: ↑Thu Sep 01, 2022 9:28 pm Try now?
The output formatting unfortunately varies a lot between the different OpenFOAM versions and forks...
I'll get back on it on saturday and ask you more if that's ok, my brain has reached it's limit for today and tomorrow I'll be busy.