SimVascular / svZeroDSolver-Archived

A Python lumped-parameter solver for blood flow and pressure in hemodynamic networks
Other
12 stars 15 forks source link

Volume internal in use_steady_bcs.py has two entries #74

Closed natalia-rubio closed 2 years ago

natalia-rubio commented 2 years ago

The internal volume variable in the coronary BC block is a numpy array of length 2, but we only need to add the first entry to y0. A quick fix is shown below. @JonathanPham

line 175:

volume_internal = Cc * (Pd - Pim)
assert volume_internal.size == 2, "Pim should be size 2."
assert volume_internal[0] == volume_internal[1], f"Entries of Pim are not equal."
var_name_list.append("var_0_" + block.block_name)
y0 = np.append(y0, np.array(volume_internal[0]))