Project

A program to calculate the drag force on a bicycle

Description:

Calculate the drag force on a bicycle using MATLAB and PLOT using DragForce vs Velocity.

Formula for Drag Force: Fd=1/2*P*A*V.^2*cd

where:

Fd-Newton(N) - kg/m-s.^2

Density - kg/m.^3

Velocity (V) - m.^2

Constant - m.^2/s.^2

Program:

Case-1: velocity vs drag force

clear all 

close all 

clc

% Inputs

% Drag coefficient

c_d = 0.8

% Area m.^2

A = 0.1

% Density kg/m.^3

rho = 1.2

% Velocity `m.^2

V = [1 2 3 4 5]

% drag Force = `rho*a*v.^2*c_d*0.8
% Plotting 
plot(v,F_d,'linewidth','color','r')
xlabel('Velocity')
ylabel('drag Force')
title('drag Force vs Velocity')

% Plotting 
plot(v,F_d,'linewidth','color','r')
xlabel('drag coefficient')
ylabel('drag force')
title('drag coefficient vs drag force')
grid on

Case-2: drag coefficient vs drag force

clear all 
close all 
clc

% Inputs

% Drag coefficient

c_d = [1:50]

%Area m^2

A = 0.1

% Density kg/m^3

rho = 1.2

% Velocity `m.^2

v = [2]
drag_force = rho*A*v.^2*c_d*0.8
plot(c_d,drag_force)
xlabel('drag_coefficient')
ylabel('drag_force')
title('drag_coefficient vs drag_force')
grid on

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.