Write a matlab code for conformal mapping of a circle to an airfoil.
Write a matlab code for conformal mapping of a circle to an airfoil.
clear;clc % Step 1: Select the parameters that define the airfoil of interest. % (1) Select the a == angle of attack alpha a = -3; % in degrees a = a*pi/180; % Conversion to radians % (2) Select the parameter related to thichkness of the airfoil: e = .1; % (3) Select the shift of y-axis related to camber of the airfoil: f = .1; % (4) Select the trailing edge angle parameter: te = .06; % 0 < te < 1 (0 ==> cusped trailing edge) n = 2 - te; % Number related to trailing edge angle. tea = (n^2-1)/3; % This is a Karman-Trefftz extension. % Step 2: Compute the coordinates of points on circle in zp-plane: R = 1 + e; theta = 0:pi/200:2*pi; yp = R * sin(theta); xp = R * cos(theta); % Step 3: Transform coordinates of circle from zp-plane to z-plane: z = (xp - e) + 1i.*(yp + f); % Step 4: Transform circle from z-plane to airfoil in w-plane % (the w-plane is the "physical" plane of the airfoil): rot = exp(1i*a); % Application of angle of attack. w = rot .* (z + tea*1./z); % Joukowski transformation. % Step 5: Plot of circle in z-plane on top of airfoil in w-plane plot(xp,yp), hold on plot(real(w),imag(w),'r'),axis image, hold off