Fungal Bioremediation

Fungal Bioremediation preview image

1 collaborator

Default-person Quinn Gebeaux (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 209 times • Downloaded 28 times • Run 0 times
Download the 'Fungal Bioremediation' 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 IT?

This is a model of fungal bioremediation. In this model, white rot fungus produces enzymes that serve two purposes: breaking down lignin (a complex polymer found in wood) and degrading neonicotinoids (contaminants).

Lignin is broken down into glucose, which is then consumed by bacteria and fungi in cellular respiration. The fungi and bacteria have a symbiotic relationship. Since bacteria cannot break down lignin, they rely on fungal enzymes to break down lignin to produce glucose in the absence of other glucose.

The fungal enzymes also degrade neonicotinoids (contaminants in the water). While in reality, the neonicotinoids would be degraded into a potentially less harmful product, in this model, the neonicotinoids are simply modeled as being eliminated.

For further context, in a real world setting, white rot fungi growing on wood chips would function as a filter. As contaminated water flows through the fungi filter, the fungi convert neonicotinoids in the water into potentially less harmful products.

This model includes elements of enzyme kinetics and organisms' competition for food.

HOW IT WORKS

When the experiment is set up, fungi, bacteria, and contaminants are randomly placed in the grid.

New fungi grow outward from old fungi, and as fungi age, they become less active and eventually die off. The fungi become whiter in color as they age. Fungi consume nutrients, glucose, and dissolved oxygen in the surrounding patches and produce enzymes that degrade lignin and neonicotinoids.

Bacteria also consume glucose, nutrients, and dissolved oxygen in the surrounding patches.

Nutrients and dissolved oxygen diffuse throughout the water.

Sliders control various factors that influence reaction rates, reproduction rates, water speed, oxygen levels, the starting amount of ECs, and the amount of energy gained from glucose consumption.

The first switch allows for the user to turn on nutrient replenishing, and the second switch allows for the user to turn on background coloring so that the background changes colors based on the levels of glucose present.

HOW TO USE IT

Press "setup" to set up the model. Press "go" to run. The simulation will automatically stop when all of the fungi has died off, but if you'd like to stop the simulation before then, simply press "go" again. Press "setup" to reset the simulation.

The initial populations of fungi and bacteria can be modified in the two green boxes. The slider called "amount-lignin" controls the initial amount of lignin in each patch.

The interface contains three plots. One monitors lignin, glucose, nutrients, O2, and CO2. Note that the plot for CO2 is set to not show since CO2 is much greater than the other elements, and adding the CO2 plot would condense the other plots. The second monitors fungi, bacteria, and enzyme populations. The last monitors the percent of contaminants removed.

Several monitors track the populations of contaminants, enzymes, bacteria, fungi, and percent of ECs that escaped. The monitor and plot for percent of ECs escaped isn't particularly useful for water flow = 0. Users should just look at the number of contaminants remaining plot to monitor the progress of contaminant removal.

The green sliders control various aspects of the model.

THINGS TO NOTICE

Notice the time it takes for a certain amount of contaminants to be removed and the percent of contaminants that are removed before all fungi die off.

Notice the colors of the patches. What does that indicate about the diffusing behavior of the nutrients and dissolved oxygen?

Notice the behavios of the fungi, bacteria, and enzyme populations. Are the populations always increasing? Always decreasing? Do they rapidly increase and then decrease?

Notice the shapes of the graphs for glucose, nutrients, lignin, and dissolved O2.

Notice the behavior at low and high water flow.

THINGS TO TRY

Task 1: There are three different sliders related to the reaction rate: temperature, pH, and uv-light. For each condition, there's an optimal condition where the enzymes function best. Try to figure out what the optimal conditions are. Consider isolating each condition (don't change multiple at once as that will make it difficult to determine how each change affected the experiment). Consider a model where the water speed = 0 and a model where the water speed = 1.

Task 2: There's a cost associated with each of these conditions (e.g. keeping the solution at a constant temperature). Assuming all of the conditions cost the same amount to make optimal, figure out which two conditions at their optimal have the greatest positive impact on the rate. Which condition can be sub-optimal while having the smallest negative impact on the rate? Consider a model where the water speed = 0 and a model where the water speed = 1.

Task 3: Now, figure out which condition should be optimal if you can only have one optimal condition and the other two must be sub-optimal. Can you rank the conditions from least to greatest impact on rate?

Task 4: Consider changing the replenish O2 time. What happens when replenish O2 time is smaller? How about when it is larger?

Task 5: Considering all four sliders (temperature, pH, UV light, and replenish O2 time), try to modify the conditions so that you produce four different results in a model where water speed = 0: no removal of ECs, low removal of ECs, moderate removal of ECs, and high removal of ECs. For a model where water speed = 1, try to create conditions where there is low, moderate, and high numbers of ECs escaping.

Task 6: Determine the optimal water speed (1-5) for fungi survival and ensuring that few contaminants escape the filter. Why do you think this speed is the best? How does the idea of water speed apply in the real world? What engineering mechanisms could be added to ensure the optimal water speed?

Task 7: Using the different sliders and input boxes, find conditions that cause less fungi growth. Why do you think these conditions hurt fungi growth?

Final Task Part 1: Using any or all of the sliders, try to create a scenario where no species is too dominant or too weak, the reaction proceeds relatively quickly, and few contaminants escape.

Final Task Part 2: How many of sliders can you have at sub-optimal conditions while allowing minimal numbers of contaminants to escape. How far from the optimal condition can the sliders be while still maintaining low numbers of contaminants escaping.

EXTENDING THE MODEL

(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)

NETLOGO FEATURES

(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)

RELATED MODELS

The wolf-sheep predation model similarly shows competition between biological organisms. It also shows how the various agents/turtles rely on the patches for food.

The enzyme kinetics model illustrates the relationship between Kc, Kd, and Kr. It also illustrates the lock and key model for how enzymes function as a catalyst in a reaction.

CREDITS AND REFERENCES

(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)

Comments and Questions

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

Click to Run Model

extensions [table]

globals [
  ec-added ;;keeps track of contaminants added
  ms ;;model speed adjuster. Not fully implemented
  Kr ;;Enzyme Kinetics Options
  Kc
  Kd
  view-number ;;Used to name the image downloaded with 'export view'
  interface-number
  complexes-formed ;;Keeps track of Enzyme + Substrate complexes formed. Used to calculate % dissociate
  dissociated ;; Count of dissociated complexes
  fungi-option ;;stores name of fungi species selected
  status-1 ;; (Comment) I can do this more efficiently
  status-2
  status-3
  my-list1 ;;Used by clock. The code is inside the plot options
  my-list2
  intracellularly ;; Used to count EC's degraded intracellularly
  fungi-dict ;;Dictionary/Table of values unique to each fungi species
  adjuster-enzymes ;; adjusts production and efficiency of enzymes based on amount of them. Capped at 280
  adjuster-fungi ;;Used to decide amount of starting NH4 given to offsprings
  ;;eph
  ;;fph
  ;;ftemp
]

fungi-own [
  age
  energy
  NH4
  partner
]

patches-own [
  glucose
  O2 ;; (Comment) Remove eventually
  lignin
]

enzymes-own [
  age
  partner
  turn
  pause-time ;; Enzyme won't go into complex again, right after dissociating
]

ECs-own [
  partner
  locked-time ;; Counts time in Enzyme Substrate complex or Intracellular process
  taken ;; True if being degraded Intracellularly
]

breed [fungi fungus]
breed [ECs EC]
breed [enzymes enzyme]

to setup
  clear-all
  setup-globals
  setup-patches
  setup-fungi
  setup-ECs
  reset-ticks
end 

to go
  if ticks > 400 and not any? ECs [
    output-print (word "Success! All Contaminants Removed in " ticks " ticks.")
    stop]
  if ticks > 1000 [
    output-print (word (ec-added - count ECs)" of " ec-added " Contaminants Removed.")
    stop]
  if fungi-species != fungi-option [
    setup
    stop]

  diffuse glucose (0.5 + (0.01 * temperature)) ;;diffuse glucose in patches
  diffuse O2 (0.5 + (0.01 * temperature))

  set adjuster-enzymes round max(list ((count enzymes)^(1 / 4)) 1)
  set adjuster-fungi round max(list ((count enzymes)^(1 / 5)) 1)
  ;;if background-color [color-patches]
  move

  break-down-lignin
  eat-glucose
  replenish-O2

  reproduce
  ;;produce-enzymes ;; called with if/else in reproduce
  produce-ECs

  age-fungus
  age-enzymes
  check-death
  nutrient-status

  intracellular-degrade
  denature
  change-rate
  degrade-ECs
  tick
end 

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

to setup-globals
  set ms 0.5
  set view-number 1
  set interface-number 1
  set fungi-option fungi-species
  set status-1 false
  set status-2 false
  set status-3 false
  set fungi-dict table:make
end 

to setup-patches
  ask patches [
    set pcolor blue
    set glucose 4
    set lignin 100
    set O2 25
    ;;Net values are 32 * 32 * of these
  ]
end 

to setup-fungi
  create-fungi 6 [;;set the starting number of fungi
    if fungi-species = "Phanerodontia Chrysosporium" [
    set shape "fungi-tendrils"
    set size 2.25
    table:put fungi-dict "fungi-growth-temp" 30
    table:put fungi-dict "fungi-growth-pH" 2
    table:put fungi-dict "enzyme-production-cost" 1
    table:put fungi-dict "enzyme-production-pH" 4
    ;;intracellular-radius
    ]
    if fungi-species = "Trametes Versicolor" [
    set shape "turkey-tail-3"
    set size 2
    table:put fungi-dict "fungi-growth-temp" 24
    table:put fungi-dict "fungi-growth-pH" 1
    table:put fungi-dict "enzyme-production-cost" 1
    table:put fungi-dict "enzyme-production-pH" 3.75
    ]
    if fungi-species = "Pleurotus Ostreatus" [
    set shape "Button-Mushroom"
    set size 2
    table:put fungi-dict "fungi-growth-temp" 33.5
    table:put fungi-dict "fungi-growth-pH" 4
    table:put fungi-dict "enzyme-production-cost" 2.5
    table:put fungi-dict "enzyme-production-pH" 5
    ]
  ;;table:put fungi-dict "enzyme-denature-pH" 4
  ;;table:put fungi-dict "enzyme-reaction-pH" 4 ;; I'm gonna hard code these in
  set color 1
  setxy random -28 + 14 random -28 + 14 ;;place the fungi at random locations, but not edges (display is -16 to 16)
  set energy 30
  set NH4 12
  set partner nobody
  ]
  ;;set eph table:get fungi-dict "enzyme-production-pH"
  ;;set fph table:get fungi-dict "fungi-growth-pH"
  ;;set ftemp table:get fungi-dict "fungi-growth-temp"
end 

to setup-ECs
  set ec-added 40
  create-ECs 40 ;;If changed, change above as well
  [
    set size 1
    set shape "substrate"
    set color 26
    setxy (random -32 + 16) one-of [ -16 16 ] ;;place the ECs at random locations along the bottom or top
    set partner nobody
    set hidden? false
    set taken false
  ]
end 

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

to color-patches
  ask patches [
    set pcolor (blue + glucose / 3) ;;changes patch color based on amount of glucose
  ]
end 

to move
  ask enzymes [
    if partner = nobody [
      if ticks mod 3 = 0 [
        set turn (random 120) - 60 ;; A turn is decided every 3 ticks, and then carried out in 3 pieces over that time. Very smooth
      ]
   		right turn / 3
      ifelse (xcor > 14.5) [ ;; These 4 blocks redirect the enzyme if it is near an edge and heading towards that edge
        if (0 < heading and heading <= 90) [left 20]
        if (90 < heading and heading < 180) [right 20]
      ][
      ifelse (xcor < -14.5) [
        if (270 <= heading and heading < 360) [right 20]
        if (180 < heading and heading < 270) [left 20]
      ][
      ifelse (ycor < -14.5) [
        if (270 > heading and heading > 180) [right 20]
        if (180 >= heading and heading > 90) [left 20]
      ][
      if (ycor > 14.5) [
        if (0 <= heading and heading < 90) [right 20]
        if (270 < heading and heading < 360) [left 20]
      ]
      ]
      ]
      ]
      forward 0.12
  	]
  ]
  ask ECs [
    if partner = nobody [
      ifelse ticks < 150 [
        ;; This moves the EC's towards the center horizontal at the start of the game.
        ;; This is needed as the first EC's start on the top and bottom
        let ec-heading heading
        if ycor > 6 [set heading 180]
        if ycor < -6 [set heading 0]
        forward 0.05
        set heading ec-heading
      ]
      [
        ;;This keeps them closer to the center horizontal during the rest of the game
        let ec-heading heading
        ifelse ycor > 12 [set heading 180][
        ifelse ycor < -12 [set heading 0][
		ifelse xcor < -12 [set heading 90] [
		if xcor > 12 [set heading 270]
		]
		]
		]
        forward 0.02
        set heading ec-heading
      ]

      right -45 + random 90 ;; No turn setup. More erratic

      if (xcor > 14.5) [
        if (0 < heading and heading < 90) [left 20]
        if (90 < heading and heading < 180) [right 20]
      ]
      if (xcor < -14.5) [
        if (270 < heading and heading < 360) [right 20]
        if (180 < heading and heading < 270) [left 20]
      ]
            if (ycor < -14.5) [
        if (270 > heading and heading > 180) [right 20]
        if (180 > heading and heading > 90) [left 20]
      ]
      if (ycor > 14.5) [
        if (0 < heading and heading < 90) [right 20]
        if (270 < heading and heading < 360) [left 20]
      ]
      forward 0.06
    ]
  ]
end 

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

to break-down-lignin
  ask enzymes with [partner = nobody] [
     if lignin >= 2
    [ set lignin (lignin - 2)
      set glucose (glucose + 1) ;;(Comment) later try / adjuster-enzyme
      ]
      ]
  if (count enzymes) < 80 [
    ask fungi [
      if lignin >= 1 [
        set lignin lignin - 0.5
        set glucose glucose + 0.25
      ]
    ]
  ]
end 

to eat-glucose
  ask patches [ ;;(Comment) try to simplify or remove this section
    let fungus-count count fungi-here
    if fungus-count > 0 [
        let g glucose / fungus-count
          ask fungi-here [
        set O2 (O2 + (g * 2))
          ]
       ]
    ]
  ask fungi [
        ifelse glucose >= 5 and O2 >= 30 [
      	set glucose (glucose - 5)
      	set O2 (O2 - 30)
      	set energy (energy + (5 * 0.25))
    ][
          if O2 >= glucose * 3 [
          let m (glucose / count fungi-here)
          set glucose (glucose - m)
          set O2 (O2 - (m * 3))
          set energy (energy + (m * 0.25))
          ]
      ]
    ]
end 

to replenish-O2
  if (ticks mod 5 = 0) [
  ask patches [
    if O2 <= 50 [
    set O2 (O2 + 30)
    ]
  ]
  ]
end 

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

to reproduce
  ask fungi [
    ifelse age > 16  and random(2 * (abs(table:get fungi-dict "fungi-growth-pH" - pH))^ 2)= 0 and energy > (random 8 + 2 + (abs(table:get fungi-dict "fungi-growth-temp" - temperature) ^ 2) * 2 + (abs(2 - table:get fungi-dict "fungi-growth-pH"))^ 2) [
      ;;Affected by age, pH, energy and temp
      let En (energy / 2)
      set energy En
      let L glucose / 2
      set glucose L
      set NH4 NH4 - 0.5
      hatch-fungi 1 [
        let p max-one-of patches in-radius 3 with [pycor < 15 and pycor > -15 and pxcor < 15 and pxcor > -15] [glucose]
        face p
        set energy En + (5.5 - (2 * abs(table:get fungi-dict "fungi-growth-pH" - pH))) + (table:get fungi-dict "enzyme-production-cost" * 1.5)
        set NH4  3.5 / adjuster-fungi
        set age 0
        forward 1
        ;;set glucose L
        set partner nobody
      ]
     ]
    [produce-enzymes] ;;Enzymes can only be produced when the fungi cannot reproduce
  ]
end 

to produce-enzymes
    if (sum [glucose] of patches in-radius 2) < 120 and (energy < 20 or ticks < 12) and NH4 >= (max(list 1 (abs(table:get fungi-dict "enzyme-production-pH" - pH) * (table:get fungi-dict "enzyme-production-cost"))) * table:get fungi-dict "enzyme-production-cost") and (random(((abs(table:get fungi-dict "enzyme-production-pH" - pH))^ 3) * 50) = 0  or ticks < 12) and ((random 100) + count enzymes) < 280 [
      ;;Affected by nearby glucose, energy, NH4, ticks, enzyme count and pH
      set NH4 NH4 - (max(list 1 (abs(table:get fungi-dict "enzyme-production-pH" - pH) * (table:get fungi-dict "enzyme-production-cost"))) * table:get fungi-dict "enzyme-production-cost")
      hatch-enzymes 1 [
          set size 1
          set color white
          set shape "enzyme"
          set partner nobody
          set age 0
        ]
    ]
end 

to produce-ECs
  if ticks > 32 and ticks < 400 and ticks mod 6 = 0 [ ;;EC's produced every 6 ticks after the first 32
    create-ECs 2 [
      set size 1
      set shape "substrate"
      set color 26
      setxy (random 20 - 10) (random 20 - 10) ;; Placed closer to the center of the display
      set partner nobody
      set hidden? false
      set ec-added ec-added + 1
      set taken false
    ]
  ]
end 

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

to age-fungus
  ask fungi [
    set energy energy - 0.7
    set NH4 NH4 + 0.08 / (adjuster-enzymes * 1.5) ;;All fungus get NH4 at a set rate every tick
    set age (age + 1)
    set color age * 0.15 ;;lighten color as fungi age
    if energy <= 0 [set age age + 0.6]
    if color >  9.9 [
      set color 9.9]
    if energy < 0 [set energy 0]
  ]
end 

to age-enzymes
  ask enzymes [
    set age (age + 1) ;;add 1 to enzymes' age
  ]
end 

to check-death
  ask fungi [
    if age > 200 * (1 / ms) and partner = nobody [die];;die when age exceeds 400
  ]
  ask enzymes [
    if age > 275 * (1 / ms) and partner = nobody [die] ;;enzymes die when their age exceeds 550
  ]
end 

to nutrient-status
  ;;This reports the lignin remaining to the user
  ;;I'm trying to draw attention to the graphs
  if sum [lignin] of patches < (51200) and status-1 = false
  [output-print ("Lignin at 50%")
  ;ask status 1 [set whether true
  set status-1 true]
  if sum [lignin] of patches < (76800) and status-2 = false
    [output-print ("Lignin at 75%")
     set status-2 true]
  if sum [lignin] of patches < (26600) and status-3 = false
    [output-print ("Lignin at 25%")
     set status-3 true]
end 

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

to intracellular-degrade ;;Some contaminants are removed by intracellular enzymes
  ;;This happens when they approach an unpaired fungus
  ask fungi with [partner = nobody] [
    if any? ECs in-radius 0.5 with [partner = nobody] [
      set partner one-of ECs in-radius 0.5 with [partner = nobody]
      ask partner [
        set partner myself
        set taken true]
    ]
  ]
  Ask ECs with [taken = true] [
      set locked-time locked-time + 1
      if locked-time > 34 [
        set intracellularly intracellularly + 1 ;;Counter for % removed intracellularly
        ask partner [set partner nobody]
        die
      ]
    set size 1 - (locked-time / 34) ;;Shrink each tick and move slightly forward
    fd 0.007  ;;this is 1 / 15 rounded
    ]
end 

to denature ;;parameters for denaturing enzymes
  let aging-amount 0.5 + 0.1 * (table:get fungi-dict "enzyme-production-pH" - pH) ^ 2 + (count enzymes / 500) ;;All enzymes age the same amount, based on pH the count of enzymes
  ask enzymes [
    set age age + aging-amount
  ]
  ;;if ticks mod 80 = 0 [ ;;Optional randomizer. Sometimes a lot of enzymes die at once, this would prevent that
    ;;ask enzymes with [partner = nobody] [
      ;;set age age + (random 20) - 10
    ;;]
end 

to change-rate
    set Kc round (1) ;;(Comment) If these first two are going to be constant. Define them in setup globals once and for all
    set Kd round (60)
    set Kr round(3 * abs(32 - temperature) + 3) ;;multiply Kr by the multipliers for temperature, pH
end 

to degrade-ECs
  ask enzymes [form-complex]
  ask enzymes [dissociate]
  ask ECs [react-forward]
end 

to form-complex
  ifelse pause-time < 0 ;;Enzymes won't reform immediately after dissociating
  [set pause-time pause-time + 1]
  [if partner = nobody and (any? other ECs-here with [partner = nobody and not taken]) [ ;;and random Kc = 0 [
    set partner one-of (other ECs-here with [partner = nobody and not taken])
    set complexes-formed complexes-formed + 1
    let h heading
    ask partner [
      set partner myself
      set hidden? true
      move-to partner ;;These two make it so the EC matches the Enzyme position exactly.
      set heading h   ;;if they dissociate it will look like a clean separation
    ]
    set shape "complex"
    ]
  ]
end 

to react-forward
  if (partner != nobody and not taken) [
    set locked-time locked-time + 1 ;;Won't react forward right after joining.
    if locked-time > 25 and random Kr = 0
      [ ;set breed products
        ;set color green
        ;set shape "substrate"
        ;set hidden? false
        ask partner [
          set partner nobody
          set shape "enzyme"
          set color white
          set age age - 15] ;;Age lowers so enzyme won't die right after leaving complex. That would be confusing for the user
        set partner nobody
        die
    ]
  ]
end 

to dissociate
  if partner != nobody and random Kd = 0
      [set dissociated dissociated + 1
       set pause-time -15
       ask partner [
          set partner nobody
          set hidden? false
          set locked-time 0]
        set partner nobody
        set shape "enzyme"
        set age age - 15 ;;Age lowers so enzyme won't die right after leaving complex. That would be confusing for the user
  			]
end 

There are 4 versions of this model.

Uploaded by When Description Download
Quinn Gebeaux about 3 years ago Updated Main Model Download this version
Quinn Gebeaux about 3 years ago Now fungi species have different values Download this version
Quinn Gebeaux about 3 years ago Improved Fungi Growth and removed unnecessary options. Download this version
Quinn Gebeaux about 3 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Fungal Bioremediation.png preview Model Image about 3 years ago, by Quinn Gebeaux Download

This model does not have any ancestors.

This model does not have any descendants.