Drag Coefficent
clc
clear
N=10;
amin=0;
amax=0.12;
M012=0.4;
K=0.4;
a=K*K;
L=amax-amin;
DL=L/N;
LL(1)=amin;
US(1)=0.00001;
for i=1:N-1;
LL(i+1)=LL(i)+DL;
CD(i+1)=a/(2*log(LL(i+1)-log(0.03)));
end
plot(CD,LL,'-*')
title('Drag Coeficent Vs Height in Donut')
xlabel('Drag Coeficent')
ylabel('Height in Donut (m)')
grid on
axis equal
clear
N=10;
amin=0;
amax=0.12;
M012=0.4;
K=0.4;
a=K*K;
L=amax-amin;
DL=L/N;
LL(1)=amin;
US(1)=0.00001;
for i=1:N-1;
LL(i+1)=LL(i)+DL;
CD(i+1)=a/(2*log(LL(i+1)-log(0.03)));
end
plot(CD,LL,'-*')
title('Drag Coeficent Vs Height in Donut')
xlabel('Drag Coeficent')
ylabel('Height in Donut (m)')
grid on
axis equal
Friction Velcoity
clc
clear
N=10;
amin=0;
amax=0.12;
M012=0.4;
K=0.4;
a=M012*K;
L=amax-amin;
DL=L/N;
LL(1)=amin;
US(1)=0;
for i=1:N-1;
LL(i+1)=LL(i)+DL;
US(i+1)=a/(log(LL(i+1)+3.5066));
end
plot(US,LL,'-*')
title('Friction Velcoity Vs Height in Donut')
xlabel('Friction Velcoity (m/Sec)')
ylabel('Height in Donut (m)')
grid on
axis equal
clear
N=10;
amin=0;
amax=0.12;
M012=0.4;
K=0.4;
a=M012*K;
L=amax-amin;
DL=L/N;
LL(1)=amin;
US(1)=0;
for i=1:N-1;
LL(i+1)=LL(i)+DL;
US(i+1)=a/(log(LL(i+1)+3.5066));
end
plot(US,LL,'-*')
title('Friction Velcoity Vs Height in Donut')
xlabel('Friction Velcoity (m/Sec)')
ylabel('Height in Donut (m)')
grid on
axis equal
Deardruf Velocity affected by Temperature
clc
clear
g=9.81;
N=100;
zmin=0;
zmax=0.12;
zz=zmax-zmin;
dz=zz/N;
FH=0.2;
T=300;
rr=0.87;
TV=T*(1+0.61*rr)
z(1)=0;
W(1)=0;
for i=1:N-1;
z(i+1)=z(i)+dz;
W(i+1)=((g*z(i+1)*FH)/TV)^(1/3)
end
plot(W,z)
xlabel('Deardruff Velocity')
ylabel('Donut Height')
title('Deardruff Velocity vs Height')
grid on
clear
g=9.81;
N=100;
zmin=0;
zmax=0.12;
zz=zmax-zmin;
dz=zz/N;
FH=0.2;
T=300;
rr=0.87;
TV=T*(1+0.61*rr)
z(1)=0;
W(1)=0;
for i=1:N-1;
z(i+1)=z(i)+dz;
W(i+1)=((g*z(i+1)*FH)/TV)^(1/3)
end
plot(W,z)
xlabel('Deardruff Velocity')
ylabel('Donut Height')
title('Deardruff Velocity vs Height')
grid on
Velocity Profile Over Soil
clc
clear
N=10;
amin=0;
amax=0.12;
M012=0.4;
K=0.4;
a=K*K;
L=amax-amin;
DL=L/N;
LL(1)=amin;
MM(1)=0.2507*(log(LL(1))+10.1626*LL(1)+3.5066);
for i=1:N-1;
LL(i+1)=LL(i)+DL;
MM(i+1)=0.2507*(log(LL(i+1))+10.1626*LL(i+1)+3.5066)
end
plot(MM,LL,'-*')
title('Wind Velocity Vs Height in Donut')
xlabel('Wind Velocity (m/Sec)')
ylabel('Height in Donut (m)')
grid on
set(gca,'XLim',[0 0.6],'YLim',[0.02 0.12])
% axis equal
clear
N=10;
amin=0;
amax=0.12;
M012=0.4;
K=0.4;
a=K*K;
L=amax-amin;
DL=L/N;
LL(1)=amin;
MM(1)=0.2507*(log(LL(1))+10.1626*LL(1)+3.5066);
for i=1:N-1;
LL(i+1)=LL(i)+DL;
MM(i+1)=0.2507*(log(LL(i+1))+10.1626*LL(i+1)+3.5066)
end
plot(MM,LL,'-*')
title('Wind Velocity Vs Height in Donut')
xlabel('Wind Velocity (m/Sec)')
ylabel('Height in Donut (m)')
grid on
set(gca,'XLim',[0 0.6],'YLim',[0.02 0.12])
% axis equal
Wind Distribution Analysis
clc
clear
alpha=2;
N=10;
for i=1:N;
MMM(i)=rand(1,1);
end
Mtot=sum(MMM);
for i=1:N;
MM(i)=MMM(i)/Mtot;
end
M=sort(MM)
grid on
MMAX=max(M)
DM=(M(N)-M(1))/N;
for i=1:N;
PPr(i)=alpha*DM*(M(i)^(alpha-1))*((1/MMAX)^alpha)*exp((M(i)/MMAX)^alpha);
end
Pr=sort(PPr)
area(M,Pr)
title('Probability of Wind Speed')
xlabel('Wind Speed (m/Sec)')
ylabel('Probability of Velocity')
grid on
clear
alpha=2;
N=10;
for i=1:N;
MMM(i)=rand(1,1);
end
Mtot=sum(MMM);
for i=1:N;
MM(i)=MMM(i)/Mtot;
end
M=sort(MM)
grid on
MMAX=max(M)
DM=(M(N)-M(1))/N;
for i=1:N;
PPr(i)=alpha*DM*(M(i)^(alpha-1))*((1/MMAX)^alpha)*exp((M(i)/MMAX)^alpha);
end
Pr=sort(PPr)
area(M,Pr)
title('Probability of Wind Speed')
xlabel('Wind Speed (m/Sec)')
ylabel('Probability of Velocity')
grid on
Unless otherwise noted, all content on this site is @Copyright by Ahmed Al Makky 2012-2013 - http://cfd2012.com