NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
July 20, 2019, 10:18:12 am
 Welcome, Guest. Please login or register.Did you miss your activation email? 1 Hour 1 Day 1 Week 1 Month Forever Login with username, password and session length

 Home Help Search Login Register
An interaction between two opposites produces a unique outcome. ..."Jules Henri Poincare(1854-1912, One of France's greatest mathematicians)"

 Pages: [1]   Go Down
 Author Topic: Ejs open source simple harmonic motion java applet SHM virtual lab  (Read 45253 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message on: October 15, 2008, 04:12:53 pm » posted from:Singapore,,Singapore

Ejs open source simple harmonic applet SHM for inquiry learning virtual lab updated April 2010 with slightly better GUI and color scheme.
google tag " simple hamonic motion simulation "
spring mass easy java simulation on simple harmonic physics applet with options for pre university A level physics made by lookang.

remixed From an EJS manual example from D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_examples\Manual\Spring.xml and D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_examples\Manual\SpringAdvanced.xml by Author : Francisco Esquembre
follow the tutorial on spring mass system allows this virtual lab to be created by lookang.
Thanks to Francisco Esquembre, Fu-Kwun Hwang and Wolfgang Christian for their guidance.
many options: simple harmonic motion forced oscillation of course, another best java physics applet, by teacher for teachers.
creative commons attribute! http://creativecommons.org/licenses/by-sa/3.0/sg/
older versions
http://66.7.205.91/~lookangc/_apps/_examples/weelookangspring05.app/weelookangspring05_Simulation.html

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
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!
 SHMlookang.png (85.03 KB, 1280x800 - viewed 2363 times.) *** There are 3 more attached files. You need to login to acces it! « Last Edit: March 17, 2011, 11:30:36 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #1 on: November 05, 2008, 02:04:54 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

Simple Harmonic Motion Model

The EJS simple harmonic motion Model shows a mass m situated at the end of 2 springs of length l = 2.0 m of negligible massThe motion is restricted to one dimension, the horizontal. (We choose a coordinate system in the plane with origin at centre of the mass-spring system and with the X axis along the direction of the spring). The floor is assumed to be frictionless.

Four Plots vs t shows
1 displacement (in m) versus time (in s).
2 velocity (in m/s) versus time (in s).
3 acceleration (in m/s^2) versus time (in s).
4 energies (in J) versus time (in s).

Three Plots vs X shows

5 velocity (in m/s) versus displacement (in m).
6 acceleration (in m/s^2) versus displacement (in m).
7 energies (in J) versusdisplacement (in m).

Users can examine and change the model if they have Ejs installed.

free oscillations

A simple harmonic oscillator is an oscillator that is neither driven nor damped. Its motion is periodic— repeating itself in a sinusoidal fashion with constant amplitude, A. Simple harmonic motion SHM can serve as a mathematical model of a variety of motions, such as a mass on a spring.

For simplicity, we assume that the reaction of the springs to a displacement dx from the equilibrium point follows Hooke's Law, F(dx) = -k dx , where k is a constant which depends on the physical characteristics of the spring.

This, applying Newton's Second Law, leads us to the second order differential equation

d2x / dt2 = -k/m (x-l),

where x is the horizontal position of the mass from the from the origin centre of the springs.
This is similar to what is commonly describe in SHM as
a = - ω2x
a acceleration
w omega is angular velocity of SHM
x displacement of object in SHM from the equilibrium position

Exercises: Designed for http://www.seab.gov.sg/aLevel/20102011Syllabus/9646_2011.pdf
Oscillations
Content
• Simple harmonic motion

1. Run the simulation with b = 0 (no damping) and X driver = 0 ( no driver amplitude). Explore the various sliders to make sense of the sliders. Describe the motion of these free oscillations with reference to acceleration and displacement. Describe and relate to other examples of simple free oscillations.
2. Investigate the relationship of the displacement, velocity and acceleration versus time by exploring the Plot vs t checkbox to reveal the graphical display of the experimental view of the setup. Describe, with graphical illustrations, the changes in displacement, velocity and acceleration during simple harmonic motion.
3. Explore the terms amplitude, period, frequency, angular frequency and phase difference in the virtual laboratory by looking for the hints in the virtual lab. Play with the sliders and make sense of these terms used commonly in SHM.
4. Explore and record the period, T in terms of both frequency, f and angular frequency, ω. Select the 'expert' checkbox and look for the values of f and ω in relations to T.
5. The equation a = –ω2x is the defining equation of simple harmonic motion. Select the Plot vs X checkbox and record down the graph. Why is the equation is correct? Explain the negative sign and meaning of ω in terms of k and m.
6. The equation v = vocosω t can be used to describe the graph of v versus t (select checkbox Plot vs t and check v) Why is the equation is correct? Under what conditions is the equation valid?
7. The equation v = ±ω Math.sqrt ( xo2 - x2 ) can be used to describe the graph of v versus x (select checkbox Plot vs x and check v) Why is the equation is correct? Under what conditions is the equation valid?
8. Explore degree of damping and the importance of critical damping by varying the slider of b. Design and record down how the values of b affects the graph of displacement vs time. Hint: The graph of energies vs time would be of interest in describing the effects of damping.
9. Explore the amplitude and frequency of the driving force (Fdriver) and it effects on the motion of the system.

recently change 07 June 2009
1. allow the mass to be drag and remember the x initial value.
2. resize the screen and the velocity vector and text to prevent the autoscale to cause the view to move to much.
April 2010
3 updated with slightly better GUI and color scheme.
4 remove plotperiod
5 added dots on all 7 graphs for better visualization of value of graphs.
6 update sliders and checkbox with associated background colors
09 February 2011
7 added more hints
8 added motor plunger as the right wall now moves with the externalForce(t) = amplitude * Math.sin(frequency*time); for greater association to possible real life setup
9 move top check-boxes hints to bottom as well for standard menu control

source code
download the *.jar for using the applet on standalone without internet connection.
 *** There are 1 more attached files. You need to login to acces it! « Last Edit: February 09, 2011, 08:03:40 am by lookang » Logged
Rare
Newbie

Offline

Posts: 12

no secretcode:ntnujava/log:1254222188

 « Embed this message Reply #2 on: October 03, 2009, 02:47:03 pm » posted from:Dallas,Texas,United States

This simulation show The relations between acceleration, velocity and displacement in simple harmonic motion{(b. investigate the motion of an oscillator using experimental and graphical methods) and (g. describe with graphical illustrations, the changes in displacement, velocity and acceleration during simple harmonic motion)}, right ? Thanks
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #3 on: October 03, 2009, 03:18:54 pm » posted from:Singapore,,Singapore

This simulation show The relations between acceleration, velocity and displacement in simple harmonic motion{(b. investigate the motion of an oscillator using experimental and graphical methods) and (g. describe with graphical illustrations, the changes in displacement, velocity and acceleration during simple harmonic motion)}, right ? Thanks

Yes! relations between acceleration, velocity and displacement in simple harmonic motion can be observe in the inquiry learning virtual lab.

experimental method is the oscillator moving in SHM
graphical corresponding graphs total there are 7 of them.

to describe can used the wiki explanation:
In physics, simple harmonic motion (SHM) is the motion experiences a single force that is directly proportional to the displacement x and points in the opposite direction.

the equation model is a = - w2x
a acceleration
w omega is angular velocity of SHM
x displacement of object in SHM from the equilibrium position

let me know what you need to understand in SHM, i think i will create an exercise to let u try with the applet
 « Last Edit: October 03, 2009, 03:41:19 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #4 on: October 03, 2009, 03:25:38 pm » posted from:Singapore,,Singapore

Motion of a spring
This is the simulation of the motion of a mass m situated at the end of a spring of length l and negligible mass. The motion is restricted to one dimension, the horizontal. (We choose a coordinate system in the plane with origin at the fixed end of the spring and with the X axis along the direction of the spring).
We assume that the reaction of the spring to a displacement dx from the equilibrium point follows Hooke's Law, F(dx) = -k dx , where k is a constant which depends on the physical characteristics of the spring. This, applying Newton's Second Law, leads us to the second order differential equation
d2x / dt2 = -k/m (x-l),
where x is the horizontal position of the free end of the spring.
In the simulation we solve numerically this equation and visualize the results.
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #5 on: October 03, 2009, 09:18:53 pm » posted from:Singapore,,Singapore

This simulation show The relations between acceleration, velocity and displacement in simple harmonic motion{(b. investigate the motion of an oscillator using experimental and graphical methods) and (g. describe with graphical illustrations, the changes in displacement, velocity and acceleration during simple harmonic motion)}, right ? Thanks
Hi rare, do the Exercises. it will help u make sense:)
Exercises:
Oscillations
Content
• Simple harmonic motion

1. Run the simulation with b = 0 (no damping) and X driver = 0 ( no driver amplitude). Explore the various sliders to make sense of the sliders. Describe the motion of these free oscillations with reference to acceleration and displacement. Describe and relate to other examples of simple free oscillations.
2. Investigate the relationship of the displacement, velocity and acceleration versus time by exploring the Plot vs t checkbox to reveal the graphical display of the experimental view of the setup. Describe, with graphical illustrations, the changes in displacement, velocity and acceleration during simple harmonic motion.
3. Explore the terms amplitude, period, frequency, angular frequency and phase difference in the virtual laboratory by looking for the hints in the virtual lab. Play with the sliders and make sense of these terms used commonly in SHM.
4. Explore and record the period, T in terms of both frequency, f and angular frequency, ω. Select the 'expert' checkbox and look for the values of f and ω in relations to T.
5. The equation a = –ω2x is the defining equation of simple harmonic motion. Select the Plot vs X checkbox and record down the graph. Why is the equation is correct? Explain the negative sign and meaning of ω in terms of k and m.
6. The equation  v = vocosω t can be used to describe the graph of v versus t (select checkbox Plot vs t and check v) Why is the equation is correct? Under what conditions is the equation valid?
7. The equation  v = ±ω Math.sqrt ( xo2 - x2 )  can be used to describe the graph of v versus x (select checkbox Plot vs x and check v) Why is the equation is correct? Under what conditions is the equation valid?
8. Explore degree of damping and the importance of critical damping by varying the slider of b. Design and record down how the values of b affects the graph of displacement vs time. Hint: The graph of energies vs time would be of interest in describing the effects of damping.
9. Explore the amplitude and frequency of the driving force (Fdriver) and it effects on the motion of the system.

 « Last Edit: October 04, 2009, 10:19:54 am by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #6 on: December 02, 2009, 08:18:23 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

Got a question from Ahmed who i think is using this applet's source codes to remix.

his question is:
"I mean for example im developing into a project and im begin by tools 2D Drawingpanel so have a part on project
I must use tools from 3DDrawingpanel,, and im begin develop by 2D Drawingpanel so im try use for example
(3Dparticle:A 3D particle) on drawing panel 24 so when i make it appear this massage for me
(THIS ELEMENT CAN NOT BE ADDED TO THIS PARENT) and i'll insert picture and mark from problem begin
Im waiting answer thanks so much. "
 000.JPG (235.76 KB, 1680x1050 - viewed 974 times.) « Last Edit: December 02, 2009, 09:08:08 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #7 on: December 02, 2009, 08:28:18 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

I must use tools from 3DDrawingpanel,, and im begin develop by 2D Drawingpanel so im try use for example
(3Dparticle:A 3D particle) on drawing panel 24 so when i make it appear this massage for me
(THIS ELEMENT CAN NOT BE ADDED TO THIS PARENT)

If you must use 3D particle, u need to start a new 3D frame, because this source has a 2D frame at the beginning.

are you trying to make a 3D simple spring mass system? if you are, then u need to start a new 3D frame, add the 3D objects one by one if they were previously made in 2D objects. If they are previously in 3D, then copy and paste it should work.
I have added it for u already and the source is in a zip attached below http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=758.0;attach=1513

is that what u want?

 SHM3d.PNG (37.67 KB, 594x616 - viewed 5469 times.) *** There are 1 more attached files. You need to login to acces it! « Last Edit: December 02, 2009, 08:47:03 am by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3082

 « Embed this message Reply #8 on: December 02, 2009, 09:35:08 am » posted from:Taipei,T'ai-pei,Taiwan

In EJS 3.0 , there is no differentiation between 2D and 3D elements.
For example: particle,arrow elements can be added under 2D drawingPanel or 3D drawingPanel.
All those elements had properties for x,y,z even you only use it as 2D element.

It has been changed later, there are 3 parts under "elements for the view"
1. Interface: you can add the top drawing frame, drawing panel from here, and other control elements (button, slider...)
2. 2D drawables: all the elements has to be added under 2D drawingPanel or 2D plottingPanel.
3. 3D drawables: all the elements has to be added under 3D drawingPanel.
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #9 on: December 02, 2009, 06:09:12 pm » posted from:Singapore,,Singapore

Hi Ahmed
is this what u want?
i added the 3D frame and a 3D particle to ensure it works like what u spoke of in the emails.
 *** There are 1 more attached files. You need to login to acces it! Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #10 on: April 06, 2010, 08:13:08 pm » posted from:Singapore,,Singapore

old picture.
now updated with slightly better GUI and color scheme.
 Ejs open source simple harmonic applet SHM for inquiry learning virtual lab.PNG (160.03 KB, 777x412 - viewed 1216 times.)  SHMlookang.png (85.03 KB, 1280x800 - viewed 1109 times.) « Last Edit: April 06, 2010, 08:20:47 pm by lookang » Logged
ahmedelshfie
Ahmed
Hero Member

Offline

Posts: 954

 « Embed this message Reply #11 on: April 06, 2010, 08:26:13 pm » posted from:,,Brazil

Hi Prof
Yes i see now simle harmonic motion with excellent interace
Excellent Prof I'm still now try learn way for post projects to become pages HTML in site
But no get succeed yet
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3082

 « Embed this message Reply #12 on: April 06, 2010, 08:37:10 pm » posted from:Taipei,T\'ai-pei,Taiwan

You did not moved your ejs source ahmed from ejsworkspace directory
to under users subdirectory.  That is the reason why your uploaded jar file did not work.
for more detail information.
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #13 on: June 16, 2010, 01:42:38 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

1 this is the very first applet that i made, by following the Ejs tutorial since 2007 in yjc days while doing my MAIDT @ NIE. It was not the course that taught me this, but rather it was LEE TL that shared this tool with me during a teabreak or something, that i took it very seriously to explore Ejs. The main driving force was instructional design which was the focus of the masters program, but instructional design with the ability to change learning environment/objects myself is the game changer for me. I never looked back after i found the power of Ejs. This is going to change the physics education world and i am glad to be part of it.
16 june 2010
2 made some checkboxes Force and Energy into menu to save space to fit into width =600 for blog post http://sgeducation.blogspot.com/2010/06/ejs-open-source-simple-harmonic-motion.html
18 March 2011
added a slider to slow down sim for analyze from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2149.0
added text drag mass and release to give hint on the interactivity possible
 « Last Edit: March 17, 2011, 11:36:04 pm by lookang » Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #14 on: February 09, 2011, 08:09:13 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

a teacher recently shown me an exe file that can simulate SHM with a motor as driver.
it is should not be surprising (imperfect information flow) but i am always "surprise" (i thought google will surface this applet well and everyone searches the internet for applets) despite this applet being on the internet freely assessable, it is not widely known.
Information or innovative simulations like those made in Ejs is indeed difficult to diffuse and make it to teachers classroom use

anyway i improve this version of the SHM and concentrate on what are my interests/excites me.
09 February 2011
7 added more hints
8 added motor plunger as the right wall now moves with the externalForce(t) = amplitude * Math.sin(frequency*time); for greater association to possible real life setup
9 move top check-boxes hints to bottom as well for standard menu control

made some animated gif uploaded here as well as http://weelookang.blogspot.com/2010/06/ejs-open-source-simple-harmonic-motion.html for google to crawl
 shmmotor.PNG (48.45 KB, 1019x727 - viewed 921 times.)  SHM.gif (841.51 KB, 600x400 - viewed 15058 times.)  SHMgraphs.PNG (30.76 KB, 606x615 - viewed 1488 times.)  SHMenergyvt.gif (1122.25 KB, 300x542 - viewed 1307 times.)  SHMenergyvx.gif (1018.55 KB, 300x542 - viewed 1245 times.) « Last Edit: March 17, 2011, 09:54:57 pm by lookang » Logged
joseph25
Newbie

Offline

Posts: 1

 « Embed this message Reply #15 on: November 02, 2011, 04:58:18 pm » posted from:,,Satellite Provider

I decided to give a hand and sent a post into social bookmarks. I hope the popularity will rise in.
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #16 on: November 02, 2011, 06:29:15 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

I decided to give a hand and sent a post into social bookmarks. I hope the popularity will rise in.
Thanks Joseph25
Can u share the link where u social bookmark these simualtions ?
 Logged
Gaven
Newbie

Offline

Posts: 6

 « Embed this message Reply #17 on: December 16, 2011, 01:26:54 am » posted from:Islamabad,Islamabad,Pakistan

I am doing also social book marking from the one week ago and this is the amazing experience to add the PR of sites and increase the PR of cites.
 Logged
 Pages: [1]   Go Up
An interaction between two opposites produces a unique outcome. ..."Jules Henri Poincare(1854-1912, One of France's greatest mathematicians)"