SimVascular / svZeroDSolver

A C++ lumped-parameter solver for blood flow and pressure in hemodynamic networks
https://simvascular.github.io/documentation/rom_simulation.html#0d-solver
Other
7 stars 18 forks source link

Input files generated from API use "internal_junction" instead of "NORMAL_JUNCTION" #106

Open natalia-rubio opened 8 months ago

natalia-rubio commented 8 months ago

Description

Input files generated from API have "internal_junction"s instead of "NORMAL_JUNCTION"s. "internal_junction" doesn't seem to be used anymore in the solver. The solver returns the following error when provided an input file with an "internal_junction":

_RuntimeError: Invalid block type internaljunction

If one replaces all instances of "internal_junction" with "NORMAL_JUNCTION", the solver runs fine.

Reproduction

Generate an input file with this code, and attempt to run it with the 0D solver:

https://github.com/SimVascular/SimVascular-Tests/blob/master/new-api-tests/simulation/reduced-order-modeling/simulation.py

Expected behavior

Input files generated with this code should run in the 0D solver.

Additional context

No response

Code of Conduct

menon-karthik commented 8 months ago

Adding what we discussed yesterday: This might be caused by using an older version of the simvascular API to create the 0D input files. @natalia-rubio please confirm when you get a chance.

If that does not fix this, maybe this issue should be moved to SimVascular because it is related to the API creating the wrong input files, not the 0D solver itself.

mrp089 commented 8 months ago

This should have been fixed. However, I'm not sure what our plans are with a new release. @natalia-rubio, can you build SimVascular from source and check if it works?

The only way to avoid discrepancies between SimVacsular and svZeroDSolver (which are guaranteed to happen again) is to add continuous integration to SimVacsular via its Python API.