Ohm's Law-Collisions-final

No preview image

3 collaborators

Uri_dolphin3 Uri Wilensky (Author)
Default-person Pratim Sengupta (Author)
Default-person Daniel Kornhauser (Team member)

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.1pre1 • Viewed 193 times • Downloaded 17 times • Run 1 time
Download the 'Ohm's Law-Collisions-final' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


VERSION

$Id: Ohm's Law-Collisions-final.nlogo 39507 2008-04-24 15:23:31Z everreau $

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

The wire in this model (gray patches region) is composed of atoms, 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". These free electrons obey some rules that are specified in the "Procedures" tab in the model. The applied electric field due to the battery imparts a steady velocity to the electrons in the direction of the positive terminal. 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 generation in the battery maintaining a constant voltage (or potential difference) between the two terminals.

Voltage in the battery gives rise to a constant electric field throughout the wire, imparting a steady drift to the electrons while they move in the wire connecting the two terminals. In addition to this drift, the electrons also collide with the atomic nuclei 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.

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-NUCLEI slider indicates how many nuclei are in the wire. Higher this value, higer will be the collision rate of electrons in a wire causes resistance.

The button "Trace A Single Electron" asks an electron to set its color green 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 "Setup" again.

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 "Setup" 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 COLLISION-RATE-WITH-NUCLEI ?

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 collision-rate of electrons with the nuclei. How does the value of current in the wire change? How does the motion of electrons change?

2.b) Reduce the collision-rate of electrons with the nuclei. 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 collision-rate-with-nuclei. Now calculate the average speed of the electron from these observations.

3.b) Repeat 3a for a few different values of the slider COLLISION-RATE-WITH-NUCLEI What do you notice?

3.c) How can you calculate current in the wire from the average speed of an electron through it?

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 this method and 3(b) equivalent to each other?

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, Conductor, 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.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

breed [ electrons electron ]
breed [ anodes anode ]
breed [ nuclei nucleus ]
breed [ cathodes cathode ]
globals [dt charge-flow charge-flow-history init-timer time old-charge-flow old-time]
;;;;;;;;;;;;;;;;;;;;;;;;
;;; Setup Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;;;

to setup
  ca
  set time 0
  set-default-shape electrons "circle 2" 
  set charge-flow-history []
  ;; create wire
  ask patches
  [ set pcolor gray]
  
  ;; create electrons                
  crt total-electrons / 2
  [
    set breed electrons 
    setxy random max-pxcor - 3 random-ycor
    set heading random 360
    set color orange - 2
    set size 1
  ] 
  crt total-electrons / 2
  [
    set breed electrons 
    setxy random min-pxcor + 4 random-ycor
    set heading random 360
    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
    ]
  ]
  ask patches with [pxcor = max-pxcor - 1 and pycor = 0] 
  [ sprout 1 
    [ 
      set breed anodes
      set shape "minus" 
      set size 1.5
    ]
  ]
  ask n-of (20) patches with [pxcor < max-pxcor - 4.5 and pxcor > min-pxcor + 4.5 
                                         and nuclei-here != true and nuclei-on neighbors4 != true]
  [ sprout 1 
    [ 
      set breed nuclei
      set size 2
      set shape "circle 2"
      set color blue
    ]
  ] 
;repeat 5 
ask n-of number-of-atoms patches with [pxcor < max-pxcor - 4.5 and pxcor > min-pxcor + 4.5 
                                         and count nuclei-here = 0 and nuclei-on neighbors4 != true]
  [ sprout 1 
    [ 
      set breed nuclei
      set size 2
      set shape "circle 2"
      set color blue
    ]
  ] 
set charge-flow 0
set dt 1
end 


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

to go
 set old-charge-flow charge-flow ;; record current value of charge-flow
 set old-time time    ;; record current value of time
 
 ;; update the size of battery-terminals with values of Voltage
  update-battery-size
 
 ;; Rules for electrons
 without-interruption [
  ask electrons
  [
    ;; 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 / ticks) 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 
ifelse not any? nuclei-on neighbors 
 [
   set heading 270 fd 0.5 * voltage 
   ;set heading random 360 fd 0.3 
 ]
 [
   ifelse random-float 1.0 > 0.5 
   [ set heading 2 * heading ;; change direction due to collision 
     fd 0.5 * Voltage       ;; after the collsion, move by the same amount prior to the collision
     set heading random 360 ;; these two rules are just so that electrons don't get trapped between nuclei 
     fd 0.01    
   ]
   [ set heading 180 - 2 * heading ;; change direction due to collision 
     fd 0.5 * Voltage       ;; after the collsion, move by the same amount prior to the collision
     set heading random 360 ;; these two rules are just so that electrons don't get trapped between nuclei 
     fd 0.01    
   ]
 ] 
if pcolor = black 
 [ pu 
   set charge-flow charge-flow + 1
   set time time + (1 / 50)  
   hatch 1 
     [ set breed electrons
       setxy max-pxcor - 4 ycor
       pu
     ]
   die
   
 ]
end  


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

to do-plot
  set-current-plot "Current vs Time" 
  plotxy ticks / 50 (50 * charge-flow) / ticks 
end 

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

to update-battery-size
  
  ;; now update the size of Battery-negative   
  ask cathodes
  [
    set size 1.5 + 0.5 * Voltage
  ] 
  ask anodes
  [
    set size 1.5 + 0.5 * Voltage
  ] 
end   

to reset-clock
  set time 0
  reset-timer
  set charge-flow 0
end     

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

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.