First time here? Checkout the FAQ!
x
0 votes
by (120 points)
Hi,

I was wondering if there is a way to use epicardial potentials calculated with a bidomain model as a kind of dirichlet boundary condition to compute potentials at the torso surface? I have calculated the potentials with the torso as bath surrounding, however I am willing to compute it in a uncoupled way, which means that there is a no flux boundary condition on the extracellular heart part as well instead of the perfect transmission between torso and heart.

I have tried to do it with "stimulus[0].stimtype = 10", however when using this stimtype it seems that I cannot define the specific nodes to prescribe the potential on by using the vtx_file.

I also tried "stimulus[0].stimtype =2" and using "stimulus[0].vtx_file", however when using this in combination with the La Place solver it had to be calculated with a vertex adjustment file per time step. Thereby, I thought of using the stimtype 2 with a predefined pulse file (trc), however the pulse shape is different for each node on the epicardial surface.

Is there another way to compute the uncoupled problem, either by assigning the stimulus differently than I described above, or by defining a no-flux boundary on heart-torso surface instead of the automatic assigned perfect transmission?

2 Answers

0 votes
by (8.0k points)
Hi!

What you need is a heterogenous Dirichlet boundary condition. There is no implementation for this in openCARP, but this would be a nice thing to add. We will have a look at it.

Best, Aurel
by (120 points)
Thanks for the quick response! Is there any possibility that the heterogenous boundary condition was already implemented in CARPentry?
0 votes
by (8.0k points)
Hi!

Sorry for the confusion! I had a look at the source code, and it turns out that I have already implemented heterogenous Dirichlet BCs in openCARP. I just had forgotten about it!

Here is an example of a setup using this type of BC:

stim[0].name = stim
stim[0].crct.type = 2
stim[0].pulse.strength = 10000
stim[0].elec.vtx_file    = dbc_het_200.vtx
stim[0].elec.vtx_fcn     = 1
stim[0].ptcl.start = 0
stim[0].ptcl.duration = 10

stim[1].name = ground
stim[1].crct.type   = 3
stim[1].elec.geomID = 100

The key ingredients are:

stim[0].elec.vtx_file    = dbc_het_200.vtx
stim[0].elec.vtx_fcn     = 1

vtx_fcn = 1 turns on the heterogenous BC. The .vtx file now has to consist of vertex-value pairs instead of plain vertices. Everything else stays the same. Here is an example:

5
extra
514 0.999034
515 0.999058
516 0.600000
517 0.600000
518 1.000000

The values are interpreted as scaling factors w.r.t. stim[].pulse.strength. As such, you need to normalize your epicardial potential distribution.

Hope that helps, Aurel
by (120 points)
I have found this indeed, but does this mean that you have to calculate it separately for each timestep or can the .vtx file include multiple columns one for each time step?
by (8.0k points)
Hi!

The assumption is a fixed potential distribution. It is not just the file format, but the overall stimulus implementation, that does not allow for time-dependent potential distributions.

You could try a list of many stimuli, one stimulus per epicardial potential distribution. I am not sure how efficiently this is handled, as hundreds or thousands of stimuli is not exactly what we had in mind when designing the stimulus code.

Best, Aurel
by (120 points)
Okay thanks for the help!
by (200 points)
edited by
Since this answer was linked in another question (https://opencarp.org/q2a/830/how-define-stimulus-through-vtx-file-22_simple-experiment?show=830#q830), I would like to point out that the option

stim[0].crct.type = 2

is really crucial for the stimulus definition from a .vtx-file to work. Without this option, I got the error:

"Specified vertices are not in stimulus domain! Aborting!"

It took me a while to figure out what this error was referring to. There is no reference to "stimulus domain" in the documentation. It would be nice to have more informative error messages, e.g., stating what the missing or erroneous parameter could be.

Thanks in advance for considering!

EDIT: in the end I could make it work with stim[0].crct.type = 0. It is unclear to me what is the mechanism behind this.
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
...