# NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

## Easy Java Simulations (2001- ) => Collaborative Community of EJS => Topic started by: lookang on August 10, 2010, 04:49:01 pm

 Title: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on August 10, 2010, 04:49:01 pm Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet.based on Real Data!customized by lookang based on an applet by Professor Andrew Duffy, remixed by lookang Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on August 10, 2010, 04:55:54 pm changes made:1 key in real data of Earth Moon using new format 0.00E00 like in tracker2 redrawn and scale the world view to fit both g field graph and potential graph.3 insert earth and moon images4 design menu for "Moon Surface;Net Force Zero;Earth Surface;Random"5 design features for exploring escape velocity concept select position from drop down menu and key in velocity v_escape_moon = 2280 m s-1v_escape_earth = 11300 m s-16 dt is in 60 sec interval7 can explore the gravitational constant on Earth surface = 9.81 m/s^2 and Moon =  1.6 m/s^2 approximately Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on August 11, 2010, 10:47:05 am exercises by lookang:activity Aunselect the M2=5.97E24 kg checkboxdrag the red test mass m, on the world side view closer to the Moon.notice the value of g1 varies according to the distance away from the center of the Moonsince M2 is unselected, gnet = g1 + g2 and g2 = 0therefore gnet = g1note down the value of gnet when m =1kgnote down the value of Fnet when m=1 kgnow change the value of m and record down the values of g1 , gnet and Fnet. do this for a few readings.suggest a relationship between Fnet and gnet.by manipulating the relationship variables above, write down the form that best describe the concept of a gravitational field as an example of field of force.hence, derive the meaning that gravitational field strength as force per unit massActivity Breset the simulation if needunselect the test mass, m and select M2.notice the green vector drawn on the center of the Moon and Earth.the readings are as shown as F1= 1.98E20N and F2=-1.98E20Nusing the real life data that you can get from textbook, lecture notes or/and the internet, verify the equationF = G M1M2/r^2suggest what does F1 represent?hint: force on ________ exerted by ___________suggest what does F2 represent?hint: force on ________ exerted by ___________drag on the Moon and Earth to move along the horizontal line, observe what happens to the magnitude and direction of the forces F1 and F2.What observation can be made?hint: magnitude, direction and different bodies?What is the name of this physics idea?What is the meaning of the negative sign on the force that points in the direction opposite to x-axis direction?Activity CGiven that Newton's law of gravitation in the form F = G M1M2/r^2 and derive the equation for gravitational field strength, g.hint: select the g field checkbox to reveal the graph of g vs r for a system of M1 alone.select the M2 checkbox and deduce the relationship when the system is 2 mass, M1 and M2you may use the data from the applet to verify your equation.Activity Dapply the equation for gravitational field strength, g = G M/r^2 to the situation of the applet.write the meaning of g1write the meaning of g2hence, suggest what is the net gravitational field strength for the case of a Earth and Moon system.gnet = select the gravity g field checkbox vary the left slider to the bottom to change the scale of the y axis to -1.2 to 1.2 N/kgnotice the shape of the graph of g vs r. sketch it on your worksheet or lecture.select and deselect the M2 to test your understanding.Activity E nil(e) show an appreciation that on the surface of the Earth g is approximately constant and equalto the acceleration of free fall. another applet perhaps?Activity Flet the infinity point be ilet the final position of the point be fwrite down the energies of a mass m an infinity, hint: KEi + PEi = 0 + (-G M / infinity) = 0write down the the energies of a mass m an a point r away from source of gravity field say M.hint: KEf + PEf = 0 + (-G M / r)use conservation of energy or otherwise, WDpropulsion + KEi + PEi = KEf + PEf derive WDpropulsion in terms of G, M and rdefine Mdefine rhence or otherwise, verify whether you can define potential φ at a point as work done in bringing unit mass from infinity to the point.write down the equation that shows this clearly.select the gravity φ potential checkbox vary the left slider to the bottom to change the scale of the y axis to high value J/kgsketch the shape of the φ potential vs r.select and deselect the M2 to test your understanding.Activity Gsolve problems using the equation φ = - G M/r for the potential in the field of a point mass.for example,Certain meteorites (tektites) found on the Earth have a composition identical with that of lunar granite. It is thought that they may be debris from volcanic eruption on the Moon. The applet shows how the gravitational potential between the surface of the Moon and the surface of the Earth varies along the line joining their centres. At the point P, the gravitational potential is a maximum.By considering the separate contributions of earth and Moon to the gravitational potential, explain why the graph has a maximum and why the curve is asymmetricalState how the resultant gravitational force on the tektite at any point between the Moon and the Earth could be deduced When a tektite is at P ( drop menu select "Net Force Zero) , the gravitational forces on it due to Moon and Earth are F_M and F_E respectively. State the relation which applies between F_M and F_E.F_Moon is which color force ?F_Earth is which color force ?given that the distance between Earth and Moon used in the applet is 384 403 000 mdetermine the distance between test mass m and M1 (moon)determine the distance between test mass m and M2 (earth)verify whether the applet is accurate, which the uncertainty error between the 2 values?If the tektite is to reach Earth, it must be projected from the volcano on the Moon with a minimum speed v0. Making use of appropriate values from the applet, find this speed. Explain your reasoning.test out your answers against the simulation.suggest why you cannot use the value derived theoretically, but it should be a value greater or lesser? explain. Run the simulation with an escape velocity from Moon as v =2500 m/s,  Predict and discuss very briefly whether a tektite will reach the Earth’s surface with a speed less than, equal to or greater than the speed of projection v =2500 m/s.vary the simulation to test out the v =2500 m/s.what is the value of velocity of test mass impacting earth?change the values of test mass, m and rerun the sim, what is the velocity of impact on Earth?by using equation of conservation of energy or otherwise, calculate the velocity of impact on Earth of test mass m.(h) recognise the analogy between certain qualitative and quantitative aspects of gravitationaland electric fields.Ejs Open Source Electric Field & Potential of 2 Charged Particles Java Applethttp://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1918msg6989;topicseen#msg6989Design an experiment to verify that following table of dataGravitational Fields                      Electric FieldsDue to mass interaction, m          Due to charge interaction, +q and -qOnly attractive                           Either attractive or repulsiveNewton’s Law of gravitation          Coulomb’s LawGravitational Field Strength          Electric Field StrengthGravitational Potential                   Electric Potential Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on April 27, 2012, 12:35:53 pm discussion with teacherCan you make the moon and Earth more obvious? Moon is too small and not too visible.Thanks.it is currently showing real data of distance and radius of earth and moon.Can explain how to make bigger while still showing real distances ?:)I not sure how and what to change http://weelookang.blogspot.com Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on May 07, 2012, 12:25:16 pm changesmade consistent to original simulation http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1921.0 Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on June 08, 2012, 01:36:53 pm discussionI can't reliably get the mass to be launched at the speed i want.When i key v = -1.11E4 and click play, it doesnt even go halfway. Nothing happens if i continue to change the velocity value.addressedBut i found i was able to make it work again if i always "reset" it by selecting "random spot" then return back to "Earth surface". However, the value of -1.11E4 never works. In fact, -1.15E5 will also cause it to return back to Earth surface. Only value of -1.16E4 onwards will it reliably reach the moon. made the menu bar remember but the first time need to set manuallytheory says 11200 m/s, to reach infinity as speed 0but in practice it could be larger like 11500 m/s, say to reach a very far place with a speed of 100 to 1000 m/si have change the launch position to be slightly above sea level surface of Earth .i think it works for 11400 m/s now.http://en.wikipedia.org/wiki/Escape_velocity also say it is roughly 11200 m/s, so it should be  larger  than 11200 m/s according to the computer model about 11500 m/s should escapeSo:1. I wonder if there's anything wrong in the applet calculation values (rounding off issues) that causes the value to be different from that calculated in the worksheet.i checked, the values i used are pretty accurate, it is the theory that is problematic.error analysis(11500-11200)/11200 = 2.7 % error is it acceptable?2. Can it be done such that i need not do the "manual reset" each time i want to test a new velocity?done, the menu remember past last values, but need to set it for first time. Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on June 12, 2012, 11:23:47 am thanks to prof hwang's expert and masterful tips, here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2461.msg9275#msg9275attached is the latest model that has the corrected escape velocity from Earth as -11200 m/s.enjoy!the new refinement is thanks to teacher feedback"As for the simulation speed itself . . . i think this one is a bit slower? I dont recall having to wait for 3-4 minutes for the entire launch from Earth to moon, but apparently that's what is happening to the critical speeds (1.12 m/s to 1.15 m/s) Can this be addressed?"done thanks to Prof Hwang's tips http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2461.msg9275#msg9275also added a dt for time step Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on June 26, 2012, 04:40:27 pm fixed a bug with the values of gand the accln function with scale1 and scle2 included to control the checkbox of the M1 and M2 Title: Re: Ejs Open Source Gravitational Field & Potential of Earth and Moon Java Applet Post by: lookang on June 28, 2012, 09:09:29 am changesadded improved collision detectionadded improved acceleration equationpublic double getA (double x_pos) {    double accln;    accln = scale2*G*(-m2)/((x_pos-x2)*(x_pos-x2))*(x_pos-x2)/Math.abs(x_pos-x2)+scale1*G*(-m1)/((x_pos-x1)*(x_pos-x1))*(x_pos-x1)/Math.abs(x_pos-x1);    return accln;    }