Project

Drag force calculation on an object using Matlab

Aim = Write a Matlab program to calculate drag force against a cyclist.

Introduction =

Every object which moves through air is subjected to drag force.
The formula for drag force is given as-

Drag force = `1/2*rho*v^2*A*C_d`

where,F = Drag force experienced by the cyclist due to relative air. (`kg m/sec`)

`rho` = density of air [`(kg)/(m^3)`]

v = velocity `(m/sec)`

A = Frontal area of the cyclist. `m^2`

C_d = Coefficient of Drag ( unitless)

Code for Matlab program to generate Velocity vs Drag force plot is as follows=

"Linspace" = this command generates an array of values specified between two values.

"plot" = this command generates a plot when x and y values are provided in the paranthesis.

% Air Flow over a Bicycle.
% Velocity vs Drag Force

clear all
close all
clc

% Inputs

% Density (kg/m^3)
rho = 1.2

% Area (m^2)
a = 1

% Velocity (m/s)
v = linspace(1,50,50); %we are finding the drag force for each values generated for velocity by "linspace" command.

% Drag co-efficient
c_d = 3;

% Drag Force (kg-m/s^2)
drag_force = 0.5*rho*a*v.^2*c_d;

plot(v,drag_force);
xlabel('Velocity');
ylabel('Drag Force');
grid on
title('Velocity vs Drag force')

the plot is as follows= figure (1)

Code for Matlab program to generate Coefficient of drag vs Drag force plot is as follows=

% Air Flow over a Bicycle.
% Coefficient of drag vs Drag Force

clear all
close all
clc

% Inputs

% Density (kg/m^3)
rho = 1.2

% Area (m^2)
a = 1

% Velocity (m/s)
v = 2

% Drag co-efficient
c_d = linspace(0.47,1.15,50); % considering various values of coefficient of drag between 0.47 and 1.15


% Drag Force (kg-m/s^2)
drag_force = 0.5*rho*a*v.^2*c_d;

plot(c_d,drag_force);
xlabel('C_d');
ylabel('Drag Force');
grid on
title('Coefficent of Drag vs Drag force')

the plot is as follows= figure (2)

Conclusion =

As per the figure(1) ,we can see that the Drag force increases exponentially, and the Drag force increases in linear manner with respect to coefficient of drag in figure (2).

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.