Sunteți pe pagina 1din 5

AAE 416 Spring 2010 - HW 6 Solutions

1. The MATLAB code used to reproduce Fig 4-24 in White is


attached below.

% HW 6 Solution
% Use Thwaites' method to perform boundary layer calculation
% for flow past a circular cylinder

R = 1.0; % radius of the circular cylinder


U_inf = 1.0 ; % free-stream velocity
x = linspace(1e-10,2*pi/3*R,10000); % starting at a small non-zero
value
% The edge velocity profile function
% Two cases are included below

% Potential Flow Solution


% ========================
U = 2*U_inf*sin(x/R);
dU_dx0 = 2*U_inf/R;
[m,n] = size(x);
dI = 1.0/6*diff(U.^6).*diff(x)./diff(U);
du_dx = [dU_dx0 diff(U)./diff(x)];
I = cumsum(dI);

% Computing boundary layer parameters


theta2_nu = [0.45/6/du_dx(1) 0.45*I./U(2:n).^6];
lamda = theta2_nu.*du_dx;
S = (lamda+0.09).^0.62;
Cfbar = S.*sqrt(x./U./theta2_nu);

% Throwing away points after separation (Cfbar = 0)


sep_index = find(Cfbar >= 0);

% Getting theta in deg from the arc length x


theta = x/R*180./pi;
%Plotting Velocity
figure(1);
hold on;
plot(theta(sep_index),U(sep_index),'LineWidth',2);
% Plotting Cfbar
figure(2);
hold on;
plot(theta(sep_index),Cfbar(sep_index),'LineWidth',2);

% Hiemenz Experiment
% ===================
U = U_inf*(1.814*x./R - 0.271*(x./R).^3-0.0471*(x./R).^5); % fit to
measurements
dU_dx0 = U_inf*1.814/R;
[m,n] = size(x);
dx = diff(x);
dI = 1.0/6*diff(U.^6).*diff(x)./diff(U);
du_dx = [dU_dx0 diff(U)./diff(x)];
I = cumsum(dI);

% Computing boundary layer parameters


theta2_nu = [0.45/6/du_dx(1) 0.45*I./U(2:n).^6];
lamda = theta2_nu.*du_dx;
S = (lamda+0.09).^0.62;
Cfbar = S.*sqrt(x./U./theta2_nu);

% Throwing away points after separation (Cfbar = 0)


sep_index = find(Cfbar >= 0);
% Getting theta in deg from the arc length x
theta = x/R*180./pi;
%Plotting Velocity
figure(1);
plot(theta(sep_index),U(sep_index),'r','LineWidth',2);
% Plotting Cfbar
figure(2);
plot(theta(sep_index),Cfbar(sep_index),'r','LineWidth',2);
dU_dx0 = 1.814*U_inf/R;

figure(1)
xlabel('\theta','fontsize',18);
ylabel('U','fontsize',18);
legend('Potential Flow','Hiemenz Experiment');
figure(2)
xlabel('\theta','fontsize',18);
ylabel('Cfbar','fontsize',18);
legend('Potential Flow','Hiemenz Experiment');
Velocity Profile as a function of angle for potential flow and actual
edge velocity as measured by Hiemenz
Skin friction coefficient Cfbar as a function of angle for the potential
flow solution and the actual velocity as measured by Hiemenz. The
skin friction coefficient is plotted only till the separation point.

S-ar putea să vă placă și