A Matlab program for calculating and analyzing the drag force acting on a bicycle for different velocities and different coefficient of drag.
A drag force is the resistance force caused by the motion of a body through a fluid, such as water or air. A drag force acts opposite to the direction of the oncoming flow velocity.
frontal area for a cyclist depends on his position of riding usually it is between 0.1 to 0.6m^2.
units of density are kg/m^3.
coefficient of drag is a dimensionless number.
In the second plot, it is taken in a range of [1-50]
velocity in m/sec.
1. Program to plot Velocity vs Drag force
% a matlab program to calculate the drag force over a bicycle
clear all
close all
clc
% inputs for calculation
% drag coefficient
c_d=0.5
A=0.1 %area
rho=1.2 %density
v=[1:100]; %velocity
%claculating the drag force
drag_force=0.5*rho*A*v.^2*c_d;
%plotting starts
plot(v,drag_force)
title('velocity vs drag force')
xlabel('velocity')
ylabel('drag force')
grid on
1.The plot of velocity vs drag force
2. Program to plot Drag Co-efficient vs Drag force
% a matlab program to calculate the drag force over a bicycle
clear all
close all
clc
% inputs for calculation
% drag coefficient
c_d=[1:50];
A=0.1 %area
rho=1.2 %density
v=10; %velocity
%claculating the drag force
drag_force1=0.5*rho*A*c_d.*v.^2;
%plotting starts
plot(drag_force1,c_d)
title('drag force vs drag coefficent')
ylabel('drag coefficent')
xlabel('drag force')
grid on
2. Plot Drag Co-efficient vs Drag force
Result-
The plot for velocity and drag force concludes that when velocity increases drag force increases exponentially.
The plot for drag coefficient and drag force concludes that when drag force increases drag coefficient also Increases at the same rate.