Project

Matlab program to Calculate Drag Force

Week1 Challenge 3

Matlab program to calculate drag force against a cyclist.

%Flow Over A Bicycle

clear all
close all
clc

%Inputs

% Frontal area m^2

A = 0.25;

% Drag Coefficient

c_d = 0.8;

% Density kg/m^3

den = 1.2;

% Velocity m/s
V = [ 1:10];

drag_force = 0.5*c_d*den*A*V.^2
figure(1)
plot(V,drag_force)
title(\'Flow over Bicycle\')
xlabel(\'Velocity\')
ylabel(\'Drag Force\')

%Moving on to second part of the challenge
%Making V constant m/s

v = 50;

%Drag coefficient of various shapes

C_d = [0.045;0.295;0.35;1.14;1.28];

Shapes={\'airfoil\';\'bullet\';\'sphere\';\'prism\';\'flatplate\'};

Drag_force = (0.5).*C_d*den*A*v.^2;

table(Shapes,C_d,Drag_force)
figure(2)
plot(C_d,Drag_force)
title(\'Drag Coeffiecient Vs Drag Force\')
xlabel(\'Drag Force\')
ylabel(\'Drag Coefficient\')

%End Of the challenge 
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.