Project

Drag Force calculation against a cyclist using MATLAB

Aim of the Project: To write a Matlab program to calculate drag force against a cyclist (The factors involved are Velocity, Drag coefficient, Frontal Area, Density of air).

Objectives of the Project:

  1. To plot Velocity vs Drag force curve to observe the variation of Drag Force with varying velocity.
  2. To plot Drag Co-efficient vs Drag force curve to observe the variation of Drag Force for different values of drag co-efficient for different shapes for the same frontal area at unit velocity.

INTRODUCTION:

Drag Force: 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. This is the relative velocity between the body and the fluid.

The Drag Force exerted on a body traveling through a fluid is given by:

Fd = cd . ½. A . ρ. v2

Where,

Fd = Drag Force

ρ = Density of the fluid which the body is resisting

A = Frontal area

v = Velocity

cd = Drag Co-efficient

Values taken for the calculation purpose are :

The density of air = 1.225 Kg.m3

let the frontal Area of the cyclist = 0.2 m2

let the velocity (v) = 1 m/s

let the varying velocity for the velocity vs Drag force curve are (v1) = 1 to 70 m/s

The drag coefficients for different shapes for the same frontal area are (cd2) =

  • Sphere = 0.5
  • Flat plate = 1.28
  • Prism = 1.14
  • Airfoil = 0.045
  • bullet = 0.295

The MATLAB program :

% Program to find the drag force on a bicycle
% Program by Taranga Kallol Barua

clear all
close all
clc

% let the inputs be -
% drag coefficient = c_d
% Area of the cross section (m^2) = A
% Density of the fluid resisting the bicycle (kg/m^3) = rho
% Velocity of the bicycle (m/s) = v
% Drag force (Newton) = F_d

c_d = 0.9

A = 0.2

rho = 1.225

v = 1

F_d = c_d*0.5*A*v.^2*rho

% Plotting a curve to show the variation of Drag force with varying velocity

% let the velocity v_1 be vary from 1 to 70
v_1 = [1:70];

% therefore, the drag force

F_d = c_d*0.5*A*v_1.^2*rho;

subplot(1,2,1)
plot(v_1, F_d)
title('velocity vs Drag force')
xlabel('velocity m/s')
ylabel('Drag force kg*m/s^2')
grid on

% Plotting a curve to show the variation of drag force with different drag coefficient for different surfaces
% Drag coefficient for different shapes for same frontal area = c_d_2
% sphere=0.5 flat plate=1.28 prism=1.14 airfoil=0.045 bullet=0.295
% let velocity be unit i.e, v = 1 m/s^2

c_d_2=[0.5 1.28 1.14 0.045 0.295];

% therefore, the drag force

F_d = c_d_2*0.5*A*v.^2*rho;

subplot(1,2,2)
plot(c_d_2, F_d, 'color', 'red')
title('Drag Co-efficient vs Drag force')
xlabel('Drag Co-efficient')
ylabel('Drag force kg*m/s^2')
grid on

OUTPUT:

For the 1st part of the program :

For the 2nd and 3rd part, i.e, the plots between

  1. Velocity vs Drag Force
  2. Drag coefficient vs Drag Force

EXPLANATION AND CONCLUSION:

For the 1st part of the program, we took the values of drag coefficient, velocity, the frontal area of the cyclist, and the density of air as mentioned above in the form of variables in the program and used the Drag Force mathematical formula to execute the value of the Drag force exerted by the cyclist and the output is shown above.

For the 2nd part of the program, I vary the velocity by making it an array from 1 to 70 using the range operator and plot the curve between velocity and drag force using the plot command. We can clearly see the parabolic variation of the curve above and come to the conclusion that the Drag force is increasing proportionally to the square of the velocity.

For the 3rd part, I took different values for the drag coefficient as mentioned above in the form of an array and plot the curve between drag coefficient and drag force using the plot command and the color of the curve to red. We can clearly see the linear growth of the curve and from here we can conclude that the Drag force is increased with an increase in the drag coefficient.

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.