Week 1.3 Flow over Bicycle using MATLAB.
AIM:
Write a MATLAB program to calculate drag force against a cyclist.
OBJECTIVE:
- Calculate Drag force.
- Plot a graph for Velocity vs Drag force.
- Plot a graph for Drag coefficient vs Drag force.
THEORY:
When a cyclist is above 10mph (16 km/h), air resistance(drag) is the dominant force a cyclist needs to overcome. This phenomenon is called Aerodynamic Drag, it is a very interesting subject in its own right. Aerodynamics, in case you are not aware, is the study of the properties of moving air and its interactions with solids moving through it. When speeds reach in excess of 30 mph (48.2 km/h), somewhere in the region of 90% of a cyclist's muscle power is used to blow through this invisible force.

How is Aerodynamic drag calculated?

Where:
FD = Drag Force
('Rho') = The density of air
A= Frontal area of the cyclist on a bike.
CD = Drag coeffient
V = Velocity

PROCEDURE:
* The Command for Velocity vs Drag force.
% MATLAB Program for Drag Force agaist a cyclist
% OUTPUTS - 1. Drag Force Vs Velocity
close all
clc
% Inputs for bicycle
%postion 'Back down'
% Drag Coefficients
c_d = 0.5;
% Area (m^2)
A = 0.339;
% Density (kg/m^3)
rho = 1.5;
% Velocity
v = (1:25);
% FORMULA------------------------------------------------------
Drag_Force = rho*A*v.^2*c_d*0.5;
% PLOTTING-----------------------------------------------------
figure(1)
plot(v,Drag_Force,'color','g','linewidth',3)
title('Drag Force vs velocity ')
xlabel('Velocity')
ylabel('Drag Force')
grid on
*The Command for Drag Co-efficient vs Drag force.
% Velocity (m/s)
v = [10 20 30 40 50];
% Drag coefficent
c_d = 0.82;
% Frontal area (m^2)
A = 0.35;
% Density of air (kg/m^3)
rho = 1.225;
% Drag Coefficient Values---------------------------------
% Sphere-
cd_sphere = 0.47;
% Half Sphere-
cd_halfsphere = 0.42;
% Cone-
cd_cone = 0.50;
% Angle Cube-
cd_anglecube = 0.80;
% Long Cylinder-
cd_longcylinder = 0.82;
%Drag Coefficients-
CD = [cd_sphere cd_halfsphere cd_cone cd_anglecube cd_longcylinder];
% Calculating Drag Force---------------------------------------------
drag_force = 0.5*rho*A*v.*v.*CD;
%Plotting-------------------------------------------------------------
figure(2)
plot (CD,drag_force,'color','r', 'linewidth',5)
title('Drag Coefficient vs Drag Force')
xlabel('Drag Coefficient')
ylabel('Drag Force')
grid on
- Explanation of the program:
- Code for Drag force vs velocity

- close all - Close all the figures whose handles are visible.
- clc - Clears all the text from the command window.
- Line 7 to 8 - Percent command is used to add comments in the code.
- Line 10 to 20 - Defining the user-defined inputs.
- Line 22 to 25 - Formulae to calculate Drag Force.
- Line 29 to 33 - Plotting commands for plotting Drag force vs Velocity diagram.
- title - For giving title to the graph.
- linewidth - The line width command is given to the width of the line which is gonna plotted on the graph.
- xlabel - For labeling the X axis.
- ylabel - For labeling the Y axis.
- grid on - Command given to turn ON the grid in the graph.
- Code for Drag force vs drag coefficient

- close all - Close all the figures whose handles are visible.
- clc - Clears all the text from the command window.
- Line 1 to 2 - Percent command is used to add comments in the code.
- Line 07 to 18 - Defining the user-defined inputs.
- Line 19 to 34 - Defining the Drag coefficients valve and calculating CD.
- Line 36 to 39 - Formulae to calculate Drag Force.
- Line 40 to 48 - Plotting commands for plotting Drag force vs Velocity diagram.
- title - For giving title to the graph.
- linewidth - The line width command is given to the width of the line which is gonna plotted on the graph.
- xlabel - For labeling the X axis.
- ylabel - For labeling the Y axis.
- grid on - Command given to turn ON the grid in the graph.
- Error faced while programming:

- Array operations for Velocities weren't compatible with the Drag force formulae.
RESULTS OF PLOT:


CONCLUSION:
We can conclude that the MATLAB program for Calculation of Drag force against a cyclist computed and the code helps to improve drag against the wind.
REFERENCES: