Project

Flow over Bicycle

1.Matlab program to calculate drag force against a cyclist by incorporating a function to plot Drag force Vs Velocity. In this program drag coefficient and frontal area is constant with varying velocity.

% Program to calculate drag force
clear all
close all
clc

% Input
% drag coefficient
c_d=0.8;
% frontal area m^2
A=0.1;
% density kg/m^3
rho=1.2;
%velocity m/s
v=[1:50];

drag_force1(c_d,rho,A,v);



% function for calculating drag force and plotting drag force vs velocity
function []= drag_force1(c_d,rho,A,v)
drag_force=0.5*rho*A*v.^2*c_d;

plot(v,drag_force)
xlabel(\'Velocity\')
ylabel(\'Drag Force\')
grid on
end

Output:

2.Matlab program to calculate drag force against a cyclist by incorporating a function to plot Drag force Vs Drag Coefficient. In this program drag velocity and frontal area is constant with varying Drag coefficient due to a different shape.

% Program to calculate drag force
clear all
close all
clc

% Input
% Drag coefficient of Streamlined body, Streamlined half-body, half-sphere,
% sphere,long cylinder and short cylinder respectively
c_d=[0.04 0.09 0.42 0.47 0.82 1.15];
% frontal area m^2
A=0.1;
% density kg/m^3
rho=1.2;
% Velocity m/s
v=13;

dragforce2(c_d,rho,A,v);


function []= dragforce2(c_d,rho,A,v)
drag_force=0.5*rho*A*v.^2*c_d;

plot(c_d,drag_force)
xlabel(\'Drag Coefficient\')
ylabel(\'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.