Skip to content

Commit 7657ccf

Browse files
authored
Merge pull request #10 from zasexton/7-ghpages-documentation-404-errors
7 ghpages documentation 404 errors
2 parents ebd3868 + e62753f commit 7657ccf

File tree

7 files changed

+151
-2
lines changed

7 files changed

+151
-2
lines changed

docs/doc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h2>svVascularize Documentation</h2>
3737
<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>
40-
<li><a href="tutorials/quickstart.html">🟢 Quickstart tutorial</a></li>
40+
<li><a href="quickstart.html">🟢 Quickstart tutorial</a></li>
4141
<li><a href="tutorials/pipeline.html">End‑to‑end pipeline (generation → 3‑D CFD)</a></li>
4242
</ul>
4343

1.14 MB
Loading
1.04 MB
Loading

docs/graphics/quickstart_orbit.gif

194 KB
Loading

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h2>Automated vascular generation and simulation</h2>
3434
<div class="container">
3535
<h3>About<code>svVascularize</code> </h3>
3636
<p><code>svVascularize</code> (svv) is an <strong>open-source</strong>, <strong>user-friendly</strong> toolkit that algorithmically grows physiologically realistic vascular trees when imaging data are unavailable or incomplete.</p>
37-
<p><strong>Why it matters:</strong></p>
37+
<p><strong>Capabilities:</strong></p>
3838
<ul>
3939
<li><em>Biofabrication &amp; 3D printing</em> — export watertight VTP/STL meshes ready for extrusion-based printing, <a href="https://doi.org/10.1126/sciadv.1500758">FRESH</a>/<a href="https://doi.org/10.1126/sciadv.aaw2459">SWIFT</a> bioprinting, or sacrificial templating. Radii, bifurcation angles, and tapering rules are tunable to match printer resolution and biomaterial rheology.</li>
4040
<li><em>Patient-specific cardiovascular modelling</em> — fill in unresolved distal vasculature to close boundary conditions for 0D, 1D, or full 3D <a href="https://simvascular.github.io/">SimVascular</a> flow simulations. Trees can be constrained to an anatomical mask or grown freely inside an organ ROI.</li>

docs/quickstart.html

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
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>Quickstart tutorial</h2>
27+
<p>This guide shows how to grow a small synthetic vascular objects and export 0‑D simulation files for a simple
28+
convex shape. For this example we will forgo including other build parameters such as starting points and
29+
additional hemodynamic constraints in order to focus on only the essential API for minimally viable
30+
vascular objects. Here we create a simple domain, grow a vascular tree and forest, visualising them in an interactive viewer, and
31+
export 0‑D hemodynamic simulation files for further analysis using <code>svzerodsolver</code> .</p>
32+
33+
34+
<h3>Generate and visualise a tree</h3>
35+
<pre data-copy><code class="language-python">import pyvista as pv
36+
from svv.domain.domain import Domain
37+
from svv.tree.tree import Tree
38+
39+
# Creating the Tissue Domain
40+
cube = Domain(pv.Cube())
41+
cube.create()
42+
cube.solve()
43+
cube.build()
44+
45+
# Creating the Vascular Tree Object
46+
t = Tree()
47+
t.set_domain(cube)
48+
t.set_root()
49+
t.n_add(50)
50+
51+
# Visualizing the Tree and Domain
52+
t.show(plot_domain=True)</code></pre>
53+
54+
<figure class="figure-center">
55+
<img src="graphics/quickstart_orbit.gif" alt="Orbit around vascular tree" width="300" />
56+
<figcaption> Rotating view of the generated vascular tree </figcaption>
57+
</figure>
58+
<h3>Export 0‑D simulation files</h3>
59+
<pre data-copy><code class="language-python">from svv.simulation.fluid.rom.zero_d.zerod_tree import export_0d_simulation
60+
61+
export_0d_simulation(t, outdir="my_tree_0d")
62+
</code></pre>
63+
<p>This writes a 0-D solver input file, <code>solver_0d.in</code>, and geometric file, <code>geom.csv</code>, in
64+
the folder <code>my_tree_0d/</code>. The input file should contain all necessary parameters and inflow conditions to run
65+
the simulation. By default, 0-D simulations exported via this routine will simulate steady state flow through the
66+
vascular trees. Time-varying flows can be considered if additional arguments are applied to the
67+
<code>export_0d_simulation</code> function. Run the solver with <a href="https://simvascular.github.io/documentation/rom_simulation.html#0d-solver-user-guide"><code>svZeroDSolver</code></a>.</p>
68+
<h3>Generate and visualise a forest</h3>
69+
<p>Unlike <code>tree</code>, <code>forest</code> objects are composed by connecting synthetic vascular trees to form fluid circuits
70+
with a desired number of inlets and outlets. These are especially useful for fabrication and fluid routing problems in which
71+
control over the start/end points are critical.</p>
72+
<pre data-copy><code class="language-python">import pyvista as pv
73+
from svv.domain.domain import Domain
74+
from svv.forest.forest import Forest
75+
76+
# Creating the Tissue Domain
77+
cube = Domain(pv.Cube())
78+
cube.create()
79+
cube.solve()
80+
cube.build()
81+
82+
# Creating the Vascular Forest Object
83+
f = Forest()
84+
f.set_domain(cube)
85+
f.set_roots()
86+
f.add(50)
87+
88+
# Visualizing the Forest and Domain
89+
f.show(plot_domain=True)</code></pre>
90+
<figure class="figure-center">
91+
<img src="graphics/quickstart_forest_orbit.gif" alt="Orbit around unconnected vascular forest" width="400" />
92+
<figcaption> Rotating view of the generated vascular forest </figcaption>
93+
</figure>
94+
<p>At this step our vascular forest object remains unconnected and should contain two non-intersecting trees.
95+
Because we have not specified any special build parameters, these trees adhere to the same default fluid constrains
96+
and are allowed to grow homogeneously within the tissue domain. Connections among multiple trees is accomplished via
97+
the <code>forest.connect()</code> method which automatically sets up a two-step optimization problem to form
98+
connections among sets of tree terminals. </p>
99+
<pre data-copy><code class="language-python"># Form connections
100+
f.connect()
101+
102+
# Visualize the Connected Forest Object
103+
f.connections.tree_connections[0].show().show()</code></pre>
104+
<figure class="figure-center">
105+
<img src="graphics/quickstart_forest_connected_orbit.gif" alt="Orbit around connected vascular forest" width="400" />
106+
<figcaption> Rotating view of the connected vascular forest </figcaption>
107+
</figure>
108+
<h3>Export 0-D simulation files</h3>
109+
<p>Because a forest object may contain multiple fluid networks, it is important to specify which network a user wants
110+
to export for simulation as well as the inlet boundaries. These are the second and thrid positional arguments of the
111+
simulation exporting function, respectively. </p>
112+
<pre data-copy><code class="language-python">from svv.simulation.fluid.rom.zero_d.zerod_forest import export_0d_simulation
113+
114+
export_0d_simulation(f, 0, [0], outdir="my_forest_0d") </code> </pre>
115+
<p>Similar to exporting the <code>tree</code> object for simulation, this function will write out a 0-D solver input
116+
file <code>solver_0d.in</code> as well as a geometric file, <code>geom.csv</code> for casting solutions back onto
117+
the 3D geometry for visualization. The inlet boundary conditions will be applied to the root vessel of the first tree
118+
since we specified this in the third argument of our function above. By default, this will be a steady flow simulation
119+
with a simple resistance outflow boundary condition. Solutions to the 0-D problem can be obtained using the same <code>svzerodsolver</code>
120+
workflow.</p>
121+
</main>
122+
123+
<footer>
124+
<div class="container">
125+
<p>&copy; 2025 SimVascular, Stanford University, The Regents of the University of California, and others —
126+
<a href="https://opensource.org/license/BSD-3-Clause">BSD 3-Clause License</a><br></p>
127+
</div>
128+
</footer>
129+
130+
<script defer src="script.js"></script>
131+
</body>
132+
</html>

docs/style.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,23 @@ main h2 {
140140
margin-top: 3rem;
141141
}
142142

143+
.figure-center {
144+
margin: 1rem 0;
145+
text-align: center;
146+
}
147+
148+
.figure-center img {
149+
max-width: 100%;
150+
display: block;
151+
margin: 0 auto;
152+
}
153+
154+
.figure-center figcaption {
155+
margin-top: 0.5rem;
156+
font-size: 0.85rem;
157+
color: var(--clr-grey-500);
158+
}
159+
143160
/* Full-width blocks */
144161
pre {
145162
background: var(--clr-grey-100); /* light grey fill */

0 commit comments

Comments
 (0)