1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
6+ < title > svVascularize Quickstart</ title >
7+ < link href ="https://fonts.googleapis.com/css?family=Montserrat:400,700 " rel ="stylesheet " />
8+ < link rel ="stylesheet " href ="style.css " />
9+ </ head >
10+ < body >
11+ < header class ="topnav ">
12+ < div class ="container ">
13+ < h1 > < a href ="index.html "> svVascularize</ a > </ h1 >
14+ < nav >
15+ < a href ="index.html#about "> About</ a >
16+ < a href ="install.html "> Installation</ a >
17+ < a href ="doc.html "> Documentation</ a >
18+ < a href ="index.html#simulation "> Simulation</ a >
19+ < a href ="https://pypi.org/project/svv/ " target ="_blank " rel ="noopener "> PyPI</ a >
20+ < a href ="https://github.com/SimVascular/svVascularize " target ="_blank " rel ="noopener "> GitHub</ a >
21+ </ nav >
22+ </ div >
23+ </ header >
24+
25+ < main class ="container content ">
26+ < h2 > End-to-End Pipeline for 3D CFD Simulations</ h2 >
27+ < p > Generating a watertight, simulation-ready finite element mesh for computational fluid dynamics is a challenging
28+ multi-step problem. For typical workflows modeling bloodflow from clinical imaging data, this process involves
29+ pathline generation, segmentation, solid surface creation, volume mesh generation, mesh optimization/smoothing,
30+ and boundary identification. The pathline and segmentation steps are dependent upon available image data, thus
31+ these steps are very different for synthetically generated vascular structures which inheriently lack imaging
32+ data. The remaining steps are somewhat the same except that the workflow employed with
33+ < code > svVascularize</ code > is automated since the number of vessels may quickly exceed practical manual
34+ efforts for model and mesh creation. These automated steps are all part of the < code > Simulation</ code > class
35+ which can be used to wrap around synthetic vascular objects in order to build simulation files. We will
36+ demonstrate the basic API below for a simple vascular tree. </ p >
37+ < pre data-copy > < code class ="language-python "> import pyvista as pv
38+ from svv.domain.domain import Domain
39+ from svv.tree.tree import Tree
40+ from svv.simulation.simulation import Simulation
41+
42+ cube = Domain(pv.Cube())
43+ cube.create()
44+ cube.solve()
45+ cube.build()
46+
47+ t = Tree()
48+ t.set_domain(cube)
49+ t.set_root()
50+ t.n_add(2)</ code > </ pre >
51+ < p > Now that we have a simple tree we can start building simulations from this object. </ p >
52+ < pre data-copy > < code class ="language-python "> # Create Simulation Container for Synthetic Tree Object
53+ sim = Simulation(t)
54+
55+ # Build All Surface/Volume Meshes for 3D CFD Simulation
56+ sim.build_meshes()</ code > </ pre >
57+ < p > This method will produce unioned surface < code > .vtp</ code > meshes and their cooresponding volume meshes < code > .vtu</ code >
58+ representing the synthetic vascular object. Additionally, the procedure will attempt to append boundary layer meshes
59+ along the walls vessels, typical in many hemodynamic studies to account for the steep velocity gradients near vessel
60+ walls. If successful, the surfaces meshes will be stored within the simulation container list
61+ < code > simulation.fluid_domain_surface_meshes</ code > , volume meshes will be stored within the container
62+ < code > simulation.fluid_domain_volume_meshes</ code > , and boundary layers will be stored within the container
63+ < code > simulation.fluid_domain_boundary_layers</ code > . Storing the meshes as python objects allows for more custom
64+ modification procedures that users may want to implement prior to creating the simulation files.
65+ </ p >
66+ < div class ="callout "> < strong > Mesh building: </ strong > This step is potentially memory and compute intensive depending
67+ on the size of the synthetic vascular object being discretized. Under the hood, < code > svVascularize</ code > is
68+ using a combination of < code > tetgen</ code > and < code > mmg</ code > meshing utilities via python subprocess calls.
69+ These, as well as surface mesh unioning operations, are non-trivial and may take minutes-hours to complete.
70+ Users can supply custom meshing parameters for their applications to override default values this may result
71+ in more efficient meshing, but it is recommended that default parameters are attemped first.</ div >
72+ </ main >
73+ < footer >
74+ < div class ="container ">
75+ < p > © 2025 SimVascular, Stanford University, The Regents of the University of California, and others —
76+ < a href ="https://opensource.org/license/BSD-3-Clause "> BSD 3-Clause License</ a > < br > </ p >
77+ </ div >
78+ </ footer >
79+
80+ < script defer src ="script.js "> </ script >
81+ </ body >
82+ </ html >
0 commit comments