Matlab Program to calculate the Air drag force over Cycle
Objective :
1.Write a program to plot Velocity vs Drag force.
2.Write a program to plot Drag Co-efficient vs Drag force
Aerodynamic Drag: Aerodynamic drag is a force acting opposite to the relative motion of any object moving with respect to a surrounding fluid.``
`F_d = 1/2rhov^2Ac_d`
Where `F_d` = Drag Force
`rho`= Fluid Density
`v`=velocity
`A` = Crossectional Area
`C_d`= Drag CoefficientCd">
Matlab Code:
%Air Drag calculation over cycle
close all
clear all
clc
%Density of air(kg/m^3)
rho = 1.225;
%Assumed max speed attain by cyclist is 11m/s
vel = linspace(0,11,50);
%drag coeffecient with rider can vary from 0.7-1.15
cd = linspace(0.7,1.15,50);
%frontal area(m^2)
A = linspace(0.3,0.6,50);
%for velocity vs drag assume cd=0.8 and A=0.3
drag_v = 0.5*rho*A.*cd.*(vel.^2);
%plot of velocity vs drag
figure(1)
plot(vel,drag_v)
title('velocity vs drag force')
xlabel('velocity in (m/s)')
ylabel('Drag Force (N)')
grid on
%for drag coeff vs drag force assume v=6m/s
drag_cd=0.5*rho*cd.*A*6^2;
%plot of drag coeff vs drag force
figure(2)
plot(cd,drag_cd)
%axis([0,2,0,16])
title('Drag Coefficient vs Drag Force')
xlabel('Drag Coefficient (cd)')
ylabel('Drag Force (N)')
grid on
Results :