Drag Calculation over a Cyclist
The Following is the function created to calculate Drag Force as a function of velocity
function D=drag_vel(p,Cd,A,V)
D=0.5*p*Cd*A.*(V.^2);
end
The Following is the function created to calculate Drag Force as a function of velocity
function D=drag_Cd(p,Cd_shapes,A,V_const)
D=0.5*p.*Cd_shapes*A*(V_const^2);
end
The Following is the code where the two functions have been called
p=1.225; %Density of air
A=1; %Assumed Frontal Area of 1m.sq
Cd=0.4; %Assumed constant Drag Coefficient of 0.4
V=linspace(0,100,10); %Velocity from 0-100 m/s
%To plot Drag force as a function of velocity
D_V=drag_vel(p,Cd,A,V);
figure(1)
plot(V,D_V)
grid on
hold on
xlabel('Velocity (m/s)')
ylabel('Drag Force (N)')
title('Drag Force as a function of Velocity')
%To plot Drag force as a function of Drag Coefficient
V_const = 20;
%Drag Coeff for base shapes
%Flat plate =1.28
%Prism=1.14
%Sphere=0.4
%Bullet=0.295
%Aerofoil =0.045
Cd_shapes=[1.28 1.14 0.4 0.295 0.045];
Drag_cd=drag_Cd(p,Cd_shapes,A,V_const)
figure(2)
plot(Cd_shapes,Drag_cd)
grid on
hold on
xlabel('Drag Coefficient')
ylabel('Drag Force (N)')
title('Drag Force as a function of Drag Coefficient')
NOTE: It can be observed that, the drag force increases exponentially with velocity and increases linearly with Cd.