NetLogo

De POLR
Sauter à la navigation Sauter à la recherche
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

NetLogo est un environnement de programmation créé par Uri Wilensky, du Center for Connected Learning (CCL) and Computer-based Modeling, en 1999, avec comme objectif de favoriser l'enseignement et l'apprentissage de phénomènes complexes et des propriétés émergentes. NetLogo est un dialecte de Logo, un langage créé à la fin des années soixante et inspiré des théories cognitivistes de Jean Piaget en matière d'éducation. NetLogo est accessible librement à partir de ce lien où l'on retrouve une documentation exhaustive, des exemples, ainsi que d'autres applications connexes. NetLogo vient avec une impressionnante bibliothèque de modèles touchant à tous les domaines des sciences physiques, de la vie et sociales. Les modèles ci-dessous ont été créés par des membres du POLR pour diverses applications de recherche ou de formation.


Modèle Description Auteur(s)
Billard Modèle de billard exploitant les collisions multiples inélastiques. Y. Lévesque
Gyre granulaire Un modèle simulant un écoulement granulaire de particules de tailles finies soumises à des forces externes. Y. Lévesque

Billard

Ce modèle reproduisant un jeu de billard permet de tester certains aspects physiques et numériques du traitement des collisions multiples de disques de taille finie.

check-for-collision

Pour détecter une collision, on sélectionne d'abord les particules qui sont dans l'entourage de la particule considérée. Ensuite, parmi les particules sélectionnées, on choisit celle qui est la plus proche, mais on élimine la particule venant de faire une collision avec celle d'entrée. Toutefois, cette élimination ne doit être que temporaire car ces deux particules peuvent entrer en collision ensemble plus tard et il ne faut pas l'interdire. La variable last-collision est égale à nobody après une collision avec le mur.

Billard
Billard

Gyre granulaire

This program simulates the inelastic collisions between 2D circular particles (disks) of identical sizes in a closed domain. Disks are subject to different forces including wind, waves and water drag. Multiple input parameters can be adjusted like the restitution coefficient (elasticity of collisions), concentration, particle size, thickness and density, wind gyre speed, etc. The number of collisions and fluxes of particles through several sections located strategically in the domain can be displayed and saved in a file for analysis. The rotational movement of the disks is ignored.

Gyre granulaire
Gyre granulaire

How it works

NetLogo programs are structured in three main steps: declaration of the variables, the setup procedure (to setup) and the go procedure (to go). Each of these procedures contains several other procedures with the main ones described below :

  1. The program defines the characteristics of the computational domain (world) and declares the variables used by the program. The domain size can be adjusted by clicking the Settings button in the Interface tab.
  2. In the configuration step, the program creates and positions the discs randomly within the world making sure that disks do not overlap. The number of disks is determined by adjusting the concentration and the size of the discs.
  3. When starting the computation, the program asks to the discs to move a very short distance by correcting the position and velocity of particles using the kinematic equations as a function of forces (wind, waves, drag).
  4. The program checks whether the disks will collide with a wall at their next move. If so, they undergo an elastic collision who only affects the direction of their movement without changing their energy.
  5. The program checks for each disc, if other disks are in their immediate surroundings, i.e. within a distance equal to the radius of the disc add to a safety distance whose value is less than the path traveled by the next move of the disc. If other particles are present, the program asks to discs with the relative velocity is nonzero, perform an inelastic collision.
  6. The amount of energy lost in each inelastic collision can be set by the user.
  7. This program records the number of collisions among spheres, between the spheres and the walls and various particle flux in strategic locations and displays the results on the control panel.
  8. The program then repeats steps 3-7 until it shut down.** All values ​​presented and used by the program have the usual units of the international system. A correction factor (scale) is present on the control panel and allows you to change the program level (1 m = scale patch).

How to use it

Initial settings: Characteristics of the particles

  • Concentration : Concentration of particles in the pool
  • Particles_size : Diameter of the particles (meter)
  • thickness-particles_nc : Thickness of the particles (meter)
  • wood_density : Particles density (cedar, 480 à 560 kg / m^3)
  • init-particle-speed_nc : initial speed of each particle (m / s)

Environment

  • scale_factor : A correction factor allows you to change the program level (1 m = scale patch)
  • factor_inelastic_collision : Characterizes the amount of energy lost in each inelastic collision. This factor varies from 0 to 1. 0 represents 100% elastic collision. 1 represents a collision who dissipate the maximum kinetic energy.
  • wind_initial_speed_nc : initial speed of the wind (m / s)
  • water_depth : Set the water depth (meter)
  • wave-frequency : Set the wave frequency (s^-1)* wave-amplitude : Set the wave amplitude (meter)
  • wave-wavelenght : Set the wave wavelenght (meter)

Types of observation

  • mean_time : The time during the Maxwell demons calculates the average particle flux (sec)
  • Demon_Maxwell : Creates "Maxwell's demon" in the basin according to three different configurations. (number of particles / sec)

1. none : No "Maxwell's demon" is used 2. 4_quadrant : The flux of particles of each quadrant is calculated. 3. 4axe_xy : 4 daemons are positioned symmetrically on the x-axis, y-axis 4. 6axe_xy : 6 daemons are positioned symmetrically on the x-axis, y-axis

The SETUP button will set the initial conditions. The GO button will run the simulation.

Monitors

  • number_particles : The number of particles
  • collisions_between_particles : The number of collisions between particles
  • wall_collisions : The number of collisions between wall and particles
  • totals_collisions : The total number of collisions
  • demon_x : length of the demons on the x-axis (meter)
  • demon_y : length of the demons on the y-axis (meter)
  • AVERAGE SPEED : average speed of the particles
  • AVERAGE ENERGY : average energy of the particles
  • flux_"color"_"Top or below" : The flow of particles through the various demons of maxwell.

Things to notice

  • The dics are of equal size
  • The rotational energy of the spheres is set to 0
  • The movement of water is not affected by wind
  • The influence of the presence of particles on the intensity of the wind and tides is not considered.
  • Waves are generated by a random function and does not represent the real movement of water created by a waveform generator. The incident wave generated by this device and the various reflections on the walls are not held in account, only a steady low temporal evolution function is used.