Project

Flow over bicycle - MATLAB

Objective : To understand the flow over bicycle and to calculate the drag force with respect to velocity and drag coefficient, Also to plot a graph for the same using MATLAB.

Theory : when a cyclist rides a bicycle it experiences a drag force (wind resistance) . This drag force depends on the factors like density of the medium in which the bicycle is rode, frontal area, velocity and drag coeffiecient.

The value of drag coeffiecent changes if the shape of frontal area changes.

Formula : Drag force, F = 0.5*ρ*A*V^2*c_d

where,

ρ = Density of the medium in which the bicycle is rode

A= frontal area

V = velocity of the bicycle

c_d = drag coeffiecient ( constant for a given shape )

From the above equation it can be seen that the drag force is directly proportional to the area ,thus cyclists can be generally found to crouch inorder to have minimal frontal area while riding a bicycle and also wearing helmets with a particular shape inorder to face miniumum resistance and have maximum velocity.

velocity is inversely proportional to the square root of frontal area.

The following is the MATLAB code for the above problem statement :

clear all
close all
clc

% FLOW OVER BICYCLE

% INPUTS

% Drag coeffiecent
c_d=0.8

% Area
A=0.1

% Density
rho=1.2

% velocity
v=[1:20]


% Drag force
drag_force=rho*A*v.^2*c_d*0.5

plot(v,drag_force)
xlabel('velocity')
ylabel('drag force')
grid on

Here,

a) % symbol is used to write commands

b) Range operator ":" is used to have range of values for velocity so that a plot can be obtained.

c) Air is choosen as the medium (density = 1.2) and all the units are assumed to be in SI .

d) xlabel and ylabel are used to label the x and y axis respectively.

e) Grid is turned on to have a clearer representation.

The above figure shows the variation of drag force w.r.t velocity. More the values of velocity, smoother is the plot obtained.

Drag (air resistance) increases with speed because more air molecules strike the surface of the object per second as its velocity increases.

Now writing a code to check the variation of drag force vs drag coefficient

close all
clear all
clc

% Drag Co-efficient vs Drag force

% Area
A=0.1

% Density
rho=1.2

% velocity
v=5

% drag coefficent values as per the shape

% circle
c1 = 0.47

% semi circle
c2 = 0.42

% triangular shape
c3 = 0.5

C = [c1 c2 c3]



% Drag force
drag_force=rho*A*v^2.*C*0.5

% Drag Co-efficient vs Drag force

plot(C,drag_force)
xlabel('drag coefficient')
ylabel('drag force')
grid on

The below figure shows the linear variation of drag force w.r.t 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.