# The Seacow & Plastic in Ocean Currents

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

## WHAT IS IT?

This is a mathematical model that demonstrates abstract vector fields and integral curves.

Generally speaking, a field is a "region in which a body experiences a force as the result of the presence of some other body or bodies. A field is thus a method of representing the way in which bodies are able to influence each other. For example, a body that has mass is surrounded by a region in which another body that has mass experiences a force tending to draw the two bodies together.... The strength of any field can be described as the ratio of the force experienced by a small appropriate specimen to the relevant property of that specimen, e.g. force/mass for the gravitational field" (Oxford Minidictionary of Physics).

By 'abstract vector fields' we mean that this model is not committed to any specific type of force, such as gravity or magnetism. Rather, it simulates a general field, in which some focal property of influence affects a "small appropriate specimen", or particle, placed in the field.

Normally, if you look at a field with bare eyes, you will not necessarily see the forces. For instance, if you drop an apple it falls down, even though you cannot see the gravitational force. The apple is an object in the gravitational field. You saw how it behaved so you could guess that there is some force that made it go down. Humans do not perceive (visually) forces of gravitation or electro-magnetic forces. However, in a model, we can use little arrows (vectors) to show where, how forceful, and in which direction there are forces in this field.

## HOW IT WORKS

In this model, the field is plotted using vector graphics: green streaks are individual vectors with yellow turtles serving as arrowheads. The length of each vector is roughly proportional to the magnitude of the vector field at each point. In this model, it is just the distance from the origin: The further away from the origin, the larger the vector. Also, all vectors are aimed clockwise along tangents to circles centered on the origin.

The vectors show you in what direction and how forcefully an appropriate specimen -- here, a 'particle' -- will be "knocked about" once it is placed the field. Once the particle is "knocked" to a new location, it will be knocked yet again by the force there (represented by the vector). Actually, it being "knocked about" continuously, but in this simulation, the "knock" occurs at discrete points in the field. Since the particle does not use up the forces, it will keep being knocked about. The path the particle takes is called its 'trajectory.' You will be able to track this trajectory because the particle will leave a red trail behind it as it moves along its trajectory. Trajectories in vector fields are called 'integral curves.'

Even though behavior of particles can be interesting and possibly unanticipated, owing to forces not being distributed uniformly in the field, or some other factor, we have chosen, for clarity, a vector field with a logical and consistent relation between location in space and size/orientation of the force. The vector field chosen for this particular model is

```text

- y d/dx + x d/dy

```

Ideally, in the particular force field modeled here, the particle trajectories should be concentric circles (that is, the particle should go round and round along the same circular trajectory).

## HOW TO USE IT

SETUP: Clears the world and computes the vector field.

PLACE-PARTICLES: Puts the program into the mode in which you can position red test-particles by clicking anywhere in the View.

GO: Runs the simulation continuously to show the integral curves.

## THINGS TO NOTICE

Notice that the vectors grow in length as you move away from the origin. What effect do short vectors have on a particle? Long vectors?

The way this model is programmed, each particle moves some finite amount before calculating its new heading. Therefore, the particles do not turn as much as they would if their headings were continuously recalculated. This causes their trajectories to spiral slowly outward. (You have to let the model run for a while before this becomes apparent.) We tried to minimize this by having the particles move forward only a very small amount at each time step (the variable `step-size`). We couldn't make this amount too small since the model would then run too slowly. If you want the particles to spiral less, or you want the model to run faster, change this value.

## THINGS TO TRY

Place particles in different parts of the world. Does the particle's position have any effect on the trajectory?

## EXTENDING THE MODEL

Try a different vector field by changing it in the `setup-vector`, `force-x`, and `force-y` procedures. For instance, if you choose

```text

x d/dx - y d/dy

```

the integral curves will be hyperbolas.

## HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

* Wilensky, U. (1998). NetLogo Vector Fields model. http://ccl.northwestern.edu/netlogo/models/VectorFields. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

Please cite the NetLogo software as:

* Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

## COPYRIGHT AND LICENSE

Copyright 1998 Uri Wilensky.

![CC BY-NC-SA 3.0](http://ccl.northwestern.edu/images/creativecommons/byncsa.png)

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

This model was created as part of the project: CONNECTED MATHEMATICS: MAKING SENSE OF COMPLEX PHENOMENA THROUGH BUILDING OBJECT-BASED PARALLEL MODELS (OBPML). The project gratefully acknowledges the support of the National Science Foundation (Applications of Advanced Technologies Program) -- grant numbers RED #9552950 and REC #9632612.

This model was converted to NetLogo as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227. Converted from StarLogoT to NetLogo, 2002.

## Comments and Questions

breed [ particles particle ] ;; the things that are affected by the field breed [ vectors vector ] ;; the vectors that affect the particles breed [ seacows seacow ] breed [ seaelefants seaelefant ] globals [ max-modulus ;; the maximum modulus of all the vectors step-size ;; the amount a particle moves forward zufall-head zufall-border zufall-himmelsrichtung FULL OK count-caught money seacow-number plastic-total A caught ] seacows-own [volume volume-status] vectors-own [modulus] ;; the length of the vector particles-own [weight] seaelefants-own [elefant-volume] ; ##################### SETUP ######################## to setup clear-all setup-vectors add-initial-plastic add-seacow add-seaelefants add-marks set plastic-total 73400000 set caught 0 reset-ticks end ; ##################### GO ######################## to go ;if ticks >= 30000 [ stop ] let stop? false add-river-plastic add-plastic-flow move-particles seacow-volume-check ask seacows [ if volume-status = "OK" [move-seacows collect-plastic ] if volume-status = "FULL" [go-seaelefant] ] ask seacows [ fd 4 / 10 ] move-seaelefants ask seaelefants [ fd elefant-speed / 10 ] tick ;; if one of the particles was going to wrap around the world, stop. if stop? [ stop ] end ; ##################### SEACOWS ######################## to add-seacow create-seacows seacows-number [ setxy -117 -117 set size 5 set heading 0 set color white set volume 0 set seacow-number seacow-number + 1 ] end to move-seacows if search-algo = "random" [ search-random ] if search-algo = "circuit seaelefant" [ ifelse distance one-of seaelefants > max-distance-seacow and 2000 >= volume [face one-of seaelefants] [rt random 10 lt random 10 ] ] end to search-random ifelse distancexy 0 0 > max-distance-seacow and volume-status = "OK" [facexy 0 0] [rt random 10 lt random 10] end to with-the-flow if zufall-head > 1 [ set heading (atan force-x force-y) ] if patch-ahead 1 != nobody [ forward stroemung / 20 ] end to seacow-volume-check ask seacows [ if volume < 2000 [set volume-status "OK"] if volume >= 2000 [set volume-status "FULL" set label-color red ] set label precision volume 2 ] end to collect-plastic ask seacows [ let parthere particles-here let total-weight-collected 0 ask parthere [ let weight-loss (weight * 0.0004) set weight weight - weight-loss if weight < 10 [die] set total-weight-collected total-weight-collected + weight-loss ] set volume volume + total-weight-collected ] end to go-seaelefant ask seacows with [volume >= 2000] [face one-of seaelefants ] if distance one-of seaelefants < 1 [ set caught caught + volume set plastic-total plastic-total - volume set volume-status "OK" set volume 0 set label-color white facexy 0 0 output-show one-of ["fuckin' plastic" "ahoi!" "plastic kills!" "love ya all" "anybody out there?" "attention. some big waves comin in" "save the planet!" "I am so lonely out here" "Arrrrgh!!!" "May day, whiskey bottle empty" "Plastic-free zone"] ] end ; #################### SEAELEFANT ###################### to add-seaelefants create-seaelefants 1 [ setxy 40 0 set size 5 set heading 0 set label elefant-volume set color yellow set elefant-volume 0 ] end to move-seaelefants ask seaelefants [ ifelse distancexy 0 0 > max-dist-center-elefant [facexy 0 0] [rt random 10 lt random 10] ] ;set A max-distance-to-center-or-seaelefant * max-distance-to-center-or-seaelefant * 3.14 ;ifelse (count particles with [distance one-of seacows < max-distance-to-center-or-seaelefant ] < min-conc-before-chance / A) ;[move-to patch-left-and-ahead 45 1] ;[facexy 0 100] ; [set heading (atan force-x force-y) end ; ##################### ADD PLASTIC ######################## to add-initial-plastic create-particles amount-classI [ let xpos random-normal 0 world-width * 0.12 let ypos random-normal 0 world-height * 0.12 set xpos max list (min list xpos max-pxcor) min-pxcor set ypos max list (min list ypos max-pycor) min-pycor setxy xpos ypos set size 0.1 set color 125 set weight 310 ;kg pro Agent ] create-particles amount-classII [ let xpos random-normal 0 world-width * 0.12 let ypos random-normal 0 world-height * 0.12 set xpos max list (min list xpos max-pxcor) min-pxcor set ypos max list (min list ypos max-pycor) min-pycor setxy xpos ypos set size 0.3 set color 115 set weight 860 ] create-particles amount-classIII [ let xpos random-normal 0 world-width * 0.12 let ypos random-normal 0 world-height * 0.12 set xpos max list (min list xpos max-pxcor) min-pxcor set ypos max list (min list ypos max-pycor) min-pycor setxy xpos ypos set size 0.8 set color 105 set weight 8250 ] create-particles amount-classIV [ let xpos random-normal 0 world-width * 0.12 let ypos random-normal 0 world-height * 0.12 set xpos max list (min list xpos max-pxcor) min-pxcor set ypos max list (min list ypos max-pycor) min-pycor setxy xpos ypos set size 1.2 set color 95 set weight 1060 ] end to add-plastic-flow create-particles plastic-flow-random [ set zufall-himmelsrichtung random 4 if zufall-himmelsrichtung = 0 [setxy 200 0] if zufall-himmelsrichtung = 1 [setxy -200 -0] if zufall-himmelsrichtung = 2 [setxy -0 200] if zufall-himmelsrichtung = 3 [setxy 0 -200] set size 1 set heading 0 set color yellow ] end to add-river-plastic create-particles plastic-flow-river [ setxy -200 0 set size 1 set heading 0 set color yellow ] end to move-particles ask particles [ set zufall-head random 100 if zufall-head < pull-effect [ face patch 0 0 forward stroemung / 3 ] if zufall-head < move-randomness [set heading random 360 forward stroemung / 10 ] set heading (atan force-x force-y) forward stroemung / 10 ] end ; ##################### WORLD ######################## ;; report true if we will wrap around if we move forward by step-size to-report going-to-wrap? ;; turtle procedure let next-patch patch-ahead step-size report next-patch = nobody end to add-marks ask patches at-points [ [50 0] [50 1] [50 2] [50 -1] [50 -2] [100 0] [100 1] [100 2] [100 -1] [100 -2] ] [set pcolor white] ask patches at-points [ [0 0] [0 1] [0 2] [0 -1] [0 -2] [1 0] [2 0] [-1 0] [-2 0] ] [set pcolor white] ask patches at-points [ [-119 -119] [-119 -118] [-119 -117] [-118 -118] [-117 -119] [-117 -118] [-117 -117]] [set pcolor white] end ; ##################### CREATE VECTOR FIELD ######################## ;; create vectors at regular intervals to see the effect of the force ;; at a particular place. to setup-vectors ask patches [ if (pxcor mod 13 = 0) and (pycor mod 13 = 0) [ sprout-vectors 1 [ setup-vector ] ] ] set max-modulus (max [modulus] of vectors) ;; draw vector field ask vectors [ show-vector ] end ;; calculate the horizontal force where the turtle is located to-report force-x ;; turtle procedure report ycor end ;; calculate the vertical force where the turtle is located to-report force-y ;; turtle procedure report (- xcor) end ;; draw the vector using a turtle to display strength and direction of field to show-vector ;; turtle procedure set modulus (10 * modulus / max-modulus) forward modulus set color yellow end ;; make the turtle become a vector and initialize the vector's variables to setup-vector ;; turtle procedure set color blue pen-down if (force-x != 0) or (force-y != 0) [ set heading atan force-x force-y ] set modulus distancexy 0 0 end ; Copyright 2017 Dominik Huter

There is only one version of this model, created about 1 year ago by Dominik Huter.

## Attached files

File | Type | Description | Last updated | |
---|---|---|---|---|

The Seacow & Plastic in Ocean Currents.png | preview | Preview for 'The Seacow & Plastic in Ocean Currents' | about 1 year ago, by Dominik Huter | Download |

This model does not have any ancestors.

This model does not have any descendants.