SimVascular / SimVascular/svMultiPhysics

Object oriented refactor of active stress with optional spatially varying parameters

Open
#519 5 comments 0 reactions 1 assignee View on GitHub

@dseyler is already working on this.

Since Mar 18, 2026.

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

Description

Problem

The current active stress implementation is embedded inside inside mat_models.cpp where directional stress distribution and EP coupling are all mixed into the constitutive update flow. As discussed in a few other issues, it would be nice to expand the active stress implementation to allow more flexibility, i.e spatially varying stress distributions, magnitude, and temporal delay, but this would be unmanageable in the current procedural code.

@zasexton Let me know if you have any insights on how best to do this.

Solution

I propose refactoring active stress handling into an object-oriented module/class (active_stress.h /.cpp) that provides an interface for spatially varying element-wise parameter lookup, similar to @aabrown100-git's implementation of spatially varying robin BCs. In the proposed solution, compute_pk2cc will request parameters from a spatial field object and apply them instead of directly reading global values. This will keep future additions to active stress contained in its own file, separate from the constitutive math.

Element-wise parameters can be supplied in a VTU path under <Fiber_reinforcement_stress>. I think it makes the most sense to have a single VTU contain all of the spatially varying active stress fields, and those that are not supplied in the VTU will be assigned default values.

Example:

Fiber_reinforcement_stress type="Unsteady">
  <Temporal_values_file_path> LV_stress.dat </Temporal_values_file_path>
  <Spatial_values_file_path> eta.vtu </Spatial_values_file_path>
</Fiber_reinforcement_stress>

I drafted an implementation for this feature with spatially varying directional active stress distributions in this branch.

Let me know if anyone else would find this useful or if there are any other features that folks would like included for active stress. My current list is:

  • spatially varying directional distribtuion (eta_f, eta_s, eta_n)
  • spatially varying stress magnitude
  • spatially varying temporal delay (i.e. one way coupling) @javijv4 Maybe this could be combined with the eikonal equation solver you suggested.
  • active stress "fiber" direction independent from constitutive "fiber" direction
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.