# How do you create an irregular heartrate in the engine?

**URL:** https://discourse.kitware.com/t/how-do-you-create-an-irregular-heartrate-in-the-engine/754
**Category:** Pulse Physiology Engine
**Created:** [January 5, 2022, 3:35pm UTC](https://discourse.kitware.com/t/how-do-you-create-an-irregular-heartrate-in-the-engine/754 "2022-01-05T15:35:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kylegts](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/k/97f17d/32.png) [@kylegts](https://discourse.kitware.com/u/kylegts)
#### Post date: [January 5, 2022, 3:35pm UTC](https://discourse.kitware.com/t/how-do-you-create-an-irregular-heartrate-in-the-engine/754/1 "2022-01-05T15:35:55Z")

</div>

I need an irregular heartrate for a simulation I am running but it does not seem to have an option to create one?? Any help?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [January 5, 2022, 3:58pm UTC](https://discourse.kitware.com/t/how-do-you-create-an-irregular-heartrate-in-the-engine/754/2 "2022-01-05T15:58:41Z")

</div>

What kind of arrhythmia are you looking for?  
We have just put in (and are still cleaning up) these heart rhythms

```auto
enum eHeartRhythm
{
  NormalSinus = 0; /**<< @brief Normal electical signal and mechanical function. */ 
  SinusBradycardia = 1; /**<< @brief Normal electical signal with reduced heart rate. */
  SinusTachycardia = 2; /**<< @brief Normal electical signal and increased heart rate. */
  Asystole = 3; /**<< @brief No electrical signal or mechanical function. */
  CoarseVentricularFibrillation = 4; /**<< @brief No organized electrical signal, no mechanical function. */
  FineVentricularFibrillation = 5; /**<< @brief No organized electrical signal, reduced amplitude compared to coarse VF, no mechanical function. */
  PulselessElectricalActivity = 6; /**<< @brief Electical signal, but no mechanical function. */
  PulselessVentricularTachycardia = 7; /**<< @brief Normal electical signal with reduced amplitude, but no mechanical function. */
  StableVentricularTachycardia = 8; /**<< @brief Ventricular tachycardia electrical signal with increased heart rate. */
  UnstableVentricularTachycardia = 9; /**<< @brief Ventricular tachycardia electrical signal with increased heart rate, reduced heart elastance. */
}

```

Here is an example of using these:  
[https://gitlab.kitware.com/physiology/engine/-/blob/feature/arrhythmia/src/cpp/howto/HowTo-Arrhythmia.cpp](https://gitlab.kitware.com/physiology/engine/-/blob/feature/arrhythmia/src/cpp/howto/HowTo-Arrhythmia.cpp)

---

<div class="post-metadata">

### Author: ![jeanf](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/j/b19c9b/32.png) [@jeanf](https://discourse.kitware.com/u/jeanf)
#### Post date: [February 24, 2022, 2:09pm UTC](https://discourse.kitware.com/t/how-do-you-create-an-irregular-heartrate-in-the-engine/754/3 "2022-02-24T14:09:39Z")

</div>

the example link is no longer valid.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [February 24, 2022, 3:02pm UTC](https://discourse.kitware.com/t/how-do-you-create-an-irregular-heartrate-in-the-engine/754/4 "2022-02-24T15:02:21Z")

</div>

We have merged that branch into our 4.x branch

You can see it here now  
[https://gitlab.kitware.com/physiology/engine/-/blob/4.x/src/cpp/howto/HowTo-Arrhythmia.cpp](https://gitlab.kitware.com/physiology/engine/-/blob/4.x/src/cpp/howto/HowTo-Arrhythmia.cpp)

You can also experiment with arrhythmia in the explorer  
[https://gitlab.kitware.com/physiology/explorer/-/wikis/home](https://gitlab.kitware.com/physiology/explorer/-/wikis/home)

Load a State (ex. StandardMale@0s.json)  
Start the engine  
Add an arrhythmia action  
Check out the response!
