Project

MATLAB program to calculate drag force against a cyclist

AIM OF THE PROJECT:

To write a MATLAB program to determine the drag force against a Cyclist during cycling, including the graph between the velocity and the drag force, and also include a plot of a graph between the Drag Coefficient and the drag force.

INTRODUCTION:

Drag Force- In simple words, the drag force is a kind of resistive force that is caused due to the motion of an object when it moves through a fluid (like, air, water, etc) is known as a drag force. This force is always acting in the opposite direction of the moving velocity of the object. Generally, this force depends on the frontal area of the object, and the moving velocity of the object.

GOVERNING EQUATION:

The mathematical formula needed to calculate the drag force is shown below,

Where,

  1. (F_D) is the drag Force
  2. (rho) is the density of the fluid
  3. A is the frontal area
  4. V is the velocity of the moving object
  5. (C_D) is the coefficient of drag

OBJECTIVE OF THE PROJECT:

  1. MATLAB code corresponding to the formula to calculate the drag force against a Cyclist during cycling, and a graph between the velocity and the drag force
  2. MATLAB code corresponding to the formula to calculate the drag force against a Cyclist during cycling, and a graph between the drag Co-efficient and the drag force

MATLAB CODE:

Part First:

MATLAB code corresponding to the formula to calculate the drag force against a Cyclist during cycling, and a graph between the velocity and the drag force

% a program to calculate drag force

close all

clear all

clc

Input Data

% frontal area in m^2

A = 2;

% density in kg/m^3

rho = 1;

% velocity in m/s

V = [ 1 : 10 ] ;

%Drag Coefficient

C_D = [1 1.5 2 2.5 3];

for i = 1:5

%drag force in N

F_D = 0.5*rho*A*V.^2*C_D(i);

% plotting

plot (V, F_D)

xlabel ('V-Velocity')

ylabel ('F_D-Drag-Force')

axis ( [ -1 10 -1 10] )

grid on

hold on

end

OUTPUT:

Part Second:

MATLAB code corresponding to the formula to calculate the drag force against a Cyclist during cycling, and a graph between the drag Co-efficient and the drag force

close all

clear all

clc

Input Data

% frontal area in m^2

A = 2;

% density in kg/m^3

rho = 1;

% velocity in m/s

V = [ 1 : 10 ] ;

%Drag Coefficient

C_D = [1 1.5 2 2.5 3];

for i=1:10

%drag force in N

F_D = rho*A*V(i)^2*C_D.*0.5;

% plotting

hold on

plot ( C_D ,F_D )

xlabel ('C_D-drag co-efficient')

ylabel ('F_D-drag force')

grid on

end

OUTPUT:

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.