NTNUJAVA Virtual Physics Laboratory
Enjoy 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 February 19, 2009, 04:21:54 pm



Title: Molecular Dynamics by Wolfgang Christian and Francisco Esquembre
Post by: lookang on February 19, 2009, 04:21:54 pm
Molecular Dynamics
A simple Molecular Dynamics model is constructed using the Lennard-Jones potential truncated at a distance of 3 molecular diameters. This is a reasonably accurate model of then interactions between noble gas atoms.  The motion of the molecules is governed by Newton's laws, approximated using the Verlet algorithm with the indicated Time step. For sufficiently small time steps dt, the system's total energy should be approximately conserved.
References:
The Molecular Dynamics model is based on a Java applet written by Dan Schroeder, Physics Department, Weber State University.  See:
This simulation was created by Wolfgang Christian using the Easy Java Simulations (Ejs) modeling tool and is designed to teach modeling.  Users can inspect and modify the underlying model by copying the model from the running program into Ejs.  Right click within the simulation to examine the model in Ejs. 
You can examine and modify this simulation if you have Ejs installed by right-clicking within a plot and selecting "Open Ejs Model" from the pop-up menu. Information about Ejs is available at: .
The Easy Java Simulations (EJS) manual can be downloaded from the ComPADRE Open Source Physics collection and from the Ejs website.
See:
"Modeling Physics with Easy Java Simulations" by Wolfgang Christian and Francisco Esquembre, The Physics Teacher, November 2007, 45 (8), pp. 475-480.

Molecular Dynamics Physics
Dan Schroeder describes the physics of the Lennard-Jones molecular dynamics model as follows:
The force between the molecules is calculated from the Lennard-Jones formula (truncated at a distance of 3 molecular diameters). This is a reasonably accurate model of the interactions between noble gas atoms.

The model uses a natural system of units, with the molecular diameter, the molecular mass, the depth of the Lennard-Jones potential, and Boltzmann's constant all set equal to 1. For argon (for example), the unit of distance is 3.4 angstroms, the unit of mass is 40 atomic mass units, and the unit of energy is 0.01 electron-volts; the corresponding unit of time is then 2.2 picoseconds, the unit of velocity is 160 meters per second, and the unit of temperature is 120 kelvin.

The motion of the molecules is governed by Newton's laws, approximated using the Verlet algorithm with the indicated time step. For sufficiently small time steps dt, the system's total energy should be approximately conserved.

The walls exert a linear (spring) force on the molecules, with a spring constant of 50 in natural units.

There's also an optional uniform downward force, controlled by the the gravity parameter. The magnitude of this force, however, is not meant to be realistic. Earth's gravitational constant is utterly negligible in the units used here (a little over 10-13 for argon).

That's all the physics! Everything else you see is a consequence of these basic laws (applied repeatedly as the molecules move), plus the initial placement of the molecules. The simulation code knows nothing about phase transformations or crystal structure or irreversibility.
References:
The Molecular Dynamics model is based on a Java applet written by Dan Schroeder, Physics Department, Weber State University.  See:

Wonderful work on the jar upload !!




Title: Re: Molecular Dynamics by Wolfgang Christian and Francisco Esquembre
Post by: Fu-Kwun Hwang on February 19, 2009, 04:43:44 pm
I created two similar applets more than three years ago (2005/11), please check out
 particle model for solid/liquid/gas states (2D model) (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=296.0)
 particle model for solid/liquid/gas states in 3D (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=297.0)

Both models include options to add gravity and see what will happened.

Do you have any suggestions about new EJS upload interface or this forum system?
Let me know if there is anything the system can be changed to make user feel easier (to use for teaching/learning purpose).


Title: Re: Molecular Dynamics by Wolfgang Christian and Francisco Esquembre
Post by: lookang on February 19, 2009, 08:52:47 pm
I created two similar applets more than three years ago (2005/11), please check out
 particle model for solid/liquid/gas states (2D model) (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=296.0)
 particle model for solid/liquid/gas states in 3D (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=297.0)
I like yours 2D, maybe i try to read you codes to understand it
Think i try
the 3D is also cool, but seems a bit slow


Do you have any suggestions about new EJS upload interface or this forum system?
Let me know if there is anything the system can be changed to make user feel easier (to use for teaching/learning purpose).

You have done an excellent modification of your php codes,
i just wondering if EJS users could just upload the standalone jar file in the 2nd attachment, and it automatically does the embedding. That will be like super userfriendly!
since the 1st attachment is currently auto used for generating the png preview in the board view.

The 21st century education way is definitely collaboration platform, will give you suggestions without hesitation.


On a separate matter can you create a board for request for mods in your SMF forum?
i want to help you add some mods that i have tested on my own SMF forum and i think it helps netizens stay on your forum, making your forum a cool place to hang out and introduce applets to others.
wanna try?
it is just like the auto generating on thumbnails on board , those kinds that worth adding ones, i hope:)


Title: Firework
Post by: Fu-Kwun Hwang on February 19, 2009, 10:30:43 pm
The 3D model is slow because there are more calculations for 3D.

I am going to simply the EJS upload interface.
User only need to upload ejs_XXX.jar file.
I will add code to extract width,height,and code name from uploaded jar file.
It is working now!

Use jar file as second attachment might not be a good ideas. For the folllowing reasons:
What if you have uploaded other files? (The 2nd file is not a jar file).
what if you want to upload new versions of jar file?
...

Now, just click the checkbox and upload the ejs jar file.
The php code will unzip the jar file and find out all the necessary information.




Title: Re: Molecular Dynamics by Wolfgang Christian and Francisco Esquembre
Post by: lookang on February 20, 2009, 07:22:13 am
The 3D model is slow because there are more calculations for 3D.
oic.




I am going to simply the EJS upload interface.
User only need to upload ejs_XXX.jar file.
I will add code to extract width,height,and code name from uploaded jar file.
It is working now!

Amazing stuff Prof. Hwang



Use jar file as second attachment might not be a good ideas. For the folllowing reasons:
What if you have uploaded other files? (The 2nd file is not a jar file).
what if you want to upload new versions of jar file?
...

Now, just click the checkbox and upload the ejs jar file.
The php code will unzip the jar file and find out all the necessary information.
not to worry, i do agree the current method is effective too.
my suggestion was flawed too i was thinking about it after posted the suggestion.


hope more people will be populating their EJS Simulations, original and remixed ones.

well done!!


Title: Re: Molecular Dynamics by Wolfgang Christian and Francisco Esquembre
Post by: Fu-Kwun Hwang on February 20, 2009, 08:40:06 am
The improvement is due to your suggestion.
Otherwise, user need to enter more information (width/height and long code name).

Quote
On a separate matter can you create a board for request for mods in your SMF forum?
i want to help you add some mods that i have tested on my own SMF forum and i think it helps netizens stay on your forum, making your forum a cool place to hang out and introduce applets to others.

Is it necessary to create a new board just for request for mods ?
Could you sent me private message about the suggestions?
I will be happy to hear from you about those suggestions!


Title: Re: Molecular Dynamics by Wolfgang Christian and Francisco Esquembre
Post by: lookang on February 20, 2009, 09:43:34 am
LOL! agreed! ;D


Title: Re: Molecular Dynamics by Wolfgang Christian and Francisco Esquembre
Post by: Fu-Kwun Hwang on February 20, 2009, 12:53:11 pm
I already add several SMF mods you suggested.
I was not able to install some of them due to the change of the system with my own code.