Closed JonathanPham closed 3 years ago
Comments are indeed a good idea. However, there is no need to use an underscore _comments
field. Why not just have a description
field?
Awesome, @JonathanPham, thank you for these quick changes! Do you think it makes sense to get rid of the zero_d_element_type
entirely and just default to ComboBlock
(with whatever zero_d_element_values
are given)?
Let me know if you have any objections! I'm mainly thinking of "classic" cardiovascular models, but you have a broader view of 0D capabilities.
If we go through with that we could rename Combo
to BloodVessel
or something similar.
@mrp089 Good question. While the BloodVessel
(originally ComboBlock
) block is now the only built-in block capable of modeling blood vessels, there are still some advanced users (e.g. Ingrid and Mattia) who want to develop their own blocks for modeling vessels. As such, I think we should leave the zero_d_element_type
field in the json
input file so that those advanced users can use their own special blocks.
@mrp089 and @ktbolt Thanks for your suggestions!
The following updates were made:
R
, RC
, RL
, RCL
, Stenosis
) that could be modeled using the ComboBlock
. I also updated the all tests cases reflect these changes. All test cases now use the ComboBlock
.solver.py
and blocks.py
to prevent novice misuse of these blocks.ComboBlock
, we need to require that users provide a viscous Poiseuille-based resistance when they use the ComboBlock
. This requirement also aligns with our previous RC
, RL
, RCL
, and StenosisBlock
implementations, all of which required specification of a viscous Poiseuille-based resistance.ComboBlock
to BloodVessel
since the ComboBlock
is now the only (built-in) block capable of modeling blood vessels.The above address the comments in Issues #37, #38, #43.
Addresses Issue #38
Implemented the
ComboBlock
inblocks.py
to allow users to model vessels using an arbitrary combination of a resistor, a capacitor, an inductor, and/or a stenosis element. ThisComboBlock
effectively replaces theR
,RC
,RL
,RCL
, andStenosisBlock
elements, since we can model all of these using theComboBlock
now.Tested the accuracy of the
ComboBlock
by checking that it yields the same 0d simulation results as aStenosisBlock
for the attached 0d input files (from VMR). zero_d_json.zipHere's an example of how to use the
ComboBlock
to model three different elements: 1)R-C-L-stenosis
, 2)R-L
, and 3)R-C-stenosis
:We can also easily extend the new json input file format and the
ComboBlock
implementation to incorporate more complex features, such as the ones described in M. Mirramezani and S.C. Shadden. A distributed lumped parameter model of blood flow. Annals of Biomedical Engineering. 2020.Also resolving a small part of Issue #37. Added description comments to the
json
input files for the test cases.