@@ -35,7 +35,7 @@ We are interested in solving the DAE system for the solutions, $\textbf{y}\_{n+1
3535
3636 $$ \textbf{K}\left(\dot{\textbf{y}}\_{n+\alpha\_{m}}^{k}, \textbf{y}\_{n+\alpha\_{f}}^{k}, t\_{n+\alpha\_{f}}\right)\cdot\Delta \textbf{y}\_{n+\alpha\_{f}}^{k} = -\textbf{r}\left(\dot{\textbf{y}}\_{n+\alpha\_{m}}^{k}, \textbf{y}\_{n+\alpha\_{f}}^{k}, t\_{n+\alpha\_{f}}\right), $$
3737
38- where $\textbf{K}\left(\dot{\textbf{y}}\_ {n+\alpha\_ {m}}, \textbf{y}\_ {n+\alpha\_ {f}}, t\_ {n+\alpha\_ {f}}\right) = \frac{\partial \textbf{r}\left(\dot{\textbf{y}}\_ {n+\alpha\_ {m}}, \textbf{y}\_ {n+\alpha\_ {f}}, t\_ {n+\alpha\_ {f}}\right)}{\partial \textbf{y}\_ {n+\alpha\_ {f}}}$ is the consistent tangent matrix.
38+ where $\textbf{K}\left(\dot{\textbf{y}}\_ {n+\alpha\_ {m}}, \textbf{y}\_ {n+\alpha\_ {f}}, t\_ {n+\alpha\_ {f}}\right) = \frac{\partial \textbf{r}\left(\dot{\textbf{y}}\_ {n+\alpha\_ {m}}, \textbf{y}\_ {n+\alpha\_ {f}}, t\_ {n+\alpha\_ {f}}\right)}{\partial \textbf{y}\_ {n+\alpha\_ {f}}}$ is the tangent matrix.
3939
4040 We solve this equation to find $\Delta \textbf{y}\_ {n+\alpha\_ {f}}^{k}$ and update our guess of $\dot{\textbf{y}}\_ {n+\alpha\_ {m}}$ and $\textbf{y}\_ {n+\alpha\_ {f}}$,
4141
@@ -45,7 +45,7 @@ We are interested in solving the DAE system for the solutions, $\textbf{y}\_{n+1
4545
4646 $$ \dot{\textbf{y}}\_{n+\alpha\_{m}}^{k+1} = \dot{\textbf{y}}\_{n+\alpha\_{m}}^{k} + \frac{\alpha\_{m}}{\Delta t\alpha\_{f}\gamma}\Delta \textbf{y}\_{n+\alpha\_{f}}^{k}. $$
4747
48- The consistent tangent matrix is
48+ The tangent matrix is
4949
5050 $$ \textbf{K}\left(\dot{\textbf{y}}\_{n+\alpha\_{m}}, \textbf{y}\_{n+\alpha\_{f}}, t\_{n+\alpha\_{f}}\right) = \underset{\text{Term 1}}{\underbrace{\frac{\partial \textbf{E}\left(\textbf{y}\_{n+\alpha\_{f}}, t\_{n+\alpha\_{f}}\right)}{\partial \textbf{y}\_{n+\alpha\_{f}}}\cdot\dot{\textbf{y}}\_{n+\alpha\_{m}}}} + \frac{\alpha\_{m}}{\Delta t\alpha\_{f}\gamma}\textbf{E}\left(\textbf{y}\_{n+\alpha\_{f}}, t\_{n+\alpha\_{f}}\right) + \underset{\text{Term 2}}{\underbrace{\frac{\partial \textbf{F}\left(\textbf{y}\_{n+\alpha\_{f}}, t\_{n+\alpha\_{f}}\right)}{\partial \textbf{y}\_{n+\alpha\_{f}}}\cdot\textbf{y}\_{n+\alpha\_{f}}}} + \textbf{F}\left(\textbf{y}\_{n+\alpha\_{f}}, t\_{n+\alpha\_{f}}\right) + \underset{\text{Term 3}}{\underbrace{\frac{\partial \textbf{c}\left(\textbf{y}\_{n+\alpha\_{f}}, t\_{n+\alpha\_{f}}\right)}{\partial \textbf{y}\_{n+\alpha\_{f}}}}}. $$
5151
@@ -93,285 +93,65 @@ $$\textbf{E}^{e}\left(\textbf{y}^{e}, t\right)\cdot\dot{\textbf{y}}^{e} + \textb
9393
9494<h4 > Vessel elements </h4 >
9595
96- <h5 > Resistor </h5 >
96+ <h5 > BloodVessel </h5 >
9797
9898<br >
9999<figure >
100- <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/resistor.png " >
101- <figcaption class =" svCaption " > Resistor element.
102- </figcaption >
103- </figure >
104-
105- The governing equations for the local resistor element are
106-
107- <!-- https://github.com/mathjax/MathJax/issues/329 -- need to add a backslash before all underscore in an equation -->
108-
109- $$ P\_{in}^{e} - P\_{out}^{e} - RQ\_{in}^{e} = 0 $$
110-
111- $$ Q\_{in}^{e} - Q\_{out}^{e} = 0. $$
112-
113- The local contributions to the global arrays are
114-
115- \begin{gather}
116- \textbf{y}^{e} =
117- \begin{bmatrix}
118- P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e}
119- \end{bmatrix}^T,
120- \end{gather}
121-
122- \begin{gather}
123- \textbf{F}^{e} =
124- \begin{bmatrix}
125- 1 & -R & -1 & 0 \ \cr
126- 0 & 1 & 0 & -1
127- \end{bmatrix}.
128- \end{gather}
129-
130- <h5 > Capacitor </h5 >
131-
132- <br >
133- <figure >
134- <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/capacitor.png " >
135- <figcaption class =" svCaption " > Capacitor element.
136- </figcaption >
137- </figure >
138-
139- The governing equations for the local capacitor element are
140-
141- $$ C\frac{d\left( P\_{in}^{e} - P\_{out}^{e} \right)}{dt} - Q\_{in}^{e} = 0 $$
142-
143- $$ Q\_{in}^{e} - Q\_{out}^{e} = 0. $$
144-
145- The local contributions to the global arrays are
146-
147- \begin{gather}
148- \textbf{y}^{e} =
149- \begin{bmatrix}
150- P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e}
151- \end{bmatrix}^T,
152- \end{gather}
153-
154- \begin{gather}
155- \textbf{E}^{e} =
156- \begin{bmatrix}
157- C & 0 & -C & 0 \ \cr
158- 0 & 0 & 0 & 0
159- \end{bmatrix},
160- \end{gather}
161-
162- \begin{gather}
163- \textbf{F}^{e} =
164- \begin{bmatrix}
165- 0 & -1 & 0 & 0 \ \cr
166- 0 & 1 & 0 & -1
167- \end{bmatrix}.
168- \end{gather}
169-
170- <h5 > Inductor </h5 >
171-
172- <br >
173- <figure >
174- <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/inductor.png " >
175- <figcaption class =" svCaption " > Inductor element.
176- </figcaption >
177- </figure >
178-
179- The governing equations for the local inductor element are
180-
181- $$ P\_{in}^{e} - P\_{out}^{e} - L\frac{dQ\_{in}^{e}}{dt} = 0 $$
182-
183- $$ Q\_{in}^{e} - Q\_{out}^{e} = 0. $$
184-
185- The local contributions to the global arrays are
186-
187- \begin{gather}
188- \textbf{y}^{e} =
189- \begin{bmatrix}
190- P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e}
191- \end{bmatrix}^T,
192- \end{gather}
193-
194- \begin{gather}
195- \textbf{E}^{e} =
196- \begin{bmatrix}
197- 0 & -L & 0 & 0 \ \cr
198- 0 & 0 & 0 & 0
199- \end{bmatrix},
200- \end{gather}
201-
202- \begin{gather}
203- \textbf{F}^{e} =
204- \begin{bmatrix}
205- 1 & 0 & -1 & 0 \ \cr
206- 0 & 1 & 0 & -1
207- \end{bmatrix}.
208- \end{gather}
209-
210- <h5 > Resistor-Capacitor </h5 >
211-
212- <br >
213- <figure >
214- <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/RC.png " >
215- <figcaption class =" svCaption " > Resistor-Capacitor element.
216- </figcaption >
217- </figure >
218-
219- The governing equations for the local resistor-capacitor element are
220-
221- $$ P\_{in}^{e} - P\_{out}^{e} - RQ\_{in}^{e} = 0 $$
222-
223- $$ Q\_{in}^{e} - Q\_{out}^{e} - C\frac{dP\_{out}^{e}}{dt} = 0. $$
224-
225- The local contributions to the global arrays are
226-
227- \begin{gather}
228- \textbf{y}^{e} =
229- \begin{bmatrix}
230- P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e}
231- \end{bmatrix}^T,
232- \end{gather}
233-
234- \begin{gather}
235- \textbf{E}^{e} =
236- \begin{bmatrix}
237- 0 & 0 & 0 & 0 \ \cr
238- 0 & 0 & -C & 0
239- \end{bmatrix},
240- \end{gather}
241-
242- \begin{gather}
243- \textbf{F}^{e} =
244- \begin{bmatrix}
245- 1 & -R & -1 & 0 \ \cr
246- 0 & 1 & 0 & -1
247- \end{bmatrix}.
248- \end{gather}
249-
250- <h5 > Resistor-Inductor </h5 >
251-
252- <br >
253- <figure >
254- <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/RL.png " >
255- <figcaption class =" svCaption " > Resistor-Inductor element.
100+ <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/RCL.png " >
101+ <figcaption class =" svCaption " > BloodVessel element.
256102 </figcaption >
257103</figure >
258104
259- The governing equations for the local resistor-inductor element are
260-
261- $$ P\_{in}^{e} - P\_{out}^{e} - RQ\_{in}^{e} - L\frac{dQ\_{out}^{e}}{dt} = 0 $$
262-
263- $$ Q\_{in}^{e} - Q\_{out}^{e} = 0. $$
264-
265- The local contributions to the global arrays are
266-
267- \begin{gather}
268- \textbf{y}^{e} =
269- \begin{bmatrix}
270- P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e}
271- \end{bmatrix}^T,
272- \end{gather}
105+ The BloodVessel element is a general block for modeling blood vessels. To use this block, the Poiseuille-based resistance must be specified. All other components (capacitance, inductance, and stenosis-based resistance) are optional.
273106
274- \begin{gather}
275- \textbf{E}^{e} =
276- \begin{bmatrix}
277- 0 & 0 & 0 & -L \ \cr
278- 0 & 0 & 0 & 0
279- \end{bmatrix},
280- \end{gather}
107+ <!-- All have a default value of zero, except for the curvature coefficient, which has a default value of 1. -->
281108
282- \begin{gather}
283- \textbf{F}^{e} =
284- \begin{bmatrix}
285- 1 & -R & -1 & 0 \ \cr
286- 0 & 1 & 0 & -1
287- \end{bmatrix}.
288- \end{gather}
109+ The governing equations for the local BloodVessel element, including the stenosis contribution [ 3] , are
289110
290- <h5 > Resistor-Capacitor-Inductor </h5 >
291-
292- <br >
293- <figure >
294- <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/RCL.png " >
295- <figcaption class =" svCaption " > Resistor-Capacitor-Inductor element.
296- </figcaption >
297- </figure >
298-
299- The governing equations for the local resistor-capacitor-inductor element are
300-
301- $$ P\_{in}^{e} - P\_{out}^{e} - RQ\_{in}^{e} - L\frac{dQ\_{out}^{e}}{dt} = 0 $$
111+ $$ P\_{in}^{e} - P\_{out}^{e} - R\left(Q\_{in}^{e}\right)Q\_{in}^{e} - L\frac{dQ\_{out}^{e}}{dt} = 0 $$
302112
303113$$ Q\_{in}^{e} - Q\_{out}^{e} - C\frac{dP\_{c}^{e}}{dt} = 0. $$
304114
305- $$ P\_{in}^{e} - RQ\_{in}^{e} - P\_{c} = 0 $$
115+ $$ P\_{in}^{e} - R\left(Q\_{in}^{e}\right)Q\_{in}^{e} - P\_{c} = 0 $$
116+
117+ where $R\left(Q\right) = R\_ {s}\left(Q\right) + R\_ {p}$, $R\_ {s}\left(Q\right) = K\_ {t}\frac{\rho}{2A\_ {o}^{2}}\left(\frac{A\_ {o}}{A\_ {s}} - 1\right)^{2}|Q|$, and $R\_ {p} = \frac{8\mu L}{\pi r^{4}}.$
306118
307119The local contributions to the global arrays are
308120
309121\begin{gather}
310- \textbf{y}^{e} =
311- \begin{bmatrix}
312- P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e} & P\_ {c}
313- \end{bmatrix}^T,
122+ \textbf{y}^{e} =
123+ \begin{bmatrix}
124+ P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e} & P\_ {c}
125+ \end{bmatrix}^T,
314126\end{gather}
315127
316128\begin{gather}
317- \textbf{E}^{e} =
318- \begin{bmatrix}
319- 0 & 0 & 0 & -L & 0 \ \cr
320- 0 & 0 & 0 & 0 & -C \ \cr
321- 0 & 0 & 0 & 0 & 0
322- \end{bmatrix},
129+ \textbf{E}^{e} =
130+ \begin{bmatrix}
131+ 0 & 0 & 0 & -L & 0 \ \cr
132+ 0 & 0 & 0 & 0 & -C \ \cr
133+ 0 & 0 & 0 & 0 & 0
134+ \end{bmatrix},
323135\end{gather}
324136
325137\begin{gather}
326- \textbf{F}^{e} =
327- \begin{bmatrix}
328- 1 & -R & -1 & 0 & 0 \ \cr
329- 0 & 1 & 0 & -1 & 0 \ \cr
330- 1 & -R & 0 & 0 & -1
331- \end{bmatrix}.
138+ \textbf{F}^{e} =
139+ \begin{bmatrix}
140+ 1 & -R\left(Q \_ {in}^{e}\right) & -1 & 0 & 0 \ \cr
141+ 0 & 1 & 0 & -1 & 0 \ \cr
142+ 1 & -R\left(Q \_ {in}^{e}\right) & 0 & 0 & -1
143+ \end{bmatrix}.
332144\end{gather}
333145
334- <h5 > Stenosis </h5 >
335-
336- <br >
337- <figure >
338- <img class =" svImg svImgMd " src =" /documentation/rom_simulation/0d-solver/images/stenosis.png " >
339- <figcaption class =" svCaption " > Stenosis element.
340- </figcaption >
341- </figure >
342-
343- The governing equations for the local stenosis element [ 3] are
344-
345- $$ P\_{in}^{e} - P\_{out}^{e} - R\_{pre}\left(Q\_{in}^{e}\right)Q\_{in}^{e} = 0 $$
346-
347- $$ Q\_{in}^{e} - Q\_{out}^{e} = 0, $$
348-
349- where $R\_ {pre}\left(Q\right) = K\_ {t}\frac{\rho}{2A\_ {o}^{2}}\left(\frac{A\_ {o}}{A\_ {s}} - 1\right)^{2}|Q| + R\_ {p}$ and $R\_ {p} = \frac{8\mu L}{\pi r^{4}}.$
350-
351- The local contributions to the global arrays are
352-
353146\begin{gather}
354- \textbf{y}^{e} =
355- \begin{bmatrix}
356- P\_ {in}^{e} & Q\_ {in}^{e} & P\_ {out}^{e} & Q\_ {out}^{e}
357- \end{bmatrix}^T,
147+ \textbf{dF}^{e} =
148+ \begin{bmatrix}
149+ 0 & -R\_ {s}\left(Q\_ {in}^{e}\right) & 0 & 0 & 0 \ \cr
150+ 0 & 0 & 0 & 0 & 0 \ \cr
151+ 0 & -R\_ {s}\left(Q\_ {in}^{e}\right) & 0 & 0 & 0
152+ \end{bmatrix}.
358153\end{gather}
359154
360- \begin{gather}
361- \textbf{F}^{e} =
362- \begin{bmatrix}
363- 1 & -R\_ {pre}|Q\_ {in}^{e}| - R\_ {p} & -1 & 0 \ \cr
364- 0 & 1 & 0 & -1
365- \end{bmatrix}.
366- \end{gather}
367-
368- \begin{gather}
369- \textbf{dF}^{e} =
370- \begin{bmatrix}
371- 1 & -R\_ {pre}|Q\_ {in}^{e}| & -1 & 0 \ \cr
372- 0 & 0 & 0 & 0
373- \end{bmatrix}.
374- \end{gather}
375155
376156<h5 > Junction </h5 >
377157
0 commit comments