Flow over Bicycle
Here we are going to write a matlab program to calculate a dragforce against a cyclist.
In first we wrote a program to plot velocity vs dragforce
In second we wrote a program to plot drag coefficient vs drag force.
Formula used : Fd=rho*A*v^2*Cd*0.5
where : rho=density,
A =frontal area,
V =Velocity of object,
Cd =Drag coefficient.
Explanation of results : In the graph it clearly shows that when the velocity increases the drag force also gets increased while on the other hand(plot) the coefficient of the drag also increases while the drag force increases
Attached screenshots of results for your reference.
%program to calculate drag force
clear all
close all
clc%
%inputs
c_d =1.25
A = 0.1
rho = 1.2
v = [1:50]
%formula to calculate drag force
drag_forcee = 0.5*rho*A*v.^2*c_d;
%plotting a graph
plot(v, drag_forcee)
xlabel('velocity')
ylabel('drag_forcee')
grid on
--------------------------------------------------------------------------
%program to calculate drag force
clear all
close all
clc%
%inputs
c_d =[0.1:2.5]
A = 0.1
rho = 1.2
v = 1
%formula to calculate drag force
drag_forcee = 0.5*rho*A*v^2*c_d;
%plotting a graph
plot(c_d, drag_forcee)
xlabel('c_d')
ylabel('drag_forcee')
grid on
program to plot (1)velocity vs drag force
(2)drag coeff vs drag force