Series Circuit with Collisions

No preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (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.1pre1 • Viewed 145 times • Downloaded 12 times • Run 1 time
Download the 'Series Circuit with Collisions' 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: Series Circuit with Collisions.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 x right-current]
;;;;;;;;;;;;;;;;;;;;;;;;
;;; Setup Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;;;

to setup
  ca
  set right-current 1
  set-default-shape electrons "circle 2" 
  set charge-flow-history []
  ;; create wire
  ask patches
  [ set pcolor gray]
  ask patches with [pxcor < 0]
  [ set pcolor gray + 2 ]
  
  ;; create electrons                
  crt 2 * resistance-left-wire
  [
    set breed electrons 
    setxy random max-pxcor - 3 random-ycor
    set heading random 360
    set color orange - 2
    set size 1
  ] 
  crt 2 * resistance-right-wire
  [
    set breed electrons 
    setxy random min-pxcor + 3 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 resistance-right-wire patches with [pxcor < max-pxcor - 4.5 and pxcor >= 2]
  [ sprout 1 
    [ 
      set breed nuclei
      set size 2
      set shape "circle 2"
      set color blue
    ]
  ] 
ask n-of resistance-left-wire patches with [pxcor < (- 2) and pxcor > min-pxcor + 4.5]
  [ sprout 1 
    [ 
      set breed nuclei
      set size 2
      set shape "circle 2"
      set color blue
    ]
  ] 
ask patches with [ pxcor < 1 and pxcor > ( - 1) ]
 [ set pcolor white ]
set charge-flow 1
set dt 1
end 


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

to go
;;
set x resistance-left-wire / ( resistance-right-wire + resistance-left-wire)
;;set x (count electrons with [pcolor = gray])/((count electrons with [pcolor = gray]) + (count electrons with [pcolor = gray + 2]))
 ;; update the size of battery-terminals with values of 3.5
  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     
  if pcolor = white 
  [ set right-current right-current + 1 
   set xcor (- 2) ]
  ]                    ]                                   
  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   
  
  if ticks > 20 
  [ do-plot ]
end 


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

to move 
ifelse not any? nuclei-on neighbors 
 [
   set heading 270 
   if pcolor = gray 
    [ fd 0.3 * 3.5 * (1 - x) ]  
  if pcolor = gray + 2
    [ fd 0.3 * 3.5 * x ]  
  if pcolor = red
   [ set heading 270 fd 3 ] 
   ;set heading random 360 fd 0.3 
   
 ]
 [
   ifelse random-float 1.0 > 0.5 
   [ set heading 2 * heading ;set heading 180 - 2 * heading ;; change direction due to collision 
     if pcolor = gray 
    [ fd 0.3 * 3.5 * (1 - x) ]  
    if pcolor = gray + 2
    [ fd 0.3 * 3.5 * x ]        ;; 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.1    
   ]
   [ set heading 180 - 2 * heading ;; change direction due to collision 
     if pcolor = gray 
    [ fd 0.3 * 3.5 * (1 - x) ]  
    if pcolor = gray + 2
    [ fd 0.3 * 3.5 * x ]       ;; 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.1    
   ]
 ] 
if pcolor = black 
 [ pu 
   set charge-flow charge-flow + 1 
   hatch 1 
     [ set breed electrons
       setxy max-pxcor - 4 ycor
       pu
     ]
   die
 ]
end  


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

to do-plot
  set-current-plot "Current" 
  set-current-plot-pen "left current"
  plotxy ticks mean charge-flow-history 
 set-current-plot-pen "right current"
  plotxy ticks right-current / 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 * 3.5
  ] 
  ask anodes
  [
    set size 1.5 + 0.5 * 3.5
  ] 
end 

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

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.