![]() here is the first place where we put in the differential equation we are solving ax, ay is the acceleration from the springs (neighbors), - b * vx, -b * vy is damping (friction) - a simple model where damping is linear in velocity -g is the force of gravity (constant, - y direction. If ? 0)] ] end find new velocity and position of nodes using 4th order Runge Kutta. Let mystart ((myrow * (myrow + 1 )) / 2 ) make the ground green ask patches [ if pycor 0 [ tick end to setup-globals separate procedure for setting globals set diam 1.5 set x-max max-pxcor - (diam / 2 ) + 1 0.5 set y-max max-pycor - (diam / 2 ) + 1 0.5 set filename "" change to collect images (or just use command center after setup) set-default-shape turtles "circle" set dt 0.01 step size for Runge Kutta end to setup-patches if (ticks = 1000) stop after a while, if you want. Set x mouse-xcor set y mouse-ycor setxy x y Set t closest-xy mouse-xcor mouse-ycor turtles while [ If filename = 0 an attempt to work even tho user forgets setup this allows us to grab a node and drag it. Set xzero 0 set yzero y-max - 3 ask turtle 0 (for this model to work with NetLogo's new plotting features, _clear-all-and-reset-ticks should be replaced with clear-all at the beginning of your setup procedure and reset-ticks at the end of the procedure.) _clear-all-and-reset-ticks To setup Setup the model for a run, build a plot. Kx1 kx2 kx3 ky1 ky2 k圓 jx1 jx2 jx3 jy1 jy2 j圓 ![]() X y vx vy ax ay xtemp ytemp vxtemp vytemp ![]() There are a variety of (somewhat) related physics applets available here: CODE globals [x-max y-max diam filename number-of-nodes Nothing particularly special – uses “links” … RELATED MODELSĪs noted above, the “Bouncing Ball” CREDITS AND REFERENCES I’m hoping to add a “pendulum” mode, but not yet … NETLOGO FEATURES Alternatively, the model can be stopped by “set stoptick 100” or some similar value, again using the command center. You can stop the process by clicking on “go” when you have enough images. The filenames will look like movie0001.png movie0002.png … etc. When the model sees the filename has been set to a non-null value while running (“go”), it will take a picture every step of the model. To do this, type ‘set filename “movie”’ in the command center immediately after clicking “setup”. Movies: (Use this with local models, not via the web) You can make a sequence of images for creating a movie of the model. Change the various parameter settings while the model is running. Grab nodes with the mouse while the model is running. You can slow things down to see better what is happening by using the Interface “speed” slider. ![]() The plot shows the y coordinates of the top node, the bottom node, and the center-of-mass of the system. You also can grab a node with the mouse and move it around. While the model is running, you can change the various parameters. The model wraps horizontally, but not vertically … HOW TO USE ITĬlick on setup to initialize the Jello. If nodes go off screen, they become invisible, but stay active in the model. If nodes hit the ground, they bounce back up (elastic collision). These “springs” have a rest-length, and exert a (linear) force on their ends, trying to return to their rest-length.ĭo-drop: This releases the top node, so they all fall (if gravity is on).ĭrive: In this mode, the top node is “driven” – either oscillating up and down, or rotating in a circle. They also experience forces caused by “springs” attaching them to other nodes. The moving nodes are pulled down by a fixed gravitational force. There are several modes:ĭefault: One node (the top) is fixed, the others are free to move. This model uses a 4th order Runge Kutta numerical solver for movement of the nodes. Some aspects of this model (especially the basic form of the Runge Kutta solver) came from the Bouncing Ball netlogo model: HOW IT WORKS This is inspired by the desire to explore dynamical systems and numerical solvers … There is also “damping” in the system (a “friction” force, opposite to (and linear in) velocity). The “Jello” is a batch of nodes connected by springs, and pulled down by gravity. Windows and Linux users may obtain the latest Java from Mac users must have Mac OS X 10.4 or higher. Java must be enabled in your browser settings. This page was automatically generated by NetLogo 5.0.3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |