Aquaponic-edu

Aquaponic-edu preview image

1 collaborator

Default-person Asmaa AlJuhani (Author)

Tags

ecosystem 

Tagged by Asmaa AlJuhani about 12 years ago

Model group MAM-2013 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.4 • Viewed 1480 times • Downloaded 139 times • Run 0 times
Download the 'Aquaponic-edu' 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 AQUAPONICS?

Aquaponics consist of two main parts : Aquaculture (fish farming) and Hydroponics (soil-less growing of plants). It combines fish and plants in a "closed" integrated system. Closed means that there is no water loss - so Aquaponics is a very water efficient way of growing plants and fish, requiring only one tenth the water! Fish wastes in the water are converted by beneficial bacteria to nutrients (plant food). Plants then use the nutrients to grow and clean water is then returned to the fish tank. The fish, plants and bacteria create a mutually beneficial relationship where the only input needed is to feed the fish and top up the water. In order to create a balance in the aquaponic system, fish and plants need to be balanced. If there are too many fish, then the plants will not be able to extract enough of the nutrients and clean the water, if there are too many plants, then there will not be enough nutrients in the water for all of the plants.

WHAT IS IT?

This model can be used to educate people about the aquaponics system. It illustrate the main components of the system ( fish , plants ) ,the relationship between them, and how the whole system behave. Here is a description of how the model is visualized. When a user first view the model, s/he will see two parts: a blue fish tank on the right and a gray growbed on the left and they are connected with two tunnels which allow water to circulate in the system. for educational purpose, the model can either start filled with the components or empty and the user fill it step by step. Fish tank holds water and fish. as well as fish food which is added once each day. In the fish tanks there is pump which pumps water through a tunnel to the growbed where the plants’ seeds are. water can return back to the fish tank through the other tunnel.

HOW IT WORKS

When fish eat food they produce waste in the water, the water is pumped to the growbed, seeds in the growbed filter water from waste and grow, lastly, the water return back to the fish tank.

HOW TO USE IT

1) You can either start complete system (setup) or empty sytem (setup-empty) and fill it with componants while it is running. 2) Water : set the Tank-size : how many gallons of water you want in the tank. 3) Fish : set the number of fish you want in the system. 4) Plants: set the number of plants seed you want to place in the growbed. 5) Food: set the number of pellets/fish 6) Press the (go) button and see how the system will perform. If you start with empty system, you can fill it while it is runing by pressing the buttons for each components. There is also a button to clear the tank from un-eaten food. For better visulaization, there is a switch to hide water int he growbed.

THINGS TO NOTICE

One good way of visualizing the change taking place in Fish is to pick a fish and follow it. Observe how the variables changes when it eat food and produce Ammonia. Also notice that fish grow up when they eat, it takes while to see the different.

THINGS TO TRY

You can try different values for variables to see when the system reaches the equilibrium status. You can also add more fish while the system is running and see the effect of it. One important factor in this system is the food. Try to add more food and see how this affect the system.

EXTENDING THE MODEL

One way to extend this model, is to use hardware that can have a temperature and light as inputs to this model and see how this will affect the system. A visual extension for this model can be changing the tank size visually depends on the amount of water.

NETLOGO FEATURES

This model had to do a lot of generalizations of breed-related functions. Each component (fish, plants,water,bacteria,food) corresponds to a breed of turtles which increase the readability of the code and the model performance. I also use helper reporter to report environment-related variables like the tunnels’ entrance and exit.

RELATED MODELS

Aquaponics-Details http://modelingcommons.org/browse/one_model/3790

This model show how nutrient-rich water that result from raising fish provides a source of natural fertilizer for the growing plants.It provides a better understanding of how Ammonia (Fish waste) convert to Nitrates.

For the plants growth, I used the sunflower model library

CREDITS AND REFERENCES

Aquaponics-Edu http://modelingcommons.org/browse/one_model/3774

Source for information on Aquaponics:

http://aquaponics.com/

Comments and Questions

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

Click to Run Model

;;; Asmaa aljuhani
;;; Agent Based Modeling
;; Aquaponics

breed [fish a-fish]
breed [plants plant]
breed [water a-water]
breed [food a-food]

plants-own [
  seed
  head-to ;; to arrange the growth of the plants 
  ]

water-own [
  head-to ;; this variable is to arrange the flow of water ( to make crossing tunnels easy)
  clean  ;; this variable holds arrange of int from 1-5 (1 is clean and 5 is toxic)
  ]

fish-own [
  tank ;; variable that hold how the amount of food a fish eat 
  waste ;; amount of waste a-fish produce
  
]

globals [window-edge
  growbed-size
 t2b-entrance t2b-exit
 b2t-entrance b2t-exit
 day day-change?]

to setup-empty
  ca
  draw-environment
  reset-ticks
end 

to setup
  ca
  draw-environment
  add-water tank-size
  add-fish number-of-fish
  add-plants number-of-seeds
  add-food amout-of-food/fish
  reset-ticks
end 

to go
  if day-change?
  [
   add-food amout-of-food/fish
  ]

  ask fish [
    is-env-healthy  ;; this function is to check whether the surrounding environment is healthy for the fish , if not it dies
    swim
    eat
    grow-produce
    produce-ammonia
  ]
  
  ask water[
    circulate 
    cross-tunnels 
    recolor ;; to recolor water depends on how clean it is
    ;; hide water in grow bed
    ifelse ( hide-water-in-growbed? and xcor < 0 )
    [ht]
    [st]
  ]

ask plants ;with [ any? water with [clean > 1] in-radius 2] 
    [
      ifelse (color = brown)[
        grow
      ]
      [ 
        move-leaves
      ]
    ]    
  
  
  ask food [
   break-down-into-toxins 
  ]
  
  
  ifelse ticks mod 100 = 0
  [
   set day day + 1
   set day-change? true
  ]
  [
   set day-change? false
  ]
 tick 
end 


;;;;;;;;;;;;;;;;;;;;;;;;; setup functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to draw-environment
   ask patches [set pcolor brown + 3]
   
  draw-tank
  draw-grow-bed
  draw-walls
  draw-tunnels
  
  set growbed-size count patches with [pxcor < 0]
  set t2b-entrance tank-to-bed-tunnel-entrance
  set t2b-exit tank-to-bed-tunnel-exit
  set b2t-entrance bed-to-tank-tunnel-entrance
  set b2t-exit bed-to-tank-tunnel-exit
  set day-change? false
  
   ;;;create pump
  crt 1 [
    set shape "pump"
    set size 5
    setxy 35 -10
    set heading 0
    set label "pump"
  ]
end 

to draw-tank
  ask patches with [pxcor > max-pxcor / 3]
  [
   set pcolor blue ;scale-color (blue) ((random-float 2.0) + 5) 0 10
  ]
end 

to draw-grow-bed
  ask patches with [pxcor < 0][
    set pcolor scale-color (gray) ((random-float 2.0) + 5) 0 10
  ]
end 

to draw-walls
  ;; don't let the window be bigger than the right chamber
  if (2 > (max-pycor - 1))
    [ set window-edge (max-pycor - 2) ]
  ask patches with [(pxcor = min-pxcor) or
                    ((pxcor < 0) and (abs pycor = max-pycor)) or
                    (pxcor >= max-pxcor - 2) or
                    ((pxcor > max-pxcor / 3) and (abs pycor >= max-pycor - 2))]
    [ set pcolor black ]
  ask patches with [pxcor = 0 or pxcor = 11 or pxcor = 12 or pxcor = 13]
    [ ifelse abs pycor < window-edge
        [ set pcolor black ]
        [ set pcolor black ] ]
  ;; make sure no turtles are embedded in the middle wall
  ;; if the window size changed
end 

to draw-tunnels
  ask patches with [(pycor = max-pycor / 2 + 1 or pycor = max-pycor / 2 - 1)
                     or (pycor = (- max-pycor / 2 + 1) or pycor =(- max-pycor / 2 - 1))]
  [
    if (pxcor > -1 and pxcor < max-pxcor / 3 )[
      set pcolor black
    ]
   
  ]
  ask patches with [pycor = max-pycor / 2 or pycor = (- max-pycor / 2)]
  [
    if (pxcor > -1 and pxcor < max-pxcor / 3 )[
      set pcolor brown + 3
    ]
  ]
end 

;; turtle procedure that randomizes position on the growbed

to arrange-within-growbed
    setxy (abs random-xcor * -1)
        random-ycor
  if any? patches in-radius 2 with [pcolor = black or pcolor = brown + 3]
    [ arrange-within-growbed ] ;; try again until we don't land on or near green
  set seed self
end 

;; turtle procedure that randomizes  position on the tanks

to arrange-within-tank
   setxy abs random-xcor
        random-ycor
  if any? patches in-radius 2 with [pcolor = black or pcolor = brown + 3]
    [ arrange-within-tank ] ;; try again until we don't land on or near black
end 


;;;                          ;;;
;;;    turtles procedures    ;;;
;;;                          ;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;FISH PROCEDURS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to add-fish [numfish]
   ;;;create fish
  create-fish numfish [
   set shape "fish"
   set color orange
   set size 2
   set tank 0
   set waste 0 
   arrange-within-tank  ;; function to randomize fish withen the tank
  ]
end 

;;;turtle procedure that let fish to swim within the tank

to swim
  fd 1
  rt 3
  if any? patches in-radius 2 with [pcolor = black][
    rt 180
  ]
end 

to produce-ammonia 

 if waste > 0 
 [
   let drops  water in-radius (size / 2)
   if drops != nobody
   [ 
     set waste waste - 1
     ask drops
     [
       if clean < 5
       [
         set clean (clean + 1) 
       ]
     ]
   ] 
 ]
end 

to eat
  let target-food  one-of food with [color > 11] in-radius 3;Min-one-of food [distance myself] ;one-of food with [color > 11] in-radius 3;  
  if target-food != nobody
   [
     set tank tank + 1
     set waste waste + 1
     face [patch-here] of target-food   
     ask target-food [
       die
     ]
   ]
end 

to grow-produce
  if day-change?
  [
    set size size + .01
  ]
end 

to is-env-healthy
  let water-arround-me water in-radius 2 with [clean > 4]
  if count water-arround-me > 5
   [
    die
   ]
end  

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;PLANTS PROCEDURS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to add-plants [numseed]
   ;;;create Plants
  create-plants numseed [
   set shape "leaf2"
   set color brown
   set size 0.5
   set head-to 0
   arrange-within-growbed ;; function to randomize plants withen the growbed
  ]
end 

to grow
 let a-drop one-of water with [clean > 1] in-radius 2
 if a-drop != nobody
 [
  filter-ammonia a-drop
    ask seed
    [
      let h head-to
      hatch 1
      [
        set color green 
        set size 0.6 * sqrt distance seed
        set heading h * .62 * 360
      ]   
      set head-to head-to + 1
    ]
 ]
end 

to move-leaves
  if  color != brown and not any? patches in-radius 1 with [pcolor = black or pcolor = brown + 3] 
        [
          fd  .02
          set size 0.6 * sqrt distance seed
        ]
end 

to filter-ammonia [drop]
  ask drop [
    set clean (clean - 1)
  ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WATER PROCEDURS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to add-water[gallon]
  ;;;create water
  create-water gallon * 100 [
   set shape "drop"
   set color scale-color (blue) ((random-float 2.0) + 5) 0 10
   set size 1
   set clean 1
   arrange-within-tank ;; function to randomize drops withen the tank
  ]  
end 

to circulate

  if ( (xcor >= max-pxcor / 3 or  xcor <= 0 ) and head-to = 0)
  [
    flow
  ]
  ;; for water in the lower part of the tank --> move towards the tunnel
  if (random 10 = 1 and floor ycor = [pycor] of t2b-exit and xcor > 0); max-pycor / -3 and xcor > max-pxcor / 3)
  [ face t2b-exit
    set head-to t2b-exit
    ;set color red
    ]
  
  ;; after crosseing the tunnel --> flow in the grow bed or tank
   if ((xcor < -1 and ycor < 0) or (xcor > max-pxcor / 3 + 1 and ycor > 0))
    [
      set head-to 0
    ]

 ;; for water in the upper part of the grow-bed --> move towards the tunnle
   if (random 10 = 1 and floor ycor = [pycor] of b2t-exit and xcor < 0 );and shade-of? blue color)
   [
     ;; water will return back to the tank after reaching 40%
     ;if (count water with [xcor < 0] * 100 / count water > 40) [
    ; if (color = blue) [
       face b2t-exit
       set head-to b2t-exit
       ;set color yellow
    ; ]
    ]
end  

to flow
  fd 1
  rt random 10
  if any? patches in-radius 2 with [pcolor = black][
  rt 180
  ]
end 

to cross-tunnels
  if (head-to = t2b-exit or head-to = b2t-exit )
  [
    fd 1
  ]
end 

to recolor
  ifelse clean > 1
  [
    set color scale-color (brown) (( 2.0) + 5) clean 10
  ]
  [
    set color scale-color (blue) ((random-float 2.0) + 5) 0 10
  ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;FOOD PROCEDURS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to break-down-into-toxins
  if color > 10.1 and ticks mod 5 = 1
  [
   set color color - .1
   if ( floor color = 10) ; when food is black , increase toxic at water to the max
   [
    let a-drop water-here
    if a-drop != nobody
    [
     ask a-drop [ set clean 5]
     die
    ] 
   ]  
  ]
end 

to add-food [amount]
   create-food amount * count fish [
   set shape "circle"
   set color red
   set size .5
  arrange-within-tank  ;; function to randomize food withen the tank
  ]
end  

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;                          ;;;
;;;    helper reporters      ;;;
;;;                          ;;;

to-report tank-to-bed-tunnel-entrance
  report patch ((max-pxcor / 3) + 1) (max-pycor / -2)
end 

to-report tank-to-bed-tunnel-exit
  report patch (-1) (max-pycor / -2)
end 

to-report bed-to-tank-tunnel-entrance
  report patch (-1) (max-pycor / 2)
end 

to-report bed-to-tank-tunnel-exit
  report patch ((max-pxcor / 3) + 1) (max-pycor / 2)
end 

There are 4 versions of this model.

Uploaded by When Description Download
Asmaa AlJuhani about 12 years ago related models added Download this version
Asmaa AlJuhani about 12 years ago final Download this version
Asmaa AlJuhani about 12 years ago v2 Download this version
Asmaa AlJuhani about 12 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Aljuhani_Asmaa_FinalPaper.docx word Final Paper about 12 years ago, by Asmaa AlJuhani Download
Aljuhani_Asmaa_Poster.jpg jpeg Aquaponics_poster about 12 years ago, by Asmaa AlJuhani Download
Aljuhani_Asmaa_Slam.pptx powerpoint Poster Slam about 12 years ago, by Asmaa AlJuhani Download
AljuhaniAsmaa_June3.docx word Progress Report about 12 years ago, by Asmaa AlJuhani Download
AljuhaniAsmaa_May13.docx word Progress Report about 12 years ago, by Asmaa AlJuhani Download
AljuhaniAsmaa_May20.docx word Progress Report about 12 years ago, by Asmaa AlJuhani Download
AljuhaniAsmaa_May27.docx word Progress Report about 12 years ago, by Asmaa AlJuhani Download
Aquaponic-edu.png preview Preview for 'Aquaponic-edu' about 12 years ago, by Asmaa AlJuhani Download
Aquaponics.pptx powerpoint Educational Material - Presentation about 12 years ago, by Asmaa AlJuhani Download
Aquaponics_WorkSheets.docx word Educational Material - WorkSheet about 12 years ago, by Asmaa AlJuhani Download

This model does not have any ancestors.

This model does not have any descendants.