Potential indeed. What you see is just the transformation of the potential flow around a circle, very simple to calculate (and a bit magical the first times you see it...), in the flow around an airfoil via the Joukowsky transformation (another quite magical thing...). The shape of the airfoil depends by a complex parameter, on that NASA program they added an interface so you can change camber and thickness instead of the real and imaginary parts of that parameter. Another similar transformation is the Karman Treffz airfoil it allows to set a further parameter, the angle of the trailing edge.
Then once you have the potential, to calculate lift (for the 2D airfoil) is quite easy. Then the lift for the wing is just lift of the 2D airfoil times the span… most of other options are just to set density without entering it directly (the program includes an approximate law for pressure and temp vs altitude and a few funny things like data about other planets).
Obviously it doesn’t calculate drag exactly because it’s a potential model. And obviously it doesn’t calculate separation of the boundary layer simply because in that model the boundary layer doesn’t exist...
The stall model apparently just overrides the calculation when AoA modulus is larger than 10 degrees, artificially straightening the streamlines, and adding a standard non linear part for the cl-alfa at higher angles.
Basically it’s just a tutorial game, funny to play with for a while but with zero practical utility.
In the following quote I put a little program for MatLab I made few years ago during the Uni days to plot the streamlines around the same Joukowsky airfoil so you can see the math behind it and play a bit if you have Matlab. Singularity is the complex parameter that defines the shape of the airfoil, for logical results both parameters should be –1< x <1, as for example –0.7+0.3i, but you can use any number you want if you don’t mind odd results...
A younger Reca wrote:
function streamlines_j(a,al,l)
%
% Plots streamlines for a Joukowski airfoil
% and calculates chord (defined as maximum inscribed line)
% and the angle of attack of zero lift
%
% streamlines_j(a,alfa,l)
%
% a = singularity (complex number)
% alfa = angle of attack (degrees)
% l = number of lines
%
figure(1)
clf
t=[0:2*pi/(100):2*pi];
Q=exp(i*t);
q=Q+(((a-1)./2).^2)./(Q-(a+1)./2);
al=al*pi/180;
[r,t]=meshgrid(1:.1:5,-1:2*pi/100:2*pi);
[x,y]=pol2cart(t,r);
Z=x+i*y;
z=Z+(((a-1)./2).^2)./(Z-(a+1)./2);
F=exp(-i*al)*Z-(exp(-i*al)-exp(i*al))*log(Z)+exp(i*al)./Z;
contour(real(z),imag(z),imag(F),l,'b')
hold on
fill(real(q),imag(q),'r');
plot(real(q),imag(q),'r');
axis('equal')
k=size(q);
c=0;
for p=1:k(2)
if (real(q(p))-real(q(1))).^2+(imag(q(p))-imag(q(1))).^2 > c
c=(real(q(p))-real(q(1))).^2+(imag(q(p))-imag(q(1))).^2;
v= q(p);
end
end
line([real(q(1)),real(v)],[imag(q(1)),imag(v)]);
c=sqrt(c);
al=atan(imag(v)./(abs(real(v)-real(q(1)))))*180./pi;
disp('chord =')
disp(num2str(c))
disp('Angle of zero lift (degrees) =')
disp(num2str(al))
zoom
hold off