Skip to content

Add Impedance boundary condition#235

Open
ncdorn wants to merge 24 commits into
SimVascular:masterfrom
ncdorn:impedance-bc
Open

Add Impedance boundary condition#235
ncdorn wants to merge 24 commits into
SimVascular:masterfrom
ncdorn:impedance-bc

Conversation

@ncdorn

@ncdorn ncdorn commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Current situation

This branch adds support for an IMPEDANCE outlet boundary condition based on an Olufsen et al. (1999) time-domain convolution. The need for this BC is to represent the frequency-dependent downstream response of a structured tree, including wave reflection and distributed vascular memory, which cannot be captured well by a simple resistance or RCR model.

The implementation treats outlet pressure as

P = Pd + z0 * Q + sum(z[m] * Q_lag[m])

where z is a one-cycle discrete impedance kernel and the lagged flow terms come from accepted solution history. To make that work in svZeroDSolver, the solver needed explicit support for boundary-condition memory that persists across accepted time steps, can be restored for coupled trial steps, and stays consistent with the configured cardiac-period discretization.

Release Notes

Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.

  • Added a new IMPEDANCE boundary condition for structured-tree style outlet loading using a periodic discrete convolution kernel.
  • Added support for bc_values.z, optional Pd, and convolution controls via convolution_mode = exact|truncated and num_kernel_terms.
  • Added solver/model hooks for persistent per-block state so convolution history is only advanced on accepted time steps.
  • Added coupling-safe rollback/commit behavior in the interface so repeated trial solves start from the same accepted impedance history.
  • Added validation that the impedance kernel length matches one cardiac cycle in time steps and that coupled runs use the required time-step layout.
  • Added regression and interface tests covering the new BC and its persistent-memory behavior.

Documentation

Documentation is included in the README with:

  • the IMPEDANCE BC definition,
  • required and optional JSON fields,
  • timing/discretization requirements,
  • coupled vs non-coupled setup expectations,
  • the runtime implication of truncated convolution.

Testing

Coverage added in this branch includes:

  • a new solver regression case: tests/cases/pulsatileFlow_R_impedance.json with reference output,
  • interface test coverage for trial/accept semantics and persistent-state commits for IMPEDANCE,
  • updates to the Python solver test list so the new case runs with the standard regression suite.

Code of Conduct & Contributing Guidelines

@ncdorn ncdorn requested a review from mrp089 June 17, 2026 20:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants