Skip to content

Commit 9ee68ed

Browse files
authored
Update Doxygen documentation with json block examples (SimVascular#189)
1 parent aa2ec73 commit 9ee68ed

16 files changed

Lines changed: 332 additions & 1 deletion

src/model/BloodVessel.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,23 @@
112112
* * `2` Inductance
113113
* * `3` Stenosis coefficient
114114
*
115+
* ### Usage in json configuration file
116+
*
117+
* "vessels": [
118+
* {
119+
* "vessel_id": 0,
120+
* "vessel_length": 10.0,
121+
* "vessel_name": "branch0_seg0",
122+
* "zero_d_element_type": "BloodVessel",
123+
* "zero_d_element_values": {
124+
* "R_poiseuille": 100.0,
125+
* "C": 1.0e-5,
126+
* "L": 1.0e-6,
127+
* "stenosis_coefficient": 0.0
128+
* }
129+
* }
130+
* ]
131+
*
115132
* ### Internal variables
116133
*
117134
* This block has no internal variables.

src/model/BloodVesselJunction.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,40 @@
113113
* * `i+num_outlets` Inductance for inner blood vessel `i`
114114
* * `i+2*num_outlets` Stenosis coefficient for inner blood vessel `i`
115115
*
116+
* ### Usage in json configuration file
117+
*
118+
* "junctions": [
119+
* {
120+
* "inlet_vessels": [
121+
* 0
122+
* ],
123+
* "junction_name": "J0",
124+
* "junction_type": "BloodVesselJunction",
125+
* "junction_values": {
126+
* "R_poiseuille": [
127+
* 100,
128+
* 200
129+
* ],
130+
* "C": [
131+
* 0.0,
132+
* 0.0
133+
* ],
134+
* "L": [
135+
* 0.0,
136+
* 0.0
137+
* ],
138+
* "stenosis_coefficient": [
139+
* 0.0,
140+
* 0.0
141+
* ]
142+
* },
143+
* "outlet_vessels": [
144+
* 1,
145+
* 2
146+
* ]
147+
* }
148+
* ]
149+
*
116150
* ### Internal variables
117151
*
118152
* This block has no internal variables.

src/model/ChamberElastanceInductor.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,27 @@
109109
* * `5` t_twitch: Twitch time
110110
* * `6` Impedance: Impedance of the outflow
111111
*
112+
* ### Usage in json configuration file
113+
*
114+
* "chambers": [
115+
* {
116+
* "type": "ChamberElastanceInductor",
117+
* "name": "ventricle",
118+
* "values": {
119+
* "Emax": 1.057,
120+
* "Emin": 0.091,
121+
* "Vrd": 26.1,
122+
* "Vrs": 18.0,
123+
* "t_active": 0.2,
124+
* "t_twitch": 0.3,
125+
* "Impedance": 0.000351787
126+
* }
127+
* }
128+
* ],
129+
* "initial_condition": {
130+
* "Vc:ventricle": 96.07
131+
* }
132+
*
112133
* ### Internal variables
113134
*
114135
* Names of internal variables in this block's output:
@@ -119,7 +140,7 @@
119140
class ChamberElastanceInductor : public Block {
120141
public:
121142
/**
122-
* @brief Construct a new BloodVessel object
143+
* @brief Construct a new ChamberElastanceInductor object
123144
*
124145
* @param id Global ID of the block
125146
* @param model The model to which the block belongs

src/model/ChamberSphere.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,32 @@
9393
* * `tdias` - Diastole timing parameter \f$t_\text{dias}\f$
9494
* * `steepness` - Activation steepness parameter \f$\gamma\f$
9595
*
96+
* ### Usage in json configuration file
97+
*
98+
* "vessels": [
99+
* {
100+
* "boundary_conditions": {},
101+
* "vessel_id": 1,
102+
* "vessel_length": 1.0,
103+
* "vessel_name": "ventricle",
104+
* "zero_d_element_type": "ChamberSphere",
105+
* "zero_d_element_values": {
106+
* "rho" : 1e3,
107+
* "thick0" : 0.01,
108+
* "radius0" : 0.05,
109+
* "W1" : 10e3,
110+
* "W2" : 40,
111+
* "eta" : 10.0,
112+
* "sigma_max" : 185e3,
113+
* "alpha_max": 30.0,
114+
* "alpha_min": -30.0,
115+
* "tsys": 0.170,
116+
* "tdias": 0.484,
117+
* "steepness": 0.005
118+
* }
119+
* }
120+
* ]
121+
*
96122
* ### Internal variables
97123
*
98124
* Names of internal variables in this block's output:

src/model/ClosedLoopCoronaryLeftBC.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@
1212
/**
1313
* @brief Left side of closed loop coronary boundary condition
1414
* ClosedLoopCoronaryBC.
15+
*
16+
* ### Usage in json configuration file
17+
*
18+
* "boundary_conditions": [
19+
* {
20+
* "bc_name": "LCA",
21+
* "bc_type": "ClosedLoopCoronaryLeft",
22+
* "bc_values": {
23+
* "Ra": 9.307638231,
24+
* "Ram": 15.124912126,
25+
* "Rv": 33.270958757,
26+
* "Cim": 0.003737025,
27+
* "Ca": 0.000552427
28+
* }
29+
* }
30+
* ]
1531
*/
1632
class ClosedLoopCoronaryLeftBC : public ClosedLoopCoronaryBC {
1733
public:

src/model/ClosedLoopCoronaryRightBC.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@
1212
/**
1313
* @brief Right side of closed loop coronary boundary condition
1414
* ClosedLoopCoronaryBC.
15+
*
16+
* ### Usage in json configuration file
17+
*
18+
* "boundary_conditions": [
19+
* {
20+
* "bc_name": "RCA",
21+
* "bc_type": "ClosedLoopCoronaryRight",
22+
* "bc_values": {
23+
* "Ra": 5.757416349,
24+
* "Ram": 9.355801566,
25+
* "Rv": 20.580381989,
26+
* "Cim": 0.003463134,
27+
* "Ca": 0.001055957
28+
* }
29+
* }
30+
* ]
1531
*/
1632
class ClosedLoopCoronaryRightBC : public ClosedLoopCoronaryBC {
1733
public:

src/model/ClosedLoopHeartPulmonary.h

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,54 @@
5959
* * `25` Right atrium resting volume
6060
* * `26` Left atrium resting volume
6161
*
62+
* ### Usage in json configuration file
63+
*
64+
* "closed_loop_blocks": [
65+
* {
66+
* "outlet_blocks": [
67+
* "branch0_seg0"
68+
* ],
69+
* "closed_loop_type": "ClosedLoopHeartAndPulmonary",
70+
* "cardiac_cycle_period": 1.0169,
71+
* "parameters": {
72+
* "Tsa": 0.40742,
73+
* "tpwave": 8.976868,
74+
* "Erv_s": 2.125279,
75+
* "Elv_s": 3.125202,
76+
* "iml": 0.509365,
77+
* "imr": 0.806369,
78+
* "Lrv_a": 0.000186865,
79+
* "Rrv_a": 0.035061704,
80+
* "Lra_v": 0.000217032,
81+
* "Rra_v": 0.007887459,
82+
* "Lla_v": 0.000351787,
83+
* "Rla_v": 0.005310825,
84+
* "Rlv_ao": 0.034320234,
85+
* "Llv_a": 0.000110776,
86+
* "Vrv_u": 9.424629,
87+
* "Vlv_u": 5.606007,
88+
* "Rpd": 0.098865401,
89+
* "Cp": 1.090989,
90+
* "Cpa": 0.556854,
91+
* "Kxp_ra": 9.22244,
92+
* "Kxv_ra": 0.004837,
93+
* "Emax_ra": 0.208858,
94+
* "Vaso_ra": 4.848742,
95+
* "Kxp_la": 9.194992,
96+
* "Kxv_la": 0.008067,
97+
* "Emax_la": 0.303119,
98+
* "Vaso_la": 9.355754
99+
* }
100+
* }
101+
* ],
102+
* "initial_condition": {
103+
* "V_RA:CLH": 38.43,
104+
* "V_RV:CLH": 96.07,
105+
* "V_LA:CLH": 38.43,
106+
* "V_LV:CLH": 96.07,
107+
* "P_pul:CLH": 8.0
108+
* }
109+
*
62110
* ### Internal variables
63111
*
64112
* Names of internal variables in this block's output:

src/model/ClosedLoopRCRBC.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,22 @@
8282
* * `1` Capacitance
8383
* * `2` Distal resistance
8484
*
85+
* ### Usage in json configuration file
86+
*
87+
* "boundary_conditions": [
88+
* {
89+
* "bc_name": "RCR_aorta",
90+
* "bc_type": "ClosedLoopRCR",
91+
* "bc_values": {
92+
* "_comment_": "R_total = 1.570879*0.948914 = 1.490629075, Rp =
93+
* 0.09*R_total, Rd = 0.91*R_total, C = 0.228215*1.044637", "Rp": 0.134156617,
94+
* "Rd": 1.356472458,
95+
* "C": 0.238401833,
96+
* "closed_loop_outlet": true
97+
* }
98+
* }
99+
* ]
100+
*
85101
* ### Internal variables
86102
*
87103
* Names of internal variables in this block's output:

src/model/FlowReferenceBC.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@
5050
*
5151
* * `0` Flow
5252
*
53+
* ### Usage in json configuration file
54+
*
55+
* "boundary_conditions": [
56+
* {
57+
* "bc_name": "INFLOW",
58+
* "bc_type": "FLOW",
59+
* "bc_values": {
60+
* "Q": [
61+
* 5.0,
62+
* 5.0
63+
* ],
64+
* "t": [
65+
* 0.0,
66+
* 1.0
67+
* ]
68+
* }
69+
* }
70+
* ]
71+
*
5372
* ### Internal variables
5473
*
5574
* This block has no internal variables.

src/model/Junction.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,22 @@
6363
* \underbrace{1}_{P_i} & \dots & \underbrace{1}_{P_j} & \dots\end{array}\right]
6464
* \quad \mathrm{with} \quad i \neq j \f]
6565
*
66+
* ### Usage in json configuration file
67+
*
68+
* "junctions": [
69+
* {
70+
* "inlet_vessels": [
71+
* 0
72+
* ],
73+
* "junction_name": "J0",
74+
* "junction_type": "NORMAL_JUNCTION",
75+
* "outlet_vessels": [
76+
* 1,
77+
* 2
78+
* ]
79+
* }
80+
* ]
81+
*
6682
* ### Internal variables
6783
*
6884
* This block has no internal variables.

0 commit comments

Comments
 (0)