Oxygen transportation

No preview image

1 collaborator

Default-person Antoine HERBET (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.4.0 • Viewed 19 times • Downloaded 1 time • Run 0 times
Download the 'Oxygen transportation' 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 is trying to show how Hemoglobin takes some oxygen from lungs and transport it to muscles to produce ATP (energy). This energy can be consumed by moving. Some CO2 is produced and need to be evacuated by the lungs.

HOW IT WORKS

Oxygen can't go through blood (in white) and need to use hemoglobin to go in the muscle to drop oxygen. This oxygen will then be consumed by mitochondrias to produce ATP. The ATP (yellow lightnings) can be consumed by moving.

HOW TO USE IT

Use SETUP to create the world: cyan for lungs, white for blood, pink for muscles. Push GO to through one tick Push BREATHE to breathe and create more oxygen in the lungs (you can select how many oxygen you want to create with breath-oxy slider) Push MOVE to consum ATP Use NBmitos slider to create more mitochondrias at setup. Use NBhb slider to create more hemoglobins at the beginning

THINGS TO NOTICE

In this model hemoglobin can bring 1 to 4 molecules of oxygen (blue dots on the red circle) and 1 to 2 CO2 (red dots). In real life the O2 saturation follows a sigmoide curve always above 95% except for some diseases and CO2 can be transported by hemoglobin but in less proportion. In real life a very few O2 may go through blood without transport but it's more common to have CO2 dissolved in blood.

THINGS TO TRY

You can breathe and move and vary every nb on sliders to see how it can evolve.

EXTENDING THE MODEL

To extend the model it is possible to do many things: - code for all energy production pathways in the cell with perfect chemistry proportions ( glycolysis, CRP, krebs cycle, ...) - code to let O2 and CO2 go through blood without using hemoglobins - code for buffer systems (NADH, FADH2...) - code for acid-base balance with CO2, O2 and pH thanks to
- code for HEAT and H2O management - correlate a full chemistry model with external variables (VO2max, Tlim, ...) to try to predict performance

NETLOGO FEATURES

Segment some aeras with specific rules to move. Transportation of molecules. Shape of hemoglobins changing with saturation with O2 (blue balls) and CO2 (black balls)

RELATED MODELS

no idea not found

CREDITS AND REFERENCES

http://pneumocourlancy.fr/popup/physiologie-respiratoire.pdf https://fr.wikipedia.org/wiki/Respiration_cellulaire

HERBET Antoine 2024

Comments and Questions

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

Click to Run Model

; set up different molecules
breed [ oxygens oxygen]
breed [ mitos mito ] ; mitochondries mitochondrie
breed [ ATPs ATP ] ; Adenosine Tri Phosphate
breed [ CO2s CO2 ] ; carbon dioxide

; set up a transporter
breed [ hbs hb] ; hemoglobins hemoglobin


; set up different kind of environment
patches-own [ lung-cell? muscle-cell? blood-cell? ]

; internal variables
hbs-own [ oxygen-fixed CO2-fixed]
CO2s-own [ life ]

;;;; SETUP AND GO ;;;;;;;;;;;

to setup
  clear-all
  setup-hbs
  setup-oxygens
  setup-mitos
  setup-ATPs
  setup-patches
  reset-ticks
; let world-area (2 * max-pxcor + 1) * (2 * max-pycor + 1)
end 

to go
  move-hbs
  move-oxygens
  move-mitos
  move-CO2s
  move-ATPs
  ask hbs [
    HB-get-oxygen
    HB-drop-oxygen
    HB-get-CO2
    HB-drop-CO2
  ]
  ask mitos [
    mitos-creates-ATP
  ]
  ask CO2s [
  CO2-loose-life
  ]
  tick
end 

;to breathe
;  breathe-in
;  breathe-out
;end

to move
  move-consumption
end 

; a button to make some oxygen go in the lungs with a slider breath-oxy

to breath
  create-oxygens breath-oxy [
    set shape "dot"
    setxy (- 7 - random-float (15 - 8 + 1 )) ( 15 -  random-float (32 ))
    set color blue
  ]
end 



;;;;;;;;; SETTING UP ;;;;;;;;;;;;;

; setup patches with 3 aeras: from left to right lungs in cyan, vessels in white and muscle in pink.

to setup-patches
  ask patches [
    if ( pxcor > -16 ) and ( pxcor < -4 ) [set pcolor cyan + 3
      set lung-cell? true ]
    if ( pxcor > -5 and pxcor < 5 ) [set pcolor white
      set blood-cell? true ]
    if ( pxcor > 4 and pxcor < 16 ) [set pcolor pink + 3
      set muscle-cell? true]
    if ( pxcor = -16 ) or ( pxcor = 16 ) [set pcolor grey ]
  ]
end 

; setup hemoglobin with by default 1 oxygen on

to setup-hbs
  create-hbs NBhb
  ask hbs [
    set shape "orbit 1"
    setxy random-xcor random-ycor
    set color red
    set size 1
    set oxygen-fixed 1
  ]
end 

; definition of hemoglobin moves and go backward if a grey wall is met

to move-hbs
  ask hbs [
    right random 50
    left random 50
    if [pcolor] of patch-ahead 1 = grey [ lt 180 ]
    forward 1
  ]
end 

; setup oxygen only in lungs

to setup-oxygens
  create-oxygens NBoxygen
  ask oxygens [
    set shape "dot"
    setxy (- 7 - random-float (15 - 8 + 1 )) ( 15 -  random-float (32 ))
    set color blue
  ]
end 

; definition of oxygen moves only between white and grey

to move-oxygens
  ask oxygens[
    right random 60
    if [pcolor] of patch-ahead 1 = white [ lt 180 ]
    if [pcolor] of patch-ahead 1 = grey [ lt 180 ]
    forward 1
  ]
end 

; setup the number of mitochondrias in the muscle (more there is more ATP can be produced

to setup-mitos
  create-mitos NBmitos
  ask mitos [
    set shape "factory"
    setxy (15 - random-float (15 - 7 + 1 )) ( 15 -  random-float (32 ))
    set color green
  ]
end 

; definition of mitochondrias moves

to move-mitos
  ask mitos[
    right random 50
    left random 50
    if [pcolor] of patch-ahead 1 = white [ lt 180 ]
    if [pcolor] of patch-ahead 1 = grey [ lt 180 ]
    forward 1
  ]
end 

; definition of CO2 moves

to move-CO2s
  ask CO2s[
    right random 50
    left random 50
    if [pcolor] of patch-ahead 1 = white [ lt 180 ]
    if [pcolor] of patch-ahead 1 = grey [ lt 180 ]
    forward 1
  ]
end 

; definition of ATP moves

to move-ATPs
  ask ATPs[
    right random 50
    left random 50
    if [pcolor] of patch-ahead 1 = white [ lt 180 ]
    if [pcolor] of patch-ahead 1 = grey [ lt 180 ]
    forward 1
  ]
end 

; setup of ATPs style

to setup-ATPs
  ask ATPs [
    set shape "dot"
    set size 2
    set color yellow
  ]
end 

;;;;;;;;;;;;;;;;; Procedures ;;;;;;;;;;;;;;;;;;


;;;;;;;;; HB ;;;;;;;;
; function to stick O2 on hemoglobins

to HB-get-oxygen
  let oxygen-consumed one-of oxygens-here
  if oxygen-consumed != nobody and oxygen-fixed = 1 [
    ask oxygen-consumed [ die ]
    set oxygen-fixed 2 set shape "orbit 2"
  ]
  if oxygen-consumed != nobody and oxygen-fixed = 2 [
    ask oxygen-consumed [ die ]
    set oxygen-fixed 3 set shape "orbit 3"
  ]
  if oxygen-consumed != nobody and oxygen-fixed = 3 [
    ask oxygen-consumed [ die ]
    set oxygen-fixed 4 set shape "orbit 4"
  ]
end 

; function to drop O2 from hemoglobins

to HB-drop-oxygen
  if pcolor = pink + 3 and oxygen-fixed = 4 [
    set oxygen-fixed 3 set shape "orbit 3"
    hatch-oxygens 1 [ set shape "dot" set color blue ]
  ]
  if pcolor = pink + 3 and oxygen-fixed = 3 [
    set oxygen-fixed 2 set shape "orbit 2"
    hatch-oxygens 1 [ set shape "dot" set color blue ]
  ]
  if pcolor = pink + 3 and oxygen-fixed = 2 [
    set oxygen-fixed 1 set shape "orbit 1"
    hatch-oxygens 1 [ set shape "dot" set color blue ]
  ]
end 

; function to stick CO2 on hemoglobins (and take care of shapes)

to HB-get-CO2
  let CO2-consumed one-of CO2s-here
  if CO2-consumed != nobody and CO2-fixed = 0 and oxygen-fixed = 3 [
    ask CO2-consumed [ die ]
    set shape "orbit 4 with co2"
    set CO2-fixed 1
  ]
  if CO2-consumed != nobody and CO2-fixed = 1 and oxygen-fixed = 2 [
    ask CO2-consumed [ die ]
    set shape "orbit 4 with 2 co2"
    set CO2-fixed 2
  ]
  if CO2-consumed != nobody and CO2-fixed = 0 and oxygen-fixed = 2 [
    ask CO2-consumed [ die ]
    set shape "orbit 3 with co2"
    set CO2-fixed 1
  ]
  if CO2-consumed != nobody and CO2-fixed = 1 and oxygen-fixed = 1 [
    ask CO2-consumed [ die ]
    set shape "orbit 3 with 2 co2"
    set CO2-fixed 2
  ]
  if CO2-consumed != nobody and CO2-fixed = 0 and oxygen-fixed = 1 [
    ask CO2-consumed [ die ]

    set shape "orbit 2 with co2"
    set CO2-fixed 1
  ]
end 

; function to drop CO2 from hemoglobins (and take care of shapes)

to HB-drop-CO2
  if pcolor = cyan + 3 and CO2-fixed = 2 and oxygen-fixed = 2 [
    set CO2-fixed 1 set shape "orbit 3 with co2"
    hatch-CO2s 1 [ set shape "dot" set color black set life 5 ]
  ]
  if pcolor = cyan + 3 and CO2-fixed = 2 and oxygen-fixed = 1 [
    set CO2-fixed 1 set shape "orbit 2 with co2"
    hatch-CO2s 1 [ set shape "dot" set color black set life 5 ]
  ]
  if pcolor = cyan + 3 and CO2-fixed = 1 and oxygen-fixed = 3 [
    set CO2-fixed 0 set shape "orbit 3"
    hatch-CO2s 1 [ set shape "dot" set color black set life 5 ]
  ]
  if pcolor = cyan + 3 and CO2-fixed = 1 and oxygen-fixed = 2 [
    set CO2-fixed 0 set shape "orbit 2"
    hatch-CO2s 1 [ set shape "dot" set color black set life 5 ]
  ]
  if pcolor = cyan + 3 and CO2-fixed = 1 and oxygen-fixed = 1 [
    set CO2-fixed 0 set shape "orbit 1"
    hatch-CO2s 1 [ set shape "dot" set color black set life 5 ]
  ]
end 

;;;;;;; Muscles ;;;;;;;;

; function to create ATPs and CO2 from burning O2

to mitos-creates-ATP
  let oxygen-burned one-of oxygens-here
  if oxygen-burned != nobody [
    ask oxygen-burned [ die ]
    hatch-ATPs 19 [ set shape "lightning" set size 1 ]
    hatch-CO2s 1 [ set shape "dot" set color black]
  ]
end 

; function to define how the button move consumes ATP

to move-consumption
   let atp-burned one-of ATPs-here
  if atp-burned != nobody and pcolor = pink + 3 [
    ask atp-burned [ die ]
  ]
end 


;;;;;;; lungs ;;;;;;;

; function to make CO2 disappear slowly

to CO2-loose-life
  if pcolor = cyan + 3 [ set life life - 1 ]
  if life < 0 [ die ]
end 


;; Copyright 2024 Antoine Herbet

There is only one version of this model, created 28 days ago by Antoine HERBET.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.