SimVascular / SimVascular/svOneDSolver
Bug report: reference geometry inconsistency (area-based vs radius-based linear interpolation)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 22
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Description
The reference geometry $A_0(z)$ used in the 1D solver is defined as a linear interpolation of the inlet and outlet areas (line 1341 in cvOneDBFSolver.cxx).
However, in the material model classes (e.g. cvOneDMaterialOlufsen.cxx), the reference radius $r_0(z)$ is computed as a linear interpolation of the inlet and outlet radii (line 158).
These two approaches are clearly mathematically inconsistent, since interpolating areas and then taking a square root $\quad r_0(z) = \sqrt{A_0(z) / \pi}$ is not equivalent to interpolating radii.
This inconsistency leads to a mismatch in the initial geometry and becomes visible when looking at the pressure at $t = 0$. The attached plot ( $p(z,0)$ along the centerline of a coronary artery) highlights the problem.
Proposed fix:
- Either update line 1341 in
cvOneDBFSolver.cxxto interpolate radii instead of areas (and compute $A_0$ from them), - or update the material classes to interpolate areas instead of radii.
bug_RCA-A18-B17_pressure_along_centerline.pdf
Reproduction
Run a 1D simulation over any vessel geometry, selecting for the material model $p_0 = 0$ and look at the pressure at time $t=0$ along the geometry itself. This will not be zero, but rather follow a parabolic profile over each segment.
Environment info
OS: Ubuntu 22.04
Skyline solver
commit: https://github.com/SimVascular/svOneDSolver/commit/66b31b4221b8dc9c04a767ed48e6a5367f63a499
Expected behavior
The pressure at the initial time, when imposing e.g. $p_0 = 0$, must be equal to $p_0$ (0 in this example).
Additional context
When the parameters of the material model are changed to make the vessel quasi-rigid, the effect of this bug becomes more evident.
Code of Conduct
- I agree to follow this project's Code of Conduct and Contributing Guidelines
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the reference-geometry interpolation at line 1341 in cvOneDBFSolver.cxx with the radius interpolation at line 158 in cvOneDMaterialOlufsen.cxx and the other material classes. Run a 1D simulation on a vessel geometry with p₀ = 0 and inspect pressure at t = 0. Done means the geometry is handled consistently and the initial pressure remains equal to p₀ along the vessel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100