Yogogourt

No preview image

1 collaborator

Default-person Bryan Guo (Author)

Tags

biology 

Tagged by Reuven M. Lerner over 12 years ago

bryan guo 

Tagged by Bryan Guo over 12 years ago

fermentation 

Tagged by Reuven M. Lerner over 12 years ago

food 

Tagged by Reuven M. Lerner over 12 years ago

tristan sokol 

Tagged by Bryan Guo over 12 years ago

Model group LS426_2013 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.3 • Viewed 690 times • Downloaded 61 times • Run 0 times
Download the 'Yogogourt' 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 model depicts the yogurt fermentation process.

HOW IT WORKS

There are two types of agents in this model: Caseins and bacteria. Caseins come with the milk and do Brownian Motion and stay away from each other when not denaturalized. Bacteria were added to the milk and they reproduce and produce acid. The temperature determines the reproduction rate. When there are enough bacteria and the acidity researches a certain level, caseins are denaturalized and coagulate. The mechanical extension detect the temperature and stir the milk when temperature at the bottom of the jar rises too high. This model didnt simulate the sugar levelthe nutrient of bacteria, assuming there is enough sugar in the milk.

HOW TO USE IT

Connect Yogogourt device to computer, setup the model, and click go. Then click Add Bacteria, observe the model. There are two buttons Stir and Stop. The model can start and stop the stirring device automatically so users don_t have to click on those buttions.

THINGS TO NOTICE

Observe when the caseins are denaturalized and start to coagulate

THINGS TO TRY

Add different amount bacteria at different time

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

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

Click to Run Model

;NetLogo Lab Project "Yogogourt" for LS_426 Winter 2013
; Copyright 2013 Bryan Guo & Tristan Sokol.


extensions [gogo]


globals [serial-port acidity temperature] 
breed [caseins casein]
breed [bacteria bacterium]
bacteria-own [bact-energy acid age bact-timer]  
caseins-own [destablized? cas-timer]

to add-milk
  create-caseins 100
[
  set color white 
  set size 2
  set cas-timer 6000
  set shape "dot"
  set destablized? false
  setxy random-xcor random-ycor
  ]
end 

to stir
  ifelse gogo:sensor 1 < 580 [
    gogo:talk-to-output-ports [ "b" ]
    gogo:output-port-on
    ]
  [
    gogo:talk-to-output-ports [ "a" ]
    gogo:output-port-off
    gogo:talk-to-output-ports [ "b" ]
    gogo:output-port-off
  ]
end 

to brownian  
ask caseins [
  ifelse count caseins-on neighbors >= 1 
  [
    rt random 360 fd 2]
  [lt random 360 fd 1 bk 1]
]
end 

to coagulate 
ask caseins [
    ifelse count caseins-on neighbors < 1
    [rt random 360 fd 1]
    [lt random 360 fd 1 bk 1
      if cas-timer = 0 [
      create-link-with one-of caseins-on neighbors]
      set cas-timer cas-timer - 1
      ] 
  ]
end 

to be-caseins 
    ask caseins [
      ifelse destablized? = 1
      [coagulate]
      [brownian]
    ]
end 

to setup
    ifelse length (gogo:ports) > 0
    [ set serial-port user-one-of "Select a port:" gogo:ports ]
    [ user-message "There is a problem with the connection. Check if the board is on, and if the cable is connected. Otherwise, try to quit NetLogo, power cycle the GoGo Board, and open NetLogo again. For more information on how to fix connection issues, refer to the NetLogo documentation or the info tab of this model"
      stop ]
  gogo:open serial-port
  repeat 5
  [ if not gogo:ping
    [ user-message "There is a problem with the connection. Check if the board is on, and if the cable is connected. Otherwise, try to quit NetLogo, power cycle the GoGo Board, and open NetLogo again. For more information on how to fix connection issues, refer to the NetLogo documentation or the info tab of this model"] ]
  gogo:talk-to-output-ports [ "a" "b" "c" "d"]
  set temperature gogo:sensor 1

  ca
  reset-ticks
  add-milk
end 

to go
  display
  ask caseins [be-caseins]
  ask bacteria [
    set acidity acidity + 1
    move
    reproduce
    ]
  if acidity > 1024 [
    ask caseins [set color yellow set destablized? 1]
    ]
  stir
  tick
end 

to move
  rt random 50
  lt random 50
  fd random 3
  set age age + 1 
  set acidity acidity + 1 
  if age > 12 [die]
end 

to add-bacteria
    create-bacteria 1 [
      set age 0
      set shape "dot" 
      set color red 
      set bact-timer temperature / 10 
      setxy random-xcor random-ycor
      set acidity 1
    ] 
end 

to reproduce 
ask bacteria [
if bact-timer = 0 [
  hatch 1 rt random 360 fd 1
;  set acidity acidity + 1
  ]
set bact-timer bact-timer - 1
]
end 

There are 2 versions of this model.

Uploaded by When Description Download
Bryan Guo over 12 years ago Latest Version Feb 13 2013 Download this version
Bryan Guo over 12 years ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.