You are on page 1of 26

KIVAN AL ANIL April 17, 2007

508052003

COSINE SPACING
-c/2 ---- c/2 0 ---- c
( ) cos
2
c
x x =
( ) sin
2
c
dx x dx =
( ) ( )
1 cos
2
c
x x =
( ) sin
2
c
dx x dx =
Vortex weight factor
n
dx
x x
dx
=


( ) sin
2
n
c
x x
N

=
( )
2
sin
2
n
c
x x
N

=
( )
2
1 cos
2
n
c
x x
N

=
( ) cos
2
c
x x =
( )
2
cos x x
c
=
( )
2
cos x x
c
=
2
2
1
2
n
c
x x
c N

| |
=
|
\ .

2
2
4
1
2
n
c
x x
c N

=
2
2
4
n
c
x x
N

=

Vortex weight factor
n
dx
x x
dx
=


( ) sin
2
n
c
x x
N

=
( )
2
sin
2
n
c
x x
N

=
( )
2
1 cos
2
n
c
x x
N

=
( ) ( )
1 cos
2
c
x x =
( )
2
1 cos x x
c
=
( )
2
cos 1 x x
c
=
2
2
1 1
2
n
c
x x
c N

| |
=
|
\ .

2
2
4 4
1 1
2
n
c
x x x
c c N

| |
= +
|
\ .

2
2
4 4
1 1
2
n
c
x x x
c c N

= +
( )
2
2
4
2
n
c
x cx x
c N

=
( )
2
2
4
2
n
c
x cx x
c N

=
( )
n
x c x
x
N


=
(Equation 72, Justin E. Kerwin)
KIVAN AL ANIL April 17, 2007
508052003

-c/2 ---- c/2 0 ---- c
The equation of a parabolic mean line with
maximum camber
0
f is
( )
2
0
2
1
x
f x f
c
(
| |
=
(
|
\ .
(




The equation of a parabolic mean line with
maximum camber
0
f is
( )
2
0
2
2
1
c
x
f x f
c
(
| | | |

(
|
|
\ .
(
= |
(
|
| (
\ .


( )
2
0
2
1
x c
f x f
c
(

| |
=
(
|
\ .
(


( )
2
0
2
1 1
x
f x f
c
(
| |
=
(
|
\ .
(


( )
2
0 2
4 4
1 1
x x
f x f
c c
( | |
= +
( |
\ .

( )
2
0 2
4 4 x x
f x f
c c
| |
=
|
\ .

( )
0
4
1
x x
f x f
c c
| |
=
|
\ .

(Equation 5.80, Katz&Plotkin)
The Slope is:
0
2
8 df f x
dx c
=
The Slope is:
0 2
4 8 df x
f
dx c c
| |
=
|
\ .

0
2
4 1
df f x
dx c c
| |
=
|
\ .

(Equation 5.81, Katz&Plotkin)

We can see from the following figures that both formulations for cosine spacing give the
same results.



KIVAN AL ANIL April 17, 2007
508052003


Figure 1. Input Window for The Parabolic Mean Line (Cosine Spacing -c/2 - c/2).


Figure 2. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 3. The Geometry & Results.

KIVAN AL ANIL April 17, 2007
508052003


Figure 4. Input Window for The Parabolic Mean Line (Cosine Spacing 0 - c).


Figure 5. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 6. The Geometry & Results.

KIVAN AL ANIL April 17, 2007
508052003


Figure 7. Input Window for The Parabolic Mean Line (Cosine Spacing 0- c).


Figure 8. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 9. The Geometry & Results.

KIVAN AL ANIL April 17, 2007
508052003


Figure 10. The Geometry & Results.




Figure 11. The Geometry & Results.


KIVAN AL ANIL April 17, 2007
508052003


Figure 12. Input Window for The Parabolic Mean Line (Cosine Spacing -c/2 - c/2).


Figure 13. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 14. The Geometry & Results.
KIVAN AL ANIL April 17, 2007
508052003


Figure 15. Input Window for The Parabolic Mean Line (Cosine Spacing 0 - c).


Figure 16. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 17. The Geometry & Results.


KIVAN AL ANIL April 17, 2007
508052003


Figure 18. Input Window for The Parabolic Mean Line (Cosine Spacing 0- c).


Figure 19. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 20. The Geometry & Results.


KIVAN AL ANIL April 17, 2007
508052003



Figure 21. The Geometry & Results.



Figure 22. The Geometry & Results.

KIVAN AL ANIL April 17, 2007
508052003


Figure 23. Input Window for The FLAT PLATE (Cosine Spacing -c/2 - c/2).


Figure 24. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 25. The Geometry & Results.


KIVAN AL ANIL April 17, 2007
508052003


Figure 26. Input Window for The FLAT PLATE (Cosine Spacing -c/2 - c/2).


Figure 27. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 28. The Geometry & Results.

KIVAN AL ANIL April 17, 2007
508052003


Figure 29. Input Window for The FLAT PLATE (Cosine Spacing 0 - c).


Figure 30. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 31. The Geometry & Results.

KIVAN AL ANIL April 17, 2007
508052003

2-D Vortex Lattice Method with Cosine Spacing
(13.04 LECTURE NOTES HYDROFOILS AND PROPELLERS, Justin E. Kerwin)

pages 53-54

We first define an auxiliary angular variable x such that

( ) ( )
1 cos
2
c
x x = (69)

so that 0 x = corresponds to the leading edge and x = corresponds to the trailing edge
x c = . This is the same as the change of variables introduced by Glauert, except that the x
coordinate has been shifted by c/2 to place the leading edge at 0 x = . We next divide the
chord into N equal intervals of x with common interval x N = . Point vortices
n
are
located at the mid-points of each x interval, and control points are located at the
downstream boundary of each x interval,


(70)


( ) 1 cos
2
c
c n
x n
N
| | | |
=
| |
\ . \ .


Note that with this spacing algorithm the last control point is at the trailing edge, x c = .

The velocity induced at the nth control point is simply,



(71)

where the last equality in 71 is a statement of the boundary condition developed earlier.
Equation 71, written for each of the N control points, represents a set of simultaneous
equations for the unknown point vortex strengths
n
.











( )
( ) 1/ 2
1 cos
2
v
n c
x n
N
| | | |
=
| |
\ . \ .
( ) ( )
1
1
2
N
m
n
m v c
df
v U
x m x m dx

(
= =
(

KIVAN AL ANIL April 17, 2007


508052003


Figure 32. Input Window for VLM-2D for The Parabolic Mean Line


Figure 33. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 34. The Geometry & Results (VLM-2D for The Parabolic Mean Line)

KIVAN AL ANIL April 17, 2007
508052003


Figure 35. The Geometry & Results (VLM-2D for The Parabolic Mean Line)














KIVAN AL ANIL April 17, 2007
508052003


Figure 36. Input Window for VLM-2D for The Parabolic Mean Line


Figure 37. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 38. The Geometry & Results (VLM-2D for The Parabolic Mean Line)


KIVAN AL ANIL April 17, 2007
508052003


Figure 39. The Geometry & Results (VLM-2D for The Parabolic Mean Line)














KIVAN AL ANIL April 17, 2007
508052003


Figure 40. Input Window for VLM-2D for The FLAT PLATE


Figure 41. Input Window for The flow angle of attack (alpha in degrees) - The
default value is for CL = 1.


Figure 42. The Geometry & Results (VLM-2D for The FLAT PLATE)


KIVAN AL ANIL April 17, 2007
508052003


Figure 43. The Geometry & Results (VLM-2D for The FLAT PLATE)

C:\Documents and Settings\xp\My Documents\ZOVAN...\parabolic1.m Page 1
April 15, 2007 10:06:38 PM
% Kivanc Ali ANIL (2007)
% 508052003
%
% The Parabolic Mean Line
% Cosine Spacing
% -c/2 - c/2
clc, clear, close all,
format compact
% ---------------------------------------------
def0 = {'1','0.4','8','1'};
dlgTitle = 'The Parabolic Mean Line (Cosine Spacing -c/2 - c/2)';
prompt = {'Chord Length (c)',...
'Maximum Chamber (fo) ',...
'Number of Panels (N)',...
'Free stream velocity (U)'};
data = inputdlg(prompt,dlgTitle,1,def0);
if isempty(data)==1
clear
return
end
c = str2num(char(data(1)));
f0 = str2num(char(data(2)));
N = str2num(char(data(3)));
U = str2num(char(data(4)));
defalpha = ((1-4*pi*f0/c)/(2*pi))*180/pi;
def1 = {num2str(defalpha)};
prompt = {'The flow angle of attack (alpha in degrees) - The default value is for
CL = 1'};
data = inputdlg(prompt,dlgTitle,1,def1);
if isempty(data)==1
clear
return
end
alpha = str2num(char(data(1)))*pi/180;
% ---------------------------------------------
% Exact solution
xtilda = 0:pi/36:pi;
x = -(c/2)*cos(xtilda); % -c/2 - c/2
f = f0*(1-(2*x/c).^2); % -c/2 - c/2
CL = 2*pi*alpha+4*pi*f0/c;
gamma = (-2*U*alpha*(1+cos(xtilda))./sin(xtilda))-8*U*sin(xtilda)*f0/c;
warning off MATLAB:divideByZero
% ---------------------------------------------
% The global coordinates for panels
GCO = [ ];
for k = 1:N+1
xgc = -(c/2)*cos((k-1)*pi/N); % -c/2 - c/2
GCO = [GCO; xgc f0*(1-(2*xgc/c)^2)]; % -c/2 - c/2
end
% ---------------------------------------------
GVP = [ ]; % The global lump vortex points of the panels
GCP = [ ]; % The global collocation points of the panels
for k = 1:N
cp(k) = ((GCO(k,1)-GCO(k+1,1))^2+(GCO(k,2)-GCO(k+1,2))^2)^.5;
theta(k)= atan((GCO(k,2)-GCO(k+1,2))/(GCO(k,1)-GCO(k+1,1)));
xgvp = GCO(k,1)+(cp(k)/4)*cos(theta(k));
ygvp = GCO(k,2)+(cp(k)/4)*sin(theta(k));
C:\Documents and Settings\xp\My Documents\ZOVAN...\parabolic1.m Page 2
April 15, 2007 10:06:38 PM
GVP = [GVP; xgvp ygvp];
xgcp = GCO(k,1)+(3*cp(k)/4)*cos(theta(k));
ygcp = GCO(k,2)+(3*cp(k)/4)*sin(theta(k));
GCP = [GCP; xgcp ygcp];
dx(k) = sqrt((c^2/4)-GVP(k,1)^2)*pi/N; % Vortex weight factors -c/2 - c/2
end
% ---------------------------------------------
for i = 1:N
for j = 1:N
r(i,j) = ((GVP(j,1)-GCP(i,1))^2+(GVP(j,2)-GCP(i,2))^2)^.5;
beta(i,j) = theta(i)- atan((GVP(j,2)-GCP(i,2))/(GVP(j,1)-GCP(i,1)));
A(i,j) = (1/(2*pi*r(i,j)))*cos(beta(i,j));
if j > i
A(i,j) = -A(i,j);
end
end
end
% [A] {X} = {b}
b = -(U*(alpha-theta)); %sin(alpha-theta) = (alpha-theta) since (alpha-theta) is sm
all
b = b'; % Transpose
X = A\b;
Xplot = X./dx';
%-U*c*pi*alpha % Lumped Vortex Element for Flat plate (f0 = 0, N = 1)
% ---------------------------------------------
figure(1)
subplot(2,1,1),plot(x,f,'k')
hold on
plot(GCO(:,1),GCO(:,2),'r','linewidth',2)
plot(GCO(:,1),GCO(:,2),'g+','linewidth',2)
plot(GVP(:,1),GVP(:,2),'o','linewidth',2)
plot(GCP(:,1),GCP(:,2),'x','linewidth',2)
axis equal
title(['\fontsize{20}\bf{GEOMETRY}']);
grid
% ---------------------------------------------
subplot(2,1,2),plot(x(2:length(x)),gamma(2:length(x)),'linewidth',2)
hold on
plot(GVP(:,1),Xplot,'or','linewidth',2)
legend('\fontsize{15}\bf{Exact Solution}',[num2str(N) , ' Panels'])
xlabel('\fontsize{15}\bf{x}');
ylabel('\fontsize{15}\bf{\gamma (x)}');
set(figure(1),'Position',[1,1,1400,930])
title(['\fontsize{20}\bf{\gamma (x) (for C_L = }',num2str(CL),')']);
grid
% ---------------------------------------------
C:\Documents and Settings\xp\My Documents\ZOVAN...\parabolic2.m Page 1
April 15, 2007 10:10:34 PM
% Kivanc Ali ANIL (2007)
% 508052003
%
% The Parabolic Mean Line
% Cosine Spacing
% 0 - c
clc, clear, close all,
format compact
% ---------------------------------------------
def0 = {'1','0.4','8','1'};
dlgTitle = 'The Parabolic Mean Line (Cosine Spacing 0 - c)';
prompt = {'Chord Length (c)',...
'Maximum Chamber (fo) ',...
'Number of Panels (N)',...
'Free stream velocity (U)'};
data = inputdlg(prompt,dlgTitle,1,def0);
if isempty(data)==1
clear
return
end
c = str2num(char(data(1)));
f0 = str2num(char(data(2)));
N = str2num(char(data(3)));
U = str2num(char(data(4)));
defalpha = ((1-4*pi*f0/c)/(2*pi))*180/pi;
def1 = {num2str(defalpha)};
prompt = {'The flow angle of attack (alpha in degrees) - The default value is for
CL = 1'};
data = inputdlg(prompt,dlgTitle,1,def1);
if isempty(data)==1
clear
return
end
alpha = str2num(char(data(1)))*pi/180;
% ---------------------------------------------
% Exact solution
xtilda = 0:pi/36:pi;
x = (c/2)*(1-cos(xtilda)); % 0 - c
f = f0*(1-(2*(x-c/2)/c).^2); % 0 - c
CL = 2*pi*alpha+4*pi*f0/c;
gamma = (-2*U*alpha*(1+cos(xtilda))./sin(xtilda))-8*U*sin(xtilda)*f0/c;
warning off MATLAB:divideByZero
% ---------------------------------------------
% The global coordinates for panels
GCO = [ ];
for k = 1:N+1
xgc = (c/2)*(1-cos((k-1)*pi/N)); % 0 - c
GCO = [GCO; xgc f0*(1-(2*(xgc-c/2)/c)^2)]; % 0 - c
end
% ---------------------------------------------
GVP = [ ]; % The global lump vortex points of the panels
GCP = [ ]; % The global collocation points of the panels
for k = 1:N
cp(k) = ((GCO(k,1)-GCO(k+1,1))^2+(GCO(k,2)-GCO(k+1,2))^2)^.5;
theta(k)= atan((GCO(k,2)-GCO(k+1,2))/(GCO(k,1)-GCO(k+1,1)));
xgvp = GCO(k,1)+(cp(k)/4)*cos(theta(k));
ygvp = GCO(k,2)+(cp(k)/4)*sin(theta(k));
C:\Documents and Settings\xp\My Documents\ZOVAN...\parabolic2.m Page 2
April 15, 2007 10:10:34 PM
GVP = [GVP; xgvp ygvp];
xgcp = GCO(k,1)+(3*cp(k)/4)*cos(theta(k));
ygcp = GCO(k,2)+(3*cp(k)/4)*sin(theta(k));
GCP = [GCP; xgcp ygcp];
dx(k) = sqrt((c-GVP(k,1))*GVP(k,1))*pi/N;% Vortex weight factors 0 - c
end
% ---------------------------------------------
for i = 1:N
for j = 1:N
r(i,j) = ((GVP(j,1)-GCP(i,1))^2+(GVP(j,2)-GCP(i,2))^2)^.5;
beta(i,j) = theta(i)- atan((GVP(j,2)-GCP(i,2))/(GVP(j,1)-GCP(i,1)));
A(i,j) = (1/(2*pi*r(i,j)))*cos(beta(i,j));
if j > i
A(i,j) = -A(i,j);
end
end
end
% [A] {X} = {b}
b = -(U*(alpha-theta)); %sin(alpha-theta) = (alpha-theta) since (alpha-theta) is sm
all
b = b'; % Transpose
X = A\b;
Xplot = X./dx';
%-U*c*pi*alpha % Lumped Vortex Element for Flat plate (f0 = 0, N = 1)
% ---------------------------------------------
figure(1)
subplot(2,1,1),plot(x,f,'k')
hold on
plot(GCO(:,1),GCO(:,2),'r','linewidth',2)
plot(GCO(:,1),GCO(:,2),'g+','linewidth',2)
plot(GVP(:,1),GVP(:,2),'o','linewidth',2)
plot(GCP(:,1),GCP(:,2),'x','linewidth',2)
axis equal
title(['\fontsize{20}\bf{GEOMETRY}']);
grid
% ---------------------------------------------
subplot(2,1,2),plot(x(2:length(x)),gamma(2:length(x)),'linewidth',2)
hold on
plot(GVP(:,1),Xplot,'or','linewidth',2)
legend('\fontsize{15}\bf{Exact Solution}',[num2str(N) , ' Panels'])
xlabel('\fontsize{15}\bf{x}');
ylabel('\fontsize{15}\bf{\gamma (x)}');
set(figure(1),'Position',[1,1,1400,930])
title(['\fontsize{20}\bf{\gamma (x) (for C_L = }',num2str(CL),')']);
grid
% ---------------------------------------------
C:\Documents and Settings\xp\My Documents\ZOVANC\Tur...\VLM2D.m Page 1
April 15, 2007 10:11:19 PM
% Kivanc Ali ANIL (2007)
% 508052003
%
% VLM-2D for The Parabolic Mean Line
% Cosine Spacing
% 0 - c
clc, clear, close all,
format compact
% ---------------------------------------------
def0 = {'1','0.4','8','1'};
dlgTitle = 'VLM-2D for The Parabolic Mean Line';
prompt = {'Chord Length (c)',...
'Maximum Chamber (fo) ',...
'Number of Panels (N)',...
'Free stream velocity (U)'};
data = inputdlg(prompt,dlgTitle,1,def0);
if isempty(data)==1
clear
return
end
c = str2num(char(data(1)));
f0 = str2num(char(data(2)));
N = str2num(char(data(3)));
U = str2num(char(data(4)));
defalpha = ((1-4*pi*f0/c)/(2*pi))*180/pi;
def1 = {num2str(defalpha)};
prompt = {'The flow angle of attack (alpha in degrees) - The default value is for
CL = 1'};
data = inputdlg(prompt,dlgTitle,1,def1);
if isempty(data)==1
clear
return
end
alpha = str2num(char(data(1)))*pi/180;
% ---------------------------------------------
% Exact solution
xtilda = 0:pi/36:pi;
x = (c/2)*(1-cos(xtilda)); % 0 - c
f = f0*(1-(2*(x-c/2)/c).^2);
CL = 2*pi*alpha+4*pi*f0/c;
gamma = (-2*U*alpha*(1+cos(xtilda))./sin(xtilda))-8*U*sin(xtilda)*f0/c;
warning off MATLAB:divideByZero
% ---------------------------------------------
% The global coordinates for panels
GCO = [ ];
for k = 1:N+1
xgc = (c/2)*(1-cos((k-1)*pi/N));
GCO = [GCO; xgc 0];
end
% ---------------------------------------------
GVP = [ ]; % The global lump vortex points of the panels
GCP = [ ]; % The global collocation points of the panels
for k = 1:N
xgvp = (c/2)*(1-cos((k-1/2)*pi/N));
GVP = [GVP; xgvp 0];
xgcp = (c/2)*(1-cos(k*pi/N));
C:\Documents and Settings\xp\My Documents\ZOVANC\Tur...\VLM2D.m Page 2
April 15, 2007 10:11:19 PM
GCP = [GCP; xgcp 0];
dx(k) = sqrt((c-GVP(k,1))*GVP(k,1))*pi/N;% Vortex weight factors
end
% ---------------------------------------------
% Solution of Equation 71 for the Parabolic Mean Line
% (13.04 LECTURE NOTES HYDROFOILS AND PROPELLERS, Justin E. Kerwin)
for i = 1:N
b(i,1) = U*((4*f0*(1-2*GCP(i,1)/c)/c)-alpha); %sin(alpha) = (alpha) since (alpha) is
small
for j = 1:N
r(i,j) = GVP(j,1)-GCP(i,1);
A(i,j) = -(1/(2*pi*r(i,j)));
end
end
% [A] {X} = {b}
X = A\b;
Xplot = X./dx';
% ---------------------------------------------
figure(1)
subplot(2,1,1),plot(x,f,'k')
hold on
plot(GCO(:,1),GCO(:,2),'r','linewidth',2)
plot(GCO(:,1),GCO(:,2),'g+','linewidth',2)
plot(GVP(:,1),GVP(:,2),'o','linewidth',2)
plot(GCP(:,1),GCP(:,2),'x','linewidth',2)
axis equal
title(['\fontsize{20}\bf{GEOMETRY}']);
grid
% ---------------------------------------------
subplot(2,1,2),plot(x(2:length(x)),gamma(2:length(x)),'linewidth',2)
hold on
plot(GVP(:,1),Xplot,'or','linewidth',2)
legend('\fontsize{15}\bf{Exact Solution}',[num2str(N) , ' Panels'])
xlabel('\fontsize{15}\bf{x}');
ylabel('\fontsize{15}\bf{\gamma (x)}');
set(figure(1),'Position',[1,1,1400,930])
title(['\fontsize{20}\bf{\gamma (x) (for C_L = }',num2str(CL),')']);
grid
% ---------------------------------------------