Calculation of flow over a bicycle using MATLAB
Drag Force
A drag force is the resistance force caused by the motion of a body through a fluid. A drag force acts opposite to the direction of the oncoming flow velocity.
Fd = 0.5*rho*A*V^2*Cd
where,
- Fd = Drag force (kgm/s^2)
- rho = fluid density (kg/m^3)
- A = Frontal area (m^2)
- V = Velocity of object (m/s)
- Cd = Coefficient of drag (unitless)
Frontal area (A)
The value for frontal area (A) is taken as - 0.44m^2
A cyclist presents a frontal area of 0.3 to 0.6 metres squared depending on position. Frontal areas of an average cyclist riding in different positions are as follows
- Tops position - 0.63
- Hoods position - 0.40
- Drops position - 0.32
The average frontal area of the three diffrent positions is taken as the frontal area (A) which is 0.44m^2
The values are referred from a website, cycling power lab. The reference link is given below (reference link - https://www.cyclingpowerlab.com/CyclingAerodynamics.aspx)
Coefficient of Drag (Cd)
The value for coefficient of drag(Cd) is taken as - 0.2486 - 0.3092
As the frontal area reduces the coefficient of drag also reduces . The cyclist is considered to be in diffrent position in a Scott Foil bike, so coefficient of drag is 0.2486 - 0.3092
This value of drag coefficient is referred from an experiment conducted by Cycling weekly. The data of the experiment is give below (reference link -
time-2:52)
Velocity (V)
The velocity is considered to be 40Kmph which is - 11.11m/s
Fluid density (rho)
Program
The Matlab program to calculate drag force against a cyclist is as follows.
% Matlab program to calculate drag force against a cyclist.
clear all
close all
clc
% At a constant coefficient of drag and gradually increasing velocity,
% velocity vs drag force is plotted using the below program
% Inputs
rho = 1.2
A = 0.44
V = linspace(0,11.11,10)
Cd = 0.3092
Fd = 0.5*rho*A*((V.^2)*Cd)
% Plot
figure(1)
plot(V,Fd,'linewidth',3)
xlabel('Velocity in [m/s]')
ylabel('Drag force in [kgm/s^2]')
title('Velocity vs Drag force')
grid on
% At a constant velocity and gradually increasing coefficient of drag,
% coefficient of drag vs drag force is plotted using the below program
% Inputs
V = 11.11
Cd = linspace(.2486,0.3092,10)
Fd = 0.5*rho*A*((V.^2)*Cd)
figure(2)
plot(Cd,Fd,'linewidth',3)
xlabel('Coefficient of drag')
ylabel('Drag force in [kgm/s^2]')
title('Coefficient of drag vs Drag force')
grid on
Program explanation
- At first the commands clear all, close all, clc are entered to clear the storage and variables in the workspace.
- Then the required variables are entered accordingly to calculate the drag force.
- To plot the velocity vs drag force, coefficient of drag force value is kept as constant the the velocity is varried from 0m/s - 11.11m/s as 10 values using the linspace command in line13.
- Then these values are used to calculate the drag force values for the respective velocities.
- The accuired values of velocities and drag forces are plot on a graph using the plot command.
- The x-axis and y-axis are labeled respectively using the xlabel and ylabel command.
- The plot is given a title using title command
- Then to plot the coefficient of drag vs drag force, velocity is kept as constant and the coefficient of drag force value is varried from 0.2486 - 0.3092 as 10 values using the linspace command in line30.
- Then these values are used to calculate the drag force values for the respective drag coefficient values.
- The coefficient of drag force and drag force are plot on a graph using plot command.
- Figure command is used to creat a new figure window to display the plots seperately.
- The x-axis and y-axis are labeled respectively using the xlabel and ylabel command.
- The plot is given a title using title command.
Result
- All the calculated variables are given in the workspace.
- The command window results are given below
- The plot between Velocity vs Drag force
- The plot between coefficient of drag vs Drag force