Aquaponics-Details

Aquaponics-Details preview image

1 collaborator

Default-person Asmaa AlJuhani (Author)

Tags

ecosystem 

Tagged by Asmaa AlJuhani almost 11 years ago

Model group MAM-2013 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.4 • Viewed 808 times • Downloaded 50 times • Run 0 times
Download the 'Aquaponics-Details' modelDownload this modelEmbed this model

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


THIS IS A COMPLEMENTRY MODEL FOR AQUAPONICS-EDU

Please refere to the original model to understand the big picture of the system. You can find the model here : http://modelingcommons.org/browse/one_model/3774

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 focus on how nutrient-rich water that result from raising fish provides a source of natural fertilizer for the growing plants. This conversion is done by 2 types of bacteria: Nitrosomonas ( turns ammonia into Nitrites) , and Nitrobacter (turns Nitrites into Nitrates). This conversions create a sustainable ecosystem where both the fish and plants can thrive. The interface for this model shows the fish tank with number of fish that can be specified by the user. when fish produce ammonia, The first type of bacteria (Nitrosomonas) grow and convert the ammonia to Nitrites which is intermediate compound. This Nitrites is then converted to Nitrates (NO3- ) by the second type of the bacteria (Nitrobacter). It is beneficial for plants to consume because it serves as an essential plant nutrient helping with tissue development and building immune systems, and it helps plants develop and produce seeds. In the system, water is the carrier for all these compounds that circulate the system from the tank to growbed, then it is filtered by the plants and return clean to the tank.

HOW IT WORKS

When fish produce ammonia, The first type of bacteria (Nitrosomonas) grow and convert the ammonia to Nitrites (water drop become yellow) which is intermediate compound. This Nitrites is then converted to Nitrates NO3- (water drop become green) by the second type of the bacteria (Nitrobacter).

HOW TO USE IT

1) Choose the amount of water in the tank 2) Choose number of fish in the system 3) Choose the lifespan for bacteria 4) Press (setup) 5) press (go) button

THINGS TO NOTICE

Notice that when you have few fish in large tank, Bacteria take long time to grow. Also, notice the effect of the bacteria life-span on the model. One important thing to notice by observing the plot that components reaches a stable state where the amount of Ammonia remain stable when the amount of the other minerals become stable.

THINGS TO TRY

You can try to have a lot of fish in a small tank, or vice versa. Try to play with the bacteria life-span to see how this will affect material conversion.

EXTENDING THE MODEL

An interesting extension would be to add antibiotics to the system and see how this will affect the whole system.

NETLOGO FEATURES

This model had to do a lot of generalizations of breed-related functions. Each component (fish,water,Nitrosomonas,Nitrobacter) corresponds to a breed of turtles which increase the readability of the code and the model performance.

RELATED MODELS

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

CREDITS AND REFERENCES

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

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 [water a-water]
breed [Nitrosomonas a-Nitrosomonas] ; convert ammonia (brown) to Nitrites (yellow)
breed [Nitrobacter a-Nitrobacter]  ; conver Nitrites (yellow) to Nitrates (Green)


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)
  nitrites?
  nitrates?
  ]


fish-own [
  tank ;; variable that hold how the amount of food a fish eat 
       ;;if it reach the max-amount-0f-food-afish-can-eat fish will stop eat
  waste ;; amount of waste a-fish produce
  
]

Nitrosomonas-own [ life-span]
Nitrobacter-own [life-span]

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

to setup
  ca
  
   ask patches [set pcolor brown + 3]
   
  draw-tank
  draw-walls
  draw-tunnels
 
  set t2b-entrance tank-to-bed-tunnel-entrance
  set b2t-exit bed-to-tank-tunnel-exit
  
 
  
  set day-change? false
  
     ;;;create fish
  create-fish number-of-fish [
   set shape "fish"
   set color orange
   set size 2
   set tank 0
   set waste 0
   arrange-within-tank
  ]
  
  ;;;create water
  create-water tank-size * 50 [
   set shape "drop"
   set color scale-color (blue) ((random-float 2.0) + 5) 0 10
   set size 1
   set clean 1
   set nitrites? false
   set nitrates? false
   arrange-within-tank
  ]
  

  

  
  reset-ticks
end 

to go
  
  ask fish [
    swim
    produce-ammonia
  ]
  
  ask water[
    
    circulate 
    grow-Nitrosomonas
    grow-Nitrobacter
    cross-tunnels
    recolor ;; to recolor water depends on how clean it is
    
  ]
  
 if any? Nitrosomonas
 [
  ask Nitrosomonas
  [
    swim
   convert-ammonia-to-Nitrites
   calculate-life-span
  ] 
 ] 

if any? Nitrobacter
 [
  ask Nitrobacter
  [
    swim
   convert-Nitrites-to-Nitrates
   calculate-life-span
  ] 
 ] 
  

    
 ifelse ticks mod 100 = 0
 [
   set day day + 1
   set day-change? true
 ]
 [
   set day-change? false
 ]
 tick 
end 


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

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

to draw-walls

  ask patches with [pxcor = max-pycor or 
                    pxcor = min-pycor + 1 or
                    pycor = max-pxcor or
                    pycor = min-pxcor]
    [ set pcolor black ]
    
  ask patches with [pxcor = min-pycor]
  [
    set pcolor brown + 3
  ]
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 <= min-pycor + 1 )[
      set pcolor black
    ]
   
  ]
  ask patches with [pycor = max-pycor / 2 or pycor = (- max-pycor / 2)]
  [
    if (pxcor <= min-pycor + 1 )[
      set pcolor brown + 3
    ]
  ]
end 

;; turtle procedure that randomizes  position on the tanks

to arrange-within-tank
   setxy 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;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 

   let drops  one-of water in-radius (size / 2)
   if drops != nobody and random 10 = 5
   [ 
     set waste waste - 1
     ask drops
     [
       if clean < 5
       [
         set clean (clean + 1) 
       ]
     ]
    
 
   ]
end 

to empty-fish-tank
  ask fish [
   set tank 0 
  ]
end 

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



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

to circulate

  if ( 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-entrance); max-pycor / -3 and xcor > max-pxcor / 3)
  [ face t2b-entrance
    set head-to t2b-entrance
   ; set color red
    ]
  
  if (head-to = b2t-exit and ycor > 0 and xcor > min-pxcor / 2)
  [
   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)
   [
       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-entrance or head-to = b2t-exit )
  [
    fd 1
    
    if ( xcor < min-pxcor + .5)
    [
      set ycor [pycor] of b2t-exit
     ; set color green
      set heading 90
      set head-to b2t-exit
      ;; return clean water
      set clean 1
      set nitrites? false
      set nitrates? false
      
    ]
  ]
end 

to recolor
  ifelse clean > 1 and (not nitrites?) and (not nitrates?)
  [
    set color scale-color (brown) (( 2.0) + 5) clean 10
  ]
  [ ifelse nitrites?
    [ 
      set color yellow
    ]
    [ ifelse nitrates?
      [
        set color green - 1
      ]
      [
         set color scale-color (blue) ((random-float 2.0) + 5) 0 10
      ]
    ]
  ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;BACTERIA PROCEDURS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to grow-Nitrosomonas
  if all? water in-radius 2 [clean > 1]
  [
    hatch-Nitrosomonas 1[
      set shape "bacteria"
      set color blue
      set size 1
      set life-span bacteria-life-span * 100
    ]
  ]
end 

to grow-Nitrobacter
  if all? water in-radius 2 [nitrites?]
  [
    hatch-Nitrobacter 1[
      set shape "bacteria2"
      set color pink
      set size 1
      set life-span bacteria-life-span * 100
    ]
  ]
end  

to convert-ammonia-to-Nitrites
   let drops  water with [clean > 2] in-radius 1
   if drops != nobody 
   [ 
     ask drops
     [
      set nitrites? true
     ]
   ]
end 

to convert-Nitrites-to-Nitrates
   let drops  water with [nitrites?] in-radius 1
   if drops != nobody 
   [ 
     ask drops
     [
       set nitrites? false
      set nitrates? true
     ]
   ]
end 

to calculate-life-span
  ifelse life-span > 1
  [
    set life-span life-span - 1
  ]
  [
    die
  ]
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

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

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

There are 2 versions of this model.

Uploaded by When Description Download
Asmaa AlJuhani almost 11 years ago v2 Download this version
Asmaa AlJuhani almost 11 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Aquaponics-Details.png preview Preview for 'Aquaponics-Details' almost 11 years ago, by Asmaa AlJuhani Download

This model does not have any ancestors.

This model does not have any descendants.