Skip to content

Commit

Permalink
update tikz pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
mrp089 committed Oct 28, 2023
1 parent 03cd1e6 commit 5323d1b
Show file tree
Hide file tree
Showing 36 changed files with 165 additions and 143 deletions.
17 changes: 12 additions & 5 deletions docs/pages/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ reflect the hemodynamics and physiology of different cardiovascular
anatomies. These 0D models are governed by differential algebraic equations
(DAEs).

For more background information on 0D models, have a look at SimVascular's
[ROM Simulation Guide](http://simvascular.github.io/docsROMSimulation.html).
For more background information on 0D models, have a look at the detailed documentation:
- System of equations: SparseSystem
- Time integration: Integrator
- Overview of available 0D elements (blocks): Block

* <a href="https://github.com/StanfordCBCL/svZeroDPlus">Source
repository</a>
* <a href="https://simvascular.github.io">About SimVascular</a>
You can find more details about governing equations in individual blocks, for example:
- BloodVessel
- BloodVesselJunction
- WindkesselBC

For implementation details, have a look at the [source code](https://github.com/StanfordCBCL/svZeroDPlus).

[About SimVascular](https://simvascular.github.io)

# Installation

Expand Down
Binary file added docs/png/blood_vessel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/blood_vessel_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/blood_vessel_junction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/blood_vessel_junction_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/blood_vessel_junction_individual.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/closed_loop_coronary_b_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/closed_loop_coronary_b_c_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/closed_loop_r_c_r_b_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/closed_loop_r_c_r_b_c_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/flow_reference_b_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/flow_reference_b_c_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/junction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/junction_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/open_loop_coronary_b_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/open_loop_coronary_b_c_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/pressure_reference_b_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/pressure_reference_b_c_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/resistance_b_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/resistance_b_c_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/resistive_junction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/resistive_junction_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/windkessel_b_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/png/windkessel_b_c_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 14 additions & 13 deletions src/model/BloodVessel.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,7 @@
*
* Models the mechanical behavior of a bloodvessel with optional stenosis.
*
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R$, *-] (3,0)
* to [R, l=$S$, -] (5,0)
* (5,0) to [L, l=$L$, -*] (7,0)
* node[anchor=south]{$P_{out}$}
* (5,0) to [C, l=$C$, -] (5,-1.5)
* node[ground]{};
* \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_{out}$};
* \end{circuitikz}
* \f]
* \image html blood_vessel_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -141,6 +129,19 @@
* * `3` Stenosis coefficient
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R$, *-] (3,0)
// * to [R, l=$S$, -] (5,0)
// * (5,0) to [L, l=$L$, -*] (7,0)
// * node[anchor=south]{$P_{out}$}
// * (5,0) to [C, l=$C$, -] (5,-1.5)
// * node[ground]{};
// * \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_{out}$};
// * \end{circuitikz}
// * \f]
class BloodVessel : public Block {
public:
/**
Expand Down
56 changes: 30 additions & 26 deletions src/model/BloodVesselJunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,39 +40,16 @@
#include "SparseSystem.h"

/**
* @brief BloodVesselJunction
* @brief Junction between blood vessels
*
* Models a junction with one inlet and arbitrary outlets using
* modified blood vessel elements between each inlet and outlet pair.
*
* \f[
* \begin{circuitikz}
* \draw node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0.1) node[anchor=south]{$P_\text{in}$};
* \draw (1,0) to [short, *-] (2.5,0.75);
* \draw (1,0) to [short, *-] (2.5,-0.75);
* \draw (2.5,0.75) node[anchor=south]{} to [generic, l_=$BV_{1}$, -*]
* (4.5,0.75); \draw (2.4,0.75) node[anchor=south]{}; \draw (4.6,0.75)
* node[anchor=south] {$P_{out,1}$}; \draw (2.5,-0.75) node[anchor=south]{} to
* [generic, l^=$BV_{2}$, -*] (4.5,-0.75); \draw (2.4,-0.75)
* node[anchor=north]{}; \draw (4.6,-0.75) node[anchor=north]
* {$P_{out,2}$}; \draw [-latex] (4.7,0.75) -- (5.5,0.75) node[right]
* {$Q_{out,1}$}; \draw [-latex] (4.7,-0.75) -- (5.5,-0.75) node[right]
* {$Q_{out,2}$}; \end{circuitikz} \f]
* \image html blood_vessel_junction_dark.png
*
* Each blood vessel is modelled as:
*
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_\text{in}$}
* to [R, l=$R$, *-] (3,0)
* to [R, l=$S$, -] (5,0)
* (5,0) to [L, l=$L$, -*] (7,0)
* node[anchor=south]{$P_\text{out}$};
* \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_\text{out}$};
* \end{circuitikz}
* \f]
* \image html blood_vessel_junction_individual_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -140,6 +117,33 @@
* * `i+2*num_outlets` Stenosis coefficient for inner blood vessel `i`
*
*/
// * \f[
// * \begin{circuitikz}
// * \draw node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0.1) node[anchor=south]{$P_\text{in}$};
// * \draw (1,0) to [short, *-] (2.5,0.75);
// * \draw (1,0) to [short, *-] (2.5,-0.75);
// * \draw (2.5,0.75) node[anchor=south]{} to [generic, l_=$BV_{1}$, -*]
// * (4.5,0.75); \draw (2.4,0.75) node[anchor=south]{}; \draw (4.6,0.75)
// * node[anchor=south] {$P_{out,1}$}; \draw (2.5,-0.75) node[anchor=south]{} to
// * [generic, l^=$BV_{2}$, -*] (4.5,-0.75); \draw (2.4,-0.75)
// * node[anchor=north]{}; \draw (4.6,-0.75) node[anchor=north]
// * {$P_{out,2}$}; \draw [-latex] (4.7,0.75) -- (5.5,0.75) node[right]
// * {$Q_{out,1}$}; \draw [-latex] (4.7,-0.75) -- (5.5,-0.75) node[right]
// * {$Q_{out,2}$}; \end{circuitikz}
// * \f]
//
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_\text{in}$}
// * to [R, l=$R$, *-] (3,0)
// * to [R, l=$S$, -] (5,0)
// * (5,0) to [L, l=$L$, -*] (7,0)
// * node[anchor=south]{$P_\text{out}$};
// * \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_\text{out}$};
// * \end{circuitikz}
// * \f]
class BloodVesselJunction : public Block {
public:
// Inherit constructors
Expand Down
31 changes: 16 additions & 15 deletions src/model/ClosedLoopCoronaryBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,7 @@ enum class Side { LEFT, RIGHT, NONE };
* @brief Closed loop coronary boundary condition (connected to other blocks on
* both sides).
*
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R_a$, *-] (3,0)
* to [R, l=$R_{am}$, -] (5,0)
* to [R, l=$R_v$, *-*] (7,0)
* node[anchor=south]{$P_{out}$}
* (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
* node[left]{$P_{im}$}
* (3,0) to [C, l=$C_a$, -*] (3,-1.5)
* node[left]{$P_a$};
* \draw [-latex] (7.2,0) -- (8.0,0) node[right] {$Q_{out}$};
* \end{circuitikz}
* \f]
* \image html closed_loop_coronary_b_c_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -116,6 +102,21 @@ enum class Side { LEFT, RIGHT, NONE };
* * `4` Cim
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R_a$, *-] (3,0)
// * to [R, l=$R_{am}$, -] (5,0)
// * to [R, l=$R_v$, *-*] (7,0)
// * node[anchor=south]{$P_{out}$}
// * (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
// * node[left]{$P_{im}$}
// * (3,0) to [C, l=$C_a$, -*] (3,-1.5)
// * node[left]{$P_a$};
// * \draw [-latex] (7.2,0) -- (8.0,0) node[right] {$Q_{out}$};
// * \end{circuitikz}
// * \f]
class ClosedLoopCoronaryBC : public Block {
public:
explicit ClosedLoopCoronaryBC(int id, const std::vector<int> &param_ids,
Expand Down
25 changes: 13 additions & 12 deletions src/model/ClosedLoopRCRBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,7 @@
* Models the mechanical behavior of a Windkessel boundary condition that is
* connected to other blocks on both sides.
*
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R_p$, *-] (3,0)
* to [R, l=$R_d$, *-*] (5,0)
* node[anchor=south]{$P_{out}$}
* (3,0) to [C, l=$C$, *-] (3,-1.5)
* node[ground]{$P_{C}$};
* \draw [-latex] (5.2,0) -- (6.0,0) node[right] {$Q_{out}$} ;
* \end{circuitikz}
* \f]
* \image html closed_loop_r_c_r_b_c_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -108,6 +97,18 @@
* * `2` Distal resistance
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R_p$, *-] (3,0)
// * to [R, l=$R_d$, *-*] (5,0)
// * node[anchor=south]{$P_{out}$}
// * (3,0) to [C, l=$C$, *-] (3,-1.5)
// * node[ground]{$P_{C}$};
// * \draw [-latex] (5.2,0) -- (6.0,0) node[right] {$Q_{out}$} ;
// * \end{circuitikz}
// * \f]
class ClosedLoopRCRBC : public Block {
public:
// Inherit constructors
Expand Down
15 changes: 8 additions & 7 deletions src/model/FlowReferenceBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@
*
* Applies a prescribed flow to a boundary.
*
* \f[
* \begin{circuitikz} \draw
* node[left] {$\hat{Q}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
* \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
* \end{circuitikz}
* \f]
* \image html flow_reference_b_c_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -78,6 +72,13 @@
* * `0` Flow
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$\hat{Q}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
// * \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
// * \end{circuitikz}
// * \f]
class FlowReferenceBC : public Block {
public:
// Inherit constructors
Expand Down
25 changes: 13 additions & 12 deletions src/model/Junction.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,7 @@
* Models a junction with arbitrary inlets and outlets. Across all inlets and
* outlets of the junction, mass is conserved and pressure is continuous.
*
* \f[
* \begin{circuitikz}
* \draw node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$} to [short, *-*] (3.0,0);
* \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,1.0);
* \draw (4.3,1.1) node[anchor=south] {$P_{out,1}$};
* \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,-1.0);
* \draw (4.3,-1.1) node[anchor=north] {$P_{out,2}$};
* \draw [-latex] (4.65,1.1) -- (5.25,1.5) node[right] {$Q_{out,1}$};
* \draw [-latex] (4.65,-1.1) -- (5.25,-1.5) node[right] {$Q_{out,2}$};
* \end{circuitikz}
* \f]
* \image html junction_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -85,6 +74,18 @@
* \quad \mathrm{with} \quad i \neq j \f]
*
*/
// * \f[
// * \begin{circuitikz}
// * \draw node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$} to [short, *-*] (3.0,0);
// * \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,1.0);
// * \draw (4.3,1.1) node[anchor=south] {$P_{out,1}$};
// * \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,-1.0);
// * \draw (4.3,-1.1) node[anchor=north] {$P_{out,2}$};
// * \draw [-latex] (4.65,1.1) -- (5.25,1.5) node[right] {$Q_{out,1}$};
// * \draw [-latex] (4.65,-1.1) -- (5.25,-1.5) node[right] {$Q_{out,2}$};
// * \end{circuitikz}
// * \f]
class Junction : public Block {
public:
using Block::Block;
Expand Down
29 changes: 15 additions & 14 deletions src/model/OpenLoopCoronaryBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,7 @@
/**
* @brief Open loop coronary boundary condition based on \cite kim_coronary.
*
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R_a$, *-] (3,0)
* to [R, l=$R_{am}$, -] (5,0)
* to [R, l=$R_v$, *-*] (7,0)
* node[anchor=south]{$P_{v}$}
* (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
* node[left]{$P_{im}$}
* (3,0) to [C, l=$C_a$, -*] (3,-1.5)
* node[left]{$P_a$};
* \end{circuitikz}
* \f]
* \image html open_loop_coronary_b_c_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -104,6 +91,20 @@
* * `6` Pv
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R_a$, *-] (3,0)
// * to [R, l=$R_{am}$, -] (5,0)
// * to [R, l=$R_v$, *-*] (7,0)
// * node[anchor=south]{$P_{v}$}
// * (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
// * node[left]{$P_{im}$}
// * (3,0) to [C, l=$C_a$, -*] (3,-1.5)
// * node[left]{$P_a$};
// * \end{circuitikz}
// * \f]
class OpenLoopCoronaryBC : public Block {
public:
// Inherit constructors
Expand Down
17 changes: 9 additions & 8 deletions src/model/PressureReferenceBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@
*
* Applies a predefined pressure at a boundary.
*
* \f[
* \begin{circuitikz}
* \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
* \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
* \draw (1,0) to [short, l=, *-] (1,-1)
* node[ground]{$\hat{P}$};
* \end{circuitikz}
* \f]
* \image html pressure_reference_b_c_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -79,6 +72,14 @@
* * `0` Pressure
*
*/
// * \f[
// * \begin{circuitikz}
// * \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
// * \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
// * \draw (1,0) to [short, l=, *-] (1,-1)
// * node[ground]{$\hat{P}$};
// * \end{circuitikz}
// * \f]
class PressureReferenceBC : public Block {
public:
// Inherit constructors
Expand Down
15 changes: 8 additions & 7 deletions src/model/ResistanceBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@
/**
* @brief Resistance boundary condition.
*
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1.0,0) to [R, l=$R$, *-*] (3,0)
* node[anchor=south]{$P_{d}$};
* \end{circuitikz}
* \f]
* \image html resistance_b_c_dark.png
*
* ### Governing equations
*
Expand Down Expand Up @@ -77,6 +71,13 @@
* * `1` Distal pressure
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1.0,0) to [R, l=$R$, *-*] (3,0)
// * node[anchor=south]{$P_{d}$};
// * \end{circuitikz}
// * \f]
class ResistanceBC : public Block {
public:
// Inherit constructors
Expand Down
Loading

0 comments on commit 5323d1b

Please sign in to comment.