Create water and carbondioxide molecules

Create water and carbondioxide molecules preview image

1 collaborator

Cecilia_lesomar Cecilia Lesomar (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.3 • Viewed 177 times • Downloaded 9 times • Run 0 times
Download the 'Create water and carbondioxide molecules' 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 different atoms (Oxygen (symbol O and color red), Hydrogen (symbol H and color white), and Carbon (symbol C and color grey)) then these atoms are combined to form two different types of molecules (H20-water and CO2-carbondioxide).

HOW TO USE IT

Click set up to start. Click create atoms to create three different atoms that move randomly in the world. To create water or carbondioxide molecule click the corresponding button. Use a speed model that is less than normal speed to see the atoms and molecules movement.

THINGS TO NOTICE

Notice the different color combinations for each molecule.

THINGS TO TRY

Try to click as many times the create water or carbondioxide button to show the formation of new molecules.

EXTENDING THE MODEL

This model can be extended to include more atoms and more molecules.

RELATED MODELS

Chemistry & Physics Bounce Example Halo Example

CREDITS AND REFERENCES

Comments and Questions

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

Click to Run Model

breed [ squares square ]
breed [ dots dot ]
breed [ stars star ]
breed [ molwats molwat ]
breed [ molcarbdios molcarbdio ]

to setup ;; setup different shapes, colors, and positions of turtles; setup patches color; setup procedure to draw walls; setup variable number of atoms
  clear-all
  set-default-shape squares "circle"
  set-default-shape dots "circle"
  set-default-shape stars "circle"
  set-default-shape molwats "molwat"
  set-default-shape molcarbdios "molcarbdio"

  ask patches [ set pcolor blue ]   ;; set patches color to blue
  draw-walls

  create-squares numberofatoms [ set color red
    randomize ]
  create-dots numberofatoms [ set color white
    randomize ]
  create-stars numberofatoms [ set color grey
    randomize ]

  reset-ticks
end 

to draw-walls ;; procedure to create black wall where the turtles bounce
  ask patches with [ abs pxcor = max-pxcor ]
  [ set pcolor black ]
  ask patches with [ abs pycor = max-pycor ]
  [ set pcolor black ]
end 

to randomize ;; setup positions of turtles
  setxy random-xcor random-ycor
  if pcolor = black
  [ randomize ]
end 

to go ;; procedure for turtles' movement
 ask turtles [
   bounce
   fd 0.1
  run word breed "-speak"
  ]
  tick
end 

to bounce ;; procedure of turtles to bounce
  if abs [ pxcor ] of patch-ahead 0.1 = max-pxcor
  [ set heading (- heading) ]
  if abs [ pycor ] of patch-ahead 0.1 = max-pycor
  [ set heading ( 180 - heading) ]
end 


;; procedures for assigning labels and colors for each turtle

to squares-speak
  set label "O"
  set label-color black
end 

to dots-speak
  set label "H"
  set label-color black
end 

to stars-speak
  set label "C"
  set label-color black
end 

to molwats-speak
  set label "H2O"
  set label-color green
end 

to molcarbdios-speak
  set label "CO2"
  set label-color orange
end 


;; procedures to create different molecules

to make-molwat
  hatch-molwats 1
  [ set size 5
   set color red
    __set-line-thickness 0.1
    create-link-to myself
    [ tie
      hide-link ]
     ]
end 

to make-molcarbdio
  hatch-molcarbdios 1
  [ set size 5
   set color red
    __set-line-thickness 0.1
    create-link-to myself
    [ tie
      hide-link ]
     ]
end 

There is only one version of this model, created over 3 years ago by Cecilia Lesomar.

Attached files

File Type Description Last updated
Create water and carbondioxide molecules.png preview Preview for 'Create water and carbondioxide molecules' over 3 years ago, by Cecilia Lesomar Download

This model does not have any ancestors.

This model does not have any descendants.