Closed mrp089 closed 2 years ago
I don't think the stenosis model is correctly linearized. It (and other loss models) modifies the N
, which is a constant for Poiseuille flow. For the stenosis model, however, N
depends on the solution. Thus, it should add a linearization term when finding the root of the nonlinear system.
More general problem, see #81.
I discovered a bug that was introduced when re-adding the loss models in #76.
For stenosis losses, the upstream segment is explicitly set in the input file. This requires calling functions that set the upstream information, which I forgot to re-add. With those functions missing, the upstream segment of the stenosis was undefined and randomly set to the inlet segment (which worked out fine for our stenosis test case).
This usually caused the stenosis to be way more severe than intended, which on the other hand caused the solver to crash in most cases (even when using the FD tangent as in #81).
Fix: dig through old commits that removed the loss models and add the missing functions back in.
Stenosis modeling was removed from svOneDSolver doing cleanup following 113f9d1. Stenosis modeling should be reintroduced and tested in a test case.