Hey Bob,
The latest changes have been pushed to our hemorrhage_resistance branch
In investigating this issue we did notice an issue associated with creating ‘tiny’ resistances (associated with the 0.01 severity) especially at locations with ‘tiny’ flows (like the pulmonary arteries/capillaries/veins). Great edge case testing!
A few items to discuss with your scenario and its execution
As part of this new hemorrhage functionality, we have added the new event:
Cardiovascular Collapse
This event will precede the mathematical errors your scenario gets.
This is basically signaling that your patient is entering a non-recoverable state (close to death).
INFO] : [118.82(s)] [Event] 118.82(s), Patient has Antidiuresis
[INFO] : [120(s)] Current Time is 120s, it took 11.716s to simulate the past 60s
[INFO] : [122.94(s)] [Event] 122.94(s), Patient has Intracranial Hypotension
[INFO] : [180(s)] Current Time is 180s, it took 6.989s to simulate the past 60s
[INFO] : [187.4(s)] [Event] 187.4(s), Patient is in Hypovolemic Shock
[INFO] : [240(s)] Current Time is 240s, it took 7.103s to simulate the past 60s
[INFO] : [297.44(s)] [Event] 297.44(s), Patient has Bradypnea
[INFO] : [300(s)] Current Time is 300s, it took 6.756s to simulate the past 60s
[INFO] : [339.9(s)] [Event] 339.9(s), Patient has low blood pressure and the vasculature has collapsed
[INFO] : [340.3(s)] [Event] 340.3(s), Patient has Renal Hypoperfusion
[INFO] : [344.26(s)] [Event] 344.26(s), Oxygen tension in the brain is dangerously low
FATAL:Cant transport with a negative volume included. Node = RightPulmonaryVeins. Volume = -0.39194 mL :grimacing:
Note that death is extremely contextual and hence programming a death check is difficult to do. It’s a combination of what actions have been performed along with what events have been thrown. For example, a cardiovascular collapse during a hemorrhage is not recoverable and could be considered death. But cardiovascular collapse also occurs during cardiac arrest, which is recoverable!
Long story short, if you are using hemorrhage, you should be listening to this event and gracefully put the pulse engine to pasture when it occurs . If you keep running past this event, you will get the math error you received.
We also added 2 new system properties on the cardiovascular system
TotalHemorrhageRate - The total rate of blood loss due to all active hemorrhages.
TotalHemorrhagedVolume - The total amount of blood lost due to all hemorrhages.
Monitoring these could also be helpful
Next up is your scenario.
I am not sure if the hemorrhages at the pulmonary arteries/capillaries/veins is accurate or not, but in any event, those are behaving much happier from a mathematical perspective… Your muscle and skin bleeds, though, are a very large bleed outs.
You are saying that 15% of the body’s blood flow to the skin and 30% of the body’s blood flow to the muscles is exiting the body. I think that is ok for the skin, but I don’t think the chest is 30% of your muscle…
This is how you can get a better idea of what you are doing with hemorrhage. Table 2 of the Cardiovascular Methodology Report gives us all the healthy flows of the various compartments:
Skin In Flow = 6.3mL/s
Muscle In Flow = 16.1mL/s
You probably want ~1 to 2 mL/s bleed out from each
Which is about 1.5 / 6.3 = severity of 0.15, and 1.5 / 16.1 = severity of 0.1
I don’t think you should bleed from the pulmonary vessels. If you do your patient will not last but a few minutes, even with 0.01. The pneumothorax is really influential and adding extra pulmonary trauma is pretty harsh…
Along with the 0.7 pneumothorax, severities of 0.1 to 0.15 for skin and 0.05 to 0.10 for muscle hemorrhages really create an injured patient and this scenario runs for about 10-15m before CV collapse, which I think is about what you want…
Again, plan for and expect the patient to die. Hopefully your users will intervein before death (borked math) occurs.
I am also updating the Explorer to support the new hemorrhage severity option and will put a windows that you could use to play with hemorrhage.
(I will probably put up a windows build this weekend)
Hope this clarifies using hemorrhage
Thanks for testing!
And let us know if you have any more questions!