Bleeding BiV to a 0D circulatory model and a 0D cell model

Bleeding BiV to a 0D circulatory model and a 0D cell model#

This example is similar to the BiV example. However, in this example we also simulate a bleeding of the BiV by draining the

from pathlib import Path
from typing import Literal
import json
from mpi4py import MPI
import dolfinx
import logging
import os
from functools import lru_cache
import circulation
from dolfinx import log
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
import matplotlib.pyplot as plt
import numpy as np
import gotranx
import adios4dolfinx
import cardiac_geometries
import cardiac_geometries.geometry
import pulse
# Run first Zenker to get the correct heart rate for normal conditions
def mmHg_to_kPa(x):
    return x * 0.133322
def custom_json(obj):
    if isinstance(obj, np.float64):
        return float(obj)
    elif isinstance(obj, np.ndarray):
        return obj.tolist()
    else:
        return str(obj)
def run_zenker(outdir: Path):
    zenker_file = outdir / "zenker.json"
    if not zenker_file.is_file():
        start_withdrawal = 300
        zenker = circulation.zenker.Zenker(
            parameters={
                "start_withdrawal": start_withdrawal,
                "end_withdrawal": 400,
                "flow_withdrawal": -20,
                "flow_infusion": 1,
                "Vv0_min": 1000,
                "Vv0_max": 2000,
            },
        )
        dt_eval = 0.1
        history = zenker.solve(T=700.0, dt=1e-3, dt_eval=dt_eval)
        start_plot = 0
        time = history["time"][start_plot:]

        fig, ax = plt.subplots(7, 2, sharex=True, figsize=(10, 14))
        ax[0, 0].plot(time, history["Vv"][start_plot:])
        ax[0, 0].set_ylabel("Vv [mL]")
        ax[1, 0].plot(time, history["Va"][start_plot:])
        ax[1, 0].set_ylabel("Va [mL]")
        ax[2, 0].plot(time, history["V_ED"][start_plot:])
        ax[2, 0].set_ylabel("V_ED [mL]")
        ax[3, 0].plot(time, history["V_ES"][start_plot:])
        ax[3, 0].set_ylabel("V_ES [mL]")
        SV = np.subtract(history["V_ED"], history["V_ES"])
        ax[4, 0].plot(time, SV[start_plot:], label="SV")
        ax[4, 0].set_ylabel("Stroke volume [mL]")
        ax[0, 1].plot(time, history["fHR"][start_plot:])
        ax[0, 1].set_ylabel("fHR [Hz]")
        CO = SV * history["fHR"]
        ax[1, 1].plot(time, CO[start_plot:], label="CO")
        ax[1, 1].set_ylabel("Cardiac output [mL/s]")
        ax[2, 1].plot(time, history["Pa"][start_plot:])
        ax[2, 1].set_ylabel("Pa [mmHg]")
        ax[3, 1].plot(time, history["S"][start_plot:])
        ax[3, 1].set_ylabel("S")
        ax[4, 1].plot(time, history["Pcvp"][start_plot:])
        ax[4, 1].set_ylabel("Pcvp [mmHg]")
        ax[4, 0].set_xlabel("Time [s]")
        ax[4, 1].set_xlabel("Time [s]")
        ax[5, 0].plot(time, history["R_TPR"][start_plot:])
        ax[5, 0].set_ylabel("R_TPR [mmHg/mL/s]")
        ax[5, 1].plot(time, history["C_PRSW"][start_plot:])
        ax[5, 1].set_ylabel("C_PRSW [mL/mmHg]")
        ax[5, 0].set_xlabel("Time [s]")
        ax[5, 1].set_xlabel("Time [s]")
        ax[6, 0].plot(time, history["Vv0"][start_plot:])
        ax[6, 0].set_ylabel("Vv0 [mL]")
        ax[6, 1].plot(time, history["TotalVolume"][start_plot:])
        ax[6, 1].set_ylabel("Total volume [mL]")
        ax[6, 0].set_xlabel("Time [s]")
        ax[6, 1].set_xlabel("Time [s]")
        fig.savefig(outdir / "zenker.png")

        print("Before withdrawal")
        before_index = int(start_withdrawal / dt_eval)
        HR_before = np.round(history["fHR"][before_index], decimals=1)
        print("HR: ", HR_before)
        print("R_TPR: ", history["R_TPR"][before_index])
        print("C_PRSW: ", history["C_PRSW"][before_index])
        print("Pa: ", history["Pa"][before_index])
        print("Pa kPa: ", mmHg_to_kPa(history["Pa"][before_index]))
        print("Pcvp: ", history["Pcvp"][before_index])
        print("Pcvp kPa: ", mmHg_to_kPa(history["Pcvp"][before_index]))
        print("fHR: ", history["fHR"][before_index])
        print("Total volume: ", history["TotalVolume"][before_index])

        print("\nAfter withdrawal")
        after_index = len(history["time"]) - 1
        HR_after = np.round(history["fHR"][after_index], decimals=1)
        print("HR: ", HR_after)
        print("R_TPR: ", history["R_TPR"][after_index])
        print("C_PRSW: ", history["C_PRSW"][after_index])
        print("Pa: ", history["Pa"][after_index])
        print("Pa kPa: ", mmHg_to_kPa(history["Pa"][after_index]))
        print("Pcvp: ", history["Pcvp"][after_index])
        print("Pcvp kPa: ", mmHg_to_kPa(history["Pcvp"][after_index]))
        print("fHR: ", history["fHR"][after_index])
        print("Volume end: ", history["TotalVolume"][after_index])

        print("\nChanges")

        R_TPR_factor = history["R_TPR"][after_index] / history["R_TPR"][before_index]
        C_PRSW_factor = history["C_PRSW"][after_index] / history["C_PRSW"][before_index]
        print(
            "Volume change: ",
            history["TotalVolume"][after_index] - history["TotalVolume"][before_index],
        )
        print("RTPR factor change: ", R_TPR_factor)
        print("C_PRSW factor change: ", C_PRSW_factor)

        history["HR_before"] = HR_before
        history["R_TPR_factor"] = R_TPR_factor
        history["C_PRSW_factor"] = C_PRSW_factor
        history["HR_after"] = HR_after
        history["before_index"] = before_index
        history["after_index"] = after_index



        Path(zenker_file).write_text(json.dumps(history, indent=4, default=custom_json))

    return json.loads(zenker_file.read_text())
def run_TorOrdLand(
    comm,
    outdir: Path,
    HR: float,
    Ta_factor: float = 1.0,
    dt: float = 0.001,
    label: Literal["before", "after"] = "before",
):
    BCL = 1 / HR
    T = round(BCL * 1000.0)
    print(f"Running TorOrdLand with HR {HR} and BCL {BCL:.3f} ms")
    times = np.arange(0.0, BCL, dt)

    if not Path("TorOrdLand.py").is_file():
        ode = gotranx.load_ode("TorOrdLand.ode")
        ode = ode.remove_singularities()
        code = gotranx.cli.gotran2py.get_code(
            ode,
            scheme=[gotranx.schemes.Scheme.generalized_rush_larsen],
            shape=gotranx.codegen.base.Shape.single,
        )
        Path("TorOrdLand.py").write_text(code)
    comm.barrier()
    import TorOrdLand

    TorOrdLand_model = TorOrdLand.__dict__

    Ta_index = TorOrdLand_model["monitor_index"]("Ta")
    y = TorOrdLand_model["init_state_values"]()
    # Get initial parameter values
    p = TorOrdLand_model["init_parameter_values"](i_Stim_Period=T)
    import numba

    fgr = numba.njit(TorOrdLand_model["generalized_rush_larsen"])
    mon = numba.njit(TorOrdLand_model["monitor_values"])
    V_index = TorOrdLand_model["state_index"]("v")
    Ca_index = TorOrdLand_model["state_index"]("cai")

    # Time in milliseconds
    dt_cell = 0.1

    state_file = outdir / f"state_{label}.npy"
    Ta_file = outdir / f"Ta_{label}.npy"
    if not Ta_file.is_file():

        @numba.jit(nopython=True)
        def solve_beat(times, states, dt, p, V_index, Ca_index, Vs, Cais, Tas):
            for i, ti in enumerate(times):
                states[:] = fgr(states, ti, dt, p)
                Vs[i] = states[V_index]
                Cais[i] = states[Ca_index]
                monitor = mon(ti, states, p)
                Tas[i] = monitor[Ta_index]


        nbeats = 200
        times = np.arange(0, T, dt_cell)
        all_times = np.arange(0, T * nbeats, dt_cell)
        Vs = np.zeros(len(times) * nbeats)
        Cais = np.zeros(len(times) * nbeats)
        Tas = np.zeros(len(times) * nbeats)
        for beat in range(nbeats):
            print(f"Solving beat {beat}")
            V_tmp = Vs[beat * len(times) : (beat + 1) * len(times)]
            Cai_tmp = Cais[beat * len(times) : (beat + 1) * len(times)]
            Ta_tmp = Tas[beat * len(times) : (beat + 1) * len(times)]
            solve_beat(times, y, dt_cell, p, V_index, Ca_index, V_tmp, Cai_tmp, Ta_tmp)

        fig, ax = plt.subplots(3, 2, sharex="col", sharey="row", figsize=(10, 10))
        ax[0, 0].plot(all_times, Vs)
        ax[1, 0].plot(all_times, Cais)
        ax[2, 0].plot(all_times, Tas)
        ax[0, 1].plot(times, Vs[-len(times) :])
        ax[1, 1].plot(times, Cais[-len(times) :])
        ax[2, 1].plot(times, Tas[-len(times) :])
        ax[0, 0].set_ylabel("V")
        ax[1, 0].set_ylabel("Cai")
        ax[2, 0].set_ylabel("Ta")
        ax[2, 0].set_xlabel("Time [ms]")
        ax[2, 1].set_xlabel("Time [ms]")

        fig.savefig(outdir / f"Ta_ORdLand_{label}.png")

        np.save(Ta_file, Tas[-len(times) :])
        np.save(state_file, y)

    all_Ta = np.load(Ta_file)
    ts = np.linspace(0, BCL, len(all_Ta))

    def get_activation(t: float):
        return np.interp(t % BCL, ts, all_Ta) * 10.0 * Ta_factor

    return get_activation
def run_3D_model(
    comm,
    geo,
    get_activation,
    outdir: Path,
    label: Literal["before", "after"] = "before",
    num_beats=5,
    dt: float = 0.001,
    R_TPR_factor: float = 1.0,
    C_PRSW_factor: float = 1.0,
    HR: float = 1.0,
    p_AR_SYS: float = 80.0,
    p_AR_PUL: float = 35.0,
    p_VEN_SYS: float = 30.0,
    p_VEN_PUL: float = 24.0,
    mesh_unit: str = "m",
    volume2ml: float = 1000.0,
):

    geometry = pulse.HeartGeometry.from_cardiac_geometries(
        geo,
        metadata={"quadrature_degree": 6},
    )

    material_params = pulse.HolzapfelOgden.transversely_isotropic_parameters()
    # material_params = pulse.HolzapfelOgden.orthotropic_parameters()
    material = pulse.HolzapfelOgden(f0=geo.f0, s0=geo.s0, **material_params)  # type: ignore

    # We use an active stress approach with 30% transverse active stress (see {py:meth}`pulse.active_stress.transversely_active_stress`)

    Ta = pulse.Variable(
        dolfinx.fem.Constant(geometry.mesh, dolfinx.default_scalar_type(0.0)), "kPa",
    )
    active_model = pulse.ActiveStress(geo.f0, activation=Ta)

    # We use an incompressible model

    comp_model = pulse.compressibility.Compressible2()

    # and assembles the `CardiacModel`

    model = pulse.CardiacModel(
        material=material,
        active=active_model,
        compressibility=comp_model,
    )

    alpha_epi = pulse.Variable(
        dolfinx.fem.Constant(geometry.mesh, dolfinx.default_scalar_type(2e5)),
        "Pa / m",
    )
    robin_epi = pulse.RobinBC(value=alpha_epi, marker=geometry.markers["EPI"][0])
    alpha_epi_perp = pulse.Variable(
        dolfinx.fem.Constant(geometry.mesh, dolfinx.default_scalar_type(2e5 / 10)),
        "Pa / m",
    )
    robin_epi_perp = pulse.RobinBC(
        value=alpha_epi_perp,
        marker=geometry.markers["EPI"][0],
        perpendicular=True,
    )
    alpha_base = pulse.Variable(
        dolfinx.fem.Constant(geometry.mesh, dolfinx.default_scalar_type(1e6)),
        "Pa / m",
    )
    robin_base = pulse.RobinBC(value=alpha_base, marker=geometry.markers["BASE"][0])
    robin = [robin_epi, robin_epi_perp, robin_base]

    lvv_initial = comm.allreduce(geometry.volume("LV"), op=MPI.SUM)
    lv_volume = dolfinx.fem.Constant(geometry.mesh, dolfinx.default_scalar_type(lvv_initial))
    lv_cavity = pulse.problem.Cavity(marker="LV", volume=lv_volume)

    rvv_initial = comm.allreduce(geometry.volume("RV"), op=MPI.SUM)
    rv_volume = dolfinx.fem.Constant(geometry.mesh, dolfinx.default_scalar_type(rvv_initial))
    rv_cavity = pulse.problem.Cavity(marker="RV", volume=rv_volume)

    print("Initial volumes", lvv_initial * volume2ml, rvv_initial * volume2ml)

    cavities = [lv_cavity, rv_cavity]
    parameters = {"base_bc": pulse.problem.BaseBC.free, "mesh_unit": mesh_unit}
    bcs = pulse.BoundaryConditions(robin=robin)
    problem = pulse.problem.StaticProblem(
        model=model, geometry=geometry, bcs=bcs, cavities=cavities, parameters=parameters,
    )

    problem.solve()

    vtx = dolfinx.io.VTXWriter(
        geometry.mesh.comm,
        f"{outdir}/displacement_{label}.bp",
        [problem.u],
        engine="BP4",
    )
    vtx.write(0.0)

    filename = outdir / Path(f"function_checkpoint_{label}.bp")
    adios4dolfinx.write_mesh(filename, geometry.mesh)
    output_file = outdir / f"output_{label}.json"

    Ta_history = []

    def callback(model, i: int, t: float, save=True):
        Ta_history.append(get_activation(t))

        if save:
            adios4dolfinx.write_function(filename, problem.u, time=t, name="displacement")
            vtx.write(t)
            out = {k: v[:i+1] for k, v in model.history.items()}
            out["Ta"] = Ta_history
            if comm.rank == 0:
                output_file.write_text(json.dumps(out, indent=4, default=custom_json))

                fig = plt.figure(layout="constrained", figsize=(12, 8))
                gs = GridSpec(3, 4, figure=fig)
                ax1 = fig.add_subplot(gs[:, 0])
                ax2 = fig.add_subplot(gs[:, 1])
                ax3 = fig.add_subplot(gs[0, 2])
                ax4 = fig.add_subplot(gs[1, 2])
                ax5 = fig.add_subplot(gs[0, 3])
                ax6 = fig.add_subplot(gs[1, 3])
                ax7 = fig.add_subplot(gs[2, 2:])

                ax1.plot(model.history["V_LV"][: i + 1], model.history["p_LV"][: i + 1])
                ax1.set_xlabel("LVV [mL]")
                ax1.set_ylabel("LVP [mmHg]")

                ax2.plot(model.history["V_RV"][: i + 1], model.history["p_RV"][: i + 1])
                ax2.set_xlabel("RVV [mL]")
                ax2.set_ylabel("RVP [mmHg]")

                ax3.plot(model.history["time"][: i + 1], model.history["p_LV"][: i + 1])
                ax3.set_ylabel("LVP [mmHg]")
                ax4.plot(model.history["time"][: i + 1], model.history["V_LV"][: i + 1])
                ax4.set_ylabel("LVV [mL]")

                ax5.plot(model.history["time"][: i + 1], model.history["p_RV"][: i + 1])
                ax5.set_ylabel("RVP [mmHg]")
                ax6.plot(model.history["time"][: i + 1], model.history["V_RV"][: i + 1])
                ax6.set_ylabel("RVV [mL]")

                ax7.plot(model.history["time"][: i + 1], Ta_history[: i + 1])
                ax7.set_ylabel("Ta [kPa]")

                for axi in [ax3, ax4, ax5, ax6, ax7]:
                    axi.set_xlabel("Time [s]")

                fig.savefig(outdir / f"pv_loop_incremental_{label}.png")
                plt.close(fig)
            comm.barrier()

    def p_BiV_func(V_LV, V_RV, t):
        print("Calculating pressure at time", t)
        value = get_activation(t)
        print(f"Time{t} with activation: {value} and volumes: {V_LV} mL (LV) {V_RV} mL (RV)")
        old_Ta = Ta.value.value
        dTa = value - old_Ta

        new_value_LV = V_LV * (1.0 / volume2ml)
        new_value_RV = V_RV * (1.0 / volume2ml)

        old_value_LV = lv_volume.value.copy()
        old_value_RV = rv_volume.value.copy()

        dLV = new_value_LV - old_value_LV
        dRV = new_value_RV - old_value_RV

        if abs(dLV) > 1e-12 or abs(dRV) > 1e-12 or abs(dTa) > 1e-12:
            # Only solve if there is a change in the volumedLB
            lv_volume.value = new_value_LV
            rv_volume.value = new_value_RV
            # First step can be a bit trick since Ta is non-zero, so we need to ramp it up
            if np.isclose(t, 0.0):
                for next_value in np.linspace(old_Ta, value, 10):
                    Ta.assign(next_value)
                    problem.solve()
            else:
                Ta.assign(value)
                problem.solve()

        lv_pendo_mmHg = circulation.units.kPa_to_mmHg(problem.cavity_pressures[0].x.array[0] * 1e-3)
        rv_pendo_mmHg = circulation.units.kPa_to_mmHg(problem.cavity_pressures[1].x.array[0] * 1e-3)
        print(f"Compute pressures: {lv_pendo_mmHg} mmHg (LV) {rv_pendo_mmHg} mmHg (RV)")
        return lv_pendo_mmHg, rv_pendo_mmHg

    mL = circulation.units.ureg("mL")
    mmHg = circulation.units.ureg("mmHg")
    s = circulation.units.ureg("s")
    add_units = False
    lvv_init = (
        geo.mesh.comm.allreduce(geometry.volume("LV", u=problem.u), op=MPI.SUM) * 1e6 * 1.0
    )
    rvv_init = (
        geo.mesh.comm.allreduce(geometry.volume("RV", u=problem.u), op=MPI.SUM) * 1e6 * 1.0
    )
    print(f"Initial volume (LV): {lvv_init} mL and (RV): {rvv_init} mL")
    init_state = {
        "V_LV": lvv_initial * 1e6 * mL,
        "V_RV": rvv_initial * 1e6 * mL,
        'p_AR_PUL': p_AR_PUL * mmHg,
        'p_AR_SYS': p_AR_SYS * mmHg,
        'p_VEN_PUL': p_VEN_PUL * mmHg,
        'p_VEN_SYS': p_VEN_SYS * mmHg,
    }

    regazzoni_parmeters = circulation.regazzoni2020.Regazzoni2020.default_parameters()
    regazzoni_parmeters["HR"] = HR
    regazzoni_parmeters["circulation"]["SYS"]["R_AR"] *= R_TPR_factor
    regazzoni_parmeters["circulation"]["SYS"]["R_VEN"] *= R_TPR_factor
    for chamber in ["LA", "RA"]:
        regazzoni_parmeters["chambers"][chamber]["EA"] *= C_PRSW_factor
        regazzoni_parmeters["chambers"][chamber]["EB"] *= C_PRSW_factor

    # Adjust time constant based on HR
    regazzoni_parmeters["chambers"]["LA"]["TC"] = 0.17 / HR * s
    regazzoni_parmeters["chambers"]["LA"]["TR"] = 0.17 / HR * s
    regazzoni_parmeters["chambers"]["LA"]["tC"] = 0.8 / HR * s
    regazzoni_parmeters["chambers"]["RA"]["TC"] = 0.17 / HR * s
    regazzoni_parmeters["chambers"]["RA"]["TR"] = 0.17 / HR * s
    regazzoni_parmeters["chambers"]["RA"]["tC"] = 0.8 / HR * s

    regazzoni = circulation.regazzoni2020.Regazzoni2020(
        add_units=add_units,
        callback=callback,
        p_BiV=p_BiV_func,
        verbose=True,
        comm=comm,
        outdir=outdir,
        initial_state=init_state,
        parameters=regazzoni_parmeters,
    )
    # Set end time for early stopping if running in CI
    end_time = 2 * dt if os.getenv("CI") else None
    regazzoni.solve(num_beats=num_beats, initial_state=init_state, dt=dt, T=end_time) #, checkpoint=RR)
    regazzoni.print_info()
circulation.log.setup_logging(logging.INFO)
log.set_log_level(log.LogLevel.INFO)
logger = logging.getLogger("pulse")
comm = MPI.COMM_WORLD
geodir = Path("ukb")
if not geodir.exists():
    comm.barrier()
    cardiac_geometries.mesh.ukb(
        outdir=geodir,
        comm=comm,
        mode=-1,
        case="ED",
        char_length_max=10.0,
        char_length_min=10.0,
        fiber_angle_endo=60,
        fiber_angle_epi=-60,
        fiber_space="DG_0",
        clipped=True,
    )
[08/26/25 13:07:38] INFO     INFO:ukb.atlas:Downloading https://www.cardiacatlas.org/share/download.php?id=60&token=AR3JSoaxJ9Ev9n8QAkvV4BHJUniyttqm&download to                             atlas.py:59
                             /github/home/.ukb/UKBRVLV.zip. This may take a while.                                                                                                                      
[08/26/25 13:07:42] INFO     INFO:ukb.atlas:Done downloading.                                                                                                                                atlas.py:65
                    INFO     INFO:ukb.atlas:Generating points from /github/home/.ukb/UKBRVLV.h5 using mode -1 and std 1.5                                                                    atlas.py:92
                    INFO     INFO:ukb.surface:Saved ukb/EPI_ED.stl                                                                                                                        surface.py:184
                    INFO     INFO:ukb.surface:Saved ukb/MV_ED.stl                                                                                                                         surface.py:189
                    INFO     INFO:ukb.surface:Saved ukb/AV_ED.stl                                                                                                                         surface.py:189
                    INFO     INFO:ukb.surface:Saved ukb/TV_ED.stl                                                                                                                         surface.py:189
                    INFO     INFO:ukb.surface:Saved ukb/PV_ED.stl                                                                                                                         surface.py:189
                    INFO     INFO:ukb.surface:Saved ukb/LV_ED.stl                                                                                                                         surface.py:197
                    INFO     INFO:ukb.surface:Saved ukb/RV_ED.stl                                                                                                                         surface.py:197
                    INFO     INFO:ukb.surface:Saved ukb/RVFW_ED.stl                                                                                                                       surface.py:197
                    INFO     INFO:ukb.clip:Folder: ukb                                                                                                                                       clip.py:142
                    INFO     INFO:ukb.clip:Case: ED                                                                                                                                          clip.py:143
                    INFO     INFO:ukb.clip:Origin: [-13.612554383622273, 18.55767189380559, 15.135103714006394]                                                                              clip.py:144
                    INFO     INFO:ukb.clip:Normal: [-0.7160843664428893, 0.544394641424108, 0.4368725838557541]                                                                              clip.py:145
                    INFO     INFO:ukb.clip:Reading ukb/LV_ED.stl                                                                                                                             clip.py:155
Warning: PLY writer doesn't support multidimensional point data yet. Skipping Normals.
Warning: PLY doesn't support 64-bit integers. Casting down to 32-bit.
                    INFO     INFO:ukb.clip:Saved ukb/lv_clipped.ply                                                                                                                          clip.py:160
                    INFO     INFO:ukb.clip:Reading ukb/RV_ED.stl                                                                                                                             clip.py:164
                    INFO     INFO:ukb.clip:Reading ukb/RVFW_ED.stl                                                                                                                           clip.py:170
                    INFO     INFO:ukb.clip:Merging RV and RVFW                                                                                                                               clip.py:172
                    INFO     INFO:ukb.clip:Smoothing RV                                                                                                                                      clip.py:175
                    INFO     INFO:ukb.clip:Saving ukb/rv_clipped.ply                                                                                                                         clip.py:179
Warning: PLY writer doesn't support multidimensional point data yet. Skipping Normals.
Warning: PLY doesn't support 64-bit integers. Casting down to 32-bit.
                    INFO     INFO:ukb.clip:Reading ukb/EPI_ED.stl                                                                                                                            clip.py:184
                    INFO     INFO:ukb.clip:Saving ukb/epi_clipped.ply                                                                                                                        clip.py:188
Warning: PLY writer doesn't support multidimensional point data yet. Skipping Normals.
Warning: PLY doesn't support 64-bit integers. Casting down to 32-bit.
0
                    INFO     INFO:ukb.mesh:Creating clipped mesh for ED with char_length_max=10.0, char_length_min=10.0                                                                      mesh.py:264
                    INFO     INFO:ukb.mesh:Created mesh ukb/ED_clipped.msh                                                                                                                   mesh.py:321
Info    : Reading 'ukb/ED_clipped.msh'...
Info    : 11 entities
Info    : 690 nodes
Info    : 3414 elements
Info    : 3 parametrizations
Info    : [  0%] Processing parametrizations                                                                                
Info    : [ 10%] Processing parametrizations                                                                                
Info    : [ 40%] Processing parametrizations                                                                                
Info    : Done reading 'ukb/ED_clipped.msh'
[2025-08-26 13:07:42.846] [info] Extract basic topology: 8536->8536
[2025-08-26 13:07:42.846] [info] Build local dual graph
[2025-08-26 13:07:42.846] [info] Build local part of mesh dual graph (mixed)
[2025-08-26 13:07:42.848] [info] GPS pseudo-diameter:(51) 149-791
[2025-08-26 13:07:42.848] [info] Create topology (single cell type)
[2025-08-26 13:07:42.848] [info] Create topology (generalised)
[2025-08-26 13:07:42.848] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:42.848] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:42.849] [info] Compute ghost indices
[2025-08-26 13:07:42.849] [info] Computing communication graph edges (using PCX algorithm). Number of input edges: 0
[2025-08-26 13:07:42.849] [info] Finished graph edge discovery using PCX algorithm. Number of discovered edges 0
[2025-08-26 13:07:42.849] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:42.849] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:42.849] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:42.849] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:42.849] [info] Number of neighbourhood source ranks in distribute_to_postoffice: 0
[2025-08-26 13:07:42.849] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:42.849] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:42.849] [info] Neighbourhood destination ranks from post office in distribute_data (rank, num dests, num dests/mpi_size): 0, 0, 0
[2025-08-26 13:07:42.849] [info] Checking required entities per dimension
[2025-08-26 13:07:42.849] [info] Cell type: 0 dofmap: 2134x4
[2025-08-26 13:07:42.850] [info] Global index computation
[2025-08-26 13:07:42.850] [info] Got 1 index_maps
[2025-08-26 13:07:42.850] [info] Get global indices
[2025-08-26 13:07:42.850] [info] XDMF distribute entity data
[2025-08-26 13:07:42.850] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:42.850] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:42.850] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:42.850] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:42.850] [info] XDMF build map
[2025-08-26 13:07:42.851] [info] Requesting connectivity (3, 0) - (0, 0)
[2025-08-26 13:07:42.851] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:42.851] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:42.852] [info] XDMF distribute entity data
[2025-08-26 13:07:42.852] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:42.852] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:42.852] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:42.852] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:42.853] [info] XDMF build map
[2025-08-26 13:07:42.853] [info] Computing mesh entities of dimension 2
[2025-08-26 13:07:42.854] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:42.854] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:42.854] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:07:42.854] [info] Computing mesh connectivity 2-3 from transpose.
[2025-08-26 13:07:42.854] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:42.854] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:42.858] [info] Opened HDF5 file with id "72057594037927936"
[2025-08-26 13:07:42.858] [info] Adding mesh to node "/Xdmf/Domain"
[2025-08-26 13:07:42.858] [info] Adding topology data to node /Xdmf/Domain/Grid
[2025-08-26 13:07:42.858] [info] Adding geometry data to node "/Xdmf/Domain/Grid"
[2025-08-26 13:07:42.858] [info] XDMF: add meshtags (Cell tags)
[2025-08-26 13:07:42.858] [info] Adding topology data to node /Xdmf/Domain/Grid
[2025-08-26 13:07:42.858] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:07:42.858] [info] XDMF: add meshtags (Facet tags)
[2025-08-26 13:07:42.858] [info] Adding topology data to node /Xdmf/Domain/Grid
[2025-08-26 13:07:42.859] [info] Computing mesh entities of dimension 1
[2025-08-26 13:07:42.860] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:42.860] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:42.860] [info] Requesting connectivity (1, 0) - (3, 0)
[2025-08-26 13:07:42.860] [info] Computing mesh connectivity 1-3 from transpose.
[2025-08-26 13:07:42.860] [info] XDMF: add meshtags (Edge tags)
[2025-08-26 13:07:42.860] [info] Adding topology data to node /Xdmf/Domain/Grid
[2025-08-26 13:07:42.861] [info] Requesting connectivity (0, 0) - (3, 0)
[2025-08-26 13:07:42.861] [info] Computing mesh connectivity 0-3 from transpose.
[2025-08-26 13:07:42.861] [info] XDMF: add meshtags (Vertex tags)
[2025-08-26 13:07:42.861] [info] Adding topology data to node /Xdmf/Domain/Grid
[08/26/25 13:07:47] INFO     INFO:ldrb.ldrb:Calculating scalar fields                                                                                                                        ldrb.py:319
                    INFO     INFO:ldrb.ldrb:Compute scalar laplacian solutions with the markers:                                                                                             ldrb.py:575
                             lv: [1]                                                                                                                                                                    
                             rv: [2]                                                                                                                                                                    
                             epi: [3]                                                                                                                                                                   
                             base: [4]                                                                                                                                                                  
                    INFO     INFO:ldrb.ldrb:  Num vertices: 690                                                                                                                              ldrb.py:592
                    INFO     INFO:ldrb.ldrb:  Num cells: 2134                                                                                                                                ldrb.py:593
[2025-08-26 13:07:47.753] [info] Checking required entities per dimension
[2025-08-26 13:07:47.753] [info] Cell type: 0 dofmap: 2134x4
[2025-08-26 13:07:47.754] [info] Global index computation
[2025-08-26 13:07:47.754] [info] Got 1 index_maps
[2025-08-26 13:07:47.754] [info] Get global indices
[2025-08-26 13:07:47.755] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:07:47.759] [info] Column ghost size increased from 0 to 0
                    INFO     INFO:ldrb.ldrb:  Apex coord: (50.82, -12.96, -28.34)                                                                                                            ldrb.py:445
[2025-08-26 13:07:47.766] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:07:47.766] [info] Requesting connectivity (2, 0) - (0, 0)
[2025-08-26 13:07:47.766] [info] Requesting connectivity (2, 0) - (0, 0)
[2025-08-26 13:07:47.767] [info] Requesting connectivity (0, 0) - (3, 0)
[2025-08-26 13:07:47.767] [info] Requesting connectivity (3, 0) - (0, 0)
[2025-08-26 13:07:47.771] [info] Column ghost size increased from 0 to 0
[2025-08-26 13:07:47.778] [info] Column ghost size increased from 0 to 0
[2025-08-26 13:07:47.784] [info] Column ghost size increased from 0 to 0
[2025-08-26 13:07:47.789] [info] Column ghost size increased from 0 to 0
[2025-08-26 13:07:47.795] [info] Column ghost size increased from 0 to 0
                    INFO     INFO:ldrb.ldrb:                                                                                                                                                 ldrb.py:327
                             Calculating gradients                                                                                                                                                      
[2025-08-26 13:07:47.802] [info] Checking required entities per dimension
[2025-08-26 13:07:47.802] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:47.802] [info] Global index computation
[2025-08-26 13:07:47.802] [info] Got 1 index_maps
[2025-08-26 13:07:47.802] [info] Get global indices
[2025-08-26 13:07:47.803] [info] Checking required entities per dimension
[2025-08-26 13:07:47.803] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:47.803] [info] Global index computation
[2025-08-26 13:07:47.803] [info] Got 1 index_maps
[2025-08-26 13:07:47.803] [info] Get global indices
[2025-08-26 13:07:48.592] [info] Checking required entities per dimension
[2025-08-26 13:07:48.592] [info] Cell type: 0 dofmap: 2134x1
[08/26/25 13:07:48] INFO     INFO:ldrb.ldrb:Compute fiber-sheet system                                                                                                                        ldrb.py:79
[2025-08-26 13:07:48.592] [info] Global index computation
[2025-08-26 13:07:48.592] [info] Got 1 index_maps
[2025-08-26 13:07:48.592] [info] Get global indices
[2025-08-26 13:07:48.593] [info] Checking required entities per dimension
[2025-08-26 13:07:48.593] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:48.593] [info] Global index computation
[2025-08-26 13:07:48.593] [info] Got 1 index_maps
[2025-08-26 13:07:48.593] [info] Get global indices
                    INFO     INFO:ldrb.ldrb:Angles:                                                                                                                                           ldrb.py:80
                    INFO     INFO:ldrb.ldrb:alpha:                                                                                                                                            ldrb.py:81
                              endo_lv: 60                                                                                                                                                               
                              epi_lv: -60                                                                                                                                                               
                              endo_septum: 60                                                                                                                                                           
                              epi_septum: -60                                                                                                                                                           
                              endo_rv: 60                                                                                                                                                               
                              epi_rv: -60                                                                                                                                                               
                    INFO     INFO:ldrb.ldrb:beta:                                                                                                                                             ldrb.py:93
                              endo_lv: 0                                                                                                                                                                
                              epi_lv: 0                                                                                                                                                                 
                              endo_septum: 0                                                                                                                                                            
                              epi_septum: 0                                                                                                                                                             
                              endo_rv: 0                                                                                                                                                                
                              epi_rv: 0                                                                                                                                                                 
[2025-08-26 13:07:49.711] [info] Checking required entities per dimension
[2025-08-26 13:07:49.711] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.711] [info] Global index computation
[2025-08-26 13:07:49.711] [info] Got 1 index_maps
[2025-08-26 13:07:49.711] [info] Get global indices
[2025-08-26 13:07:49.712] [info] Checking required entities per dimension
[2025-08-26 13:07:49.712] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.712] [info] Global index computation
[2025-08-26 13:07:49.712] [info] Got 1 index_maps
[2025-08-26 13:07:49.713] [info] Get global indices
[2025-08-26 13:07:49.715] [info] Compute face permutations
[2025-08-26 13:07:49.715] [info] Computing permutations for face type 0
[2025-08-26 13:07:49.715] [info] Compute edge permutations
[08/26/25 13:07:49] INFO     INFO:cardiac_geometries.geometry:Reading geometry from ukb                                                                                                  geometry.py:323
[2025-08-26 13:07:49.735] [info] Opened HDF5 file with id "72057594037927937"
[2025-08-26 13:07:49.735] [info] Read topology data "Mesh" at /Xdmf/Domain
[2025-08-26 13:07:49.735] [info] HDF5 Read data rate: 2369.136830419095 MB/s
[2025-08-26 13:07:49.735] [info] IO permuting cells
[2025-08-26 13:07:49.735] [info] Read geometry data "Mesh" at /Xdmf/Domain
[2025-08-26 13:07:49.735] [info] HDF5 Read data rate: 307.7437698611808 MB/s
[2025-08-26 13:07:49.737] [info] Using partitioner with 8536 cell data
[2025-08-26 13:07:49.737] [info] Compute partition of cells across ranks
[2025-08-26 13:07:49.737] [info] Building mesh dual graph
[2025-08-26 13:07:49.737] [info] Build local part of mesh dual graph (mixed)
[2025-08-26 13:07:49.738] [info] Build nonlocal part of mesh dual graph
[2025-08-26 13:07:49.738] [info] Graph edges (local: 7256, non-local: 0)
[2025-08-26 13:07:49.738] [info] Compute graph partition using PT-SCOTCH
[2025-08-26 13:07:49.739] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.739] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.739] [info] Extract basic topology: 8536->8536
[2025-08-26 13:07:49.739] [info] Build local dual graph
[2025-08-26 13:07:49.739] [info] Build local part of mesh dual graph (mixed)
[2025-08-26 13:07:49.740] [info] GPS pseudo-diameter:(51) 2133-0
[2025-08-26 13:07:49.740] [info] Create topology (single cell type)
[2025-08-26 13:07:49.740] [info] Create topology (generalised)
[2025-08-26 13:07:49.740] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.740] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.740] [info] Compute ghost indices
[2025-08-26 13:07:49.740] [info] Computing communication graph edges (using PCX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.740] [info] Finished graph edge discovery using PCX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.741] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.741] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.741] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.741] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.741] [info] Number of neighbourhood source ranks in distribute_to_postoffice: 0
[2025-08-26 13:07:49.741] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.741] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.741] [info] Neighbourhood destination ranks from post office in distribute_data (rank, num dests, num dests/mpi_size): 0, 0, 0
[2025-08-26 13:07:49.741] [info] Checking required entities per dimension
[2025-08-26 13:07:49.741] [info] Cell type: 0 dofmap: 2134x4
[2025-08-26 13:07:49.741] [info] Global index computation
[2025-08-26 13:07:49.741] [info] Got 1 index_maps
[2025-08-26 13:07:49.741] [info] Get global indices
[2025-08-26 13:07:49.742] [info] Requesting connectivity (3, 0) - (3, 0)
[2025-08-26 13:07:49.742] [info] XDMF read meshtags (Cell tags)
[2025-08-26 13:07:49.742] [info] Read topology data "Cell tags" at /Xdmf/Domain
[2025-08-26 13:07:49.742] [info] HDF5 Read data rate: 2631.724988438415 MB/s
[2025-08-26 13:07:49.742] [info] IO permuting cells
[2025-08-26 13:07:49.742] [info] HDF5 Read data rate: 519.8221789172402 MB/s
[2025-08-26 13:07:49.742] [info] IO permuting cells
[2025-08-26 13:07:49.742] [info] XDMF distribute entity data
[2025-08-26 13:07:49.742] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.742] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.742] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.742] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.743] [info] XDMF build map
[2025-08-26 13:07:49.743] [info] XDMF create meshtags
[2025-08-26 13:07:49.743] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.743] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.744] [info] Computing mesh entities of dimension 2
[2025-08-26 13:07:49.745] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.745] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.746] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:07:49.746] [info] Computing mesh connectivity 2-3 from transpose.
[2025-08-26 13:07:49.746] [info] XDMF read meshtags (Facet tags)
[2025-08-26 13:07:49.746] [info] Read topology data "Facet tags" at /Xdmf/Domain
[2025-08-26 13:07:49.746] [info] HDF5 Read data rate: 1765.212894328564 MB/s
[2025-08-26 13:07:49.746] [info] IO permuting cells
[2025-08-26 13:07:49.746] [info] HDF5 Read data rate: 667.1879072191817 MB/s
[2025-08-26 13:07:49.746] [info] IO permuting cells
[2025-08-26 13:07:49.746] [info] XDMF distribute entity data
[2025-08-26 13:07:49.746] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.746] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.746] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.746] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.746] [info] XDMF build map
[2025-08-26 13:07:49.747] [info] XDMF create meshtags
[2025-08-26 13:07:49.747] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.747] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.748] [info] Computing mesh entities of dimension 1
[2025-08-26 13:07:49.749] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.749] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.749] [info] Requesting connectivity (1, 0) - (3, 0)
[2025-08-26 13:07:49.749] [info] Computing mesh connectivity 1-3 from transpose.
[2025-08-26 13:07:49.749] [info] XDMF read meshtags (Edge tags)
[2025-08-26 13:07:49.749] [info] Read topology data "Edge tags" at /Xdmf/Domain
[2025-08-26 13:07:49.749] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.749] [info] IO permuting cells
[2025-08-26 13:07:49.750] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.750] [info] IO permuting cells
[2025-08-26 13:07:49.750] [info] XDMF distribute entity data
[2025-08-26 13:07:49.750] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.750] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.750] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.750] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.750] [info] XDMF build map
[2025-08-26 13:07:49.750] [info] XDMF create meshtags
[2025-08-26 13:07:49.750] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.750] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.751] [info] Requesting connectivity (0, 0) - (3, 0)
[2025-08-26 13:07:49.751] [info] Computing mesh connectivity 0-3 from transpose.
[2025-08-26 13:07:49.751] [info] XDMF read meshtags (Vertex tags)
[2025-08-26 13:07:49.751] [info] Read topology data "Vertex tags" at /Xdmf/Domain
[2025-08-26 13:07:49.751] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.751] [info] IO permuting cells
[2025-08-26 13:07:49.751] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.751] [info] IO permuting cells
[2025-08-26 13:07:49.751] [info] XDMF distribute entity data
[2025-08-26 13:07:49.751] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.751] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.751] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.751] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.751] [info] XDMF build map
[2025-08-26 13:07:49.751] [info] XDMF create meshtags
[2025-08-26 13:07:49.751] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.751] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.753] [info] Checking required entities per dimension
[2025-08-26 13:07:49.753] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.753] [info] Global index computation
[2025-08-26 13:07:49.753] [info] Got 1 index_maps
[2025-08-26 13:07:49.753] [info] Get global indices
[2025-08-26 13:07:49.754] [info] Compute face permutations
[2025-08-26 13:07:49.754] [info] Computing permutations for face type 0
[2025-08-26 13:07:49.754] [info] Compute edge permutations
[2025-08-26 13:07:49.759] [info] Checking required entities per dimension
[2025-08-26 13:07:49.759] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.759] [info] Global index computation
[2025-08-26 13:07:49.759] [info] Got 1 index_maps
[2025-08-26 13:07:49.759] [info] Get global indices
[2025-08-26 13:07:49.763] [info] Checking required entities per dimension
[2025-08-26 13:07:49.763] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.763] [info] Global index computation
[2025-08-26 13:07:49.763] [info] Got 1 index_maps
[2025-08-26 13:07:49.763] [info] Get global indices
outdir = Path("bleeding_biv")
outdir.mkdir(exist_ok=True)
geo = cardiac_geometries.geometry.Geometry.from_folder(
    comm=comm,
    folder=geodir,
)
scale_mesh = True
                    INFO     INFO:cardiac_geometries.geometry:Reading geometry from ukb                                                                                                  geometry.py:323
[2025-08-26 13:07:49.777] [info] Opened HDF5 file with id "72057594037927938"
[2025-08-26 13:07:49.777] [info] Read topology data "Mesh" at /Xdmf/Domain
[2025-08-26 13:07:49.777] [info] HDF5 Read data rate: 1105.0553433879215 MB/s
[2025-08-26 13:07:49.777] [info] IO permuting cells
[2025-08-26 13:07:49.777] [info] Read geometry data "Mesh" at /Xdmf/Domain
[2025-08-26 13:07:49.777] [info] HDF5 Read data rate: 1120.5846528623629 MB/s
[2025-08-26 13:07:49.779] [info] Using partitioner with 8536 cell data
[2025-08-26 13:07:49.779] [info] Compute partition of cells across ranks
[2025-08-26 13:07:49.779] [info] Building mesh dual graph
[2025-08-26 13:07:49.779] [info] Build local part of mesh dual graph (mixed)
[2025-08-26 13:07:49.780] [info] Build nonlocal part of mesh dual graph
[2025-08-26 13:07:49.780] [info] Graph edges (local: 7256, non-local: 0)
[2025-08-26 13:07:49.780] [info] Compute graph partition using PT-SCOTCH
[2025-08-26 13:07:49.781] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.781] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.781] [info] Extract basic topology: 8536->8536
[2025-08-26 13:07:49.781] [info] Build local dual graph
[2025-08-26 13:07:49.781] [info] Build local part of mesh dual graph (mixed)
[2025-08-26 13:07:49.782] [info] GPS pseudo-diameter:(51) 2133-0
[2025-08-26 13:07:49.782] [info] Create topology (single cell type)
[2025-08-26 13:07:49.782] [info] Create topology (generalised)
[2025-08-26 13:07:49.782] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.782] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.782] [info] Compute ghost indices
[2025-08-26 13:07:49.782] [info] Computing communication graph edges (using PCX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.782] [info] Finished graph edge discovery using PCX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.783] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.783] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.783] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.783] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.783] [info] Number of neighbourhood source ranks in distribute_to_postoffice: 0
[2025-08-26 13:07:49.783] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.783] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.783] [info] Neighbourhood destination ranks from post office in distribute_data (rank, num dests, num dests/mpi_size): 0, 0, 0
[2025-08-26 13:07:49.783] [info] Checking required entities per dimension
[2025-08-26 13:07:49.783] [info] Cell type: 0 dofmap: 2134x4
[2025-08-26 13:07:49.783] [info] Global index computation
[2025-08-26 13:07:49.783] [info] Got 1 index_maps
[2025-08-26 13:07:49.783] [info] Get global indices
[2025-08-26 13:07:49.784] [info] Requesting connectivity (3, 0) - (3, 0)
[2025-08-26 13:07:49.784] [info] XDMF read meshtags (Cell tags)
[2025-08-26 13:07:49.784] [info] Read topology data "Cell tags" at /Xdmf/Domain
[2025-08-26 13:07:49.784] [info] HDF5 Read data rate: 2108.2399431940967 MB/s
[2025-08-26 13:07:49.784] [info] IO permuting cells
[2025-08-26 13:07:49.785] [info] HDF5 Read data rate: 778.7610619469026 MB/s
[2025-08-26 13:07:49.785] [info] IO permuting cells
[2025-08-26 13:07:49.785] [info] XDMF distribute entity data
[2025-08-26 13:07:49.785] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.785] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.785] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.785] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.785] [info] XDMF build map
[2025-08-26 13:07:49.786] [info] XDMF create meshtags
[2025-08-26 13:07:49.786] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.786] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.787] [info] Computing mesh entities of dimension 2
[2025-08-26 13:07:49.788] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.788] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.788] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:07:49.788] [info] Computing mesh connectivity 2-3 from transpose.
[2025-08-26 13:07:49.788] [info] XDMF read meshtags (Facet tags)
[2025-08-26 13:07:49.788] [info] Read topology data "Facet tags" at /Xdmf/Domain
[2025-08-26 13:07:49.788] [info] HDF5 Read data rate: 1647.6267095736123 MB/s
[2025-08-26 13:07:49.788] [info] IO permuting cells
[2025-08-26 13:07:49.788] [info] HDF5 Read data rate: 652.6449968132569 MB/s
[2025-08-26 13:07:49.788] [info] IO permuting cells
[2025-08-26 13:07:49.788] [info] XDMF distribute entity data
[2025-08-26 13:07:49.788] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.788] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.788] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.788] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.788] [info] XDMF build map
[2025-08-26 13:07:49.789] [info] XDMF create meshtags
[2025-08-26 13:07:49.789] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.789] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.790] [info] Computing mesh entities of dimension 1
[2025-08-26 13:07:49.792] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.792] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.792] [info] Requesting connectivity (1, 0) - (3, 0)
[2025-08-26 13:07:49.792] [info] Computing mesh connectivity 1-3 from transpose.
[2025-08-26 13:07:49.792] [info] XDMF read meshtags (Edge tags)
[2025-08-26 13:07:49.792] [info] Read topology data "Edge tags" at /Xdmf/Domain
[2025-08-26 13:07:49.792] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.792] [info] IO permuting cells
[2025-08-26 13:07:49.792] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.792] [info] IO permuting cells
[2025-08-26 13:07:49.792] [info] XDMF distribute entity data
[2025-08-26 13:07:49.792] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.792] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.792] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.792] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.793] [info] XDMF build map
[2025-08-26 13:07:49.793] [info] XDMF create meshtags
[2025-08-26 13:07:49.793] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.793] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.794] [info] Requesting connectivity (0, 0) - (3, 0)
[2025-08-26 13:07:49.794] [info] Computing mesh connectivity 0-3 from transpose.
[2025-08-26 13:07:49.794] [info] XDMF read meshtags (Vertex tags)
[2025-08-26 13:07:49.794] [info] Read topology data "Vertex tags" at /Xdmf/Domain
[2025-08-26 13:07:49.794] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.794] [info] IO permuting cells
[2025-08-26 13:07:49.794] [info] HDF5 Read data rate: 0 MB/s
[2025-08-26 13:07:49.794] [info] IO permuting cells
[2025-08-26 13:07:49.794] [info] XDMF distribute entity data
[2025-08-26 13:07:49.794] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 0
[2025-08-26 13:07:49.794] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 0
[2025-08-26 13:07:49.794] [info] Computing communication graph edges (using NBX algorithm). Number of input edges: 1
[2025-08-26 13:07:49.794] [info] Finished graph edge discovery using NBX algorithm. Number of discovered edges 1
[2025-08-26 13:07:49.794] [info] XDMF build map
[2025-08-26 13:07:49.794] [info] XDMF create meshtags
[2025-08-26 13:07:49.794] [info] Building MeshTags object from tagged entities (defined by vertices).
[2025-08-26 13:07:49.794] [info] Build list of mesh entity indices from the entity vertices.
[2025-08-26 13:07:49.797] [info] Checking required entities per dimension
[2025-08-26 13:07:49.797] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.797] [info] Global index computation
[2025-08-26 13:07:49.797] [info] Got 1 index_maps
[2025-08-26 13:07:49.797] [info] Get global indices
[2025-08-26 13:07:49.798] [info] Compute face permutations
[2025-08-26 13:07:49.798] [info] Computing permutations for face type 0
[2025-08-26 13:07:49.798] [info] Compute edge permutations
[2025-08-26 13:07:49.801] [info] Checking required entities per dimension
[2025-08-26 13:07:49.801] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.801] [info] Global index computation
[2025-08-26 13:07:49.802] [info] Got 1 index_maps
[2025-08-26 13:07:49.802] [info] Get global indices
[2025-08-26 13:07:49.805] [info] Checking required entities per dimension
[2025-08-26 13:07:49.805] [info] Cell type: 0 dofmap: 2134x1
[2025-08-26 13:07:49.806] [info] Global index computation
[2025-08-26 13:07:49.806] [info] Got 1 index_maps
[2025-08-26 13:07:49.806] [info] Get global indices
if scale_mesh:
    geo.mesh.geometry.x[:] *= 1e-3
    volume2ml = 1e6
    mesh_unit = "m"
else:
    volume2ml = 1e-3
    mesh_unit = "mm"
dt = 0.001
zenker_history = run_zenker(outdir=outdir)
HR_before = zenker_history["HR_before"]
R_TPR_factor = zenker_history["R_TPR_factor"]
C_PRSW_factor = zenker_history["C_PRSW_factor"]
HR_after = zenker_history["HR_after"]
Pa_before = zenker_history["Pa"][zenker_history["before_index"]]
Pcvp_before = zenker_history["Pcvp"][zenker_history["before_index"]]

                    INFO     INFO:circulation.base:                                                                                                                                          base.py:132
                                           Circulation model parameters (Zenker)                                                                                                                        
                             ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                                                                                          
                             ┃ Parameter        ┃ Value                                      ┃                                                                                                          
                             ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩                                                                                                          
                             │ kE_LV            │ 0.066 / milliliter                         │                                                                                                          
                             │ V_ED0            │ 7.14 milliliter                            │                                                                                                          
                             │ P0_LV            │ 2.03 millimeter_Hg                         │                                                                                                          
                             │ tau_Baro         │ 20.0 second                                │                                                                                                          
                             │ k_width          │ 0.1838 / millimeter_Hg                     │                                                                                                          
                             │ Pa_set           │ 70.0 millimeter_Hg                         │                                                                                                          
                             │ Ca               │ 4.0 milliliter / millimeter_Hg             │                                                                                                          
                             │ Cv               │ 111.11 milliliter / millimeter_Hg          │                                                                                                          
                             │ Va0              │ 700 milliliter                             │                                                                                                          
                             │ Vv0_min          │ 1000           
                             │ Vv0_max          │ 2000           
                             │ R_TPR_min        │ 0.5335 millimeter_Hg * second / milliliter │                                                                                                          
                             │ R_TPR_max        │ 2.134 millimeter_Hg * second / milliliter  │                                                                                                          
                             │ T_sys            │ 0.26666666666666666 second                 │                                                                                                          
                             │ f_HR_min         │ 0.6666666666666666 / second                │                                                                                                          
                             │ f_HR_max         │ 3.0 / second                               │                                                                                                          
                             │ R_valve          │ 0.0025 millimeter_Hg * second / milliliter │                                                                                                          
                             │ C_PRSW_min       │ 25.9 millimeter_Hg                         │                                                                                                          
                             │ C_PRSW_max       │ 103.8 millimeter_Hg                        │                                                                                                          
                             │ start_withdrawal │ 300           
                             │ end_withdrawal   │ 400           
                             │ start_infusion   │ 0.0 second                                 │                                                                                                          
                             │ end_infusion     │ 0.0 second                                 │                                                                                                          
                             │ flow_withdrawal  │ -20           
                             │ flow_infusion    │ 1           
                             └──────────────────┴────────────────────────────────────────────┘                                                                                                          

                    INFO     INFO:circulation.base:                                                                                                                                          base.py:138
                             Circulation model initial states (Zenker)                                                                                                                                  
                             ┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                                                                                                                  
                             ┃ State ┃ Value                         ┃                                                                                                                                  
                             ┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩                                                                                                                                  
                             │ V_ES  │ 14.288 milliliter             │                                                                                                                                  
                             │ V_ED  │ 21.432000000000002 milliliter │                                                                                                                                  
                             │ S     │ 0.5 dimensionless             │                                                                                                                                  
                             │ Va    │ 938.1944444444443 milliliter  │                                                                                                                                  
                             │ Vv    │ 3886.805555555555 milliliter  │                                                                                                                                  
                             └───────┴───────────────────────────────┘                                                                                                                                  
                    INFO     INFO:circulation.base:Running circulation model                                                                                                                 base.py:319
                    INFO     INFO:circulation.base:Solving beat 0                                                                                                                            base.py:347
[08/26/25 13:08:06] INFO     INFO:circulation.base:Done running circulation model in 16.44 s                                                                                                 base.py:398
Before withdrawal
HR:  1.4
R_TPR:  1.0610169557318156
C_PRSW:  51.57545820150481
Pa:  73.86298657200288
Pa kPa:  9.847561095752567
Pcvp:  19.432482698012883
Pcvp kPa:  2.5907774582644736
fHR:  1.4357218973493096
Total volume:  4825.000000000233

After withdrawal
HR:  2.2
R_TPR:  1.5779680242668213
C_PRSW:  76.73665047821642
Pa:  66.56998278460713
Pa kPa:  8.875243244809392
Pcvp:  4.601823869109557
Pcvp kPa:  0.6135243618774243
fHR:  2.189373356215297
Volume end:  2825.000000000064

Changes
Volume change:  -2000.0000000001687
RTPR factor change:  1.4872222500708754
C_PRSW factor change:  1.4878520357183658
../_images/c131b527e4b03b5ae1029e3bf894baef44d59c73576a19da35a946f296697e61.png
Pa_after = zenker_history["Pa"][zenker_history["after_index"]]
Pcvp_after = zenker_history["Pcvp"][zenker_history["after_index"]]
print(f"Pa: {Pa_before} mmHg, Pcvp: {Pcvp_before} mmHg")
print(f"Pa: {Pa_after} mmHg, Pcvp: {Pcvp_after} mmHg")
print(f"HR before: {HR_before}, HR after: {HR_after}")
Pa: 73.86298657200288 mmHg, Pcvp: 19.432482698012883 mmHg
Pa: 66.56998278460713 mmHg, Pcvp: 4.601823869109557 mmHg
HR before: 1.4, HR after: 2.2
get_activation_before = run_TorOrdLand(
    comm, outdir, HR_before, Ta_factor=1, label="before", dt=dt,
)
get_activation_after = run_TorOrdLand(
    comm, outdir, HR_after, Ta_factor=C_PRSW_factor, label="after", dt=dt,
)
Running TorOrdLand with HR 1.4 and BCL 0.714 ms
2025-08-26 13:08:07 [info     ] Load ode TorOrdLand.ode       
2025-08-26 13:08:08 [info     ] Num states 52                 
2025-08-26 13:08:08 [info     ] Num parameters 140            
Solving beat 0
Solving beat 1
Solving beat 2
Solving beat 3
Solving beat 4
Solving beat 5
Solving beat 6
Solving beat 7
Solving beat 8
Solving beat 9
Solving beat 10
Solving beat 11
Solving beat 12
Solving beat 13
Solving beat 14
Solving beat 15
Solving beat 16
Solving beat 17
Solving beat 18
Solving beat 19
Solving beat 20
Solving beat 21
Solving beat 22
Solving beat 23
Solving beat 24
Solving beat 25
Solving beat 26
Solving beat 27
Solving beat 28
Solving beat 29
Solving beat 30
Solving beat 31
Solving beat 32
Solving beat 33
Solving beat 34
Solving beat 35
Solving beat 36
Solving beat 37
Solving beat 38
Solving beat 39
Solving beat 40
Solving beat 41
Solving beat 42
Solving beat 43
Solving beat 44
Solving beat 45
Solving beat 46
Solving beat 47
Solving beat 48
Solving beat 49
Solving beat 50
Solving beat 51
Solving beat 52
Solving beat 53
Solving beat 54
Solving beat 55
Solving beat 56
Solving beat 57
Solving beat 58
Solving beat 59
Solving beat 60
Solving beat 61
Solving beat 62
Solving beat 63
Solving beat 64
Solving beat 65
Solving beat 66
Solving beat 67
Solving beat 68
Solving beat 69
Solving beat 70
Solving beat 71
Solving beat 72
Solving beat 73
Solving beat 74
Solving beat 75
Solving beat 76
Solving beat 77
Solving beat 78
Solving beat 79
Solving beat 80
Solving beat 81
Solving beat 82
Solving beat 83
Solving beat 84
Solving beat 85
Solving beat 86
Solving beat 87
Solving beat 88
Solving beat 89
Solving beat 90
Solving beat 91
Solving beat 92
Solving beat 93
Solving beat 94
Solving beat 95
Solving beat 96
Solving beat 97
Solving beat 98
Solving beat 99
Solving beat 100
Solving beat 101
Solving beat 102
Solving beat 103
Solving beat 104
Solving beat 105
Solving beat 106
Solving beat 107
Solving beat 108
Solving beat 109
Solving beat 110
Solving beat 111
Solving beat 112
Solving beat 113
Solving beat 114
Solving beat 115
Solving beat 116
Solving beat 117
Solving beat 118
Solving beat 119
Solving beat 120
Solving beat 121
Solving beat 122
Solving beat 123
Solving beat 124
Solving beat 125
Solving beat 126
Solving beat 127
Solving beat 128
Solving beat 129
Solving beat 130
Solving beat 131
Solving beat 132
Solving beat 133
Solving beat 134
Solving beat 135
Solving beat 136
Solving beat 137
Solving beat 138
Solving beat 139
Solving beat 140
Solving beat 141
Solving beat 142
Solving beat 143
Solving beat 144
Solving beat 145
Solving beat 146
Solving beat 147
Solving beat 148
Solving beat 149
Solving beat 150
Solving beat 151
Solving beat 152
Solving beat 153
Solving beat 154
Solving beat 155
Solving beat 156
Solving beat 157
Solving beat 158
Solving beat 159
Solving beat 160
Solving beat 161
Solving beat 162
Solving beat 163
Solving beat 164
Solving beat 165
Solving beat 166
Solving beat 167
Solving beat 168
Solving beat 169
Solving beat 170
Solving beat 171
Solving beat 172
Solving beat 173
Solving beat 174
Solving beat 175
Solving beat 176
Solving beat 177
Solving beat 178
Solving beat 179
Solving beat 180
Solving beat 181
Solving beat 182
Solving beat 183
Solving beat 184
Solving beat 185
Solving beat 186
Solving beat 187
Solving beat 188
Solving beat 189
Solving beat 190
Solving beat 191
Solving beat 192
Solving beat 193
Solving beat 194
Solving beat 195
Solving beat 196
Solving beat 197
Solving beat 198
Solving beat 199
Running TorOrdLand with HR 2.2 and BCL 0.455 ms
Solving beat 0
Solving beat 1
Solving beat 2
Solving beat 3
Solving beat 4
Solving beat 5
Solving beat 6
Solving beat 7
Solving beat 8
Solving beat 9
Solving beat 10
Solving beat 11
Solving beat 12
Solving beat 13
Solving beat 14
Solving beat 15
Solving beat 16
Solving beat 17
Solving beat 18
Solving beat 19
Solving beat 20
Solving beat 21
Solving beat 22
Solving beat 23
Solving beat 24
Solving beat 25
Solving beat 26
Solving beat 27
Solving beat 28
Solving beat 29
Solving beat 30
Solving beat 31
Solving beat 32
Solving beat 33
Solving beat 34
Solving beat 35
Solving beat 36
Solving beat 37
Solving beat 38
Solving beat 39
Solving beat 40
Solving beat 41
Solving beat 42
Solving beat 43
Solving beat 44
Solving beat 45
Solving beat 46
Solving beat 47
Solving beat 48
Solving beat 49
Solving beat 50
Solving beat 51
Solving beat 52
Solving beat 53
Solving beat 54
Solving beat 55
Solving beat 56
Solving beat 57
Solving beat 58
Solving beat 59
Solving beat 60
Solving beat 61
Solving beat 62
Solving beat 63
Solving beat 64
Solving beat 65
Solving beat 66
Solving beat 67
Solving beat 68
Solving beat 69
Solving beat 70
Solving beat 71
Solving beat 72
Solving beat 73
Solving beat 74
Solving beat 75
Solving beat 76
Solving beat 77
Solving beat 78
Solving beat 79
Solving beat 80
Solving beat 81
Solving beat 82
Solving beat 83
Solving beat 84
Solving beat 85
Solving beat 86
Solving beat 87
Solving beat 88
Solving beat 89
Solving beat 90
Solving beat 91
Solving beat 92
Solving beat 93
Solving beat 94
Solving beat 95
Solving beat 96
Solving beat 97
Solving beat 98
Solving beat 99
Solving beat 100
Solving beat 101
Solving beat 102
Solving beat 103
Solving beat 104
Solving beat 105
Solving beat 106
Solving beat 107
Solving beat 108
Solving beat 109
Solving beat 110
Solving beat 111
Solving beat 112
Solving beat 113
Solving beat 114
Solving beat 115
Solving beat 116
Solving beat 117
Solving beat 118
Solving beat 119
Solving beat 120
Solving beat 121
Solving beat 122
Solving beat 123
Solving beat 124
Solving beat 125
Solving beat 126
Solving beat 127
Solving beat 128
Solving beat 129
Solving beat 130
Solving beat 131
Solving beat 132
Solving beat 133
Solving beat 134
Solving beat 135
Solving beat 136
Solving beat 137
Solving beat 138
Solving beat 139
Solving beat 140
Solving beat 141
Solving beat 142
Solving beat 143
Solving beat 144
Solving beat 145
Solving beat 146
Solving beat 147
Solving beat 148
Solving beat 149
Solving beat 150
Solving beat 151
Solving beat 152
Solving beat 153
Solving beat 154
Solving beat 155
Solving beat 156
Solving beat 157
Solving beat 158
Solving beat 159
Solving beat 160
Solving beat 161
Solving beat 162
Solving beat 163
Solving beat 164
Solving beat 165
Solving beat 166
Solving beat 167
Solving beat 168
Solving beat 169
Solving beat 170
Solving beat 171
Solving beat 172
Solving beat 173
Solving beat 174
Solving beat 175
Solving beat 176
Solving beat 177
Solving beat 178
Solving beat 179
Solving beat 180
Solving beat 181
Solving beat 182
Solving beat 183
Solving beat 184
Solving beat 185
Solving beat 186
Solving beat 187
Solving beat 188
Solving beat 189
Solving beat 190
Solving beat 191
Solving beat 192
Solving beat 193
Solving beat 194
Solving beat 195
Solving beat 196
Solving beat 197
Solving beat 198
Solving beat 199
../_images/9b01025b0189fd5ca07c5006e4d1d60ad8196424651c9ee2924b9cb317794c95.png ../_images/a9b5d1e2a5dc917a91b4f7f78310dd512c81fc3f664338262075d65c028eabe1.png
run_3D_model(
    comm=comm,
    geo=geo,
    get_activation=get_activation_before,
    outdir=outdir,
    label="before",
    num_beats=5,
    dt=dt,
    HR=HR_before,
    p_AR_SYS=Pa_before,
    p_AR_PUL=Pa_before * 0.4375,
    p_VEN_SYS=Pcvp_before,
    p_VEN_PUL=Pcvp_before * 0.8,
    mesh_unit=mesh_unit,
    volume2ml=volume2ml,
)
[2025-08-26 13:09:36.274] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:36.274] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:36.274] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:36.274] [info] Requesting connectivity (3, 0) - (2, 0)
Initial volumes[2025-08-26 13:09:36.554] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:36.555] [info] Requesting connectivity (3, 0) - (2, 0)
 108.94070447709372 74.86447656085127
[2025-08-26 13:09:36.555] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:36.555] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:36.557] [info] Checking required entities per dimension
[2025-08-26 13:09:36.557] [info] Cell type: 0 dofmap: 2134x10
[2025-08-26 13:09:36.557] [info] Global index computation
[2025-08-26 13:09:36.557] [info] Got 2 index_maps
[2025-08-26 13:09:36.557] [info] Get global indices
[2025-08-26 13:09:36.806] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:36.806] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:36.806] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:36.806] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:37.050] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:37.050] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:37.050] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:37.050] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:39.067] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:39.067] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:39.067] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:39.067] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:39.454] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:39.454] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:39.454] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:39.454] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:39.841] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:39.841] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:39.841] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:39.841] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:57.245] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:57.245] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:57.245] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:57.245] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:57.859] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:57.859] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:57.859] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:57.859] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:58.473] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:58.473] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:58.474] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:58.474] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:59.073] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:59.073] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:59.073] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:59.073] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:59.288] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:59.288] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:09:59.503] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:09:59.503] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:00.107] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.107] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:00.108] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.108] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:00.321] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.321] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:00.536] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.536] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:00.536] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.538] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.538] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.538] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.538] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:00.600] [info] Column ghost size increased from 0 to 0
[08/26/25 13:10:01] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 1.181895207319343 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 1.3707190845236166 (tol=1e-06), r (rel) = 1.1597636372792688 (tol=1e-10)                                   solvers.py:273
[08/26/25 13:10:02] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.001797332262713295 (tol=1e-06), r (rel) = 0.0015207204933082223 (tol=1e-10)                              solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 1.3270998395723107e-05 (tol=1e-06), r (rel) = 1.1228574507737505e-05 (tol=1e-10)                           solvers.py:273
[08/26/25 13:10:03] INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 5.740112467629605e-09 (tol=1e-06), r (rel) = 4.856701704247331e-09 (tol=1e-10)                             solvers.py:273
[2025-08-26 13:10:04.170] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:04.170] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:04.170] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:04.170] [info] Requesting connectivity (3, 0) - (2, 0)
Initial volume (LV): 108.94070447709383 mL and (RV): 74.86447656085129 mL[2025-08-26 13:10:04.545] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:04.545] [info] Requesting connectivity (3, 0) - (2, 0)

[2025-08-26 13:10:04.545] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:04.545] [info] Requesting connectivity (3, 0) - (2, 0)

[08/26/25 13:10:04] INFO     INFO:circulation.base:                                                                                                                                          base.py:132
                                                    Circulation model parameters (Regazzoni2020)                                                                                                        
                             ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                                                                
                             ┃ Parameter                             ┃ Value                                           ┃                                                                                
                             ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩                                                                                
                             │ HR                                    │ 1.4           
                             │ chambers.LA.EA                        │ 0.07 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.LA.EB                        │ 0.09 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.LA.TC                        │ 0.12142857142857144 second                      │                                                                                
                             │ chambers.LA.TR                        │ 0.12142857142857144 second                      │                                                                                
                             │ chambers.LA.tC                        │ 0.5714285714285715 second                       │                                                                                
                             │ chambers.LA.V0                        │ 4.0 milliliter                                  │                                                                                
                             │ chambers.LV.EA                        │ 2.75 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.LV.EB                        │ 0.08 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.LV.TC                        │ 0.34 second                                     │                                                                                
                             │ chambers.LV.TR                        │ 0.17 second                                     │                                                                                
                             │ chambers.LV.tC                        │ 0.0 second                                      │                                                                                
                             │ chambers.LV.V0                        │ 5.0 milliliter                                  │                                                                                
                             │ chambers.RA.EA                        │ 0.06 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.RA.EB                        │ 0.07 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.RA.TC                        │ 0.12142857142857144 second                      │                                                                                
                             │ chambers.RA.TR                        │ 0.12142857142857144 second                      │                                                                                
                             │ chambers.RA.tC                        │ 0.5714285714285715 second                       │                                                                                
                             │ chambers.RA.V0                        │ 4.0 milliliter                                  │                                                                                
                             │ chambers.RV.EA                        │ 0.55 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.RV.EB                        │ 0.05 millimeter_Hg / milliliter                 │                                                                                
                             │ chambers.RV.TC                        │ 0.34 second                                     │                                                                                
                             │ chambers.RV.TR                        │ 0.17 second                                     │                                                                                
                             │ chambers.RV.tC                        │ 0.0 second                                      │                                                                                
                             │ chambers.RV.V0                        │ 10.0 milliliter                                 │                                                                                
                             │ valves.MV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter      │                                                                                
                             │ valves.MV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter     │                                                                                
                             │ valves.AV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter      │                                                                                
                             │ valves.AV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter     │                                                                                
                             │ valves.TV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter      │                                                                                
                             │ valves.TV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter     │                                                                                
                             │ valves.PV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter      │                                                                                
                             │ valves.PV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter     │                                                                                
                             │ circulation.SYS.R_AR                  │ 0.8 millimeter_Hg * second / milliliter         │                                                                                
                             │ circulation.SYS.C_AR                  │ 1.2 milliliter / millimeter_Hg                  │                                                                                
                             │ circulation.SYS.R_VEN                 │ 0.26 millimeter_Hg * second / milliliter        │                                                                                
                             │ circulation.SYS.C_VEN                 │ 130.0 milliliter / millimeter_Hg                │                                                                                
                             │ circulation.SYS.L_AR                  │ 0.005 millimeter_Hg * second ** 2 / milliliter  │                                                                                
                             │ circulation.SYS.L_VEN                 │ 0.0005 millimeter_Hg * second ** 2 / milliliter │                                                                                
                             │ circulation.PUL.R_AR                  │ 0.1625 millimeter_Hg * second / milliliter      │                                                                                
                             │ circulation.PUL.C_AR                  │ 10.0 milliliter / millimeter_Hg                 │                                                                                
                             │ circulation.PUL.R_VEN                 │ 0.1625 millimeter_Hg * second / milliliter      │                                                                                
                             │ circulation.PUL.C_VEN                 │ 16.0 milliliter / millimeter_Hg                 │                                                                                
                             │ circulation.PUL.L_AR                  │ 0.0005 millimeter_Hg * second ** 2 / milliliter │                                                                                
                             │ circulation.PUL.L_VEN                 │ 0.0005 millimeter_Hg * second ** 2 / milliliter │                                                                                
                             │ circulation.external.start_withdrawal │ 0.0 second                                      │                                                                                
                             │ circulation.external.end_withdrawal   │ 0.0 second                                      │                                                                                
                             │ circulation.external.start_infusion   │ 0.0 second                                      │                                                                                
                             │ circulation.external.end_infusion     │ 0.0 second                                      │                                                                                
                             │ circulation.external.flow_withdrawal  │ 0.0 milliliter / second                         │                                                                                
                             │ circulation.external.flow_infusion    │ 0.0 milliliter / second                         │                                                                                
                             └───────────────────────────────────────┴─────────────────────────────────────────────────┘                                                                                

                    INFO     INFO:circulation.base:                                                                                                                                          base.py:138
                             Circulation model initial states (Regazzoni2020)                                                                                                                           
                             ┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                                                                                                           
                             ┃ State     ┃ Value                            ┃                                                                                                                           
                             ┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩                                                                                                                           
                             │ V_LA      │ 65.0 milliliter                  │                                                                                                                           
                             │ V_LV      │ 108.94070447709372 milliliter    │                                                                                                                           
                             │ V_RA      │ 65.0 milliliter                  │                                                                                                                           
                             │ V_RV      │ 74.86447656085127 milliliter     │                                                                                                                           
                             │ p_AR_SYS  │ 73.86298657200288 millimeter_Hg  │                                                                                                                           
                             │ p_VEN_SYS │ 19.432482698012883 millimeter_Hg │                                                                                                                           
                             │ p_AR_PUL  │ 32.31505662525126 millimeter_Hg  │                                                                                                                           
                             │ p_VEN_PUL │ 15.545986158410308 millimeter_Hg │                                                                                                                           
                             │ Q_AR_SYS  │ 0.0 milliliter / second          │                                                                                                                           
                             │ Q_VEN_SYS │ 0.0 milliliter / second          │                                                                                                                           
                             │ Q_AR_PUL  │ 0.0 milliliter / second          │                                                                                                                           
                             │ Q_VEN_PUL │ 0.0 milliliter / second          │                                                                                                                           
                             └───────────┴──────────────────────────────────┘                                                                                                                           
                    INFO     INFO:circulation.base:Running circulation model                                                                                                                 base.py:319
Calculating pressure at time 0.0
Time0.0 with activation: 0.5662153360470893 and volumes: 108.94070447709372 mL (LV) 74.86447656085127 mL (RV)
[08/26/25 13:10:05] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 3.581669352736112e-13 (tol=1e-06), r (rel) = 3.581669352736112e-07 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 9.550500984829965 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:06] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 1.1213932440224694 (tol=1e-06), r (rel) = 0.11741721673069222 (tol=1e-10)                                  solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.0031135163484990944 (tol=1e-06), r (rel) = 0.00032600555232072223 (tol=1e-10)                            solvers.py:273
[08/26/25 13:10:07] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 3.1197249846135284e-06 (tol=1e-06), r (rel) = 3.2665563718268874e-07 (tol=1e-10)                           solvers.py:273
[08/26/25 13:10:08] INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 5.10692102807014e-11 (tol=1e-06), r (rel) = 5.3472807721626165e-12 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.06125972515237 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:09] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.03675621373738081 (tol=1e-06), r (rel) = 0.0033229681474525262 (tol=1e-10)                               solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 8.794905721856705e-05 (tol=1e-06), r (rel) = 7.951088700916978e-06 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:10] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 8.45421777862163e-09 (tol=1e-06), r (rel) = 7.643087666947602e-10 (tol=1e-10)                              solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.092489081860736 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                  solvers.py:273
[08/26/25 13:10:11] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.02523206369357017 (tol=1e-06), r (rel) = 0.0022746980869092328 (tol=1e-10)                               solvers.py:273
[08/26/25 13:10:12] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 6.786807690382336e-05 (tol=1e-06), r (rel) = 6.118381222011415e-06 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 1.7228049075167505e-09 (tol=1e-06), r (rel) = 1.553127431366157e-10 (tol=1e-10)                            solvers.py:273
[08/26/25 13:10:13] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.1092284669108 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                    solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.026980479470962063 (tol=1e-06), r (rel) = 0.0024286546587212877 (tol=1e-10)                              solvers.py:273
[08/26/25 13:10:14] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 8.173424571344163e-05 (tol=1e-06), r (rel) = 7.357328725112618e-06 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 6.248814587279713e-10 (tol=1e-06), r (rel) = 5.624886197895751e-11 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:15] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.130296339255858 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                  solvers.py:273
[08/26/25 13:10:16] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.029103802967740167 (tol=1e-06), r (rel) = 0.002614827321811089 (tol=1e-10)                               solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 9.40339095277442e-05 (tol=1e-06), r (rel) = 8.448464143411213e-06 (tol=1e-10)                              solvers.py:273
[08/26/25 13:10:17] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 4.720815080085076e-10 (tol=1e-06), r (rel) = 4.2414100543172925e-11 (tol=1e-10)                            solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.155745580523943 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                  solvers.py:273
[08/26/25 13:10:18] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.03062430145028571 (tol=1e-06), r (rel) = 0.0027451595439529023 (tol=1e-10)                               solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 9.493829095285232e-05 (tol=1e-06), r (rel) = 8.5102596027825e-06 (tol=1e-10)                               solvers.py:273
[08/26/25 13:10:19] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 4.543769070933871e-10 (tol=1e-06), r (rel) = 4.073030384330858e-11 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:20] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.184361207737142 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                  solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.03113881785228479 (tol=1e-06), r (rel) = 0.0027841391451792086 (tol=1e-10)                               solvers.py:273
[08/26/25 13:10:21] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 9.042488827783975e-05 (tol=1e-06), r (rel) = 8.084939908350368e-06 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 3.9889831887746064e-10 (tol=1e-06), r (rel) = 3.566572211576195e-11 (tol=1e-10)                            solvers.py:273
[08/26/25 13:10:22] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.214316648862479 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                  solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.031112854558715517 (tol=1e-06), r (rel) = 0.002774387020886506 (tol=1e-10)                               solvers.py:273
[08/26/25 13:10:23] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 8.248784855728403e-05 (tol=1e-06), r (rel) = 7.355584039590247e-06 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:24] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 3.1874581963356364e-10 (tol=1e-06), r (rel) = 2.8423115702363865e-11 (tol=1e-10)                           solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 11.244540368997395 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                  solvers.py:273
[08/26/25 13:10:25] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.030528037260689516 (tol=1e-06), r (rel) = 0.0027149208646054697 (tol=1e-10)                              solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 7.328951723044899e-05 (tol=1e-06), r (rel) = 6.517786839248437e-06 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:26] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 2.4100193823657817e-10 (tol=1e-06), r (rel) = 2.1432795857183337e-11 (tol=1e-10)                           solvers.py:273
Compute pressures: 0.7136164305588255 mmHg (LV) 0.2456890978843856 mmHg (RV)
                    INFO     INFO:circulation.base:Solving beat 0                                                                                                                            base.py:347
Calculating pressure at time 0.0
Time0.0 with activation: 0.5662153360470893 and volumes: 108.94070447709372 mL (LV) 74.86447656085127 mL (RV)
Compute pressures: 0.7136164305588255 mmHg (LV) 0.2456890978843856 mmHg (RV)



                    INFO     INFO:circulation.base:                                                                                                                                          base.py:464
                                                                                        Volumes                                                                                                         
                             ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┓                                             
                             ┃ V_LA   ┃ V_LV    ┃ V_RA   ┃ V_RV   ┃ V_AR_SYS ┃ V_VEN_SYS ┃ V_AR_PUL ┃ V_VEN_PUL ┃ Heart   ┃ SYS      ┃ PUL     ┃ Total    ┃                                             
                             ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━┩                                             
                    63.839110.10264.01475.85088.6362526.223323.151248.736313.8052614.858571.8863500.550           
                             └────────┴─────────┴────────┴────────┴──────────┴───────────┴──────────┴───────────┴─────────┴──────────┴─────────┴──────────┘                                             
                                                                Pressures                                                                                                                               
                             ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                            
                             ┃ p_LA  ┃ p_LV  ┃ p_RA  ┃ p_RV  ┃ p_AR_SYS ┃ p_VEN_SYS ┃ p_AR_PUL ┃ p_VEN_PUL ┃                                                                                            
                             ┡━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                            
                    9.4400.7147.6560.24673.86319.43232.31515.546           
                             └───────┴───────┴───────┴───────┴──────────┴───────────┴──────────┴───────────┘                                                                                            
                                                                     Flows                                                                                                                              
                             ┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                     
                             ┃ Q_MV     ┃ Q_AV   ┃ Q_TV    ┃ Q_PV   ┃ Q_AR_SYS ┃ Q_VEN_SYS ┃ Q_AR_PUL ┃ Q_VEN_PUL ┃                                                                                     
                             ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                     
                    1161.371-0.001985.853-0.00010.88623.55333.53812.212           
                             └──────────┴────────┴─────────┴────────┴──────────┴───────────┴──────────┴───────────┘                                                                                     
Calculating pressure at time 0.001
Time0.001 with activation: 0.5652486999682866 and volumes: 110.10207629223186 mL (LV) 75.85032967063542 mL (RV)
[08/26/25 13:10:27] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 38.73336649582841 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.07303455443112569 (tol=1e-06), r (rel) = 0.0018855720800563906 (tol=1e-10)                               solvers.py:273
[08/26/25 13:10:28] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.0035076753369655644 (tol=1e-06), r (rel) = 9.05595266898203e-05 (tol=1e-10)                              solvers.py:273
[08/26/25 13:10:29] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 4.1541133700285245e-07 (tol=1e-06), r (rel) = 1.072489624798279e-08 (tol=1e-10)                            solvers.py:273
Compute pressures: 0.9336642942085266 mmHg (LV) 0.4362599977048479 mmHg (RV)



                    INFO     INFO:circulation.base:                                                                                                                                          base.py:464
                                                                                        Volumes                                                                                                         
                             ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┓                                             
                             ┃ V_LA   ┃ V_LV    ┃ V_RA   ┃ V_RV   ┃ V_AR_SYS ┃ V_VEN_SYS ┃ V_AR_PUL ┃ V_VEN_PUL ┃ Heart   ┃ SYS      ┃ PUL     ┃ Total    ┃                                             
                             ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━┩                                             
                    62.747111.20663.09776.79188.6252526.210323.117248.757313.8412614.835571.8743500.550           
                             └────────┴─────────┴────────┴────────┴──────────┴───────────┴──────────┴───────────┴─────────┴──────────┴─────────┴──────────┘                                             
                                                                Pressures                                                                                                                               
                             ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                            
                             ┃ p_LA  ┃ p_LV  ┃ p_RA  ┃ p_RV  ┃ p_AR_SYS ┃ p_VEN_SYS ┃ p_AR_PUL ┃ p_VEN_PUL ┃                                                                                            
                             ┡━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                            
                    9.2310.9347.5070.43673.85419.43232.31215.547           
                             └───────┴───────┴───────┴───────┴──────────┴───────────┴──────────┴───────────┘                                                                                            
                                                                     Flows                                                                                                                              
                             ┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                     
                             ┃ Q_MV     ┃ Q_AV   ┃ Q_TV    ┃ Q_PV   ┃ Q_AR_SYS ┃ Q_VEN_SYS ┃ Q_AR_PUL ┃ Q_VEN_PUL ┃                                                                                     
                             ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                     
                    1104.185-0.001940.608-0.00020.03035.15656.17620.872           
                             └──────────┴────────┴─────────┴────────┴──────────┴───────────┴──────────┴───────────┘                                                                                     
                    INFO     INFO:circulation.base:Done running circulation model in 3.20 s                                                                                                  base.py:398



                    INFO     INFO:circulation.base:                                                                                                                                          base.py:464
                                                                                        Volumes                                                                                                         
                             ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┓                                             
                             ┃ V_LA   ┃ V_LV    ┃ V_RA   ┃ V_RV   ┃ V_AR_SYS ┃ V_VEN_SYS ┃ V_AR_PUL ┃ V_VEN_PUL ┃ Heart   ┃ SYS      ┃ PUL     ┃ Total    ┃                                             
                             ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━┩                                             
                    62.747111.20663.09776.79188.6252526.210323.117248.757313.8412614.835571.8743500.550           
                             └────────┴─────────┴────────┴────────┴──────────┴───────────┴──────────┴───────────┴─────────┴──────────┴─────────┴──────────┘                                             
                                                                Pressures                                                                                                                               
                             ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                            
                             ┃ p_LA  ┃ p_LV  ┃ p_RA  ┃ p_RV  ┃ p_AR_SYS ┃ p_VEN_SYS ┃ p_AR_PUL ┃ p_VEN_PUL ┃                                                                                            
                             ┡━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                            
                    9.2310.9347.5070.43673.85419.43232.31215.547           
                             └───────┴───────┴───────┴───────┴──────────┴───────────┴──────────┴───────────┘                                                                                            
                                                                     Flows                                                                                                                              
                             ┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                     
                             ┃ Q_MV     ┃ Q_AV   ┃ Q_TV    ┃ Q_PV   ┃ Q_AR_SYS ┃ Q_VEN_SYS ┃ Q_AR_PUL ┃ Q_VEN_PUL ┃                                                                                     
                             ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                     
                    1104.185-0.001940.608-0.00020.03035.15656.17620.872           
                             └──────────┴────────┴─────────┴────────┴──────────┴───────────┴──────────┴───────────┘                                                                                     
run_3D_model(
    comm=comm,
    geo=geo,
    get_activation=get_activation_after,
    outdir=outdir,
    label="after",
    num_beats=5,
    dt=dt,
    HR=HR_after,
    R_TPR_factor=R_TPR_factor,
    C_PRSW_factor=C_PRSW_factor,
    p_AR_SYS=Pa_after,
    p_AR_PUL=Pa_after * 0.4375,
    p_VEN_SYS=Pcvp_after,
    p_VEN_PUL=Pcvp_after * 0.8,
    mesh_unit=mesh_unit,
    volume2ml=volume2ml,
)
[2025-08-26 13:10:29.577] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.577] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.577] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.577] [info] Requesting connectivity (3, 0) - (2, 0)
Initial volumes 108.94070447709372 74.86447656085127
[2025-08-26 13:10:29.578] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.578] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.578] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.578] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.580] [info] Checking required entities per dimension
[2025-08-26 13:10:29.580] [info] Cell type: 0 dofmap: 2134x10
[2025-08-26 13:10:29.580] [info] Global index computation
[2025-08-26 13:10:29.580] [info] Got 2 index_maps
[2025-08-26 13:10:29.580] [info] Get global indices
[2025-08-26 13:10:29.585] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.585] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.585] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.585] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.586] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.586] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.586] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.586] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.598] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.598] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.599] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.599] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.601] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.601] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.601] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.601] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.603] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.603] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.603] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.603] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.609] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.609] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.609] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.609] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.615] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.615] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.615] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.615] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.621] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.621] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.622] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.622] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.624] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.624] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.624] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.624] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.626] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.626] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.628] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.628] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.631] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.631] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.631] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.631] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.633] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.633] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.635] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.635] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:29.636] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.637] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.637] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.637] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.637] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:29.699] [info] Column ghost size increased from 0 to 0
[08/26/25 13:10:30] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 1.181895207319343 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 1.3707190845236166 (tol=1e-06), r (rel) = 1.1597636372792688 (tol=1e-10)                                   solvers.py:273
[08/26/25 13:10:31] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.001797332262713295 (tol=1e-06), r (rel) = 0.0015207204933082223 (tol=1e-10)                              solvers.py:273
[08/26/25 13:10:32] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 1.3270998395723107e-05 (tol=1e-06), r (rel) = 1.1228574507737505e-05 (tol=1e-10)                           solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 5.740112467629605e-09 (tol=1e-06), r (rel) = 4.856701704247331e-09 (tol=1e-10)                             solvers.py:273
[2025-08-26 13:10:32.692] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:32.692] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:32.692] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:32.692] [info] Requesting connectivity (3, 0) - (2, 0)
Initial volume (LV): 108.94070447709383 mL and (RV): 74.86447656085129 mL
[2025-08-26 13:10:32.695] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:32.695] [info] Requesting connectivity (3, 0) - (2, 0)
[2025-08-26 13:10:32.695] [info] Requesting connectivity (2, 0) - (3, 0)
[2025-08-26 13:10:32.695] [info] Requesting connectivity (3, 0) - (2, 0)

                    INFO     INFO:circulation.base:                                                                                                                                          base.py:132
                                                        Circulation model parameters (Regazzoni2020)                                                                                                    
                             ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                                                         
                             ┃ Parameter                             ┃ Value                                                  ┃                                                                         
                             ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩                                                                         
                             │ HR                                    │ 2.2           
                             │ chambers.LA.EA                        │ 0.10414964250028562 millimeter_Hg / milliliter         │                                                                         
                             │ chambers.LA.EB                        │ 0.1339066832146529 millimeter_Hg / milliliter          │                                                                         
                             │ chambers.LA.TC                        │ 0.07727272727272727 second                             │                                                                         
                             │ chambers.LA.TR                        │ 0.07727272727272727 second                             │                                                                         
                             │ chambers.LA.tC                        │ 0.36363636363636365 second                             │                                                                         
                             │ chambers.LA.V0                        │ 4.0 milliliter                                         │                                                                         
                             │ chambers.LV.EA                        │ 2.75 millimeter_Hg / milliliter                        │                                                                         
                             │ chambers.LV.EB                        │ 0.08 millimeter_Hg / milliliter                        │                                                                         
                             │ chambers.LV.TC                        │ 0.34 second                                            │                                                                         
                             │ chambers.LV.TR                        │ 0.17 second                                            │                                                                         
                             │ chambers.LV.tC                        │ 0.0 second                                             │                                                                         
                             │ chambers.LV.V0                        │ 5.0 milliliter                                         │                                                                         
                             │ chambers.RA.EA                        │ 0.08927112214310194 millimeter_Hg / milliliter         │                                                                         
                             │ chambers.RA.EB                        │ 0.10414964250028562 millimeter_Hg / milliliter         │                                                                         
                             │ chambers.RA.TC                        │ 0.07727272727272727 second                             │                                                                         
                             │ chambers.RA.TR                        │ 0.07727272727272727 second                             │                                                                         
                             │ chambers.RA.tC                        │ 0.36363636363636365 second                             │                                                                         
                             │ chambers.RA.V0                        │ 4.0 milliliter                                         │                                                                         
                             │ chambers.RV.EA                        │ 0.55 millimeter_Hg / milliliter                        │                                                                         
                             │ chambers.RV.EB                        │ 0.05 millimeter_Hg / milliliter                        │                                                                         
                             │ chambers.RV.TC                        │ 0.34 second                                            │                                                                         
                             │ chambers.RV.TR                        │ 0.17 second                                            │                                                                         
                             │ chambers.RV.tC                        │ 0.0 second                                             │                                                                         
                             │ chambers.RV.V0                        │ 10.0 milliliter                                        │                                                                         
                             │ valves.MV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter             │                                                                         
                             │ valves.MV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter            │                                                                         
                             │ valves.AV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter             │                                                                         
                             │ valves.AV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter            │                                                                         
                             │ valves.TV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter             │                                                                         
                             │ valves.TV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter            │                                                                         
                             │ valves.PV.Rmin                        │ 0.0075 millimeter_Hg * second / milliliter             │                                                                         
                             │ valves.PV.Rmax                        │ 75006.2 millimeter_Hg * second / milliliter            │                                                                         
                             │ circulation.SYS.R_AR                  │ 1.1897778000567003 millimeter_Hg * second / milliliter │                                                                         
                             │ circulation.SYS.C_AR                  │ 1.2 milliliter / millimeter_Hg                         │                                                                         
                             │ circulation.SYS.R_VEN                 │ 0.3866777850184276 millimeter_Hg * second / milliliter │                                                                         
                             │ circulation.SYS.C_VEN                 │ 130.0 milliliter / millimeter_Hg                       │                                                                         
                             │ circulation.SYS.L_AR                  │ 0.005 millimeter_Hg * second ** 2 / milliliter         │                                                                         
                             │ circulation.SYS.L_VEN                 │ 0.0005 millimeter_Hg * second ** 2 / milliliter        │                                                                         
                             │ circulation.PUL.R_AR                  │ 0.1625 millimeter_Hg * second / milliliter             │                                                                         
                             │ circulation.PUL.C_AR                  │ 10.0 milliliter / millimeter_Hg                        │                                                                         
                             │ circulation.PUL.R_VEN                 │ 0.1625 millimeter_Hg * second / milliliter             │                                                                         
                             │ circulation.PUL.C_VEN                 │ 16.0 milliliter / millimeter_Hg                        │                                                                         
                             │ circulation.PUL.L_AR                  │ 0.0005 millimeter_Hg * second ** 2 / milliliter        │                                                                         
                             │ circulation.PUL.L_VEN                 │ 0.0005 millimeter_Hg * second ** 2 / milliliter        │                                                                         
                             │ circulation.external.start_withdrawal │ 0.0 second                                             │                                                                         
                             │ circulation.external.end_withdrawal   │ 0.0 second                                             │                                                                         
                             │ circulation.external.start_infusion   │ 0.0 second                                             │                                                                         
                             │ circulation.external.end_infusion     │ 0.0 second                                             │                                                                         
                             │ circulation.external.flow_withdrawal  │ 0.0 milliliter / second                                │                                                                         
                             │ circulation.external.flow_infusion    │ 0.0 milliliter / second                                │                                                                         
                             └───────────────────────────────────────┴────────────────────────────────────────────────────────┘                                                                         

                    INFO     INFO:circulation.base:                                                                                                                                          base.py:138
                                    Circulation model initial states                                                                                                                                    
                                             (Regazzoni2020)                                                                                                                                            
                             ┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                                                                                                            
                             ┃ State     ┃ Value                           ┃                                                                                                                            
                             ┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩                                                                                                                            
                             │ V_LA      │ 65.0 milliliter                 │                                                                                                                            
                             │ V_LV      │ 108.94070447709372 milliliter   │                                                                                                                            
                             │ V_RA      │ 65.0 milliliter                 │                                                                                                                            
                             │ V_RV      │ 74.86447656085127 milliliter    │                                                                                                                            
                             │ p_AR_SYS  │ 66.56998278460713 millimeter_Hg │                                                                                                                            
                             │ p_VEN_SYS │ 4.601823869109557 millimeter_Hg │                                                                                                                            
                             │ p_AR_PUL  │ 29.12436746826562 millimeter_Hg │                                                                                                                            
                             │ p_VEN_PUL │ 3.681459095287646 millimeter_Hg │                                                                                                                            
                             │ Q_AR_SYS  │ 0.0 milliliter / second         │                                                                                                                            
                             │ Q_VEN_SYS │ 0.0 milliliter / second         │                                                                                                                            
                             │ Q_AR_PUL  │ 0.0 milliliter / second         │                                                                                                                            
                             │ Q_VEN_PUL │ 0.0 milliliter / second         │                                                                                                                            
                             └───────────┴─────────────────────────────────┘                                                                                                                            
                    INFO     INFO:circulation.base:Running circulation model                                                                                                                 base.py:319
Calculating pressure at time 0.0
Time0.0 with activation: 4.4772206001359 and volumes: 108.94070447709372 mL (LV) 74.86447656085127 mL (RV)
[08/26/25 13:10:33] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 3.581669352736112e-13 (tol=1e-06), r (rel) = 3.581669352736112e-07 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 75.48725254441223 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:34] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 12.467069558654146 (tol=1e-06), r (rel) = 0.1651546339074834 (tol=1e-10)                                   solvers.py:273
[08/26/25 13:10:35] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.6098238131763561 (tol=1e-06), r (rel) = 0.008078500576207511 (tol=1e-10)                                 solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 0.008724261552297729 (tol=1e-06), r (rel) = 0.00011557264648312495 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:36] INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 8.613193822689889e-05 (tol=1e-06), r (rel) = 1.1410130230428502e-06 (tol=1e-10)                            solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 6: r (abs) = 3.3434940545228867e-09 (tol=1e-06), r (rel) = 4.429216777436393e-11 (tol=1e-10)                            solvers.py:273
[08/26/25 13:10:37] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 88.11653837051834 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 1.5531288833316146 (tol=1e-06), r (rel) = 0.017625849948858793 (tol=1e-10)                                 solvers.py:273
[08/26/25 13:10:38] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.17593456984083927 (tol=1e-06), r (rel) = 0.001996612362381484 (tol=1e-10)                                solvers.py:273
[08/26/25 13:10:39] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 0.0005906284040672191 (tol=1e-06), r (rel) = 6.702809880974955e-06 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 8.640161482261235e-07 (tol=1e-06), r (rel) = 9.80538005922396e-09 (tol=1e-10)                              solvers.py:273
[08/26/25 13:10:40] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 89.73767212161874 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 1.1347286882224092 (tol=1e-06), r (rel) = 0.012644953467085104 (tol=1e-10)                                 solvers.py:273
[08/26/25 13:10:41] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.08046159978163803 (tol=1e-06), r (rel) = 0.0008966312350134386 (tol=1e-10)                               solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 8.016702554229523e-05 (tol=1e-06), r (rel) = 8.933486198934076e-07 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:42] INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 4.6666132944608956e-09 (tol=1e-06), r (rel) = 5.2002834307272604e-11 (tol=1e-10)                           solvers.py:273
[08/26/25 13:10:43] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 90.60356423814342 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.8310415524261074 (tol=1e-06), r (rel) = 0.009172283225434582 (tol=1e-10)                                 solvers.py:273
[08/26/25 13:10:44] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.038121293164774375 (tol=1e-06), r (rel) = 0.0004207482728226446 (tol=1e-10)                              solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 1.3780342299978557e-05 (tol=1e-06), r (rel) = 1.5209492491661975e-07 (tol=1e-10)                           solvers.py:273
[08/26/25 13:10:45] INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 5.3891420843226275e-11 (tol=1e-06), r (rel) = 5.948046447883382e-13 (tol=1e-10)                            solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 91.01553466676279 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:46] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.645457644995764 (tol=1e-06), r (rel) = 0.007091730520058938 (tol=1e-10)                                  solvers.py:273
[08/26/25 13:10:47] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.020323095573791042 (tol=1e-06), r (rel) = 0.00022329260217171108 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 3.2805553574169966e-06 (tol=1e-06), r (rel) = 3.6043905795072976e-08 (tol=1e-10)                           solvers.py:273
[08/26/25 13:10:48] INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 2.180877555321272e-12 (tol=1e-06), r (rel) = 2.396159692195588e-14 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 91.19039299139655 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:49] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.5246421608718663 (tol=1e-06), r (rel) = 0.005753261321303486 (tol=1e-10)                                 solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.011972308787127005 (tol=1e-06), r (rel) = 0.00013128914564779367 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:50] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 1.3144584469345284e-06 (tol=1e-06), r (rel) = 1.4414439984467906e-08 (tol=1e-10)                           solvers.py:273
[08/26/25 13:10:51] INFO     INFO:scifem.solvers:Newton iteration 5: r (abs) = 5.054119798327167e-13 (tol=1e-06), r (rel) = 5.542381859023245e-15 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 91.23372163073415 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:52] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.4412100321208199 (tol=1e-06), r (rel) = 0.0048360411505145515 (tol=1e-10)                                solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.0075354174246928095 (tol=1e-06), r (rel) = 8.259465129781939e-05 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:53] INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 4.3865436896633546e-07 (tol=1e-06), r (rel) = 4.8080288858737595e-09 (tol=1e-10)                           solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 91.20090841708107 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:54] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.38192360302253847 (tol=1e-06), r (rel) = 0.004187717092421064 (tol=1e-10)                                solvers.py:273
[08/26/25 13:10:55] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.005082461097570604 (tol=1e-06), r (rel) = 5.572818501245002e-05 (tol=1e-10)                              solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 2.055152741129341e-07 (tol=1e-06), r (rel) = 2.253434507176938e-09 (tol=1e-10)                             solvers.py:273
[08/26/25 13:10:56] INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 91.12494998578565 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.3369696078845631 (tol=1e-06), r (rel) = 0.003697885243691504 (tol=1e-10)                                 solvers.py:273
[08/26/25 13:10:57] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.0035645320132200414 (tol=1e-06), r (rel) = 3.911697086007799e-05 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 1.0651146190143586e-07 (tol=1e-06), r (rel) = 1.1688507035455198e-09 (tol=1e-10)                           solvers.py:273
Compute pressures: 5.603148617261007 mmHg (LV) 2.499977227997734 mmHg (RV)
                    INFO     INFO:circulation.base:Solving beat 0                                                                                                                            base.py:347
Calculating pressure at time 0.0
Time0.0 with activation: 4.4772206001359 and volumes: 108.94070447709372 mL (LV) 74.86447656085127 mL (RV)
Compute pressures: 5.603148617261007 mmHg (LV) 2.499977227997734 mmHg (RV)



[08/26/25 13:10:58] INFO     INFO:circulation.base:                                                                                                                                          base.py:464
                                                                                        Volumes                                                                                                         
                             ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┓                                              
                             ┃ V_LA   ┃ V_LV    ┃ V_RA   ┃ V_RV   ┃ V_AR_SYS ┃ V_VEN_SYS ┃ V_AR_PUL ┃ V_VEN_PUL ┃ Heart   ┃ SYS     ┃ PUL     ┃ Total    ┃                                              
                             ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━┩                                              
                    63.877110.06463.81776.04879.884598.237291.24458.903313.805678.121350.1471342.073           
                             └────────┴─────────┴────────┴────────┴──────────┴───────────┴──────────┴───────────┴─────────┴─────────┴─────────┴──────────┘                                              
                                                                 Pressures                                                                                                                              
                             ┏━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                          
                             ┃ p_LA   ┃ p_LV  ┃ p_RA   ┃ p_RV  ┃ p_AR_SYS ┃ p_VEN_SYS ┃ p_AR_PUL ┃ p_VEN_PUL ┃                                                                                          
                             ┡━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                          
                    14.0465.60311.3912.50066.5704.60229.1243.681           
                             └────────┴───────┴────────┴───────┴──────────┴───────────┴──────────┴───────────┘                                                                                          
                                                                      Flows                                                                                                                             
                             ┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                    
                             ┃ Q_MV     ┃ Q_AV   ┃ Q_TV     ┃ Q_PV   ┃ Q_AR_SYS ┃ Q_VEN_SYS ┃ Q_AR_PUL ┃ Q_VEN_PUL ┃                                                                                    
                             ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                    
                    1123.490-0.0011183.273-0.00012.394-13.57850.886-20.728           
                             └──────────┴────────┴──────────┴────────┴──────────┴───────────┴──────────┴───────────┘                                                                                    
Calculating pressure at time 0.001
Time0.001 with activation: 4.411070095309153 and volumes: 110.0641955620631 mL (LV) 76.0477501297995 mL (RV)
                    INFO     INFO:scifem.solvers:Newton iteration 1: r (abs) = 45.09157533202757 (tol=1e-06), r (rel) = 1.0 (tol=1e-10)                                                   solvers.py:273
[08/26/25 13:10:59] INFO     INFO:scifem.solvers:Newton iteration 2: r (abs) = 0.36161554486738307 (tol=1e-06), r (rel) = 0.008019581090362469 (tol=1e-10)                                solvers.py:273
[08/26/25 13:11:00] INFO     INFO:scifem.solvers:Newton iteration 3: r (abs) = 0.0007690565324782405 (tol=1e-06), r (rel) = 1.705543722558738e-05 (tol=1e-10)                             solvers.py:273
                    INFO     INFO:scifem.solvers:Newton iteration 4: r (abs) = 9.390120357396253e-09 (tol=1e-06), r (rel) = 2.082455600243058e-10 (tol=1e-10)                             solvers.py:273
Compute pressures: 5.816959005758554 mmHg (LV) 2.7585340849927764 mmHg (RV)



[08/26/25 13:11:01] INFO     INFO:circulation.base:                                                                                                                                          base.py:464
                                                                                        Volumes                                                                                                         
                             ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┓                                              
                             ┃ V_LA   ┃ V_LV    ┃ V_RA   ┃ V_RV   ┃ V_AR_SYS ┃ V_VEN_SYS ┃ V_AR_PUL ┃ V_VEN_PUL ┃ Heart   ┃ SYS     ┃ PUL     ┃ Total    ┃                                              
                             ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━┩                                              
                    62.804111.11562.69277.15979.872598.263291.19358.975313.771678.135350.1681342.073           
                             └────────┴─────────┴────────┴────────┴──────────┴───────────┴──────────┴───────────┴─────────┴─────────┴─────────┴──────────┘                                              
                                                                 Pressures                                                                                                                              
                             ┏━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                          
                             ┃ p_LA   ┃ p_LV  ┃ p_RA   ┃ p_RV  ┃ p_AR_SYS ┃ p_VEN_SYS ┃ p_AR_PUL ┃ p_VEN_PUL ┃                                                                                          
                             ┡━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                          
                    13.7185.81711.1112.75966.5604.60229.1193.686           
                             └────────┴───────┴────────┴───────┴──────────┴───────────┴──────────┴───────────┘                                                                                          
                                                                      Flows                                                                                                                             
                             ┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                    
                             ┃ Q_MV     ┃ Q_AV   ┃ Q_TV     ┃ Q_PV   ┃ Q_AR_SYS ┃ Q_VEN_SYS ┃ Q_AR_PUL ┃ Q_VEN_PUL ┃                                                                                    
                             ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                    
                    1051.303-0.0011111.471-0.00021.838-16.09585.234-34.065           
                             └──────────┴────────┴──────────┴────────┴──────────┴───────────┴──────────┴───────────┘                                                                                    
                    INFO     INFO:circulation.base:Done running circulation model in 3.21 s                                                                                                  base.py:398



                    INFO     INFO:circulation.base:                                                                                                                                          base.py:464
                                                                                        Volumes                                                                                                         
                             ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┓                                              
                             ┃ V_LA   ┃ V_LV    ┃ V_RA   ┃ V_RV   ┃ V_AR_SYS ┃ V_VEN_SYS ┃ V_AR_PUL ┃ V_VEN_PUL ┃ Heart   ┃ SYS     ┃ PUL     ┃ Total    ┃                                              
                             ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━┩                                              
                    62.804111.11562.69277.15979.872598.263291.19358.975313.771678.135350.1681342.073           
                             └────────┴─────────┴────────┴────────┴──────────┴───────────┴──────────┴───────────┴─────────┴─────────┴─────────┴──────────┘                                              
                                                                 Pressures                                                                                                                              
                             ┏━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                          
                             ┃ p_LA   ┃ p_LV  ┃ p_RA   ┃ p_RV  ┃ p_AR_SYS ┃ p_VEN_SYS ┃ p_AR_PUL ┃ p_VEN_PUL ┃                                                                                          
                             ┡━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                          
                    13.7185.81711.1112.75966.5604.60229.1193.686           
                             └────────┴───────┴────────┴───────┴──────────┴───────────┴──────────┴───────────┘                                                                                          
                                                                      Flows                                                                                                                             
                             ┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓                                                                                    
                             ┃ Q_MV     ┃ Q_AV   ┃ Q_TV     ┃ Q_PV   ┃ Q_AR_SYS ┃ Q_VEN_SYS ┃ Q_AR_PUL ┃ Q_VEN_PUL ┃                                                                                    
                             ┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩                                                                                    
                    1051.303-0.0011111.471-0.00021.838-16.09585.234-34.065           
                             └──────────┴────────┴──────────┴────────┴──────────┴───────────┴──────────┴───────────┘                                                                                    

Below we plot the pressure volume loop, volumes, pressures and flows for 50 beats

../_images/bleeding_biv_pv_loop_normal.png

Fig. 3 Pressure volume loop for the normal BiV.#

../_images/bleeding_biv_pv_loop_bleeding.png

Fig. 4 Pressure volume loop for the bleeding BiV.#

References#