After playing around with the ECMO component a bit I had a a few questions regarding its implementation.
- Firstly, I was wondering if the sweep gas flow rate was adjustable or if it is set to a static value?
- Also, I am not too sure what the function of the “substance” that is set in the ECMO settings is. Could you clarify what it does/how it interacts with the physiology?
- Finally, it seems like the current implementation on has VV ECMO, which only supports the lungs, and I was wondering if there was any intention to implement VA ECMO, which also supports the heart as well as the lungs, or if there was anyway to emulate support of the heart’s functions with the current tools.
Thanks for taking the time to answer my questions!
The current ecmo implementation is not a fully featured equipment model.
This implementation was created to only support an end user model outside of Pulse.
The ECMO equpment can pull blood from a few locations at a specified flow rate into the ECMO machine volume, the blood flows back out to a location at the same specified rate.
The same settings action allows a user to adjust the substance values in the blood in the machine.
Then the blood is pushed back into the body at the same specified rate with the new substance values, and the new substance amounts transport through the body.
So there is no currently no sweep gas flow rate. It is up to the end user to calculate how much oxygen to add to the blood in the ECMO machine. You may also decrement the amout of carbon dioxide from the blood in the chamber as well.
This implementation was done to support a user with their own ECMO model (outside of Pulse) who wanted the ability to control substance (ex. oxygen) going into the body at their own perscribed rates and examine the whole body physiology effects their ECMO model has for various disease states.
We currently do not have plans to implement a fully featured ECMO model, but the infrastructure is there if you would like to experiment with your own model, or contribute a model to Pulse.
So what is the difference between the substance compound and the list of substance concentrations?
How do they affect the blood that is being pushed back into the body.
Pulse has substances, which is the base, single, object that transports through the body.
For example, Oxygen, Carbon Dioxide, or a drug substance.
The substance object has the properties that Pulse use to interact with the body
They each do different things in different systems.
A substance compound, is a collection of substances at various preset concentrations.
For example, saline is comprised of Sodium, Oxygen and Carbon Dioxide.
(We also have Packed Red Blood Cells and Blood)
When a compound is applied to Pulse, we inject the substances at the compound perscribed concentrations, at the provided flow rate.
So, in the case of the ECMO machine, you could simply infuse Oxygen at your own concentration , and or specify that the ECMO machine is infusing Saline, both at the provided ECMO flow rate.
Ah I see, how does the component interact with the input blood when the substance/compound is specified?
For instance, if I allocate Oxygen and Carbon Dioxide at certain concentrations is this concentration added to the existing concentration in the input blood or is the concentration of the input blood set to the concentrations specified. Similarly, if Blood is specified as the substance compound will the output blood have the concentrations specified in the Blood.json file or are the compound’s individual substance concentrations added to the existing concentrations of the input blood?
Lastly, If the concentration of substances can simply be specified and infused what effect does the volume of the oxygenator have?
Thanks for the taking the time to answer my questions!
When you hook up the ECMO, think of it as just adding another comparment to the body
The fluid is flowing around and its all well mixed, the concentration of substances is pretty consistent through out the body.
You are specifying the concentration of the liquid volume in the ecmo machine compartment
So the outgoing flow of fluid (at your concentration) is going to mix into the fluid at the canulation point (at the regular whole body concentration)
The volume fluid in the ecmo machine stays set at your provided concentration.
So as that fluid keeps flowing into the body, eventually all the fluid in the body will move to that concentration given enough time to mix
First the canulation compartment (Which has both blood from the ecmo AND blood from its preceding compartment flowing into it) will move towards the concentration of the ecmo machine, It flows blood into another compartment, which will keep propagating the concentration around the body.
If you give Blood.json, we add the substances in the compound on the ecmo machine and set their concentrations to what is specified in the compound file
Since the rate of fluid coming into the ecmo machine is the same as the rate of fluid going out of the ecmo machine, and you are setting concentrations, the volume does not influence much in Pulse. I suspect the volume does matter in the external calculations of substance concentrations in end user ecmo models.
Whilst attempting to extend the ECMO model by adding Right and Left Femoral Arteries as cannulation locations I ran into a few more questions.
- The implementation of the current cannulation locations seem to use the the CardiovascularNodes than end in the number 2. What is the difference between the nodes that end in 1 and the ones that end in 2? e.g. RightLeg1 vs RightLeg2
- The current cannulation location implementation also looks like it generalises the Veins by targeting the entire leg/arm when as the node/compartment for input and output. Is it be possible to distinguish between the Femoral Vein and Artery as cannulation locations? (this is the main factor that distinguishes between VA and VV ECMO).
Thank for taking the time to answer my continuous questions!
Take a look at the circuit diagram in our cardiovascular methodology
You can also see where we implement this circuit here
I am sure we could model VA and VV ECMO at the arms/legs
We would probably need to add a node on the arteiral side that you could “canulate” into before the Arm/Leg 3 element windkessel structure.
You should also check the flows between the aorta and arm/leg to ensure the flow is representing the vessels you want. You can see what we are modeling (expected volume/flow of our vessels) via our validation tables.
This is a lummped model, so there is also the possibility you may want to discritize the circuit for more fidelity for your application.
I was able to add a new eECMO_CannulationLocation with relative ease and it works if it uses the same Node/Compartment as one of the existing Cannulation Locations. But if I configure it with a CardiovasuclarNode that is different to one of the original Nodes the simulation freezes when the ECMO is attached with the following error.
This is what the current switch case for inflow/outflow looks like and I have tried other Nodes such as RightLeg1, Aorta1 etc. and all give the same error.
Probably some configuration that is required for the nodes used as Cannulation Locations but not quite sure where.
I am not sure what might be happening
I am not sure I am fully understanding what you are doing
If you change:
m_OutflowNode = m_data.GetCircuits().GetFluidNode(pulse::CardiovascularNode::RightLeg2);```
m_OutflowNode = m_data.GetCircuits().GetFluidNode(pulse::CardiovascularNode::RightLeg1);
The circuit crashes out?
If you want to do the Femoral Artery, you may need to add a new node here, and connect to it:
I am not sure what the circuit solver is going to do if you connect to other nodes off the top of my head…I guess I would have to experiment like you are doing and dig into the circuit solver to see what is causing this…
So I have been doing some testing looking at which CardiovascularNodes crash and which work and it looks like you have to use a node which is not in series with a capacitor/diode. For instance, most of the isolated nodes that end in 2 like Liver2, Muscle2 and Bone2 work correctly whereas most of the other nodes do not work as they are in series with a capacitor/diode.
This is just a basic theory as I could be misunderstanding the circuit diagram as I only have basic electrical engineering experience and I have limited knowledge on the actual solver but from what I understand it looks like this is what is causing the solver to run into an error.
When we add the ECMO to the circuit, we are adding a flow source to directly take out/push in a specified volume at the give rate from that location. Those generally work best outside of a windkessel structure. When you put that on the node in the windkessel, you are adding a constraint on the circuit that does not seem to solve properly. You’d probably have to derive what the circuit math would do in that situation to fully understand why that is the case. If you are pushing and pulling volume, you should do that before or after the windkessel structure, not in it.
I have been continuing to work on implementing a proper interactive ECMO model and have still been running into issues with how the physiology seems to be handling the addition of the ECMO compartment into the body. All the observations below are working with the right and left femoral vein as input and output respectively.
First of all, the ECMO seems to quickly lower the oxygen concentration at the input location when it is connected. The concentration then at the input then stays low instead of reaching an equilibrium with the output location even after an extended amount of time. This seems contrary to what you previously said about all the fluid in the body moving to the concentration of the ECMO’s output given enough time.
Secondly, I have observed that the concentration of oxygen at the right and left vasculatures is around 0.004mg/mL. Yet the required concentration of oxygen required in the output is around 0.077mg/mL (almost x20) to get the concentration of oxygen at the output to be at an acceptable level. This is with Blood included as the Compound and Oxygen included as a separate Substance to allow for adjustability. These divergent values is causing large issues with the membrane diffusion model I am trying to implement.
Aaron, just wondering if it would be possible to perhaps have a video call to discuss the sort of issues that I am having with the ECMO component.
I am really interested in implementing a model which emulates the experience that a physician will have when applying ECMO to a patient and I think Pulse is the best way to emulate the physiology but the ECMO component included seems to cause the physiology to respond in unusual ways.
I am generally pretty free, what time zone are you in?
Do you have any scenarios you could send over?
You can modify this one to reproduce the issue you are seeing
This will help be get on page quickly
I’m based in Melbourne, Australia so AEST.
My current ECMO setup/configuration is done in a C# script as part of a Unity game so I haven’t got any complete scenarios on hand to send right away.
I have attached a screenshot of what the configuration looks like on the C# end. The O2 concentration value at line 92 is linked to the concentration of O2 at the input which in this case is the RightLegVasculature.
What I have found occurring is the O2 concentrations at both LegVasculatures drops significantly upon connection with these settings.
Send me an email, I will set something up for something around lunch for you
I will take a look and see what I can see