Project

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

Aim - To write a program in MATLAB to calculate drag force on a moving bicycle

Objective-

a- To calculate drag force

b- To draw a pot between velocity and drag force

c- To draw a pot between drag coefficient and drag force

Explanation-Drag force is a resistive force against the cyclist who moving toward the wind.it

it creates a more resistive force to cyclist.it is the most important factor to consider in

automobile and aerodynamics area.

Formula will use- Drag Force= 1/2 *rho*A*V^2*c_d

where,

rho=density

A= area

V= velocity

c_d= drag coeffient

Algorithm

1- using plot command to plot a graph

2- using xlabel and ylabel to define x and y-axis

3- using grid on to show the grid in graphs

A- writing commands for drag force vs velocity

clear all
close all
clc

% calculation of drag force on a moving bicycle

%inputs

%velocity in m/s
v= [2 4 6 8]

%rho= density in kg/m^3
rho= .8

%area in m
A= .4

% drag coeffient 
c_d=.9

drag_force= .5* rho* A* v.^2*c_d;

plot(v,drag_force,'color','r')

xlabel('velocity')
ylabel('drag_force')

grid on

As we see the drag force is changing by 4th time with velocity, it means when we increase the value of speed the drag force will increase is with 4th time of speed.

B-writing commands for drag force vs drag coefficient

clear all
close all
clc

% calculation of drag force on a moving bicycle

%inputs

%velocity in m/s
v= 4

%rho= density in kg/m^3
rho= .8

%area in m
A= .4

% drag coeffient 
c_d=[.2 .4 .6 .8]

drag_force= .5* rho* A* v.^2*c_d;

plot(c_d,drag_force,'color','g')

xlabel('c_d')
ylabel('drag_force')

grid on

As we see the result is changing with change in cd value.

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.