Raindrops 3D

Raindrops 3D preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 3D 4.1pre7 • Viewed 441 times • Downloaded 26 times • Run 0 times
Download the 'Raindrops 3D' 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 is a 3D version of the 2D model Raindrops, it simulates raindrops falling on the surface of a pond and the waves they produce.

HOW TO USE IT

Click the SETUP button to set up the pond, then GO to enable motion in the water and listen for drops. Periodically click on the 2D view of the pond to release a raindrop, or leave the RANDOM-RAIN? switch on and watch the randomly generated drops fall. The IMPACT slider determines the force that the raindrops exert when they hit the surface of the water. SURFACE-TENSION and FRICTION determine the properties of the surface of the pond.

THINGS TO NOTICE

The pond is made up of a grid of turtles, each of whom, like in Wave Machine 3D, behaves like it is connected to its neighbors by springs. Each turtle has a vertical position and velocity, which determine how high above the sides of the pond it is or how far below, and how much that distance will change at the next time step.

When drops are released they decrease the vertical velocity of the particles under them, causing them to move downwards. As they fall, they pull down their neighbors, who at the same time pull them up. This exchange creates a wave within the pond, centered on where the drop fell.

As the waves hit the walls, they are reflected back towards the middle, as the walls don't move up or down. Friction causes the waves to eventually decline by pulling them closer to the surface level.

THINGS TO TRY

Try creating multiple drops in the pool to see how they interact. Do they cancel each other out or reinforce each other?

Change the surface tension to see how it affects the speed of waves. Why does water with low surface tension move so slowly? What sort of liquids in real life is it similar to?

Set friction to 0 and release some drops. Do the waves ever dissipate? How can the waves rise above the sides of the pond (have positive z-coordinates) when only downward moving forces are exerted on them? How is a turtle's movement similar to that of a spring. Is the friction used in this model analogous to that in a spring?

EXTENDING THE MODEL

This model doesn't take into account water pressure. When part of the water is pushed down on the impact of a drop, the rest of the water should feel a push from beneath. Try adding in this mechanism.

Extend the model so that the walls impose friction on waves that brush against them, causing them to dampen.

NETLOGO FEATURES

The model listens for raindrops using NetLogo's mouse primitives. GO repeatedly calls mouse-down? to register when the user has clicked over the pond. When this condition reports true, it uses two reporters, mouse-xcor and mouse-ycor, to record the current coordinates of the mouse so that a drop can be released in the appropriate place.

RELATED MODELS

For another model that demonstrates how turtles behave as a surface, see Wave Machine 3D. In it, turtles are connected in the same manner as outlined above, but their movement is governed by the regular sinusoidal motion of a section of the surface.

HOW TO CITE

If you mention this model in an academic publication, we ask that you include these citations for the model itself and for the NetLogo software:

- Wilensky, U. (1998). NetLogo Raindrops 3D model. http://ccl.northwestern.edu/netlogo/models/Raindrops3D. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

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

In other publications, please use:

- Copyright 1998 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/Raindrops3D for terms of use.

COPYRIGHT NOTICE

Copyright 1998 Uri Wilensky. All rights reserved.

Permission to use, modify or redistribute this model is hereby granted, provided that both of the following requirements are followed:

a) this copyright notice is included.

b) this model will not be redistributed for profit without permission from Uri Wilensky. Contact Uri Wilensky for appropriate licenses for redistribution for profit.

This is a 3D version of the 2D model Raindrops.

This model was created 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.

Comments and Questions

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

Click to Run Model

breed [ waters water ]
breed [ drops drop ]

turtles-own [ zpos zvel neighbor-turtles ]
globals [ edges drop-width k ]

to setup
  ca
;;  setxyz -32 34 15
  ask patches with [ pzcor = 0 ]
  [
    sprout-waters 1 [
      set color blue
      set zpos 0
      set zvel 0
      set shape "circle"
      set size 2
      set heading 0
      set pitch 0
      set roll 0
    ]
  ]
  ;; fix the edges in place, so the impact of the drops
  ;; doesn't cause the surface of the water to gradually
  ;; move downward
  set edges waters with [abs pxcor = max-pxcor or
                         abs pycor = max-pycor]
  ;; make the edges invisible because it looks cooler if
  ;; they aren't blocking your view of the waves
  ask edges
    [ hide-turtle ]
  ask waters
  [ set neighbor-turtles turtles-on neighbors4 ]
  set drop-width 2
  rain random world-width + min-pxcor
       random world-height + min-pycor
end 

to go
  set k 0.01 * surface-tension
  ask drops [ fall ]
  ask waters [ compute-delta-z ]
  ask waters [ update-position-and-color ]
  ask edges [ set zcor 0 set zpos 0 ]
  random-rain
  tick
end 

to fall  ;; drop procedure
  fd 1
  let impact-zone waters in-radius drop-width
  if any? impact-zone
  [
    ask impact-zone
    [
      set zpos zpos - (impact / count impact-zone )
    ]
    die
  ]
end 

to splash ; drop procedure
  ask waters in-radius drop-width
    [ set zvel zvel + (k * ((sum [zpos] of neighbor-turtles )
                    - (count neighbor-turtles) * zpos - impact)) ]
  die
end 

to compute-delta-z    ; water procedure
  set zvel zvel + (k * (sum  [zpos] of neighbor-turtles - (count neighbor-turtles) * zpos))
  set zvel zvel * (1 - 0.01 * friction)    ;steal energy by slowing down turtle
end 

to update-position-and-color
  set zpos zpos + zvel
  set color scale-color blue zpos -80 80
  set zcor zpos / 6.0
end 

to random-rain
  if random 100 = 0
    [ rain random-pxcor
           random-pycor ]
end 

to rain [x y]
  ask patch x y max-pzcor [
      sprout-drops 1 [
        set color white
        set pitch 270 ] ]
end 


; Copyright 1998 Uri Wilensky. All rights reserved.
; The full copyright notice is in the Information tab.

There are 3 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky over 14 years ago Raindrops 3D Download this version

Attached files

File Type Description Last updated
Raindrops 3D.png preview Preview for 'Raindrops 3D' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.