State of Matter-Water

State of Matter-Water preview image

1 collaborator

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

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.0 • Viewed 365 times • Downloaded 35 times • Run 0 times
Download the 'State of Matter-Water' 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 simulates the state changes of water. By heating up and cooling down the water molecules in the model, you add to and remove the kinetic energy from the molecules. Due to the intermolecular forces, these water molecules will then take more or less space. When they are cooled down enough, these molecules will form a crystallized structure, i.e., ice. This model can be used to explore the states of water, the relationships between molecules’ kinetic energy and space they may take, and the unusual space changes in water when it freezes.

HOW IT WORKS

All the water molecules in this model follow three rules: kinetic motion, attraction, and repulsion. The model starts with a number of randomly distributed water molecules. All the molecules 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., kinetic energy changes.

Each molecule is attracted to one of the other particles in a radius of 9, indicated by the fact that it moves towards the molecules a little bit. Each molecule is repelled by one of the other molecules if the distance between the two particles is less than 1.2, indicated by the fact that it moves away from the molecule a little bit if the distance is less than 1.2. The two distances are set based on the fact that hydrogen bonds forming among water molecules overall result in a stronger attractive force and a relatively weak repulsive force.

The space occupied by the molecules is shown by the grayish area.

HOW TO USE IT

  1. Choose “Number-of-molecules” first.
  2. Click on the button “start/reset” to confirm the setting, and then click “Run/Pause” to run the model.
  3. Click the “heat up” or “cool down” buttons while running the model.
  4. Click “Watch/Not watch 1 molecule” to watch or stop watching one of the molecules.

THINGS TO NOTICE

** Can you identify the solid, liquid, and gas states of water 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?

OTHER MODELS

Check other models at http://3dsciencemodeling.com.

CREDITS AND REFERENCES

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-Water. 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 solid core mylink watched]
patches-own [occupied tt-here]
globals [  ]

to setup
clear-all

create-turtles number-of-molecules
[set color red
 set size 2
 set shape "molecule water"
 set step 0.2
 set solid false
 set core false
 set mylink 0
 set watched false
 setxy random-xcor random-ycor ]

 check-turtles-here

reset-ticks
end 

to check-turtles-here
  ask patches
  [ifelse any? turtles-here
    [set occupied true set pcolor 2 ]
    [set occupied false set pcolor 0]
   if count neighbors with [occupied = true] >= 5 [set occupied true set pcolor 2]
    set tt-here count turtles-here]

   diffuse pcolor 1
end 

to go

  ifelse mean [step] of turtles > 0.02
  [ melt
    attraction
    repulsion
    move]
  [ set-core
    if random 100 < 50 [crystalization]
    if not any? turtles with [solid = false] [move-1]
  ]

  check-turtles-here

  tick
end 

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

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

    ]
  ]
end 

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

    ]
  ]
end 

to set-core
  if not any? turtles with [core = true]
  [ask one-of turtles with [solid = false and abs xcor < max-pxcor - 2 and abs ycor < max-pycor - 2  ]
    [
      set core true
      set solid true

  ]]
end 

to melt
  ask turtles
    [set solid false set core false set mylink 0]
end 

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

to crystalization
  ask turtles with [core = true]
[(ifelse
  mylink = 0
  [let partner min-one-of turtles with [solid = false] [distance myself]
   if partner != nobody [
     ask partner [
      move-to myself set heading [heading] of myself
      fd -1.1 set heading heading + 180
      set core true  set solid true set mylink mylink + 1

        ]
      set mylink mylink + 1]]

   mylink = 1
   [let partner-1 min-one-of turtles with [solid = false] [distance myself]
    if partner-1 != nobody [
     ask partner-1 [
       move-to myself set heading [heading] of myself
       set-heading-1]
       set mylink mylink + 1]]

   mylink = 2
   [let partner-2 min-one-of turtles with [solid = false] [distance myself]
    if partner-2 != nobody [
     ask partner-2 [
       move-to myself set heading [heading] of myself
       set-heading-2]
       set mylink mylink + 1
       if mylink >= 3
        [set core false

    ]]])
  ]
end 

to set-heading-1
  set heading heading + 60
  ifelse not any? other turtles-on patch-ahead 1.1
  [fd 1.1 set core true  set solid true set mylink mylink + 1 detect-boundray
  ;set color cyan
  ]
  [set heading heading - 120
    ifelse not any? other turtles-on patch-ahead 1.1
    [fd 1.1
     set core true  set solid true set mylink mylink + 1 detect-boundray

    ]
    [face patch 0 0 fd random 6 set heading random 360]]
end 

to set-heading-2
  set heading heading - 60
  ifelse not any? other turtles-on patch-ahead 1.1
  [fd 1.1
   set core true  set solid true set mylink mylink + 1 detect-boundray

  ]
  [face patch 0 0 fd random 6 set heading random 360]
end 

to detect-boundray
  if abs xcor >= max-pxcor - 1 or abs ycor >= max-pycor - 1 [set mylink 3 set core false]
end 

There are 3 versions of this model.

Uploaded by When Description Download
lin xiang over 4 years ago Fix info typos Download this version
lin xiang over 5 years ago adjust the visual Download this version
lin xiang over 5 years ago Initial upload Download this version

Attached files

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

This model does not have any ancestors.

This model does not have any descendants.