Project

Flow over cyclist

The flow over the cyclist is defined by the drag force acting on the cyclist.

the drag force of the air is given by the equation

F = 0.5*cd*A*v^2

cd = Coefficient of drag

A = Frontal area of the cyclist

v = velocity of the cyclist

The MATLAB code for plotting graphs

clc
clear all
close all

% drag force Fd = (1/2)*(rho*cd*A*V^2)
% rho = desity of the fluid
% cd = coefficient of drag
% A = area of the cross section
% V = velocity of the body in the fluid


% let density be rho = 1.225 kg/m^3 
  rho = 1.225;
% let  area of the cross section be A = 0.5 m^2 
  A = 0.5;
% let the coefficient of drag be as follows
% different values of drag coefficient for different shapes.
  cd = [0.024 0.04 0.09 0.42 0.47 0.50 0.80 0.825 1.05 1.15]; 
% let initial velocity be 5 m/s, increased 5 m/s till 50 m/s
  V = linspace(5,50,10);
% the variable i is for the different shapes of the body
% the variable j is for the increment of the velocity
for i = 1:length(cd)
    for j = 1:length(V)
        Fd(i,j)= (1/2)*(rho*(cd(i))*A*V(j)^2);
    end
end

% Plotting - Velocity vs Drag Force
figure(1)
for i = 1:length(cd)
    plot(V, Fd(i,:),'color',[1 (1-0.1*i) 0]);
    title('Velocity vs Drag Force');
    xlabel('Velocity');
    axis ([0 60 0 inf]);
    ylabel('Drag Force');
    grid on;
    hold on;
end
legend((num2str(cd(1))),(num2str(cd(2))),(num2str(cd(3))),(num2str(cd(4))),(num2str(cd(5))),(num2str(cd(6))),(num2str(cd(7))),(num2str(cd(8))),(num2str(cd(9))),(num2str(cd(10))));

% Plotting - Drag Coefficient vs Drag Force
figure(2)
for j = 1:length(V)
    plot(cd, Fd(:,j),'color',[0 (1-0.1*j) 1]);
    title('Drag Coefficient vs Drag Force');
    xlabel('Drag Coefficient');
    ylabel('Drag Force');
    axis([0 1.5 0 inf]);
    grid on;
    hold on;
end
legend((num2str(V(1))),(num2str(V(2))),(num2str(V(3))),(num2str(V(4))),(num2str(V(5))),(num2str(V(6))),(num2str(V(7))),(num2str(V(8))),(num2str(V(9))),(num2str(V(10))));

the output gives two plots

plot 1 - Velocity vs Drag force keeping coefficient of drag as constant

notice - the plot is quadratic in nature because force is proportional to square of velocity

plot 2 - Drag coefficient vs Drag force keeping velocity constant

notice - the plot is linear due to linear relation of drag force and drag coefficient

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.