Question

Modify your Free Fall program below to plot the energy vs. time for a baseball dropped...

Modify your Free Fall program below to plot the energy vs. time for a baseball dropped from a height of 1000 feet until it hits the ground. Now add in the effects of air resistance into your program. This time, on the energy plot, you will plot four quantities: KE (Red line), PE (Green line), Energy lost due to air resistance (purple line), and total Energy (blue circles). Note, you must calculate the energy lost by using the definition of work (W = F deltay). Copy and paste the y vs. time and Energy vs. time plots in the space below.

(Area = .0042, Density of Air = 1.225, Drag Coefficient = 0.47, Mass = 0.145)

clear all;
vo=4;
a=9.81;
m=0.145;
A=0.0042;
Cd=0.5;
rho=1.2;
t(1)=0;
dt=0.1;
te=14;
i=1;
t0=0;
l=1+((te-t(1))/dt);
%program starting
for i=1:l
v(i)=(vo*vo+2*a*((vo*(te-t(1))+0.5*a*(te-t(1))^2)-(vo*(te-t(i))+0.5*a*(te-t(i))^2)))^0.5;
k(i)=m*v(i)*v(i)/2; %kinetic energy
d(i)=Cd*rho*v(i)^2*A/2;%energy lost due to drag force
p(i)=m*a*(vo*(te-t(i))+0.5*a*(te-t(i))^2);%potential energy
x(i)=k(i)+p(i)+d(i); %total energy
y(i)=k(i)+p(i);
if i~=l
t(i+1)=t(i)+dt;
end
end
%Displaying kenitic,potential,drag force and total energy
disp(y(i))
disp(x(i))
disp(p(i))
disp(k(i))
disp(d(i))
%plot
figure;
plot(t,x,t,y,t,d); 
title('time vs energy');
legend('Total','KE+PE','energy lost');
xlabel('Time');
ylabel('energy');

Homework Answers

Answer #1

By Writing in a stepwise program form :-

1- clear all;

2- m=0.145;

3- g=9.81;

4- h=304.8; % convert 1000 feet to metre

5- Et=m*g*h; %This is total mechanical energy at any at any instant until it hits ground

6- T=sqrt(2*g*h); % Time to reach ground

7- t=0:1:T;

8- vt=g*T; %velocity at any instant t

9- Kt =0.5*m*vt.^2; Kinetic energy at any instant t

10- Pt=Et-Kt; %Potential energy at any instant t

11- plot(t,Kt,'r-');

12- hold on

13- plot (t,Pt,'g-');

14- hold on

15- Et=Kt+Pt;

16- plot(t,Et,'b-');

17- hold off;

18- y=-0.5*g*t.^2;

19- plot(t,y);

Therefore the required output as per graph is shown below.

Image:-1

Image :-2

Please comment if you have any doubts.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
You create a plot of voltage (in V) vs. time (in s) for an RC circuit...
You create a plot of voltage (in V) vs. time (in s) for an RC circuit as the capacitor is charging, where V=V_{0} \cdot \left(1- e^{ \frac{-\left(t\right)}{RC} } \right). You curve fit the data using the inverse exponent function Y=A \cdot \left(1- e^{-\left(Cx\right)} \right)+B and LoggerPro gives the following values for A, B, and C. A = 4.611 ± 0.4211 B = 0.1599 ± 0.007211 C = 1.951 ± 0.2051 What is the time constant and its uncertainty? NEED CORRECT...
Write a C++ program to demonstrate thread synchronization. Your main function should first create a file...
Write a C++ program to demonstrate thread synchronization. Your main function should first create a file called synch.txt. Then it will create two separate threads, Thread-A and Thread-B. Both threads will open synch.txt and write to it. Thread-A will write the numbers 1 - 26 twenty times in nested for loops then exit. In other words, print 1 - 26 over and over again on separate lines for at least 20 times. Thread-B will write the letters A - Z...
Finding the Spring Constant We can describe an oscillating mass in terms of its position, velocity,...
Finding the Spring Constant We can describe an oscillating mass in terms of its position, velocity, and acceleration as a function of time. We can also describe the system from an energy perspective. In this experiment, you will measure the position and velocity as a function of time for an oscillating mass and spring system, and from those data, plot the kinetic and potential energies of the system. Energy is present in three forms for the mass and spring system....
1) A nozzle is a device for increasing the velocity of a steadily flowing stream of...
1) A nozzle is a device for increasing the velocity of a steadily flowing stream of fluid. At the inlet to a certain nozzle the enthalpy of the fluid is 3025 kJ/kg and the velocity is 60 m/s. At the exit from the nozzle the enthalpy is 2790 kJ/kg. The nozzle is horizontal and there is negligible heat loss from it. (i) Find the velocity at the nozzle exit. (ii) If the inlet area is 0.1 m2 and specific volume...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT