Cardiogenic Pulmonary Edema model for Experimentation

Cardiogenic Pulmonary Edema model for Experimentation preview image

2 collaborators

Regina Falenciuc (Team member)

Tags

intensive care 

Tagged by Victor Iapascurta 11 days ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.0 • Viewed 41 times • Downloaded 6 times • Run 0 times
Download the 'Cardiogenic Pulmonary Edema model for Experimentation' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

Globals [ Normal
         Cardiogenic-Pulmonary-Edema
         ] ;; setting two states of the world - scenarios: (1) for Normal lung physiology and (2) for Pulmonary Edema formation

                               ;; setting agent breeds:
breed [ wmolecules wmolecule ] ;; water molecules, which are the ones who will extravasate and flood ACM and alveoli
breed [ fmolecules fmolecule ] ;; fluid molecules wich are to stay in the capillary
breed [ macromolecules macromolecule ] ;; macromolecules (albumine) which physiological keep wmolecules in the capillary
breed [ erythrocytes erythrocyte ] ;; Red Blood Cells which are to stay in the capillary

patches-own ;; property of patches to form physiological space zones
[
  capillary
  ACM-alveoli
]

;wmolecules-own [extravasated?] ;; property for water molecules to move outside capillary and to flood ACM and alveoli

to setup
  ca
  import-drawing "alveoli03_3.png"
  if (scenario = "Normal") ;; setting parameters for "Normal" scenario
  [
    set hydrostatic-pressure 18
    set oncotic-pressure 25
  ]
  if (scenario = "Cardiogenic-Pulmonary-Edema_21") ;; setting parameters for "Cardiogenic Pulmonary Edema" scenario
  [
    set hydrostatic-pressure 21
    set oncotic-pressure 24
  ]

   if (scenario = "Cardiogenic-Pulmonary-Edema_22") ;; setting parameters for "Cardiogenic Pulmonary Edema" scenario
  [
    set hydrostatic-pressure 22
    set oncotic-pressure 24
  ]

   if (scenario = "Cardiogenic-Pulmonary-Edema_23") ;; setting parameters for "Cardiogenic Pulmonary Edema" scenario
  [
    set hydrostatic-pressure 23
    set oncotic-pressure 24
  ]

   if (scenario = "Cardiogenic-Pulmonary-Edema_24") ;; setting parameters for "Cardiogenic Pulmonary Edema" scenario
  [
    set hydrostatic-pressure 24
    set oncotic-pressure 24
  ]

  create-erythrocytes 5 ;; creating RBC with respective properties
   ask erythrocytes
  [
   set xcor random-xcor
   set color pink
   set size 3
   set shape "erythrocyte"
    set heading 90
  ]

  create-wmolecules 1700 ;; creating water molecules with respective properties and which are to extravasate
  ask wmolecules
  [
   ;set extravasated? false
   set xcor random-xcor
   set color blue
   set shape "circle 2_w"
    set heading 0
  ]

   create-fmolecules 300 ;; creating fluid molecules with respective properties which are to move along capillary
   ask fmolecules
  [
   set xcor random-xcor
   set color blue
    set size 1.1
   set shape "circle 2_w"
    set heading 90
  ]

   create-macromolecules 10 ;; creating macromolecules with respective properties wich are to move along capillary
   ask macromolecules
  [
   set xcor random-xcor
   set color yellow
   set size 1.5
   set shape "circle"
    set heading 90
  ]

  ask patches [ set pcolor white ] ;; setting preliminary conditions for the setup of 'extravascular space'
  ask patches [ setup-capillary ]
  ask patches [ setup-ACM-alveoli ]

   ask turtles [move-to one-of patches with [pycor < 5 and pycor > 1]] ;; moving created agents to their orginal
                                                                       ;; position (i.e. in the capillary)
  reset-ticks
end 

to setup-capillary ;; setting the capillary zone of pink color anf its walls of red color
  if (pycor < 6) and (pycor > 0) [set pcolor pink]
   ask patches with [ pycor = min-pycor]
    [ set pcolor red ]
   ask patches with [ pycor = 6 ]
    [ set pcolor red ]
end 

to setup-ACM-alveoli ;; setting the extravascular space with ACM of grey color and alveola of white color
  if (pycor < 10) and (pycor > 6) [ set pcolor grey ]
  if (pycor < 22) and (pycor > 10) [ set pcolor white ]
end 

to go

  let acm-patches patches with [pycor < 10 and pycor > 6] ;; procedure simulating water extravasation under
  ask one-of acm-patches                                  ;; physiological condition. This water is then removed
  [                                                       ;; by lymph drainage mechanism
    sprout 7
  ask turtles-here
    [
    set shape "circle 2_w"
    set color blue
    ]
  ]
  ask turtles-on patches with [pycor < 10 and pycor > 6] ;; initiation of the lymph drainage machanism
  [drain-acm]

  ask macromolecules ;; procedures that simulate blood movement along the capillary
   [ fd 3]
  ask fmolecules
   [ fd 10 ]
  ask erythrocytes
   [ fd 1 ]

   if ((oncotic-pressure - hydrostatic-pressure) = 3)
  [
    ask n-of random-exponential 2 wmolecules [                 ;; procedure simulating extravasation consisting on
      move-to one-of patches with [pycor < 14 and pycor > 10]  ;; movement of water molecules out of the capillary -
    ]                                                          ;; to ACM and alveoli
  ]


   if ((oncotic-pressure - hydrostatic-pressure) = 2)
  [
    ask n-of random-exponential 4 wmolecules [                 ;; procedure simulating extravasation consisting on
      move-to one-of patches with [pycor < 14 and pycor > 10]  ;; movement of water molecules out of the capillary -
    ]                                                          ;; to ACM and alveoli
  ]

   if ((oncotic-pressure - hydrostatic-pressure) = 1)
  [
    ask n-of random-exponential 6 wmolecules [                 ;; procedure simulating extravasation consisting on
      ;set extravasated? true
      move-to one-of patches with [pycor < 14 and pycor > 10]  ;; movement of water molecules out of the capillary -
    ]                                                          ;; to ACM and alveoli
  ]

   if ((oncotic-pressure - hydrostatic-pressure) = 0)
  [
    ;set extravasated? true
    ask n-of random-exponential 8 wmolecules [                 ;; procedure simulating extravasation consisting on
      move-to one-of patches with [pycor < 14 and pycor > 10]  ;; movement of water molecules out of the capillary -
    ]                                                          ;; to ACM and alveoli
  ]

  if  (scenario = "Cardiogenic-Pulmonary-Edema_21" or scenario = "Cardiogenic-Pulmonary-Edema_22" or scenario = "Cardiogenic-Pulmonary-Edema_23" or scenario = "Cardiogenic-Pulmonary-Edema_24") and ticks = 50 ;; procedure for stopping the model
  [
    stop ]

   tick
end 

to drain-acm                                                         ;; procedure for simulation of lymph drainage mechanism
  if count turtles-on patches with [pycor < 10 and pycor > 6] > 200
  [ask turtles-here
    [ die ]
  ]
end 

There is only one version of this model, created 11 days ago by Victor Iapascurta.

Attached files

File Type Description Last updated
Cardiogenic Pulmonary Edema model for Experimentation.png preview Preview for 'Cardiogenic Pulmonary Edema model for Experimentation' 11 days ago, by Victor Iapascurta Download

This model does not have any ancestors.

This model does not have any descendants.