Drag force for the flow over bicycle using MATLAB
This project deals with the creation of code for calculating the drag force for a flow of fluid(air) over the cyclist.
A drag force is the resistance force caused by the motion of a body through a fluid, such as water or air. A drag force acts opposite to the direction of the oncoming flow velocity.
Drag force is given by`Fd = 1/2 * rho * A * V^2`
Where rho = density of air at STP,
A = frontal area,
V = velocity of the fluid over the area.
Objective: To determine the drag force and evaluate the results for the comprehension of the effects of various parameters on the drag force.
1. To plot a graph of velocity vs drag force.
CODE:
clear all
close all
clc
% input
c_d = 0.5 % drag coefficient
A = 0.1 % frontal in m^2(assuming)
rho = 1.225 % density of air in Kg/m^3 at STP conditions
V = linspace(1,20,5) % velocity in m/s
%plot 1 for velocity vs the drag force
Fd = rho*A*V.^2*c_d*0.5
plot(V,Fd)
xlabel('Velocity in m/s');
ylabel('Drag force in N');
grid on
Concise Explanation of the code:
The code defines the variable parameters to substantiate the reckoning of drag force over a constant frontal area of 0.1 m^2.
The velocity of the air over the area is varied at values of equal interval with a drag coefficient of 0.5.
Fd = drag force in N.
plot command plots the values of velocity with corresponding drag force.
Results:
The results are plotted on velocity vs drag force.
It can be noted that the drag force increases quadratically for the velocity provided the rest of the parameters are maintained constant.
2. To plot a graph of drag coefficient vs drag force.
In this case, we are considering a constant area and velocity for identifying the changes associated with different values of the coefficient of drag for different types of shapes.
Code:
clear all
close all
clc
% input
c_d = ([ 1.28, 1.14, 0.295, 0.07, 0.045])% drag coefficient for varying shapes as mentioned in the description
A = 1 % frontal in m^2(assuming)
rho = 1.225 % density of air at STP conditions in Kg/m^3
V = 25 % velocity in m/s
%plot for drag co-efficient vs the drag force
Fd = rho*A*V.^2*c_d*0.5
plot(c_d,Fd)
xlabel('drag co-efficient');
ylabel('Drag force in N');
grid on
Concise Explanation of the code:
The code defines the variable parameters to substantiate the reckoning of drag force over a constant frontal area of 1 m^2 and a constant velocity of 25 m/s.
The drag coefficient for different shapes are defined and the corresponding values of drag force is determined
Fd = drag force in N.
plot command plots the values of the coefficient of drag with corresponding drag force.
Results:
The results are plotted on the drag coefficient vs drag force.
It can be noted that the drag force varies linearly provided the rest of the parameters are maintained constant.
Thank you.