Untitled

mail@pastecode.io avatar
unknown
matlab
2 years ago
972 B
3
Indexable
% Givens
L=8;
W=1;
q=200;
T0=20;
V0=20*5/18;
x=0:0.1:L;
delta(1)=0;

for i=2:length(x)
    Tsa=40; % surface temp assumption
        while true
            T_f=(Tsa+T0)/2;
            [rho]=air(T_f,1013.25,[],'rho');
            [mu]=air(T_f,1013.25,[],'mu');
            [k]=air(T_f,1013.25,[],'k');
            [Pr]=air(T_f,1013.25,[],'Pr');
            Re=rho*V0*x(i)/mu;
            if Re>500000
                Nu=0.0308*Re^0.8*Pr^(1/3);
                d=(0.381*Re^(-0.2)-10256*Re^(-1))*x(i);
            else
                Nu=0.453*Re^0.5*Pr^(1/3);
                d=(5*x(i))/sqrt(Re);
            end
                H=k*Nu/x(i);
                T=(q/H)+T0;
            if T==Tsa
                break;
            else
            Tsa=T;
        end
    end
    Ts(i)=T;
    h(i)=H;
    delta(i)=d;
end
plot(x,delta)
xlabel('Cartage length','fontsize',18)
ylabel('Boundry layer','fontsize',18)
title('Viscous boundary layer against the cartage length');
grid on