Pressure Flow Control

The model VanOsta2024 comes with the Pressure Flow Control (PFC) module.

import circadapt
import matplotlib.pyplot as plt
import numpy as np

from circadapt import VanOsta2024
model = VanOsta2024()

model.run(stable = True)

model['Solver']['store_beats'] = 10
model.run(10)

# plot
fig = plt.figure(figsize=(15,3))
plt.plot(model['Solver']['t']*1e3, model['Cavity']['p'][:, ['cLv', 'SyArt']]/133)
plt.xlabel('Time [ms]')
plt.ylabel('Pressure [mmHg]')
fig
../../../_images/5b8c549ee29f48c8df40ad4f3358bedd271bbb17d77354e4d58121727a3fe209.png ../../../_images/5b8c549ee29f48c8df40ad4f3358bedd271bbb17d77354e4d58121727a3fe209.png

By default, it is turned on to control cardiac output and mean arterial pressure.

model1 = VanOsta2024()
model1.run(stable = True)
model1['Solver']['store_beats'] = 10
model1['PFC']['p0'] = 15000
model1.run(10)

# plot
fig = plt.figure(figsize=(15,3))
plt.plot(model['Solver']['t']*1e3, model['Cavity']['p'][:, ['cLv', 'SyArt']]/133, c=[0.8, 0.8, 0.8])
plt.plot(model1['Solver']['t']*1e3, model1['Cavity']['p'][:, ['cLv', 'SyArt']]/133)
plt.xlabel('Time [ms]')
plt.ylabel('Pressure [mmHg]')
fig
../../../_images/14d3bf54f933b7479cd3199fbc765581a9aee97c58f0f7bef7bda468ea5c56d4.png ../../../_images/14d3bf54f933b7479cd3199fbc765581a9aee97c58f0f7bef7bda468ea5c56d4.png

Pressure Flow Control off

You can turn pressure flow control off.

model2 = VanOsta2024()
model2.run(stable = True)
model2['Solver']['store_beats'] = 10
model2['PFC']['is_active'] = False
model2['Patch']['Sf_act'] *= 0.5
model2['Patch']['k1'] *= 1.2
model2.run(9)

# plot
fig = plt.figure(figsize=(15,3))
plt.plot(model['Solver']['t']*1e3, model['Cavity']['p'][:, ['cLv', 'SyArt']]/133, c=[0.8, 0.8, 0.8])
plt.plot(model2['Solver']['t']*1e3, model2['Cavity']['p'][:, ['cLv', 'SyArt']]/133)
plt.xlabel('Time [ms]')
plt.ylabel('Pressure [mmHg]')
fig
../../../_images/155c48eff98c2ceb33c9b3b6f2f7aef75b10cb36b3987307d11b7a32133f9ee7.png ../../../_images/155c48eff98c2ceb33c9b3b6f2f7aef75b10cb36b3987307d11b7a32133f9ee7.png

Volume control

The total blood volume can be a model input parameter.

model3 = VanOsta2024()
model3.run(stable = True)
model3['Solver']['store_beats'] = 10
model3['PFC']['is_volume_control'] = True
model3['PFC']['target_volume'] = 0.001

model3.run(9)

# plot
fig = plt.figure(figsize=(15,3))
plt.plot(model['Solver']['t']*1e3, model['Cavity']['p'][:, ['cLv', 'SyArt']]/133, c=[0.8, 0.8, 0.8])
plt.plot(model3['Solver']['t']*1e3, model3['Cavity']['p'][:, ['cLv', 'SyArt']]/133)
plt.xlabel('Time [ms]')
plt.ylabel('Pressure [mmHg]')
fig
../../../_images/ddb69ceacf15735baaa1561d7c19d595724518bbc21c1edf58f7305a3deba4d0.png ../../../_images/ddb69ceacf15735baaa1561d7c19d595724518bbc21c1edf58f7305a3deba4d0.png