Project

Flow over Bicycle - MATLAB

When the cyclist rides the bike, it encounters drag force due to the wind and velocity.

`F_d = 1/2 rho A v^2 C_d`

where

`F_d`is the drag force in `kg m/sec^2`

`rho` is the air density in `(kg)/m^3`

`A`is the frontal area in `m^2`

`v` is the velocity in `m^2/sec^2`

`C_d` is the coeffecient of drag force

  • Program to plot Velocity vs Drag force :
% Program to calculate drag force over a rider and bicycle
clear all
close all
clc

%Drag Coefficient
c_d = 0.8
%Frontal Area
A = 0.1
%Density of air
rho = 1.2
%Velocity array
v = [1:100]

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

%making the plot 
plot (v, drag_force, 'linewidth', 3, 'color', 'r');

%Labelling
xlabel('velocity');
ylabel('drag_force');
grid on 

In this case, velocity is considered as an array so that we can have different values of velocity which in turn will give us different values of Drag Force.

The above graph shows the parabolic path which shows drag force is proptional to square of velocity

  • Program to plot Drag Co-efficient vs Drag force :

In the figure, we can see the drag coefficient for different shapes. The approximate values range between 0.045 ~ 2.

So for this program I have varied the drag coeff within the above range and keeping the velocity steady with all the parameters same as that of last program.

% Program to calculate drag force over a rider and bicycle
clear all
close all
clc

%Drag Coeff values from min to max
c_d = linspace( 0.045,2,10);

%Frontal Area
A = 0.1

%Density of air
rho = 1.2
%Velocity
v = 1;

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

%making the plot 
plot (c_d, drag_force, 'linewidth', 3, 'color', 'r');

%Labelling
xlabel('coeff drag force');
ylabel('drag_force');
grid on 

I have used linspace command to generate 10 values between 0.045 to 2.

The graph between the drag force and coeff of drag force is a straight line for different values of Coeff of drag force. It is linearly proportional.

No errors were obtained in the code .

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.