The flow past a two-dimensional cylinder is one of the most studied of aerodynamics. It is relevant to many engineering applications
See Experiment Report%% This code solves the static pressure field around a cylinder
% Author: Good Rindo
clear all
close all
Radius = input('Radius of the cylinder : ');
theta = (0:1:360)*pi/180;
r = Radius:0.1:10*Radius;
for i = 1:length(r)
p(i,:) = 2*(Radius.^2/r(i).^2).*cos(2.*theta)-(Radius.^4/r(i).^4);
end
[TH,R] = meshgrid(theta,r);
[X,Y] = pol2cart(TH,R);
contourf(X,Y,p,30);
colorbar
axis image
xlim([-3*Radius 3*Radius])
ylim([-3*Radius 3*Radius])
xlabel('x/R','fontsize',14)
ylabel('y/R','fontsize',14)
set(gca,'fontsize',14)
title(sprintf('Static pressure field (R = %.1f)',Radius))