Simulation for lipids and bacteria
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
THINGS TO NOTICE
(suggested things for the user to notice while running the model)
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
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
(models in the NetLogo Models Library and elsewhere which are of related interest)
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
globals [time speed R pHFactor TFactor Ea A pHs lipidConNow] breed [bacteria bacterias] breed [lipids lipid] bacteria-own [age timing] to setup clear-all set-default-shape bacteria "bacteria-2-membrane" create-bacteria 50 [ set color green set size 1.5 setxy random-xcor random-ycor set age 0 ] set-default-shape lipids "circle" create-lipids lipid-concentration * 300 [ set color white set size 1 setxy random-xcor random-ycor ] set R 8.314 set pHs pH set A 0 set Ea 0 check-Activation-energy T pH check-speed A Ea T set time 0 reset-ticks end to spawn create-bacteria 50 [ set color green set size 1.5 setxy random-xcor random-ycor set age 0 ] end to go ChangepH check-Activation-energy T pHs check-speed A Ea T ask bacteria [ move reproduce aging ] ask lipids [ move ] check-collisions tick set time time + 1 end to move rt random 360 fd 1 end to reproduce set timing timing + speed if age > 10 and timing > 1 [ hatch-bacteria 1 [ set age 0 set color green set timing 0 ] set age 0 set timing 0 ] end to aging set age age + 1 if age > 20 [ die ] end to check-collisions ask bacteria [ let collided-turtle one-of lipids with [distance myself < 1] if collided-turtle != nobody [ ; Handle collision ask collided-turtle [ die ] die ] ] end to check-speed[AV Energy TV] let Es Energy * -1 let Arrhenius (A * exp ( Es / (R * TV))) if Arrhenius != 0 [ set speed (ln 2 / Arrhenius) ] end to check-Activation-energy[TV pHV] ifelse pHV < 5.5 [ pHLow ] [ ifelse pHV >= 5.5 and pH <= 8.5 [ set pHFactor 1 ] [ if pHV > 8.5 [ pHHigh ] ] ] ifelse TV < 30 [ TLow ] [ ifelse TV >= 30 and TV <= 45 [ set TFactor 1 ] [ if TV > 45[ THigh ] ] ] set Ea (50000 + random 50000) * pHFactor * TFactor set A (10 ^ 8 + random-float (10 ^ 12 - 10 ^ 8)) * pHFactor * TFactor end to pHLow let Lower 5.5 - pHs set pHFactor (Lower / 10) + 1 end to pHHigh let High pHs - 8.5 set pHFactor (High / 10) + 1 end to TLow let Lower 30 - T set TFactor (Lower / 10) + 1 end to THigh let High T - 45 set TFactor (High / 10) + 1 end to ChangepH let lc100 lipid-concentration * 100 let minusing pH - 7 if pHs > 7 [ set pHs pH + ((count lipids / lc100) - minusing) ] set lipidConNow (count lipids / lc100 / 3) * lipid-concentration output-print (word "pH: " pHs word " lipidConcentration: " lipidConNow) end
There is only one version of this model, created 12 months ago by alvin lam.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.