Project

FLOW OVER BICYCLE

AIM: To calculate Drag Force against a cyclist by using MATLAB.

GUI Used: MATLAB R2020a

OBJECTIVES:

  • Some basics theories of Drag Force will be discussed.
  • We will try to follow few steps to create a program to calculate the Drag force and the codes will be explained.
  • Program to plot Velocity vs Drag Force will be generated and explained.
  • Program to plot Drag Coefficient vs Drag Force will be generated and explained.

BASIC THEORY:

A Drag Force is the resistance force caused by the motion of the body through a fluid, such as air or water. A Drag Force acts opposite to the direction of the oncoming flow velocity.

The Drag force Fd exerted on a body travelling through a fluid is given by;

Where,

A represents the projected the frontal Area of a moving Body. Imagine that you are exactly in front of a cyclist on his bicycle in front of a white wall as shown below in the figure. Here the projected frontal area represents the whole visible area of the cyclist on his bicycle. It is denoted as A and its unit is m2(square-meter). It is always proportional to the Drag Force i.e. FdA.

ρ represents the density of the fluid through which the body is moving and its unit is kg/m3(kilogram per cubic meter)

v represents the flow velocity relative to the object and its unit is m/s (meter per second).

Cd represents the Drag Coefficient. It is a dimensionless quantity that is used to quantify the drag or resistance of an object in fluid like air or water. Drag Coefficient a function of several parameters like shape of the body, Reynolds number for the flow etc.

PROCEDURES:

Steps to be followed to create a program to calculate the Drag Force;

  • Step1: Open MATLAB.
  • Step2: Click on New Script to open the Editor Window.
  • Step3: Input code need to be written here and then click on Save option to save the program as a M-file.
  • Step4: Run the programming to get an output.

PROGRAMMING-1:

Program to calculate the Drag Force and to plot Velocity vs Drag Force Diagram.

% A program to calculate the Drag Force against a Cyclist
% To plot Velocity vs Drag Force 
clear
close all
clc
% Input all the factors involved to produce Drag Force


% Density of Air in (kg/m^3)
rho=1.2;
% Fontal Area in (m^2)
A=0.35;
% Flow velocity in (m/s^2)
v=(1:20);
% Drag Coefficient 
C_d=0.8;
% Drag Force in (N)
F_d=0.5*rho*A*v.^2*C_d;

% To plot Velocity vs Drag Force
plot(v,F_d,'linewidth',2,'marker','o' ,'color','k')
xlabel('Velocity[m/s]')
ylabel('Drag Force[N]')
grid on

CODE EXPLANATION:

To calculate Drag Force in MATLAB, we have created the above Program where,

Clear all: It removes items from workspace, freeing up system memory.

close all: It deletes all figures whose handles are not hidden.

clc: It clears Command Window.

  • Values for the factors that are involved to produce the drag force, are taken into account.
  • As we wanted to plot a velocity vs Drag Force diagram, we have taken 1 to 20 velocity range. So that we will can calculate different Drag Force for every change in velocity.
  • ‘plot’ function is used to plot the diagram.
  • ‘linewidth’ is used for thickness of line in the plot.
  • 'marker' is used to mention the marker style.
  • 'color' is used to mention the color of the line of the plot.
  • ‘xlabel’ and ‘ylabel’ function is used to labelling the x and y axis.
  • grid on helps to get a better view of the plot by switching on the grid of the plot.

OUTPUT-1:

VELOCITY vs DRAG FORCE:

PROGRAMMING-2:

% A program to calculate the Drag Force against a Cyclist
% To plot Drag Coefficient vs Drag Force 
clear
close all
clc
% Input all the factors involved to produce Drag Force


% Density of Air in (kg/m^3)
rho=1.2;
% Fontal Area in (m^2)
A=0.35;
% Flow velocity in (m/s^2)
v=6;
% Drag Coefficient 
C_d=[0.47 0.42 0.50 1.05 0.80 0.82 1.15 0.04 0.09]
% Drag Force in (N)
F_d=0.5*rho*A*v.^2*C_d

% To plot Velocity vs Drag Force
plot(C_d,F_d,'linewidth',2,'marker','o' ,'color','r')
xlabel('Drag Coefficient')
ylabel('Drag Force[N]')
grid on

CODE EXPLANATION:

To calculate Drag Force in MATLAB, we have created the above Program where,

Clear all: It removes items from workspace, freeing up system memory.

close all: It deletes all figures whose handles are not hidden.

clc: It clears Command Window.

  • Values for the factors that are involved to produce the drag force, are taken into account.
  • As we wanted to plot a Drag Coefficient vs Drag Force diagram, we have taken values from figure 2.So that we can have different value for Drag Force while there is change in Drag Coefficient value.
  • ‘plot’ function is used to plot the diagram.
  • ‘linewidth’ is used for thickness of line in the plot.
  • 'marker' is used to mention the marker style.
  • 'color' is used to mention the color of the line of the plot.
  • ‘xlabel’ and ‘ylabel’ function is used to labelling the x and y axis.
  • grid on helps to get a better view of the plot by switching on the grid of the plot.

OUTPUT-2:

DRAG COEFFICIENT vs DRAG FORCE:

CONCLUSION:

So, we can conclude from the these two plot that the value of Drag force increases exponentially for increase in value of Velocity and the value of Drag force increases linearly for the increase in value of Drag coefficient.

References:

1. https://www.sci-sport.com/en/articles/field-method-for-assessing-the-cycling-frontal-area-005.php

2. https://carsoholicdesigner.files.wordpress.com/2017/07/drag-coeff.png?w=328&h=452

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.