Project

To calculate the drag force and to plot the graph between velocity and drag force, drag coefficient and drag force

The program to calculate the drag force and to plot the graph between velocity and drag force. The program has been explained in the form of comments during coding

% A program calculate drag force against a cyclist.
clear all
close all
clc
% Inputs that are required to calculate drag force for a cyclist.

% Drag coefficient input
c_d = 0.8;

% The value of density of air in kg/m^3
rho = 1.2;

% area of cyclist which will experience a drag force in m^2
A = 0.1;

% The velocity of cyclist in m/sec
v = [1:50];

% To calcuate drag force
drag_force = rho*A*v.^2*c_d*0.5;

% To plot a graph between velocity and drag force
plot(v, drag_force,'color','g')
xlabel('Velocity')
ylabel('Drag Force')

% To On the grid of the graph
grid on

The program to calculate the drag force and to plot the graph between drag coefficient and drag force. The program has been explained in the form of comments during coding

% A program calculate drag force against a cyclist.
clear all
close all
clc
% Inputs that are required to calculate drag force for a cyclist.

% Drag coefficient can vary for cyclist with same area but in different
% position during cycling
c_d = [0.1:5];

% The value of density of air in kg/m^3
rho = 1.2;

% area of cyclist which will experience a drag force in m^2
A = 0.1;

% The velocity of cyclist in m/sec
v = 1;

% To calcuate drag force
drag_force = rho*A*v^2.*c_d.*0.5;

% To plot a graph between drag coefficient and drag force
plot(c_d, drag_force,'color','r')
xlabel('Coefficient Of drag')
ylabel('Drag Force')

% To On the grid of the graph
grid on
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.