Calculation of drag force in MATLAB
Aim:
To calculate drag force on a bicycle by MATLAB program
Governing equation:
Equation that play main role to calculate drag force is given below:
f_d=0.5*rho*A*v^2*c_d
where, f_d= drag_force,
rho=density,
A= frontal area of the man with bicycle,
v= velocity,
c_d= drag coefficient,
Units:
f_d = kgm/s^2,
rho = kg/m^3,
A = m^2,
v = m/s,
After putting the units in the main equation and calculating , we get c_d = 1.
So c_d is unitless.
Here, from the governing equation , we get that drag force is directly proportional to the square of velocity.
As here a man is cycling so the frontal area is also changeable.
Here we are interested in calculating the wind resistance that we are calling as a drag force.
Objective:
The main objective of this project is to calculate drag force(wind resistance) on a bicycle by MATLAB programming.
Workflow :
- Values of density, area, velocity, drag coefficient are considered as per requirement,
- Values are putting in the governing equation,
- Getting values of f_d after calculating,
- Printing the final value of drag force(f_d),
- Plotting the graph f_d(y-axis) vs velocity(x-axis),
- Ending of the programming process.
Brief content of this project:
This project has been done by MATLAB programming.
The code of the program has been attached below:
%calculation of drag_force on a bicycle in MATLAB programming
disp('calculation of drag_force')
%considering drag coefficient
c_d=0.9
%considering area(unit: m^2)
A=0.2
%considering density(unit:kg/m^3)
rho=1.3
%considering velocity(unit:m/s)
v=[2:60];
%considering drag_force
f_d=0.5*rho*A*v.^2*c_d;
drag_force=f_d
plot(v,f_d)
xlabel('v')
ylabel('drag_force')
grid on
1)Firstly, the topic has been displayed on the output screen
2)Then, required values have been put and units are also written in the comments for easy understanding of the project
3)Governing equating has been given to calculate the main required output I,e drag force
4)The final result is as below:
5) The graph after executing the program is attached below:
Conclusion:
Through this program, we have learned how to calculate drag force that is nothing but wind resistance. In real-world problems we can use this program to easily find out the solution of such type of problem not only for a bicycle but also for any vehicle it may be in air or road etc. Finally, by the graph we can easily understand the solution to such type of problem and definitely the graph is different for different values.