Current in a Wire

Current in a Wire preview image

2 collaborators

Uri_dolphin3 Uri Wilensky (Author)
Default-person Pratim Sengupta (Author)

Tags

electricity 

Tagged by Reuven M. Lerner over 11 years ago

niels 

Tagged by Reuven M. Lerner over 11 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.4 • Viewed 403 times • Downloaded 71 times • Run 1 time
Download the 'Current in a Wire' modelDownload this modelEmbed this model

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


WHAT IS IT?

This model shows a simplified microscopic picture of electrical conduction inside a wire connected across two battery terminals. It is based on Drude's free electron theory, and shows how electric current emerges from the collective movement of many electrons inside a wire.

It also shows how electric current depends on the number of free electrons and how fast these electrons are travelling towards the battery-positive. This speed, in turn, depends on a) the applied voltage, and b) the obstacles that the electrons encounter in their way, which are represented in this model by atoms.

HOW IT WORKS

The wire in this model (represented by gray patches) 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 a specific set of rules that can be found in the "Procedures" tab. These rules are as follows: The applied electric voltage due to the battery imparts a steady velocity to the electrons in the direction of the positive terminal. In addition to this drift, the electrons also collide with the atomic nuclei (represented by the blue atoms) in the wire giving rise to electrical resistance in the wire. During these collisions, electrons bounce back, scatter slightly, and then start drifting again in the direction of the battery-positive.

The positive battery terminal (represented by black patches), which is actually an enormous collection of positive charges, acts as a sink for the negatively charged free-electrons. The negative battery terminal (represented by red patches) is a large source of negative charges or electrons. Note that electrons reappear on the other side at the negative terminal after entering the positive terminal of the battery. This simplified representation of the continuous process of charge generation in the battery helps to maintain a constant voltage (or potential difference) between the two terminals.

HOW TO USE IT

The NUMBER-OF-ELECTRONS slider allows the user to select the total number of free electrons in the wire. This number is kept constant throughout a single run of the model.

The VOLTAGE slider indicates the magnitude of voltage between the battery terminals. This voltage imparts a steady velocity to the electrons.

The RESISTANCE slider indicates how many atoms are in the wire. The number of atoms created is equal to the square of the value of this slider. Increasing this value will also increase the number of collisions that electrons will suffer inside the wire.

The button WATCH AN ELECTRON highlights a single electron (chosen randomly) in the model so that you can observe and trace its movement. If you want to go back to the default settings (with all electrons red and no traces), you need to press SETUP. If you simply want to stop watching, press STOP WATCHING.

THINGS TO NOTICE

This model uses several approximations.

First, the atoms are placed randomly inside the wire. That is, for the same value of RESISTANCE, every time you press setup, a new spatial distribution of atoms will result. This may result in slightly different values of electric current for the same model parameters. [The representation of RESISTANCE in the form of number of atoms is also an approximate representation. In this context, the advanced user may find the discussion in the section titled "NOTES FOR ADVANCED USERS" to be of interest.]

Second, the rule for collisions between electrons and atoms is a much simplified, approximate representation. It is based on point collisions that neglect the size of electrons and atoms; in addition, these rules do not use exact mathematical formulae for calculating exact velocities before and after collisions.

As a result of these approximations, values may not strictly adhere to Ohm's Law. For example, when you double the value of RESISTANCE, electric current may not be exactly half, as you would expect from Ohm's Law, even though it will be lower.

THINGS TO TRY

  1. Run the model for different values of NUMBER-OF-ELECTRONS, while keeping all the other sliders constant. (Remember to press SETUP every time you change the value). How does the value of current in the wire change?

  2. Run the model for different values of VOLTAGE, while keeping all the other sliders constant. (Remember to press SETUP every time you change the value). How does the value of current in the wire change? How do you think VOLTAGE affects the motion of the electrons?

  3. Run the model for different values of RESISTANCE, while keeping all the other sliders constant. (Remember to press SETUP every time you change the value). How does the value of current in the wire change? How do you think RESISTANCE affects the motion of the electrons?

  4. Press WATCH AN ELECTRON. Using the TIMER monitor, or a stopwatch, note how much time the electron takes to travel through the wire. Repeat this observation several times for the same model parameters. How do you think the average of these values is related to electric current?

EXTENDING THE MODEL

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

NOTE TO ADVANCED USERS

  1. Resistance is represented in NIELS models in two forms. In the first form of representation, which is used in this model, the resistance of a material is represented by the number of atoms per unit square area. This representation foregrounds the rate of collisions suffered by free electrons making this the central mechanism that generates resistance.

In the second form of representation, which is used in both the Series Circuit and Parallel Circuit models, resistance determines not only the number of atoms inside the wire, but also the number of free electrons. This is a simplified representation of the fact that some materials with higher resistances may have a fewer number of free electrons available per atom.

  1. Both these forms of representations operate under what is known in physics as the "independent electron approximation". That is, both these forms of representations assume that the free-electrons inside the wire do not interact with each other or influence each other's behaviors.

  2. It is important to note that both these representations of resistance are, at best, approximate representations of electrical resistance. For example, note that resistance of a conducting material also depends on its geometry and its temperature. This model does not address these issues, but can be modified and/or extended to do so.

If you are interested in further reading about the issues highlighted in this section, here are some references that you may find useful:

Ashcroft, J. N. & Mermin, D. (1976). Solid State Physics. Holt, Rinegart and Winston.

Chabay, R.W., & Sherwood, B. A. (2000). Matter & Interactions II: Electric & Magnetic Interactions. New York: John Wiley & Sons.

NETLOGO FEATURES

Electrons wrap around the world vertically.

RELATED MODELS

Electrostatics, Electron Sink, Parallel Circuit, Series Circuit.

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. (2008). NetLogo Current in a Wire model. http://ccl.northwestern.edu/netlogo/models/CurrentinaWire. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, 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 Institute on Complex Systems, Northwestern University, Evanston, IL.

COPYRIGHT AND LICENSE

Copyright 2008 Pratim Sengupta and Uri Wilensky.

CC BY-NC-SA 3.0

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 uri@northwestern.edu.

To use this model for academic or commercial research, please contact Pratim Sengupta at mailto:pratim.sengupta@vanderbilt.edu or Uri Wilensky at mailto:uri@northwestern.edu for a mutual agreement prior to usage.

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 [charge-flow ]

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

to setup
  clear-all
  set-default-shape electrons "circle 2"

  ;; create wire
  ask patches
  [ set pcolor gray]

  ;; create electrons
  crt number-of-electrons
  [
    set breed electrons
    setxy random-xcor 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
    ]
  ]

;; create atoms
  ask n-of ( resistance ^ 2 ) patches with [pxcor < max-pxcor - 4.5 and pxcor > min-pxcor + 4.5
                                            and not any? nuclei-here and not any? nuclei-on neighbors ]
  [ sprout 1
    [
      set breed nuclei
      set size 2
      set shape "circle 2"
      set color blue
    ]
  ]
  set charge-flow 0

  reset-ticks
end 


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

to go

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

  ;; Rules for electrons
  ask electrons
  [
    ;; electrons-rules for performing simple point collisions
    ;; with nuclei in the wire and in between two collisions,
    ;; drifting steadily drifting forward due to the electric field
    move
  ]
  tick

  ;; Keep plotting
  do-plot
end 


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

to move
  ifelse not any? nuclei-on neighbors
   [
     set heading 270 fd voltage
   ]
   [
     ;; this is a much simplified representation indicating scattering due to point collision
     set heading random 180
     fd voltage
   ]

  ;; calculate current
  if pcolor = black
   [ pen-up
     set charge-flow charge-flow + 1

     hatch 1
       [ set breed electrons
         set color orange - 2
         setxy max-pxcor - 4 random-ycor
         pen-up
       ]
     die
   ]
end 


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

to do-plot

  ;; plot current vs. time
  set-current-plot "Current vs Time"
  plotxy ticks (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 


; Copyright 2008 Pratim Sengupta and Uri Wilensky.
; See Info tab for full copyright and license.

There are 9 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky almost 12 years ago Updated version tag Download this version
Uri Wilensky almost 12 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky over 12 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Model from NetLogo distribution Download this version

Attached files

File Type Description Last updated
Current in a Wire.png preview Preview for 'Current in a Wire' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.