% ------------------------------------------------------------------------ % Ian Chase % October 14, 2014 % University of Nevada Reno % ME 482, Aerodynamics % Problem No. 7.a % This code will produce a vector field for a source pannel of % endpoints r1 and r2. % Input argument: % r1 = left endpoint of source panel % r2 = right endpoint of source panel % Example - for a source pannel centered at the origin with endpoints (-1,0) to (1,0) % r1 = [-1 0] % r2 = [1 0] %% ----------------------------------------------------------------------- % Endpoints of panel r1-r2 r1 = [-1 0]; r2 = [1 0]; % Generates the vector coordinates of a vector field [X,Y] = meshgrid(-10:1:10,10:-1:-10); % Calculates Vx and Vy from the BIG VELOCITY EQUATION. % In anticapition of using this code in the future, srcPanel has been % stored as a separate function. [u,v] = srcPanel(r1,r2,X,Y); % Plots a vector field quiver(X,Y,u,v)