How to use vortex panel method on Joukowski airfoil?
Show older comments
I'm trying to figure out how to use the vortex panel method to plot the pressure distribution over a Joukowski airfoil. I also need to compute the lift and drag and plot the streamlines. So far I have the paneled airfoil, lift, and the pressure distribution. How do I get the streamlines?
Here's my code:
%inputs U=1; a=1; b=0.8; y1p=0.199; theta=linspace(0,2*pi,22); rho=1.225;
%airfoil x1p=b-sqrt(a^2-y1p^2); z1p=x1p+1i*y1p; z2=a*cos(theta)+a*1i*sin(theta); z1=z2+z1p; z=z1+(b^2)./z1; w=U*(z2+(a^2./z2)+1i*2*y1p*log(z2./a)); LIFT=rho*U*4*pi*y1p*U; display(LIFT, 'Lift force (N)');
%pressure coefficient i=1; while i<23 V(1,i)=U*abs((1-(a/z2(1,i))^2+1i*2*y1p/z2(1,i))/(1-(b/z1(1,i))^2)); Cp(1,i)=1-(V(1,i)/U)^2; i=i+1; end
figure(1) plot(z,'k-') axis([-3 3 -3 3])
figure(2) plot(real(z),real(Cp),'k-')
Answers (0)
Categories
Find more on Airfoil tools in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!