# Ohm's Law With Collisions

No preview image

### 3 collaborators

Uri Wilensky (Author)
Daniel Kornhauser (Team member)
Pratim Sengupta (Author)

### Tags

(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 4.0beta1 • Viewed 267 times • Downloaded 13 times • Run 1 time

### VERSION

\$Id: Ohm's Law With Collisions.nlogo 37529 2008-01-03 20:38:02Z craig \$

### WHAT IS IT?

This model illustrates how a steady current as well as resistance emerge from simple interactions between electrons and atoms in the wire and the battery terminals. It shows how the relationship between current (I), resistance(R) and voltage (V) as expressed in Ohm's Law (i.e., V = I * R) emerges due to the interactions between individual electrons and atoms in the wire.

### HOW IT WORKS

This moel is a simple representation of current in a wire based on Drude's theory of free electrons. The wire in this model (gray patches region) is composed of atoms (indicated in this model by the stationary blue circles), which in turn are made of negatively charged electrons and positively charged nuclei. According to the Bohr model of the atom, these electrons revolve in concentric shells around the nucleus. However, in each atom, the electrons that are farthest away from the nucleus (i.e., the electrons that are in the outermost shell of each atom) behave as if they are free from the nuclear attraction. These outermost electrons from each atom are called "free electrons", depicted in this model by the moving red circles. Voltage in the battery gives rise to a constant electric field throughout the wire, imparting a steady drift to these free electrons towards the battery-positive while they move in the wire connecting the two terminals. In addition to this drift, the free electrons also collide with the atoms in the wire, giving rise to electrical resistance in the wire. The nuclei are the blue circles shown in the wire that in this model causes the electrons to go around them.

The positive battery terminal (black patches region), which is actually an enormous collection of positive charges, acts as an enormous sink for negative charges or electron, whereas, the negative battery terminal (red patches area) is a large source of negative charges or electrons. Note that electrons reappear on the other side at the negative terminal after crossing into the positive terminal of the battery. This is a greatly simplified representation of the continuous process of charge re-generation in the battery maintaining a constant voltage (or potential difference) between the two terminals.

Current is defined as the numkber of electrons arriving at the battery-positive per unit time.

### HOW TO USE IT

The TOTAL-ELECTRONS slider allows selecting the total number of free electrons in both the wires. This number is kept constant throughout a single run of the model.

The VOLTAGE slider indicates the magnitude of voltage between the battery terminals. It imparts a steady velocity to the electrons. However, as the next paragraph explains, this velocity depends on the rate at which the electron collides with the atomic nuclei in the wires.

The NUM-ATOMS slider indicates how many nuclei are in the wire. Higher this value, higher will be the collision rate of the free electrons with the atoms, i.e., the elctrons with collide with the atoms more frequently. This phenomenon of hindering the flow of electrons towards the battery-positive is called resistance. ach time you change the value ofthis slider, you will need to press SETUP for the changes to take effect.

The button "Color And Trace A Single Electron" asks an electron to set its color yellow and traces its path. If you want to go back to the default settings (with all electrons red and no traces), you need to press "Stop Tracing".

The button "Watch A Single Electron" highlights a single electron (chosen randomly) in the model so that you can observe its motion in particular. If you want to go back to the default settings (with all electrons red and no traces), you need to press "Stop Watching" again.

### THINGS TO NOTICE

When you observe the trace of the path of an electron by pressing the button "Trace A Single Electron", how does the path change when you increase or decrease the number of atoms?

### THINGS TO TRY

1. Run the model with the default settings. Note the current and number of electrons in the wire.

2.a) Increase the number of atoms in the wire. How does the value of current in the wire change? How does the motion of electrons change?

2.b) Reduce the number of atoms in the wire. How does the value of current in the wire change? How does the motion of electrons change?

3.a) Press "Watch A Single Electron". Now take a stopwatch and note down how much time the electron takes to travel through the wire. Repeat this observation several times for the same value of Number-of-Atoms, Total-Electrons & Voltage. Now calculate the average time taken by the electrons to cross the wire from end-to-end.

3.b) Repeat 3a for a few different values of the slider Number-of-Atoms. What do you notice? Are the two times different?

4. Look in the section titled "Procedures for Counting Current" in the Procedures tab. How is current in each wire calculated in this model? Is there any other way that you can think of by which you can measure current in tthe wire?

5. Based on your interactions with the model, how would now explain the notions of current and resistance?

### EXTENDING THE MODEL

Can you create a series circuit (with two wires in series) by extending this model?

### NETLOGO FEATURES

Electrons wrap around the world both vertically and horizontally.

### RELATED MODELS

Electrostatics, Polarization, Charged Particles, Moving Electrons, Ohm's Law, Lines of Force, Parallel Circuit, Series Circuit.

### CREDITS AND REFERENCES

This model is a part of the NIELS curriculum. The NIELS curriculum is currently under development at Northwestern's Center for Connected Learning and Computer-Based Modeling. For more information about the NIELS curriculum please refer to http://ccl.northwestern.edu/NIELS.

Thanks to Daniel Kornhauser for his work on the design of this model.

Click to Run Model

```breed [ electrons electron ]
breed [ anodes anode ]
breed [ nuclei nucleus ]
breed [ cathodes cathode ]
globals [dt charge-flow charge-flow-history ]

;;;;;;;;;;;;;;;;;;;;;;;;
;;; Setup Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;;;

to setup
ca
set-default-shape electrons "circle 2"
set charge-flow-history []
;; create wire
[ set pcolor gray ]

;; create electrons
crt total-electrons / 2
[
set breed electrons
setxy random max-pxcor - 3 random-ycor
set color orange - 2
set size 1
]
crt total-electrons / 2
[
set breed electrons
setxy random min-pxcor + 3 random-ycor
set color orange - 2
set size 1
]
;; now set up the Battery-negative
ask patches with [pxcor >= max-pxcor - 3 ]
[
set pcolor red
]

;; now set up the Battery-negative
ask patches with [pxcor <= min-pxcor + 3 ]
[
set pcolor black
]

;; create labels for the battery terminals
ask patches with [pxcor = min-pxcor + 1 and pycor = 0]
[ sprout 1
[
set breed cathodes
set shape "plus"
set size 1.5 + 0.5 * Voltage
]
]
ask patches with [pxcor = max-pxcor - 1 and pycor = 0]
[ sprout 1
[
set breed anodes
set shape "minus"
set size 1.5 + 0.5 * Voltage
]
]
ask n-of Number-of-Atoms patches with [pcolor = gray]
[ sprout 1
[
set breed nuclei
set size 2
set shape "circle 2"
set color blue
]
]
set charge-flow 1
set dt 1
end

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Runtime Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;

to go

;; update the size of battery-terminals with values of Voltage
update-battery-size

;; Rules for electrons
without-interruption
[
[
if pcolor = black [ setxy max-pxcor - 4 ycor]
;; electrons-rules for performing simple point collisions
;; with nuclei in the wire and in between two colisions,
;; drfiting steadily drifting forward due to the electric field
move
]
]
tick
set charge-flow-history fput charge-flow charge-flow-history
if (length charge-flow-history > 50)
[
set charge-flow-history sublist charge-flow-history 0 50
]
;; Keep plotting
do-plot
end

;;;;;;;;;;;;;;;;;;;;;;;;;
;; rules for electrons ;;
;;;;;;;;;;;;;;;;;;;;;;;;;

to move
set heading random 360 ;; these two rules are just so that electrons don't get trapped between
fd 0.1                 ;; nuclei
ifelse count nuclei in-cone 2.5 180 < 1
[
;; if there are no nuclei nearby,
;; then drift due to electric field towards the battery-positive;
;; this also serves as the movement prior to any collision
set heading 270 safe-move 0.5 * Voltage
]
[
rt 180                   ;; change direction due to collision
safe-move 0.5 * Voltage  ;; after the collsion, move by the same amount prior to the collision
]
end

;;;;;;;;;;;;;;;;;;;;;;;;;
;; Plotting procedures ;;
;;;;;;;;;;;;;;;;;;;;;;;;;

to do-plot
set-current-plot "Current"
plotxy ticks mean charge-flow-history
end

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Procedures for Counting Current  ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to update-battery-size

;; now update the size of Battery-negative
[
set size 1.5 + 0.5 * Voltage
]
[
set size 1.5 + 0.5 * Voltage
]
end

;; if we wrap past the battery-postive, count current and then exit the wire and reappear on the other end
[ ;; this makes sure that charges do not stay on black patches for too long
hatch 1
[
setxy random-xcor random-ycor
]
die
]
set charge-flow count electrons with [pcolor = black] ;; count current by measuring electrons that arrive on black patches
end
```

There is only one version of this model, created over 12 years ago by Uri Wilensky.

## Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.