Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interface to an LPN solver to define BCs #116

Open
ktbolt opened this issue Aug 4, 2022 · 1 comment
Open

Add interface to an LPN solver to define BCs #116

ktbolt opened this issue Aug 4, 2022 · 1 comment
Assignees

Comments

@ktbolt
Copy link
Contributor

ktbolt commented Aug 4, 2022

The solver currently uses the General Boundary Conditions (GenBC) framework to define custom inlet and outlet boundary conditions for a simulation using a lumped parameter network (LPN).

The GenBC framework is implemented as an external executable Fortran program called by the SimVascular flow solver svSolver. The executable is called by svSolver during execution to provide values for custom boundary conditions. The GenBC framework has a couple of disadvantages

  • The LPN must be coded in Fortran
  • It is extremely slow to execute an external program and read its results from a file

A better solution is to create an interface to an LPN solver that can load the LPN solver as a shared library and directly call its functions to return the BC values at a given time step.

@ktbolt ktbolt self-assigned this Aug 4, 2022
@ktbolt
Copy link
Contributor Author

ktbolt commented Aug 16, 2022

I've modified the C++ svZeroDSolver code to build a shared library that can be loaded programatically. https://github.com/ktbolt/svZeroDSolver/tree/convert_cpp.

I've added a test for calling the LPN interface from Fortran. https://github.com/ktbolt/cardiovascular/tree/master/lpn-solver-interface/fortran

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

No branches or pull requests

1 participant