Raket opsendelse

Raket opsendelse preview image

1 collaborator

Tags

physics rocket 

Tagged by Solveig Skadhauge over 2 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.2.0 • Viewed 411 times • Downloaded 18 times • Run 0 times
Download the 'Raket opsendelse' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

globals [mass acceleration velocity height dm/dt N]

to setup
  clear-all
  reset-ticks
  create-turtles 1 [
    set shape "rocket"
    set size 3
    set heading 0
    setxy 0 1
    set color red
  ]
  set velocity 0
  set acceleration 0
  set height 0
  set mass raket_masse + brændstofmasse      ; startsmasse
  set dm/dt masseændring_per_tid   ; masseændring  per tid
  set N 10
  setup-world
end 

to setup-world
ask patches [
    set pcolor 99.8
    if pycor < 1 [ set pcolor green]
  ]
end 

to go
  let deltat 1 / N
  repeat N [
  let thrust ( dm/dt * udstødningshastighed )
  ifelse mass >  raket_masse [
  set mass (mass - dm/dt * deltat)
  ]
  [ set dm/dt 0]
  set acceleration (thrust / mass -  9.82)
  set velocity (velocity + acceleration * deltat)
  set height (height + velocity * deltat)
  ]
  if height < 0 [setup-world stop]
  ask turtles [
    setxy xcor height / 1000
  ]
  paint-sky
  tick
end 

to paint-sky
    ask patches [ set pcolor 100 - ( min list  (height / 10000)  10 )]
end 

There are 5 versions of this model.

Uploaded by When Description Download
Solveig Skadhauge over 2 years ago Change the turtles ycor to visualize better Download this version
Solveig Skadhauge over 2 years ago Change N to make it faster Download this version
Solveig Skadhauge over 2 years ago made a reat loop to make simulation faster Download this version
Solveig Skadhauge over 2 years ago Colors and time Download this version
Solveig Skadhauge over 2 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Raket opsendelse.png preview preview image over 2 years ago, by Solveig Skadhauge Download

This model does not have any ancestors.

This model does not have any descendants.