Flow over a Bicycle using MATLAB
AIM: To calculate the Drag Force for Flow over a Bicycle using Matlab programming.
INTRODUCTION: Drag is a mechanical force. It is generated by the interaction and contact of a solid body with a fluid (liquid or gas). It is not generated by a force field, in the sense of a gravitational field or an electromagnetic field, where one object can affect another object without being in physical contact. For drag to be generated, the solid body must be in contact with the fluid. If there is no fluid, there is no drag. Drag is generated by the difference in velocity between the solid object and the fluid. There must be a motion between the object and the fluid. If there is no motion, there is no drag.
The Drag Force is calculated using the following formula-
Drag Force = ( A*rho*v^2*Cd)*0.5
Where 'A', 'rho', 'v' and 'Cd' denote Frontal Area, Density of air, Velocity, and the Drag-coefficient.
CODE:
1. To calculate drag forces for different velocities
% A program to calculate the drag force on a bicycle
clear all
close all
clc
% Inputs
% Drag coefficient
c_d = 0.8
% Area m^2
A = 0.1
% Density kg/m^3
rho = 1.2
% Velocity
v = [1:60];
drag_force = rho*A*v.^2*c_d*0.5;
plot(v, drag_force)
xlabel('velocity')
ylabel('drag force')
grid on
OUTPUT:
2. To calculate drag forces for different coefficients of different shapes
% A program to calculate the drag forces for different shapes
clear all
close all
clc
% Inputs
% Drag coefficients of different shapes
c_d = [.045 .07 .295 1.14 1.28];
% Area m^2
A = 0.1
% Density kg/m^3
rho = 1.2
% Velocity
v = 50;
drag_force = rho*A*v.^2*c_d*0.5;
plot(c_d, drag_force)
xlabel('drag coefficient')
ylabel('drag force')
grid on
OUTPUT: