APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Mass-Spring System post and replies

Return to the Mass-Spring System thread
Login to post to this thread

Mass-Spring System
Feliphe Ferreira
2 Posts

I am a student of physics, and I'm developing an application that involves a vertical mass-spring system, but there are two problems in my simulation.  
1 - When I change the elastic constant of the spring, the energy is not conserved. There isn't any variable for this.
2 - The spring's support swings along with the movement of the mass-spring.
How can I fix these problems?


Replies to Mass-Spring System

Re: Mass-Spring System -
lookang Avatar
lookang
245 Posts

hi Feliphe Ferreira,

check out my vertical spring model. http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2680.0 and http://weelookang.blogspot.sg/2013/02/ejs-open-source-vertical-spring-mass.html

https://dl.dropbox.com/u/44365627/lookangEJSworkspace/export/ejs_verticalspringwee.jar

licensed under creative commons attribution. author: lookang. i thank prof hwang fu-kwun for his model here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=349.0. He is the one who teach me how to make simulations!

Post edited March 7, 2013 at 11:06 PM EST.

Post edited March 14, 2013 at 9:29 PM EST.


OSP@SG blog
OSP@SG Digital Library


Re: Re: Mass-Spring System -
Feliphe Ferreira
2 Posts

Thanks for replying. Could you send me the EJS file of the simulation?



Re: Re: Re: Mass-Spring System -
lookang Avatar
lookang
245 Posts

https://dl.dropbox.com/u/44365627/lookangEJSworkspace/export/ejs_verticalspringwee.jar

i fixed the download link

enjoy!


OSP@SG blog
OSP@SG Digital Library


Re: Re: Re: Re: Mass-Spring System -
Marco Pacheco
5 Posts

Ciao Lookang,
I think that Feliphe ask you about your simulation source code (.ejs file)  instead the compiled one (.jar).

Cheers,
Marco Pacheco



Re: Re: Re: Re: Re: Mass-Spring System -
lookang Avatar
lookang
245 Posts

actually, every EJS.jar file is zipped with the source codes. :)
just unzip the .jar file with winzip.exe or equivalent instead of javarun
navigate to the folders users and u can find the .ejs too.

attached as requested

Attached File: ejs_verticalspringwee.zip


OSP@SG blog
OSP@SG Digital Library


Re: Re: Re: Re: Re: Re: Mass-Spring System -
Marco Pacheco
5 Posts

Thanks a lot for the very useful information.

My best,
Marco Pacheco



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book