SvFSI
A multi-physics finite element solver for patient-specific blood flow simulation including fluid-structure interaction and cardiac electrophysiology
Install / Use
/learn @SimVascular/SvFSIREADME
Introduction
svFSI is a multi-physics finite element solver designed for computational modeling of the cardiovascular system. It is a major component of the ongoing SimVascular SimCardio project that aims to provide the complete pipeline for cardiac modeling, from image segmentation to computational modeling.
Some of the unique capabilities of svFSI include modeling cardiac electrophysiology, biological tissue mechanics, blood flow, and large deformation fluid-structure interaction (FSI). svFSI also offers a wide choice of boundary conditions for performing patient-specific modeling of cardiovascular biomechanics. The code is parallelized using message-passing-interface (MPI) and offers multiple options to choose a linear solver and preconditioner. svFSI can be used as part of the SimVascular software or can be used as a stand-alone solver. It is distributed under a MIT-like open source license.
Binary and Container
Precompiled binaries for Ubuntu and MacOS are available for download from SimTK.
Instructions to build and run svFSI in Docker container are provided here.
Dependence
The following packages are required to build and use svFSI.
- cmake
- cmake-curses-gui
- cmake-gui
- gcc (version>=4.8.5) with gfortran
- openmpi or mpich
- blas & lapack
- trilinos (optional)
On Ubuntu, most of the dependencies can be installed using apt install. On macOS, the dependencies may be installed using brew. Apart from GNU compilers, svFSI can also be built with Intel oneAPI Toolkits. For more details, please refer to INSTALL.md and INSTALL-DEPS.md.
Quick Build from Source
Users are recommended to build from the source code to access the most recent features and bug fixes. Instructions for a quick build are provided here for a Linux/Mac OS system.
-
Clone or download the current repository.
-
Create a
builddirectorycd svFSI && mkdir build && cd build -
Initiate the CMake terminal interface to generate makefiles.
ccmake .. -
This will automatically search for compilers. Follow instructions if necessary. Press “c” to configure repeatedly until CMake parameters no longer change and CMake presents the option “g” to generate. Press “g” to create makefiles and exit. Run
makein the build directory:makeA successful build will generate a solver binary called
svFSIin the following directorybuild/svFSI-build/bin.For more advanced users, please refer
INSTALL.mdfor detailed platform-specific instructions to installsvFSI.
Build With Trilinos
svFSI also supports compilation with Trilinos. Users can build Trilinos locally following its online documentation.
The recommended Trilinos third-party libraries (TPLs) include Boost, BLAS, HDF5, HYPRE, LAPACK, MPI, and MUMPS. The required Trilinos packages are Amesos, AztecOO, Epetra, EpetraEXT, Ifpack, ML, MueLU, ROL, Sacado, Teuchos, and Zoltan.
To enable Trilinos in svFSI, users need to turn on the option SV_USE_TRILINOS located in the file Code/CMake/SimVascularOptions.cmake as,
option(SV_USE_TRILINOS "Use Trilinos Library with svFSI" ON)
In most cases, users can proceed to build svFSI following the Quick Build, and CMake should be able to locate Trilinos automatically through find_package. In case the automatic way fails, users can also specify the path to Trilinos through ccmake -DCMAKE_PREFIX_PATH:PATH="<Path_to_Trilinos>/lib/cmake/Trilinos;<Path_to_any_other_package>;".
For more detailed instructions, please refer to INSTALL.md.
Run Simulation
svFSI requires a plain-text input file to specify simulation parameters. The syntax of the input file can be found here.
A master template is provided in the current repository, svFSI_master.inp. Users are also recommended to go through the input files in the examples and modify them for their needs.
An MPI-based run can be initiated through
mpiexec -np <number of MPI processes> <Path to Build>/svFSI-build/bin/svFSI <Path to input file>
Features
svFSI provides the capability to model a variety of physics including unsteady diffusion, linear and nonlinear elastodynamics, convective heat transfer, fluid flows, fluid-structure-interaction (FSI), and cardiac electrophysiology. As the code is modular, the users are provided with a choice to couple these physics depending on their needs. We strongly recommend users to browse through the examples provided in the GitHub repository svFSI-Tests to get a detailed insight into the capability of the code. Also, most of the examples contain established simulation results, which users can use to verify the functionality of svFSI. Here is a list of the main features of svFSI.
| Physics Solved | Documentation/Tutorial | Examples | |-------------------|--------------------------|------------| | Fluid | Webpage | pipe flow with RCR BC;<br>dye transportation;<br>GenBC/cplBC;<br>Non-Newtonian flow | | Structure | Webpage; YouTube | struct:<br>block compression;<br>passive inflation of LV model<br>ustruct:<br>block compression;<br>tension of arterial strip;<br>active inflation of LV model | | Electrophysiology | Webpage; YouTube | Aliev-Panfilov model; <br>ten-Tusscher-Panfilov model; <br>Bueno-Orovio-Cherry-Fenton model; <br>Purkinje network | | FSI | Webpage; YouTube | ALE:<br>2D heart valve; <br>2D flag behind a block; <br>pressure pulse inside aorta<br>CMM:<br>pipe flow with RCR BC;<br>vein graft |
Below, we provide a list of the available choice of constitutive models for different types of equations being solved. Users are also encouraged to implement new constitutive models. Users may use global search tools such as grep to locate the implementations of the available constitutive models in the code using the abbreviated names below.
Abbreviation refers to the variable name in the source code; Full name refers to the generic name of the model; Input keyword refers to the phrase in the input file that can invoke such model.
- Available isochoric constitutive models for the structure equation | Abbreviation | Full name | Input keyword | | -------------- | ---------------------------------- | ------------------------------------------------------- | | stIso_stVK | Saint Venant-Kirchhoff | "stVK", "stVenantKirchhoff" | | stIso_mStVK | modified Saint Venant-Kirchhoff | "m-stVK", "modified-stVK", "modified-stVenantKirchhoff" | | stIso_nHook | Neo-Hookean model | "nHK", "nHK91", "neoHookean", "neoHookeanSimo91" | | stIso_MR | Mooney-Rivlin mod
Related Skills
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
40PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
