State of Matter-Basic

State of Matter-Basic preview image

1 collaborator

Screen_shot_2018-02-02_at_12.53.50_pm lin xiang (Author)


(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.1.0 • Viewed 50 times • Downloaded 1 time • Run 0 times
Download the 'State of Matter-Basic' modelDownload this modelEmbed this model

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


This model represents the changes of state at the micro-particle level. By heating up and cooling down a set of particles, students can explore the fundamental features of three states. This model is particularly good at letting students identify visual evidence for describing different states and the changes and exploring the relationships between particles' kinetic energy and the space they may take.


All the particles follow three rules: kinetic motion, attraction, and repulsion. The model starts with a number of randomly distributed particles. All particles have the same initial speed. When users "heat up" the particle, the speed increases. When users "cool down" the particle, the speed decreases. i.e., you add and remove kinetic energy.

Each particle is attracted to one of the other particles in a radius of 5, indicated by the fact that it moves towards the particle a little bit. Each particle is repelled by one of the other particles if the distance between the two particles is less than 1, indicated by the fact that it moves away from the particle a little bit if the distance is less than 1.


  1. Choose "Number-of-particles" and "Particle-color" first. The colors do not indicate different types of particles, they are for fun.
  2. Click on the button "start/reset" to confirm the setting, and then click "Run/Pause" to run the model.
  3. Click "heat up" or "cool down" buttons while running the model.


  • Can you identify the "solid", "liquid", and "gas" state in this model?
  • What evidence can you gather in the model for identifying each of the states?
  • Does the amount of matter change when the state changes?
  • What evidence can you gather in the model for determining whether the amount of matter changes?


Check other models at


Dr. Lin Xiang created this module at the University of Kentucky in 2020. If you mention this model in a publication, we ask that you include the citations below.

Xiang, L. (2020). States of Matter-Basic. Department of STEM Education, University of Kentucky, Lexington, KY.

Comments and Questions

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

Click to Run Model

turtles-own [step watched]
patches-own [occupied tt-here]
globals [ ]

to setup

create-turtles number-of-particles
 set size 2.25
 set shape "dot"
 set step 0.2
 set watched false
 setxy random-xcor random-ycor ]



to check-turtles-here

  ask patches[
    ifelse any? turtles-here
    [set occupied true set pcolor 49 ]
    [set occupied false set pcolor white]
    if count neighbors with [occupied = true] > 5 [set occupied true set pcolor 49]
    set tt-here count turtles-here

to go
  ask turtles [set-color]


to kinetic-move
  ask turtles
    [ifelse step <= 0 [user-message "The molecules cannot be cooled any more." stop]
    [fd step
      rt random-float 360]

to attraction

  ask turtles [
    let a-close-molecule one-of other turtles in-radius 5
    if a-close-molecule != nobody
     [ ifelse step >= 0.02
      [face a-close-molecule fd 0.01 rt random-float 360]
      [face a-close-molecule fd step rt random-float 360]

to repulsion
   ask turtles [
    let a-close-molecule one-of other turtles in-radius 1
    if a-close-molecule != nobody
     [face a-close-molecule
      fd -0.04
      rt random-float 360


to set-color
  Particle-color = "Red" [set color red]
  Particle-color = "Orange" [set color orange]
  Particle-color = "Brown" [set color brown]
  Particle-color = "Green" [set color green]
  Particle-color = "Cyan" [set color Cyan]
  Particle-color = "Blue" [set color blue]
  Particle-color = "Violet" [set color violet]
  Particle-color = "Pink" [set color Pink]
  Particle-color = "Magenta" [set color magenta]
  Particle-color = "Colorful" [ ])

There are 4 versions of this model.

Uploaded by When Description Download
lin xiang 5 months ago improve the visual for solid phase Download this version
lin xiang 5 months ago fix dimensions Download this version
lin xiang 5 months ago add the estimate of space Download this version
lin xiang 5 months ago Initial upload Download this version

Attached files

File Type Description Last updated
State of Matter-Basic.png preview Preview for 'State of Matter-Basic' 5 months ago, by lin xiang Download

This model does not have any ancestors.

This model does not have any descendants.