Drag force over a bicycle using MATLAB
The cyclist experiences a Drag force while riding. Here we are writing a Matlab program to calculate drag force against a cyclist.The factors involved are Velocity,Drag coefficient,Frontal Area,Density of air.
- We are incorporating a function to plot Drag force vs Velocity.
- Also a function to plot Drag force vs Drag Coefficient. For the same frontal area the coefficient varies for different shapes.
The plot of Drag force VS Velocity is below.% a program to calculate the drag force on a bicycle clear all close all clc % inputs % drag coefficient c_d=linspace(0,1,25); %area m^2 A=0.2; % velocity v=linspace(1,2,25); % density rho=1.2 drag_force=rho*A*v.^2.*c_d*0.5; figure(1) plot(v,drag_force) xlabel('velocity') ylabel('drag_force') figure(2) plot(c_d,drag_force,'color','r') xlabel('drag_coefficient') ylabel('drag_force')
The plot of Drag force vs Drag Coefficient is below.