Titranje čestice na opruzi

Titranje čestice na opruzi preview image

1 collaborator

Default-person Hrvoje Mladinić (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 5.0.2 • Viewed 209 times • Downloaded 24 times • Run 0 times
Download the 'Titranje čestice na opruzi' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

turtles-own 
[delta_V_y delta_y delta_t d_y]

globals
[l m k F V_y E_k E_p E_uk a]

to setup
  clear-all
  setup-opruga
  setup-_estica
  reset-ticks
end 

to setup-opruga
  ask patch 0 1 [set pcolor yellow]
  ask patch -1 1 [set pcolor yellow]
  ask patch -2 1 [set pcolor yellow]
  ask patch 1 1 [set pcolor yellow]
  ask patch 2 1 [set pcolor yellow]
  set l duljina_opruge 
  ask patch 0 (0 - l) [set pcolor red]
end 

to setup-_estica
  create-turtles 1
  ask turtle 0 
    [
    setxy 0 random (0 - l) * 2
    set color green
    set shape "circle" 
    ]   
end 

to go
  ask turtle 0 
  [
  unos
  izra_un
  ]
  tick
end 

to unos
  set delta_t 0.001
  set k konstanta_opruge
  set m masa__estice
  set delta_y (abs ycor) - l
end 

to izra_un 
  set F (k * delta_y) 
  set delta_V_y (F * delta_t) / m
  set V_y (V_y + delta_V_y)
  set d_y (V_y * delta_t)
  set ycor (ycor + d_y)
  set E_k (m * V_y * V_y) / 2
  set E_p (k * delta_y * delta_y) / 2
  set E_uk E_k + E_p
  set a delta_V_y / delta_t
end 





  
  

There is only one version of this model, created over 12 years ago by Hrvoje Mladinić.

Attached files

File Type Description Last updated
Titranje čestice na opruzi.png preview Opruga about 12 years ago, by Hrvoje Mladinić Download

This model does not have any ancestors.

This model does not have any descendants.