Calculate the Drag force on a Bicycle using Matlab Program
Aim : % calculate the Drag force on a bicycle using MATLAB
Formula for drag force:
Drag force F = 1/2*rho*A*v^2*c_d
where
rho = density (kg/m^3)
A = frontal area (m^2)
v = velocity (m/s)
c_d = drag cofficent
Software Used = Matlab
Program:
1. Drag_force Calculation:
% calculate the drag force on a bicycle
clear all
close all
clc
% input variables
% 1. A = frontal area
% 2. rho = density
% 3. v = velocity
% 4. c_d = drag cofficent
A = 0.5;
rho = 1.2;
v = [2,5,8,10]
c_d = 0.8;
Drag_force = A*rho*v.^2*c_d*0.5
Output:
v =
2 5 8 10
Drag_force =
0.9600 6.0000 15.3600 24.0000
2.Plot (velocity vs Drag force):
Program:
% calculate the drag force on a bicycle
clear all
close all
clc
% input variables
% 1. A = frontal area
% 2. rho = density
% 3. v = velocity
% 4. c_d = drag cofficent
A = 0.5;
rho = 1.2;
v = [2,5,8,10]
c_d = 0.8;
Drag_force = A*rho*v.^2*c_d*0.5
plot(v,Drag_force)
xlabel('v')
ylabel('Drag_force')
grid on
Output Graph(Velocity vs Drag Force):

3.Drag Coffecient vs Drag force:
Program:
% calculate the drag force on a bicycle
clear all
close all
clc
% input variables
% 1. A = frontal area
% 2. rho = density
% 3. v = velocity
% 4. c_d = drag cofficent
A = 0.5;
rho = 1.2;
v = 5;
c_d = [1.17 1.20 1.16 1.60 1.55 1.96 2.00 2.30 2.20 2.05]
Drag_force = A*rho*v.^2*c_d*0.5
plot(c_d,Drag_force)
xlabel('Drag_ coefficent')
ylabel('Drag_force')
grid on
Output:
c_d =
1.1700 1.2000 1.1600 1.6000 1.5500 1.9600 2.0000 2.3000 2.2000 2.0500
Drag_force =
8.7750 9.0000 8.7000 12.0000 11.6250 14.7000 15.0000 17.2500 16.5000 15.3750
Plot (Drag_coffecient vs Drag_force):
