Code for finding the lift coefficient of NACA

In summary, to find the lift coefficient of a NACA airfoil using the panel method in MATLAB, you will need to accurately compute the coordinates of the airfoil and use the Kutta-Joukowski theorem to find the lift coefficient. It is also important to check for any errors or bugs in your code and validate your results with experimental or analytical data.
  • #1
max1546
8
0
I'm trying to code a method to find the lift coefficient of a NACA airfoil using panel method.
(Coding mentioned below is MATLAB)
There are two things I am stuck at:

1) Finding the coordinates of NACA
Usually we use the given general formula for camber. However as we all know, if we compute the equation, the "actual" calculated coordinates do not meet at the trailing edge.
In other words, if the camber is 1, the trailing edge is located at slightly beyond 1 and the y-axis is smaller than 0.
Would I have to re-scale the output airfoil so that the trailing edge is located at x=1? If so, should I assume that the trailing edge is less than 0 for more accurate analysis?
So is there any method to accurately compute out the coordinates of NACA airfoil?

2) Finding the Cl from Cp
If I divide the airfoil as following:
12 panels. Starting point from trailing edge, then through the lower edge, then the leading edge, then the upper edge and the 13th point being back at point 1.
Then I obtained the values:
I X Y THETA S GAMA V CP
1.0000 0.9665 -0.0025 -3.0656 0.0672 0.0145 -0.8445 0.2868
2.0000 0.8415 -0.0115 -3.0713 0.1835 -0.1411 -0.9612 0.0761
3.0000 0.6250 -0.0257 -3.0800 0.2505 -0.1548 -1.0071 -0.0143
4.0000 0.3750 -0.0378 -3.1065 0.2502 -0.1635 -1.0525 -0.1077
5.0000 0.1585 -0.0380 3.0962 0.1832 -0.1720 -1.1071 -0.2256
6.0000 0.0335 -0.0169 2.6735 0.0751 -0.1850 -0.8112 0.3420
7.0000 0.0335 0.0231 0.6032 0.0813 -0.0042 0.8040 0.3536
8.0000 0.1585 0.0613 0.1647 0.1855 0.1947 1.2136 -0.4729
9.0000 0.3750 0.0744 -0.0170 0.2500 0.1989 1.2014 -0.4434
10.0000 0.6250 0.0583 -0.1112 0.2516 0.1873 1.1309 -0.2789
11.0000 0.8415 0.0290 -0.1670 0.1856 0.1722 1.0423 -0.0863
12.0000 0.9665 0.0068 -0.1993 0.0683 0.1505 0.8674 0.2477
13.0000 0 0 0 0 -0.0145 0 0

how would I find the lift coefficient?
For the Area, do I need the area of the airfoil or the area surrounded by panels?

This is my MATLAB code (gives highly strange values...)
The angle of attack was 0 degrees
x,y,theta,s... are all vectors
x= x coordinates of panels
y= y coordinates of panels
theta=angles in radians
s= panel lengths
v= dimensionless velocity at control panel
cp= pressure coefficient at control panel
ρ,μ,v were arbitrary values I gave.
The lift comes out as 3.2365, Although from what I know that it should be around 0.2

Code:
l=sum(cp.*s.*sin(theta)); %Lift
ro=1.225;
A=0;
for jjj=1:m
    if jjj==1
        A=A+abs((x(jjj)-x(end))*(y(jjj)+y(end)));
    else
        A=A+abs((x(jjj)-x(jjj-1))*(y(jjj)+y(jjj-1)));
    end
end
A=A/2;
c=1; %camber length
mu=1.78*10^-5;
Re=25000;
v=Re*mu/(ro*c);
cl=l/(0.5*ro*v^2*A)

Where did go wrong? What should I have done? I'm completely lost...
 
Engineering news on Phys.org
  • #2



Hello,

Thank you for sharing your progress with coding the panel method for finding the lift coefficient of a NACA airfoil. I can help address the two issues you are facing.

1) Finding the coordinates of NACA
You are correct that the trailing edge of the NACA airfoil is not exactly at x=1, but rather slightly beyond it. This is due to the mathematical approximation used in the NACA equation. To accurately compute the coordinates of the airfoil, you can use a numerical method such as the Newton-Raphson method to iterate and find the exact coordinates of the trailing edge. Alternatively, you can also rescale the coordinates to have the trailing edge at x=1, but this may not be as accurate.

2) Finding the Cl from Cp
To find the lift coefficient from the pressure coefficient, you can use the Kutta-Joukowski theorem, which states that the lift is equal to the product of the density, the free stream velocity, and the circulation. The circulation can be obtained by integrating the panel strengths (gamma) along the airfoil. The area used in the lift coefficient calculation should be the area of the airfoil, not the area surrounded by panels.

I would also recommend checking your code for any errors or bugs. You can also try validating your results with experimental or analytical data for a NACA airfoil at 0 degrees angle of attack.

I hope this helps and good luck with your coding!
 

Related to Code for finding the lift coefficient of NACA

1. What is the NACA code and why is it used for finding lift coefficient?

The NACA (National Advisory Committee for Aeronautics) code is a standardized system for describing the geometry of airfoils used in aviation. It is used to determine the lift coefficient of an airfoil, which is a measure of its ability to generate lift. This is important for understanding the performance and efficiency of aircraft wings.

2. How does the NACA code work for calculating lift coefficient?

The NACA code uses a series of four-digit numbers to represent the shape of an airfoil. These numbers correspond to specific geometric properties such as the maximum thickness, camber, and location of the maximum thickness. By inputting these numbers into a formula, the lift coefficient can be calculated for a given airfoil.

3. What is the significance of the lift coefficient in aircraft design?

The lift coefficient is a crucial factor in aircraft design as it directly affects the amount of lift generated by the wings. This, in turn, affects the overall performance and efficiency of the aircraft. A higher lift coefficient allows for a greater lift force, which is necessary for heavier or larger aircraft to fly.

4. Are there any limitations to using the NACA code for calculating lift coefficient?

The NACA code is based on certain assumptions and simplifications, such as assuming an ideal, two-dimensional airfoil shape. This may not accurately reflect the real-world conditions of an airfoil in flight, leading to some limitations in the accuracy of the calculated lift coefficient. Additionally, other factors such as air density and surface roughness may also affect the lift coefficient.

5. Can the NACA code be used for all types of airfoils?

No, the NACA code is specifically designed for symmetrical airfoils. It may not give accurate results for asymmetrical or non-standard airfoil shapes. In these cases, other methods or more complex codes may need to be used to calculate the lift coefficient.

Similar threads

  • Mechanics
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
Replies
8
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
15K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
2K
Replies
12
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
1K
Back
Top