Frontal Area and Drag Force

15 views (last 30 days)
Sai Maitreya Ganti Mahapatruni
I am supposed to calculate the drag of a car's mid-section profile by calculating the frontal are using "numerical integration" for a project. However, i have no idea how to do it. The mid-section profile was created using different parametric equations of parabola, ellipse, circle and a straight line.
This is the code I have used to generate the mid-section profile and the result I got.
How do i calculate the drag coefficient and the frontal area using numerical integration?
The width of the car is assumed to be 1.76m. The heigth of the car is 1.5m and the length of the car is 3.8m .
clc
clear
% Parabola Plotting
xp = 0;
yp = 0;
A = 1.2;
n = 1e6;
u = 0:1/(n):1;
xa = xp + (A)*(u.^2);
ya = yp + (A/1.5)*u;
plot(xa,ya);
hold on
% Circle 1 Plotting
R = 0.2;
xc = xa(end);
yc = ya(end)+R;
n = 1*10^6;
u = 0:1/n:1;
xb = xc + R*cos((pi/2)*u);
yb = yc + R*sin((-pi/2)*u);
plot(xb,yb)
hold on
% Ellipse Plotting
A = 1.75/2;
B = 1/2;
Xe = xb(1) + A;
Ye = yb(1);
al = 0;
J = cosd(al);
K = sind(al);
n=1e6;
u = 0:1/n:(1);
X1 = Xe + A*cos(pi*u)*J - B*sin(pi*u)*K;
Y1 = Ye + A*cos(pi*u)*K + B*sin(pi*u)*J;
plot(X1,Y1)
hold on
% Circle 2 Plotting
R = 0.25;
xc2 = X1(1) + R;
yc2 = Y1(1);
n = 1*10^6;
u = 0:1/n:1;
xb2 = xc2 - R*cos((pi/2)*u);
yb2 = yc2 + R*sin((-pi/2)*u);
plot(xb2,yb2)
hold on
% Slanting straight line plotting
xs1 = xb2(end);
ys1 = yb2(end);
xs2 = 3.8;
ys2 = 0.3;
x3 = xs1 + u*(xs2-xs1);
y3 = ys1 + u*(ys2-ys1);
plot(x3,y3)
hold on
% Vertically doenwards line plotting
xs3 = x3(end);
ys3 = y3(end);
xs4 = 3.8;
ys4 = 0;
x4 = xs3 + u*(xs4-xs3);
y4 = ys3 + u*(ys4-ys3);
plot(x4,y4)
axis equal

Answers (0)

Categories

Find more on Fluid Dynamics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!