Chloride Corrosion 1
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
THINGS TO NOTICE
(suggested things for the user to notice while running the model)
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
breed [ chlorides chloride] breed [ moistures moisture] to setup clear-all ask patches [if (pxcor > 0) [set pcolor grey]] ask patches [if (pxcor < 32) and (pxcor > 17) [set pcolor blue]] ask patches [if (pxcor < 18) and (pxcor > 15) [set pcolor orange]] end to go generate move end to generate create-chlorides 3 [ set shape "circle" set color yellow set size 1 setxy -100 random-ycor ] create-moistures 5 [ set shape "circle" set color cyan set size 1 setxy -100 random-ycor ] end to move ask chlorides [ If (any? Patches with[ pcolor = grey] and (color = yellow)) [set heading towards one-of patches with[ pcolor = grey ] fd 4]] ask moistures [ If (any? Patches with[ pcolor = grey] and (color = cyan)) [set heading towards one-of patches with[ pcolor = grey ] fd 4]] ask chlorides [if pcolor = grey [set color yellow + 1]] ask moistures [if pcolor = grey [set color cyan + 1]] ask chlorides [ If (any? Patches with[ pcolor = orange] and (color = yellow + 1)) [set heading towards one-of patches with[ pcolor = orange ] fd 1]] ask moistures [ If (any? Patches with[ pcolor = orange] and (color = cyan + 1)) [set heading towards one-of patches with[ pcolor = orange ] fd 1]] ask patches [if pcolor = orange and (count chlorides in-radius 2 > 0 ) and (count moistures in-radius 2 > 1) [set pcolor brown]] ask turtles [ If (any? Patches with[ pcolor = brown]) [set heading towards one-of patches with[ pcolor = brown ] fd 3]] ask patches [if pcolor = brown and (count moistures in-radius 2 > 2) [ask neighbors [if pcolor = blue [set pcolor brown]]]] ask patches [if pcolor = brown and (count moistures in-radius 2 > 2) [ask neighbors [if pcolor = orange [set pcolor brown]]]] ask patches [if pcolor = brown and (random 100 < 30) [ask neighbors [if pcolor = grey [set pcolor brown]]]] ask patches [if pcolor = brown and (random 100 < 90) [ask neighbors in-radius 20 [if pcolor = black [set pcolor grey]]]] end to clearions ask turtles [die] end
There is only one version of this model, created almost 4 years ago by Manu Pouose.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.