Parallel 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 240 times • Downloaded 23 times • Run 1 time
Download the 'Parallel 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: Parallel Circuit With Collisions.nlogo 39507 2008-04-24 15:23:31Z everreau $

WHAT IS IT?

This model offers a microscopic view of free electrons in two conducting wires that are connected in parallel to each other across two terminals of a battery.

This model shows what happens when two such wires are connected in parallel to each other across two ends of a battery terminal. It shows that current in each wire is not always equal to current in the other wire, unlike in a series circuit (see Series Circuit model). However, since each of the wires is connected across the same battery terminals, voltage is the same in each wire.

HOW IT WORKS

The rules in this model are the same as in the earlier Ohm's Law and Series Circuit models. As in Series Circuit, there are two wires, each with its own resistance, but here the wires are connected side by side rather than end to end. Electrons from one wire do not cross over into the other wire.

HOW TO USE IT

The TOTAL-ELECTRONS slider allows you to select the total number of free electrons in both wires. This number is constant for a single run of the model.

The VOLTAGE slider controls the potential difference across the two battery terminals. This imparts a steady velocity to the electrons. However, this velocity is also dependent on the rate at which the electrons collide with the atomic nuclei in the wires.

The COLLISION-RATE-WITH-NUCLEI sliders, one for each wire, are inversely proportional to how far an electron travels on average without colliding with atomic nuclei. The collision rate of electrons in a wire causes resistance. The collision-rate affects the motion of electrons in it in another way: the net velocity of the electrons is also reduced in proportion to the collision rate.

THINGS TO NOTICE

When you observe the trace of the path of an electron, how does it differ in the two wires? Why?

What happens to the number of electrons in each wire when you change the collision rate of electrons in either of the wires?

THINGS TO TRY

1. Run the model with the default settings. Note the current in both the wires. Are these values equal? What about the number of electrons in each wire?

2. Increase the collision rate in one of the wires. Note the current in both the wires. Then increase the collision rate in both the wires at the same time. Note the current in both the wires. Is current in each wire still equal to each other? What about the number of electrons in each wire?

3. Watch a single electron in the top wire by pressing the top WATCH AN ELECTRON button. Now watch the tick counter and note how much model time the electron takes to travel through the wire. Repeat this observation several times for different values of the collision rates in each wire.

a) What do you notice?

b) Given the total number of electrons in each wire and the length of the wires, how can you calculate current in each wire by noting the time an electron takes to travel through the wire?

4. Following step 3 above, now calculate the current in the bottom wire.

5. 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?

6. How would you calculate the total current in the circuit?

EXTENDING THE MODEL

Can you create another wire in series with these two wires?

NETLOGO FEATURES

Electrons automatically wrap around the world horizontally. Special vertical wrap code is used to keep electrons from changing wires.

RELATED MODELS

Electrostatics

Ohm's Law

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 [top-electrons top-electron]
breed [bottom-electrons bottom-electron]
breed [nuclei nucleus ]

globals [
  top-current bottom-current  ;; current measurements, accumulate for 100 ticks
  last-top-current last-bottom-current  ;; from previous 100 tick period
]

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

to setup
  clear-all
  set-default-shape top-electrons "circle 2"
  set-default-shape bottom-electrons "circle 2"
  
  set-default-shape nuclei "circle 2"
  ;; create the top wire
  ask patches with [top-wire?]
    [ set pcolor gray ]
  ;; create the bottom wire
  ask patches with [not top-wire?]
    [ set pcolor gray + 3 ]

  ;; set up battery negative
  ask patches with [pxcor >= max-pxcor - 4]
    [ set pcolor red ]
  ask patch (max-pxcor - 1) (max-pycor / 2)
    [ set plabel "-" ]

  ;; set up battery positive
  ask patches with [pxcor <= min-pxcor + 4]
    [ set pcolor black ]
  ask patch (min-pxcor + 4) (max-pycor / 2)
    [ set plabel "+" ]

  ;; create electrons in top wire
  ask n-of (100000 / resistance-top-wire) patches with [top-wire?]
    [ sprout-top-electrons 1 [
        set color orange - 2
        set size 1
        if pcolor = black [
        set xcor xcor - 6
      ] ] ]
  ;; create electrons in bottom wire
  ask n-of (100000 / resistance-bottom-wire) patches with [not top-wire?]
    [ sprout-bottom-electrons 1 [
        set color orange - 2
        set size 1
        if pcolor = black [
        set xcor xcor - 6
      ] ] ]
  ask n-of (resistance-top-wire) patches with [top-wire? and pycor > (max-pycor / 2 + 0.1) and pcolor != black and pcolor != red]
    [ sprout-nuclei 1 [
        set color blue
        set size 1.5
         ] ]
  ask n-of (resistance-bottom-wire) patches with [not top-wire? and pycor < (max-pycor / 2 - 0.1) and pcolor != black and pcolor != red]
    [ sprout-nuclei 1 [
        set color blue
        set size 1.5
         ] ]
end 

to-report top-wire?  ;; turtle or patch procedure
  report pycor > max-pycor / 2
end 

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

to go
  ask top-electrons
    [ move-electron 
      ;; contribute to current measurement
      if pcolor = black [ pu 
        set top-current top-current + 1
        hatch 1
        [ setxy (xcor - 8) ycor
        set color orange - 2
        ]
        die
      ] ]
  ask bottom-electrons
    [ move-electron 
      ;; contribute to current measurement
      if pcolor = black [ pu 
        set bottom-current bottom-current + 1
        hatch 1
        [ setxy (xcor - 8) ycor
        set color orange - 2
        ]
        die
        
      ] ]
  tick
  ;if ticks mod 30 = 0 [ 
  update-plots 
  ;]
end 

;; perform simple point collisions
;; with nuclei in the wire and steadily drifting
;; forward due to the electric field

to move-electron 
let old-patch patch-here
let old-xcor xcor 
let old-ycor ycor 
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    
   ]
 ] 
  ;; have we entered the wrong wire? if so, wrap
  if top-wire? != [top-wire?] of old-patch
    [ setxy old-xcor old-ycor ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;
;; Plotting Procedures ;;
;;;;;;;;;;;;;;;;;;;;;;;;;

to update-plots
  set-current-plot "Current in top wire"
  plotxy (ticks) (top-current / ticks)
;  set last-top-current top-current / 30
;  set top-current 0
;  let top-max plot-y-max
  set-current-plot "Current in bottom wire"
  plotxy (ticks) (bottom-current / ticks)
;  set last-bottom-current bottom-current / 30
;  set bottom-current 0
;  let bottom-max plot-y-max
;  ;; make sure both plots are scaled the same amount
;  set-current-plot "Current in top wire"
;  set-plot-y-range 0 max list top-max bottom-max
;  set-current-plot "Current in bottom wire"
;  set-plot-y-range 0 max list top-max bottom-max
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.