openBF.jl

openBF is a computational library written in Julia for blood flow simulations in straight elastic arteries. Navier-Stokes equations are reduced to 1D form and solved along the longitudinal direction. Numerical solution is achieved via a first-order finite volume solver based on the Godunov’ method. For an usage example refer to main.jl file and its documentation.

module openBF


Import external library


ProgressMeter provides a simple implementation of a loading bar to be shown while running the solution.

using ProgressMeter


Import openBF’ files


OpenBF’ own types are contained in BTypes.jl where data structures for vessels, blood, and numerical scheme are specified.

using  BTypes


Data structures and output files are initialised at the beginning of each simulation. initialise.jl contains all the functions needed to read model description and the global settings.

include("initialise.jl")


Inlet and outlets boundary conditions are applied at each time step, and vessels extremity nodes are updated with functions defined in boundary_conditions.jl.

include("boundary_conditions.jl")


Interface problems (junctions and bifurcations) are solved via the method of characteristics. The function in junctions.jl discriminates between conjunctions, anastomosis, and bifurcations, and calls the appropriate solver.

include("junctions.jl")
include("conjunctions.jl")
include("bifurcations.jl")
include("anastomosis.jl")


godunov.jl contains Godunov’ method functions.

include("godunov.jl")


MUSCL.jl is where the MUSCL method is implemented.

include("MUSCL.jl")


Conversions from pressure to cross-sectional area (and vice versa), or from cross-sectional area to wave speed (and vice versa) are handled by functions in converter.jl; Riemann invariants are computed in the same location as well.

include("converter.jl")


Input and output writing functions are stored defined in IOutils.jl.

include("IOutils.jl")


Convergence check functions are all defined in check_convergence.jl.

include("check_convergence.jl")

end