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 - Mar 7, 2013 at 10:34PM
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 - Mar 07 2013 11:05PM
lookang Avatar
lookang
91 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.


http://weelookang.blogspot.sg


Re: Re: Mass-Spring System - Mar 14 2013 8:20PM
Feliphe Ferreira
2 Posts

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



Re: Re: Re: Mass-Spring System - Mar 14 2013 9:32PM
lookang Avatar
lookang
91 Posts

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

i fixed the download link

enjoy!


http://weelookang.blogspot.sg


Re: Re: Re: Re: Mass-Spring System - Mar 15 2013 12:08AM
Marco Pacheco
3 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 - Mar 15 2013 2:42AM
lookang Avatar
lookang
91 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


http://weelookang.blogspot.sg


Re: Re: Re: Re: Re: Re: Mass-Spring System - Mar 15 2013 9:35AM
Marco Pacheco
3 Posts

Thanks a lot for the very useful information.

My best,
Marco Pacheco



The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics