Skip to content

Commit 9ff9251

Browse files
authored
Merge pull request #11 from zasexton/7-ghpages-documentation-404-errors
#7 adding 3D mesh generation documentation
2 parents 7657ccf + a788113 commit 9ff9251

File tree

2 files changed

+83
-1
lines changed

2 files changed

+83
-1
lines changed

docs/doc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h3>Get Started</h3>
3838
<p>New to <code>svVascularize</code>? Begin with the quickstart tutorial that walks you through generating a vascular tree and running a 0‑D hemodynamic simulation in under five minutes.</p>
3939
<ul>
4040
<li><a href="quickstart.html">🟢 Quickstart tutorial</a></li>
41-
<li><a href="tutorials/pipeline.html">End‑to‑end pipeline (generation → 3‑D CFD)</a></li>
41+
<li><a href="pipeline.html">End‑to‑end pipeline (generation → 3‑D CFD)</a></li>
4242
</ul>
4343

4444
<h3>Concept Guides</h3>

docs/pipeline.html

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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>&copy; 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

Comments
 (0)