Skip to content

Coronary Netlists Guide

Components

In order to create a pulsatile model of coronary flow with custom elastance, the following components need to be created using the netlist editor:

  • Heart model

    • netlist_surfaces.dat
    • elastanceLV.dat
    • elastanceController.py
    • ventricularPressureObserver.py
  • Coronary model

    • netlist_surfaces.dat
    • ventricularPressureReceiver.py

Custom elastance is required when simulating flow in either the right or left coronary. If simulating the aortic root and entire coronary tree, the built-in LV Elastance controller can be used.

Method

Generate Elastance files

A custom elastance waveform (elastanceLV.dat) can be generated using lv_elastance_generator_two_hill.m. Adjust the scaling factor as needed to change the proportion of the cardiac output entering the coronaries.

Create Heart Model

  1. In the CRIMSON GUI, create a Netlist boundary condition.

    CRIMSON_GUI_add_Netlist

  2. On the right hand panel, select Heart Model: True and use the Select faces button to choose the correct inflow face.

    CRIMSON_GUI_Netlist_params

  3. Select Launch Editor to open the CRIMSON Boundary Condition Toolbox

  4. In the CRIMSON Boundary condition editor, click on File > New to open a blank workspace in the editor.

    1. Build the following circuit for the heart model by selecting the Components tab and double clicking the appropriate component to select it. Single click in the editor to place the component in the circuit. Right click to rotate the component. From right to left:

      1. 3D interface node
      2. AV inductor: Aortic Valve Inductance
      3. AV diode: Aortic Valve
      4. LV Volume-Tracking Pressure chamber: Left ventricle
      5. Prescribed Pressure Node
      6. MV inductor: Mitral valve inertance
      7. MV diode: Mitral valve
      8. LA Prescribed Pressure Node: Left atrial pressure

    Heart_model_components

  5. In the Properties tab, enter the following values for each component:

    1. Prescribed Pressure Node (LA)
      1. Prescribed Pressure: 665
    2. Prescribed Pressure Node (Zero-Pressure)
      1. Prescribed Pressure: 0
      2. Node control type: Custom Python script
      3. Additional input data filename: ventricularPressureObserver.py
    3. Inductor (AV)
      1. Parameter value: 1e-5
    4. Inductor (MV)
      1. Parameter value: 6e-5
    5. Diode (AV)
      1. Parameter value: 1e-5
    6. Diode (MV)
      1. Parameter value: 1.1e-5
    7. Volume-Tracking Pressure Chamber (LV)
      1. Parameter value: 0.0041 (elastance)
      2. Initial Volume: 100000 (mm3)
      3. Component control type: Custom Python script
      4. Additional Input data filename: elastanceController.py

    Parameters

  6. Click on the Assign Nodes button in the toolbar at the top of the screen. All the nodes should now be numbered. Take note of the node above the LV pressure chamber.

  7. Under Initial Node Pressures at the bottom of the Properties tab, assign the following pressures to the nodes on either side of the AV inductor:

    1. Initial Pressure at Node 1: 13332
    2. Initial Pressure at Node 2: 13332

    Note: Node numbering may not be the same as what is presented here. Double check that you are assigning values to nodes on either side of the AV inductor.

  8. Click on the Write Simulation Files button on the toolbar at the top of the screen. Select the folder to save the heart model files. This will generate netlist_surfaces.dat and the default versions of the component control python scripts.

  9. Close the Boundary Condition Toolbox and return to the CRIMSON GUI.

    1. In the Heart model netlist Boundary Condition window, select Circuit and upload the netlist_surfaces.dat file generated by the Boundary Condition Toolbox.
    2. Click on Data File and upload elastanceLV.dat from MATLAB.
    3. Click on Adjustment Scripts to upload elastanceController.py and ventricularPressureObserver.py

      1. Before uploading the python adjustment scripts, ensure that the following changes have been made:
    4. ventricularPressureObserver.py:

      Update __init__ to include self.controllerPriority and update self.heartPeriod to the desired length of one cardiac cycle in seconds:

    def __init__(self, baseNameOfThisScriptAndOfRelatedFlowOrPressureDatFile, MPIRank):
       abstractParameterController.__init__(self,baseNameOfThisScriptAndOfRelatedFlowOrPressureDatFile, MPIRank)
       self.periodicTime = 0.0 
       self.heartPeriod = 0.75
       self.time = 0.0
       self.controllerPriority = -2
    

    Add the following line to updateControl, after newValueOfTargetParameter:

    self.addBroadcastVariable("lvPressure", dictionaryOfPressuresByComponentIndex[3]) 
    # index should match node number above LV in heart model netlist xml
    
    • elastanceController.py

    Update __init__ to include

    self.controllerPriority = -3
    
    and ensure self.heartPeriod is consistent with ventricularPressureObserver.py.

The heart model is now complete.

Create Coronary Netlist Model

  1. As before, create a new Netlist boundary condition in the CRIMSON GUI. Select Heart Model = False and click on Select faces to choose the appropriate outlet faces.
  2. Open the CRIMSON Boundary Condition Toolbox by clicking on Launch Editor.
  3. Click on File > New to open a blank workspace. Double click on the circuit elements from the Components tab and single click to place them in the following circuit:

  4. In the Properties tab, enter the following values for each component:

    1. R1: Epicardial Vessel Resistance
      1. Parameter Value: 0.37
    2. R2: Intramyocardial Resistance
      1. Parameter Value: 0.37
    3. R3: Distal Intramyocardial Resistance
      1. Parameter Value: 1.92
    4. C1: Epicardial vessel compliance
      1. Parameter Value: 0.1
    5. C2: Intramyocardial vessel compliance
      1. Parameter Value: 0.8
    6. RA Pressure: Right atrial Pressure
      1. Prescribed Pressure 0
    7. LV Pressure: Left ventricular pressure
      1. Prescribed Pressure: 0
      2. Node Control Type: Custom Python Script
      3. Input Data Filename: ventricularPressureReceiver.py
    8. Zero Pressure
      1. Prescribed Pressure: 0
  5. Click on Assign nodes in the toolbar and set the initial pressures:

    1. Initial Pressure at Node 1 (closest to 3D interface): 13332
    2. Initial Pressure at Node 2 (between R1 and R2): 10000
    3. Initial Pressure at Node 3 (between R2 and R3): 13332

    Note: Node numbering may not be the same as what is presented here. Double check that you are assigning values to nodes in the correct location.

  6. Click on the Write Simulation Files button to create the netlist_surfaces.dat file for the coronary circuit.

  7. Returning to the CRIMSON GUI Netlist boundary condition editor, upload the following files:

    1. Select Circuit and upload the netlist_surfaces.dat file generated by the Boundary Condition Toolbox.
    2. Click on Adjustment Scripts to upload ventricularPressureReceiver.py

      1. Before uploading the python adjustment script, ensure that the following changes have been made:
      2. ventricularPressureReceiver.py:
      3. Replace newValueofTargetParameter with the following line:

      newValueOfTargetParameter = self.getRecievedBroadcastValue('ventricularPressureObserver', 'lvPressure')
      
      1. Update the __init__ function to have the same self.heartPeriod as ventricularPressureObserver.py from the heart model. Add self.controllerPriority = -1:

      def __init__(self, baseNameOfThisScriptAndOfRelatedFlowOrPressureDatFile, MPIRank):
          abstractParameterController.__init__(self,baseNameOfThisScriptAndOfRelatedFlowOrPressureDatFile, MPIRank)
          self.periodicTime = 0.0 
          self.heartPeriod = 0.75
          self.time = 0.0
          self.controllerPriority = -1