First time here? Checkout the FAQ!
x
0 votes
ago by (370 points)

Hi, I think I started overthinking something, so I need some clarification on how things are implemented in openCARP. I looked at example 07 on ECGs, documentation and some other questions in this forum, however I am still in doubts. Let's say I have the following simulations setups for an atria in a bath:

Bidomain/Pseudo-bidomain:

-num_imp_regions 1

-imp_region[0].name Atrium

-imp_region[0].im Courtemanche

-imp_region[0].num_IDs 1

-imp_region[0].ID[0] 1

-num_gregions 2

-gregion[0].name Bath

-gregion[0].g_bath 0.24725

-gregion[0].num_IDs 1

-gregion[0].ID[0] 0

-gregion[1].name Atria

-gregion[1].g_il 0.3333

-gregion[1].g_it 0.3333

-gregion[1].g_in 0.3333

-gregion[1].g_el 0.6666

-gregion[1].g_et 0.6666

-gregion[1].g_en 0.6666

-gregion[1].num_IDs 1

-gregion[1].ID[0] 1

-num_phys_regions 2

-phys_region[0].name Extracellular

-phys_region[0].ptype 1

-phys_region[0].num_IDs 2

-phys_region[0].ID[0] 0

-phys_region[0].ID[1] 1

-phys_region[1].name Intracellular

-phys_region[1].ptype 0

-phys_region[1].num_IDs 1

-phys_region[1].ID[0] 1

-phie_rec_ptf /home/jg23/ecg

-bidomain 2

Monodomain with IVC/Lead fields:

-num_imp_regions 1

-imp_region[0].name Atrium

-imp_region[0].im Courtemanche

-imp_region[0].num_IDs 1

-imp_region[0].ID[0] 1

-num_gregions 1

-gregion[0].name Atria

-gregion[0].g_il 0.3333

-gregion[0].g_it 0.3333

-gregion[0].g_in 0.3333

-gregion[0].g_el 0.6666

-gregion[0].g_et 0.6666

-gregion[0].g_en 0.6666

-gregion[0].num_IDs 1

-gregion[0].ID[0] 1

-phie_rec_ptf /home/jg23/ecg

-bidomain 0

My questions are:

1. For bidomain/pseudo-bidomain, how can I obtain Phie values to compute ECGs? In a previous question, Toni mentioned loading the phie.igb file and extracting the Phie values at the mesh point indices corresponding to the ECG electrodes locations, which can then be used to calculate ECGs.

2. Following up on question (1), if I include -phie_rec_ptf with ecg.pts in the bidomain/pseudo-bidomain simulation, as show in the example, it generates a phie_recovery.igb file. Can I use this phie_recovery.igb to calculate my bidomain ECGs, or not? The documentation states that phie_rec_ptf is used to recover Phie in monoodomain simulations, but example 07 includes it in bidomain cases, so I'm a bit confused.

3. Does the monodomain with IVC setup look correct or is there something missing? How can I configure the bath conductivity for IVC?

4. Do I need -phys_region for monodomain IVC?

Thanks,

Jakub

1 Answer

0 votes
ago by (8.5k points)
selected ago by
 
Best answer
Hi!

Specifying -phie_rec_ptf always activates the phie-recovery mechanism, which is independet from your Bi- or Monodomain reaction-diffusion modes. As such, you should get the same phie_recovery.igb, in peudo-bidomain and in monodomain mode (only bidomain might be slightly different due to a possible changed activation sequence due to bath loading effects etc.).

To calculate bidomain ECGs, you need to interpolate the volumetric data in phie.igb onto your ecg points. You can du this any way you like, two low-effort possibilities would be:

1) extract the mesh vertex indices closest to your ECG points with "meshtool query idxlist" and then extract traces at those indices with "igbextract".

2) define a geometry holding your ECG points, and use "meshtool interpolate nodedata" to interpolate the phie.igb onto that geometry.

Best, Aurel
ago by (370 points)
Hi Aurel,

Thanks for your answer. If I use monodomain and want to recover ECGs, how can I set the bath conductivity in code? (My questions 3 & 4). I only saw g_bath variable in documentation but would I need to set it in Atria gregion together with longitudinal and transverse conductivities?
ago by (370 points)
Also another thought. If I wanted to calculate pseudo-bidomain ECG, do I use the same approach as for bidomain? Also if I understand correctly, when I use phie_recovery.igb I am getting ECGs recovered with IVC/Lead Fields method, but when I use phie.igb then I get the actual pseudo-bidomain and bidomain ECGs?
ago by (8.5k points)
If you use monodomain and want to recover ECGs, you just set -phie_rec_ptf and you are done. You dont need to tune the IVC conductivity, since it only influences the ECG amplitude, which will not be realistic anyway (since you are using an IVC). If you are using phie-recovery, you are not caring about the amplitude, just about the dynamics of the signal.

Yes, provided that your extracellular domain covers your ECG locations, when using bidomain or pseudo-bidomain you can interpolate from the phie.igb file onto your ECG points. There is no point in using phie-recovery when using anything other than monodomain, since you are already computing the extracellular field.
ago by (370 points)
All clear now! Thank you Aurel!
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...