Osmosis Model

Osmosis Model preview image

1 collaborator

3816_184319348588766_1054405177039426534_n Spencer Clark (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.1 • Viewed 239 times • Downloaded 28 times • Run 0 times
Download the 'Osmosis Model' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

breed [water waters]

to setup
  clear-all
  reset-ticks
  ask patches with [pycor = 0] [set pcolor yellow]
  set-default-shape water "circle"
  create-water (num-water) [
   setxy 0 8 fd random 5
    set color blue
  ]
end 

to go
  move-waters
  ask turtles [
    repel-too-close-neighbor
    repel-too-close-patch
  ]
 tick
end 

to move-waters
  ask water [forward 1]
  wait 0.1
end 

to repel-too-close-neighbor
  let too-near one-of other turtles in-radius .05
  if too-near != nobody [
    face too-near
    rt 180
  ]
end 

to repel-too-close-patch
 let too-near one-of other patches in-radius 1
  if too-near != nobody [
    face too-near
  ]
end 

There are 2 versions of this model.

Uploaded by When Description Download
Spencer Clark over 7 years ago Added Moniter Download this version
Spencer Clark over 7 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Osmosis Model.png preview Preview for 'Osmosis Model' over 7 years ago, by Spencer Clark Download

This model does not have any ancestors.

This model does not have any descendants.