<< Chapter < Page Chapter >> Page >

Variable velocity exercise #2

Estimating variable velocity with a computer model

Let's write a script that approximates the graphic procedure that I described earlier.

Please copy the code from Listing 2 into an html file and open the file in your browser.

Listing 2 . Variable velocity exercise #2.
<!---------------- File JavaScript2.html ---------------------><html><body><script language="JavaScript1.3">document.write("Start Script</br>"); //Declare and initialize constantsvar g = -32.2;//acceleration of gravity in ft/sec/sec var v0 = 100;//initial velocity in ft/secvar h0 = 6;//initial height in feet var tInc = 0.25;//calculation interval in seconds//Declare and initialize working variables var t = .0001;//current time in secondsvar h = h0;//current height in feet var v = 0;//current velocity in feet/secvar oldT = 0;//previous time in seconds var delT = 0;//change in time in secondsvar oldH = h0;//previous height in feet var delH = 0;//change in height in feet//The following variable is used to insert spaces in // the output display.var sp = "&nbsp;&nbsp;&nbsp;&nbsp;" //Compute and display various values for as long as the// height of the projectile is above the ground. while(h>0){ //This is the general equation for the height of a// projectile under the influence of gravity in a // vacuum.h = h0 + v0*t +0.5*g*t*t; //Compute and save the time interval since the// previous estimate of height, etc. delT = t-oldT;oldT = t;//Save the current time for the next iteration //Estimate the velocity based on the change in// height since the previous estimate. delH = h-oldH;v = delH/delT;//compute velocity oldH = h;//Save the current height for the next iteration.//Display the information for this iteration document.write("t = " + t.toFixed(2) + " seconds" + sp +" h = " + h.toFixed(1) + " feet" + sp + " v = " + v.toFixed(2) + " feet/second" + sp +"</br>"); //Increment the time for the next iteration.t = t + tInc; }//end while loopdocument.write("End Script");</script></body></html>

Screen output

The text shown in Figure 6 should appear in your browser window when the html file opens in your browser.

Figure 6 . Screen output for Listing #2.
Start Script t = 0.00 seconds h = 6.0 feet v = 100.00 feet/secondt = 0.25 seconds h = 30.0 feet v = 95.97 feet/second t = 0.50 seconds h = 52.0 feet v = 87.92 feet/secondt = 0.75 seconds h = 72.0 feet v = 79.87 feet/second t = 1.00 seconds h = 89.9 feet v = 71.82 feet/secondt = 1.25 seconds h = 105.8 feet v = 63.77 feet/second t = 1.50 seconds h = 119.8 feet v = 55.72 feet/secondt = 1.75 seconds h = 131.7 feet v = 47.67 feet/second t = 2.00 seconds h = 141.6 feet v = 39.62 feet/secondt = 2.25 seconds h = 149.5 feet v = 31.57 feet/second t = 2.50 seconds h = 155.4 feet v = 23.52 feet/secondt = 2.75 seconds h = 159.2 feet v = 15.47 feet/second t = 3.00 seconds h = 161.1 feet v = 7.42 feet/secondt = 3.25 seconds h = 160.9 feet v = -0.63 feet/second t = 3.50 seconds h = 158.8 feet v = -8.68 feet/secondt = 3.75 seconds h = 154.6 feet v = -16.73 feet/second t = 4.00 seconds h = 148.4 feet v = -24.78 feet/secondt = 4.25 seconds h = 140.2 feet v = -32.83 feet/second t = 4.50 seconds h = 130.0 feet v = -40.88 feet/secondt = 4.75 seconds h = 117.7 feet v = -48.93 feet/second t = 5.00 seconds h = 103.5 feet v = -56.98 feet/secondt = 5.25 seconds h = 87.2 feet v = -65.03 feet/second t = 5.50 seconds h = 69.0 feet v = -73.08 feet/secondt = 5.75 seconds h = 48.7 feet v = -81.13 feet/second t = 6.00 seconds h = 26.4 feet v = -89.18 feet/secondt = 6.25 seconds h = 2.1 feet v = -97.23 feet/second t = 6.50 seconds h = -24.2 feet v = -105.28 feet/secondEnd Script

Questions & Answers

Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
characteristics of micro business
for teaching engĺish at school how nano technology help us
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
what is the actual application of fullerenes nowadays?
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
is Bucky paper clear?
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Do you know which machine is used to that process?
how to fabricate graphene ink ?
for screen printed electrodes ?
What is lattice structure?
s. Reply
of graphene you mean?
or in general
in general
Graphene has a hexagonal structure
On having this app for quite a bit time, Haven't realised there's a chat room in it.
what is biological synthesis of nanoparticles
Sanket Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Accessible physics concepts for blind students. OpenStax CNX. Oct 02, 2015 Download for free at https://legacy.cnx.org/content/col11294/1.36
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?