Need for fortran. Please help. The potential energy of a ball due to its height
ID: 671198 • Letter: N
Question
Need for fortran. Please help.
The potential energy of a ball due to its height above the ground isgiven by the equation 1
PE =mgh
where is the mass of the ball (1.5 Kg), g is gravitational acceleration(9.8m/s^2), and h is the height of the ball above the surface of the earth (m).The kinetic energy is given by
KE =1/2mv^2
where v is the velocity of the ball (m/s). Assume that a ball is initiallystationary at height of 100 m. when the ball is released, it will start to fall.Calculate PE, KE and the total energy (PE + KE) of the ball at 10-m increments as it falls form its initial position. Create a table having theformat shown below
Table of PE,KE, and Total Energy vs Height
Height(m) PE(J) KE(J) (PE+KE) (J) ====================================================
100.0 1471.5 0.0 1471.5
90.0 1324.4 147.2 1471.5
80.0 1177.2 294.3 1471.5
70.0 1030.1 441.4 1471.5
60.0 882.9 588.6 1471.5
50.0 735.8 735.8 1471.5
Note: the ball velocity at given height, h_0 , can be calculated by v=sqrt(2gh_0)
Explanation / Answer
Please find below the Fortan program:
program Energy
integer::i
real::m=1.5, g=9.8, height,h_0, potential, kinetic, velocity,total
Print *, "Table of PE,KE, and Total Energy vs Height"
Print *, "Height(m) PE(J) KE(J) (PE+KE) (J)"
Print *, "===================================================="
do i=100,0,-10
height = i
potential = m*g*height
h_0 = 100 - i
velocity = sqrt(2*g*h_0)
kinetic = m*velocity*velocity/2
total = potential + kinetic
write (*,10) height,potential,kinetic,total
10 format (f6.1,10x,f6.1,8x,f6.1,7x,f6.1)
enddo
end program Energy
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.