NetLogo Models Library:
## WHAT IS IT?
This model displays the common natural phenomenon expressed by the Coulomb's inverse-square law. It shows what happens when the strength of the force between two charges varies inversely with the square of the distance between them.
## HOW IT WORKS
In this model the formula used to guide each charge's behavior is the standard formula for Coulomb's law:
F = (q1 * q2 * Permittivity) / (r^2)
In this formula:
- "F" is the force between the two charges q1 and q2.
- "Permittivity", the constant of proportionality here, is a property of the medium in which the two charges q1 and q2 are situated.
- "r" is the distance between the centers of the two charges.
This is a single force two body model, where we have a charge q1 (the blue particle that is created when you press SETUP) and a proton (q2) (the gray particle that appears when you press the mouse button in the view). The force is entirely one-way: only q1 is attracted towards (or repelled from) the proton (q2), while the proton (q2) remains unaffected. Note that this is purely for purposes of simulation. In the real world, Coulomb's force acts on all bodies around it.
Gravity is another example of an inverse square force. Roughly speaking, our solar system resembles a nucleus (sun) with electrons (planets) orbiting around it.
For certain values of q1 (which you can control by using the CHARGE slider), you can watch q1 form elliptic orbits around the mouse pointer (q2), or watch q1 slingshot around q2, similar to how a comet streaks past our sun. The charges q1 and q2 are always set equal in magnitude to each other, although they can differ in their sign.
## HOW TO USE IT
When you press the SETUP button, the charge q1 is created in a medium determined by the permittivity value from the PERMITTIVITY slider. When you click and hold down the mouse anywhere within the view, the model creates a unit of positive charge (q2) at the position of the mouse.
The CHARGE slider sets the value of the charge on q1. First, select the value of CHARGE on q1. (For simulation ease, value of the Charge on q2 is set to be +1 unit. Thus, it also determines at what distances the particles can safely orbit before they get sucked in by an overwhelming force.)
The FADE-RATE slider controls how fast the paths marked by the particles fade. At 100% there won't be any paths as they fade immediately, and at 0% the paths won't fade at all.
The PERMITTIVITY slider allows you to change values of the constant of proportionality in Coulomb's law. What does this variable depend on -- the charges, or the medium in which the charges are immersed?
When the sliders have been set to desirable levels, press the GO button to begin the simulation. Move the mouse to where you wish q2 to begin, and click and hold the mouse button. This will start the particles moving. If you wish to stop the simulation (say, to change the value of CHARGE), release the mouse button and the particles will stop moving. You may then change any settings you wish. Then, to continue the simulation, simply put your mouse in the window again and click and hold. Objects in the window will only move while the mouse button is pressed down within the window.
## THINGS TO NOTICE
The most important thing to observe is the behavior of the q1 (the blue charge).
What is the initial velocity for q1?
What happens as you change the value of q1 from negative to positive?
As you run the model, watch the graphs on the right hand side of the world. What can you infer from the graphs about the relationship between potential energy and distance between charges? What can you say about the relationship between Coulomb's force and distance between the charges from the graphs?
Move the mouse around -- watch what happens if you move it quickly or slowly. Jiggle it around in a single place, or let it sit still. Observe what patterns the particles fall into. (You may keep FADE-RATE low to watch this explicitly.)
## THINGS TO TRY
Run the simulation playing with different values of:
a) charge -- make sure to watch how different values of the CHARGE slider impact the model for any fixed value of permittivity.
b) permittivity -- make sure to watch how different values of the PERMITTIVITY slider impact the model for any fixed value of charge.
Can you make q1 revolve around q2? Imagine, if q1 would be an electron and q2 a proton, then you have just built a hydrogen atom...
As the simulation progresses, you can take data on how
a) Force between the two charges varies with distance between charges;
b) Potential energy changes with distance between charges;
c) Force depends on permittivity.
In each case, take 8 to 10 data points. Plot your results by hand or by any plotting program.
## EXTENDING THE MODEL
Assign a fixed position to the proton (q1), i.e., make it independent of the mouse position. Assign a variable to its magnitude.
Now create another charge of the breed "centers", and assign a fixed position to it in the graphics window. Run the model for different positions, magnitude and signs (i.e., "+"ve or "-"ve) of the new "center".
Create many test-charges. Then place the two "centers", of opposite signs and comparable magnitudes, near the two horizontal edges of the world. Now run the model.
## RELATED MODELS
## NETLOGO FEATURES
When a particle moves off of the edge of the world, it doesn't re-appear by wrapping onto the other side (as in most other NetLogo models). The model stops when the particle exits the world.
## CREDITS AND REFERENCES
This model is a part of the NIELS curriculum. The NIELS curriculum has been and is currently under development at Northwestern's Center for Connected Learning and Computer-Based Modeling and the Mind, Matter and Media Lab at Vanderbilt University. For more information about the NIELS curriculum please refer to http://ccl.northwestern.edu/NIELS.
## HOW TO CITE
If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:
* Sengupta, P. and Wilensky, U. (2005). NetLogo Electrostatics model. http://ccl.northwestern.edu/netlogo/models/Electrostatics. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
* Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
To cite the NIELS curriculum as a whole, please use: Sengupta, P. and Wilensky, U. (2008). NetLogo NIELS curriculum. http://ccl.northwestern.edu/NIELS. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
## COPYRIGHT AND LICENSE
Copyright 2005 Pratim Sengupta and Uri Wilensky.
![CC BY-NC-SA 3.0](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png)
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at email@example.com.
To use this model for academic or commercial research, please contact Pratim Sengupta at <firstname.lastname@example.org> or Uri Wilensky at <email@example.com> for a mutual agreement prior to usage.