MIHS - Cell Culture Model
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
A model of cells growing in a petri dish.
HOW IT WORKS
Cells are modeled by patches. Cells need O2 and nutrients to produce energy for survival, growth and reproduction. Cells produce wastes such as CO2.
Turtles are used to model molecules of O2, nutrients, and wastes which move randomly throughout the petri dish until they are "absorbed" by a cell while passing over its patch. The various molecules can be converted into one another by the metabolic processes of cells.
Energy is represented abstractly with a patch variable called "energy."
Periodically, the culture medium is changed. This replenishes the nutrients and removes wastes.
HOW TO USE IT
The user can set values such as the starting number of cells, and the levels of oxygen and nutrients. The user can also increase or decrease the frequency with which the culture medium is changed.
THINGS TO NOTICE
Notice how the cells behave immediately after a culture change. How is their behavior different as time passes after each culture change? How does the population of cells that can survive in the petri dish change as various factors are altered?
THINGS TO TRY
Try changing the frequency of culture changes to see how the population of cells increases or decreases over time? Notice how other factors affect the population, such as the starting number of cells, and nutrient and oxygen levels.
EXTENDING THE MODEL
As wastes (such as CO2) build up in the dish, this should negative affect the cells. Try adding code to have cells absorb and accumulate CO2. If the CO2 in a cell builds up too high, it might die. You may also need to add code to allow CO2 to "diffuse" out of each cell and return to the medium of the culture dish (otherwise, every cell will eventually accumulate a lethal dose of CO2, even when CO2 levels are low in the culture medium).
NETLOGO FEATURES
One interesting feature of this model is the use of patches to represent cells and turtles to represent molecules which are diffusing.
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
Larry Bencivengo - Mercer Island High School (2021).
Comments and Questions
;; cell model globals [#-cells #-O2 O2-target-level #-nutrients #-CO2 #-CO2-generated interval] patches-own [cell? aerobic? energy O2-absorbed nutrients-absorbed] breed [xO2 O2] breed [xCO2 CO2] breed [nutrients nutrient] to setup clear-all ask patches [set pcolor white] ;; create a white background setup-cells ;; randomly identify starting-number-cells patches as cells ;; set up molecule shapes, starting numbers, etc. set #-CO2 0 set #-CO2-generated 0 set-default-shape xCO2 "molecule carbon dioxide" ;; generate starting O2 set-default-shape xO2 "molecule oxygen" set O2-target-level 100 * (O2-concentration / 21) setup-O2 ;; generate starting nutrients set-default-shape nutrients "hex" setup-nutrients reset-ticks end to setup-cells ;; generate cells by selecting random patches and setting cell? to true ;; if using anaerobic cells, randomly determine whether aerobic? is true or false ;; repeat until the correct number of cells has been generated set #-cells 0 while [#-cells < starting-number-cells] [ ;; select a random patch - if it is not already a cell, make it a cell ask patch random-pxcor random-pycor [if cell? = 0 [ become-cell set #-cells #-cells + 1 ] ] ] end to become-cell ;; check for aerobic? - needs to be added set cell? 1 set aerobic? 1 ;; change when anaerobes added set energy 100 set pcolor gray end to setup-O2 set #-O2 O2-target-level create-xO2 #-O2 [ set color blue setxy random-xcor random-ycor ] end to setup-nutrients set #-nutrients 1000 * (starting-nutrient-level / 100) create-nutrients #-nutrients [ set color green set size 0.5 setxy random-xcor random-ycor ] end ;; to go ;; molecules move randomly with a speed that depends on temperature ;; O2 and nutrient molecules are "absorbed" by cells as they pass through patches ;; metabolism of clls converts 1 O2 and 1 nutrient into x energy and 1 CO2 (waste) ;; the number of such transformations [per tick?] depends on O2/nutrients collected ;; and temperature ;; for energy conversion, "x" = 6 for aerobic cells; x = 2 for anaerobic (but no O2 needed) ;; when cells accumulate enough energy, they reproduce by turning random adjacent patch ;; into a cell ;; cells consume 1 energy [each tick?] to survive; if energy <= 0, cell dies ;; at a frequency determined by culture-change-frequency, CO2 are removed and nutrients added ;; O2 molecules are constantly added whenever to maintain the O2-concentration to go if #-cells <= 0 [stop] ask turtles [move] set #-CO2-generated 0 ask patches [metabolize] add-CO2 ask patches [reproduce] add-O2 ;; replenish O2 replace-culture-medium ;; periodically replace culture medium tick end to move right random 30 left random 30 forward 1 end to metabolize ;; absorb nutrients, generate energy and create wastes ;; only cells metabolize if cell? = 1 [ ;; consume energy and check for cell death set energy energy - 1 if energy <= 0 [cell-death] absorb-O2 ;; absorb O2 and nutrients absorb-nutrients ;; consume 1 O2 and 1 nutrient to create energy and waste if nutrients-absorbed > 0 [ set nutrients-absorbed nutrients-absorbed - 1 ifelse aerobic? = 1 and O2-absorbed > 0 [ set O2-absorbed O2-absorbed - 1 set energy energy + 60 set #-CO2-generated #-CO2-generated + 1 ] [set energy energy + 20] ] ] end to cell-death set cell? 0 ;; set aerobic? = 0 set pcolor white set energy 0 set O2-absorbed 0 set nutrients-absorbed 0 set #-cells #-cells - 1 set #-CO2-generated #-CO2-generated + 1 end to absorb-O2 ; cell procedure let available-O2 one-of xO2-here ; grab a random O2 molecule if available-O2 != nobody [ ask available-O2 [die] set #-O2 #-O2 - 1 set O2-absorbed O2-absorbed + 1 ] end to absorb-nutrients ; cell procedure let available-nutrients one-of nutrients-here ; grab a random nutrient molecule if available-nutrients != nobody [ ask available-nutrients [die] set #-nutrients #-nutrients - 1 set nutrients-absorbed nutrients-absorbed + 1 ] end to add-CO2 if #-CO2-generated > 0 [ create-xCO2 #-CO2-generated [ setxy random-xcor random-ycor set color red set size 1 ] ] set #-CO2 #-CO2 + #-CO2-generated set #-CO2-generated 0 end to add-O2 if #-O2 < O2-target-level * 0.9 [ let new-O2 (O2-target-level - #-O2) create-xO2 new-O2 [ set color blue setxy random-xcor random-ycor ] set #-O2 #-O2 + new-O2 ] end to reproduce ;; only cells reproduce if cell? = 1 and energy >= 200 [ ;; if enough energy generated, divide in two ;; check for empty adjacent patch if any? neighbors with [cell? = 0] [ ;; use up energy for cell division set energy energy - 80 ;; create a new cell in an adjacent patch set energy (energy / 2) ask one-of neighbors with [cell? = 0] [become-cell] set #-cells #-cells + 1 ] ] end to replace-culture-medium ;; check to see if it is time to replace the culture medium if medium-change-frequency > 0 and ticks > 10 and ticks mod (2500 / (medium-change-frequency * 10)) <= 1 and (ticks - interval) > 10 [ ;; prevent "double" changes ask patches [set pcolor black] ;; set patches to gray during culture medium change ask xO2 [die] set #-O2 0 add-O2 ask xCO2 [die] set #-CO2 0 ask nutrients [die] setup-nutrients ask patches [ ;; reset patch pcolors to normal ifelse cell? = 1 [ set pcolor gray] [set pcolor white] ] set interval ticks ] end
There is only one version of this model, created almost 4 years ago by Larry Bencivengo.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
MIHS - Cell Culture Model.png | preview | Preview for 'MIHS - Cell Culture Model' | almost 4 years ago, by Larry Bencivengo | Download |
This model does not have any ancestors.
This model does not have any descendants.