Project

Program to calculate drag force and Plot 1 Velocity vs drag force 2 Drag coefficient vs drag force

1. Program to plot drag force vs velocity

% program to claculate the drag force and plot velocity vs drag force

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 m/s

v = [1:50];

drag_force = rho*A*v.^2*c_d*0.5;

plot (v, drag_force)
xlabel(\'velocity\')
ylabel(\'drag force\')
grid on

2. Program to plot drag coefficient vs drag force

% program to calculate the drag force and plot drag coefficient vs drag force

clear all
close all
clc

%inputs


% area m^2
A = 0.1;

%density kg/m^3

rho = 1.2 ;

% velocity m/s

v = [1:50];


% drag coefficients of various shapes (streamlined body, half streamlined body, half sphere, sphere, long cylinder, short cylinder respectively)

C_D = [0.04 0.09 0.42 0.47 0.82 1.15];

DRAG_FORCE = C_D\'*v.*v*0.5*rho*A;

plot (C_D, DRAG_FORCE)
xlabel(\'drag coefficient\')
ylabel(\'drag force\')
grid on

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.