SimVascular / SimVascular/svMultiPhysics

Implement multipoint constraint for EP simulations

Open
#499 6 comments 0 reactions 1 assignee View on GitHub

@javijv4 is already working on this.

Since Jan 31, 2026.

enhancement future development
Dominant language
C++
Stars
45
Forks
60
Avg merge
5d 23h
Merged PRs (30d)
11

Description

Problem

Description

For EP simulations that couple 3D and 1D simulations, the current approach is to use a projection that uses <End_nodes_face_file_path>. This works by assigning the closest 3D degree of freedom to the end node of the 1D mesh, effectively changing the problem's geometry. For example, the first image below shows the original 1D mesh (images taken from #474) and the second shows the mesh that svMultiPhysics is using to solve the problem (white is the 1D Purkinje mesh).

Image Image

Reproduction Steps

See the MWE mwe.zip or the test in tests/cases/cep/cylinder_purkinje_1d3d

Expected Behavior

Ideally, we would solve without the need to change the 1D mesh, making the simulations more robust to changes in mesh resolution. One approach to do so is using linear Multi-Point Constraints (MPC), see here.

Solution

MPC works by constraining the DOFs of the 3D element that contains the 1D node to match the value at the position where the 1D node is. So, for a 3D element that contains a 1D node, we want,

$$\sum_{a=1}^{n_{nodes}^{3D}} N_a(x_{1D})^{3D} \phi_a^{3D} = \phi^{1D}(x_{1D})$$

where $N_a$ are the 3D surface basis functions, $\phi_a^{3D}$ are the nodal values of the 3D element, and $\phi^{1D}$ are the nodal values of the node to be constrained.

MPC matrix implementation

For an uncoupled 3D-1D simulation, at each time step, and at each Newton iteration, svMultiphysics solves,

Image

We can augment that system to introduce the constraint through a Lagrange multiplier,

Image

To avoid modifying the system matrix in the main solve loop, the MPC constraints can be imposed after the system matrix is assembled by solving for $\lambda$,

Image Image

and modifying the RHS,

Image

Implementation

To implement this, we'll need to

  1. Create a function to read the MPC nodes and find the 3D element that contains each node.
  2. Create a function that, after the regular assembly, modifies the RHS based on the equations above.
  3. Deal with parallelization issues.
Additional context

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct and Contributing Guidelines

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.