Author Topic: How to make gravitational simulation ?  (Read 67742 times)

GwenArBreizhou

  • Jr. Member
  • **
  • Posts: 50
How to make gravitational simulation ?
« on: December 24, 2011, 11:48:34 pm »
Hi,
I would like to try the simulator to make a simulation where gravitational forces appears while you can change weight and radius of planets and distance from them.
I found E field and B field simultor but nothing for a G field ...

How can I do ?

Thans in advance for reply,
best regards,

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: How to make gravitational simulation ?
« Reply #1 on: December 25, 2011, 06:20:19 pm »
The following simulation show gravitation field as function of r.
You can change the radius of the planet with the slider.
You can also drag mouse to any position and the simulation will show gravitation field at the new mouse position.
I hope this is what you need!

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!

GwenArBreizhou

  • Jr. Member
  • **
  • Posts: 50
Re: How to make gravitational simulation ?
« Reply #2 on: December 25, 2011, 09:27:18 pm »
Thanks for reply.
This is part of what I would like to do.
I don't need gravitation field but just the force applied on an object which weight and position can be changed.
Also, I would like to be able to change weight of the planet and not only the radius.

Regards,

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: How to make gravitational simulation ?
« Reply #3 on: December 26, 2011, 12:08:43 am »
The weight of the object depends on gravitation field g and mass of the object m. i.e. weight =m*g

And Usually the mass/size of the object is much smaller than the planet.

Quote
Also, I would like to be able to change weight of the planet and not only the radius.
Do you mean the mass of the planet instead of weight of the planet?

The mass of the planet is proportional to volume of the planet. $M=hofrac{4pi r^3}{3}$

GwenArBreizhou

  • Jr. Member
  • **
  • Posts: 50
Re: How to make gravitational simulation ?
« Reply #4 on: December 26, 2011, 12:23:03 am »
Do you mean the mass of the planet instead of weight of the planet?

Yes of course.
Sorry but each time I used "weight", I meant "mass".


The mass of the planet is proportional to volume of the planet. $M=ho frac{4pi r^3}{3}$

In a way yes. But it depends on density.

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: How to make gravitational simulation ?
« Reply #5 on: December 26, 2011, 03:23:45 pm »
I modified the code: you can change the density,too!
And it will display gravitation field.
If you need the force, just multiple the gravitation field by mass of the object.


GwenArBreizhou

  • Jr. Member
  • **
  • Posts: 50
Re: How to make gravitational simulation ?
« Reply #6 on: December 26, 2011, 05:23:40 pm »
Thanks for these modifications.

It seems to be a problem while if r > 0.6, g don't change anymore.

As the gravitation field is concerned, would it be possible to have it as an option because I work with 15 years old students and it will be difficult for them to understand the meaning of such a field ?

Can we have instead a cursor where m of the object can be changed and the value of force would appears in the simulation ?

thanks in advance,
best regards,

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: How to make gravitational simulation ?
« Reply #7 on: December 26, 2011, 08:18:27 pm »
The initial value for diameter is D=0.6 (mean r=D/2=0.3).
g=0.42 is gravitation field strength at r=0.3

The gravitation field will not change if you increase the radius of the planet.
(The uniform mass outside radius r will not contribute to gravitation field).

I added an object (blue dot) and user can adjust it's mass with slider.
The gravitation force is shown as black arrow.
User can drag the object with mouse,too!
I hope this version is closer to what you need!
Enjoy it!

GwenArBreizhou

  • Jr. Member
  • **
  • Posts: 50
Re: How to make gravitational simulation ?
« Reply #8 on: December 27, 2011, 04:45:10 am »
I hope this version is closer to what you need!

Yes in fact, it is.
To achieve, I would like to know if the gravitational potential could be an option like "g" and if it's possible to put a legend (planet, object, gravitational force, gravitational field) and to let me do a french version of this simulation.

Thanks in advance (I hope it's the last time ;o))

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: How to make gravitational simulation ?
« Reply #9 on: December 27, 2011, 11:00:11 pm »
The simulation has been modified according to your suggestion!

GwenArBreizhou

  • Jr. Member
  • **
  • Posts: 50
Re: How to make gravitational simulation ?
« Reply #10 on: January 31, 2012, 05:46:00 am »
Hi,
I begin to use your simulation with students (15 years old) without translating it because I don't remember how to do it.
Can you refresh my memory ?

The student are a little surprised with the potential curve. Would it be possible to put it as an option ?

Thanks in advance,
Best regards,

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: How to make gravitational simulation ?
« Reply #11 on: January 31, 2012, 09:37:12 am »
The simulation has been modified (add an option for show V:potential curve).

For the translation: Please check out How to translate a simulation created with EJS

You are also welcomed to check out Getting started with EJS

GwenArBreizhou

  • Jr. Member
  • **
  • Posts: 50
Re: How to make gravitational simulation ?
« Reply #12 on: January 31, 2012, 09:29:05 pm »
Hi,
I got a problem. When I right-click on the simulation and ask for opening EJS model, I'm told that "Easy Java Simulations are not found" as you can see in the attached file.

I tried as well after putting your users_ntnu_fkh_gravitationfnr.ejs in the directory but I got the same message.

What can I do ?

Thanks for reply,

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: How to make gravitational simulation ?
« Reply #13 on: January 31, 2012, 11:25:10 pm »
I believe the applet gonna work if you mark use original path, try do it again, he gonna work with you.

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: How to make gravitational simulation ?
« Reply #14 on: January 31, 2012, 11:28:25 pm »
1. You need to install EJS (just unzip the file)
2. run EJSConsole.jar and you need to select working directory when you run it for the first time.
You can select workspace under EJS installed directory.
However, I would suggest you create another directory under root (e.g. c:workspace).
This would be easier when you install new version later. (because you do not need to change working directory again)