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

Interfacing to external codes broke in recent pull request #101

Closed menon-karthik closed 8 months ago

menon-karthik commented 8 months ago

Description

PR #78 broke the interfacing with svFSI/svSolver because external coupling blocks were being treated as periodic. This happened because the periodic field in the JSON file was not being passed to generate_block in src/solve/SimulationParameters.cpp

Reproduction

I have added tests/test_interface/test_03 that now tests the interface for multiple consecutive time steps of a hypothetical 3D solver. This test allows a user to reproduce the bug if it exists (i.e. the test will fail).

Expected behavior

The periodic option in the JSON makes sure external_coupling_blocks are not periodic. This is required when interfacing with a 3D solver because each 0D simulation is one time-step of the 3D solver, not one cardiac cycle.

Additional context

No response

Code of Conduct