Drag force problem with plots of drag force versus velocity and drag coefficent with drag coefficent of some shapes
% Drag force calculation and plotting
%frontal area (metre square)
a=1;
%density(kg/m3)
rho=1;
%Velocity variation(m/sec)
v=[1:50];
%drag coeffient
Cd=0.6;
%Drag force
Fd=0.5*rho*a*v.^2*Cd;
% Plotting Velocity vs drag force
figure(1)
plot (v,Fd)
xlabel(\'velocity\')
ylabel(\'Drag force\')
%Drag coefficent of some major shapes
%streamline body
c1=0.04
%half sphere
c2=0.43
%sphere
c3=0.47
%cone
c4=0.5
%long cylinder
c5=0.82
%cube
c6=1.05
%draf force calculation of above shape assuming same area
v1=1
CD=[c1 c2 c3 c4 c5 c6];
FD=0.5*rho*a*v1*v1*CD;
%plotting drag force as a function of drag coefficent
figure(2)
plot(CD,FD)
xlabel(\'drag coefficent\')
ylabel(\'drag force\')