parameters (dict[str, Any] | None, optional) – Parameters used in the model, by default None which uses the default parameters
add_units (bool, optional) – Add units to the parameters, by default False. Note that adding units
will drastically slow down the simulation, so it is recommended to
use this only for testing purposes.
callback (base.CallBack | None, optional) – Optional callback function which is called at every time step, by default None.
The callback function take three arguments: the model, the current time,
and a boolean flag save which indicates if the current state should be saved.
verbose (bool, optional) – Print additional information, by default False
comm (mpi4py.MPI_InterComm optional) – MPI communicator, by default None
callback_save_state (base.CallBack | None, optional) – Optional callback function called every time the state should be saved, by default None.
The function should take three arguments: the model, the current time, and a boolean
flag save which indicates if the current state should be saved.
initial_state (dict[str, float] | None, optional) – Initial state of the model, by default None which uses the default initial state
Closed loop circulation model fom Regazzoni et al. [2].
Parameters:
parameters (dict[str, Any] | None, optional) – Parameters used in the model, by default None which uses the default parameters
p_LV_func (Callable[[float, float], float] | None, optional) – Optional function to calculate the pressure in the LV, by default None.
The function should take the volume in the LV as the first argument and
the time as the second argument, and return the pressure in the LV
p_BiV_func (Callable[[float, float, float], float] | None, optional) – Optional function to calculate the pressure in the LV and RV, by default None.
The function should take the volume in the LV as the first argument, the volume
in the RV as the second argument, and the time as the third argument, and return
a tuple (plv, prv) with the pressures in the LV and RV.
add_units (bool, optional) – Add units to the parameters, by default False. Note that adding units
will drastically slow down the simulation, so it is recommended to
use this only for testing purposes.
callback (base.CallBack | None, optional) – Optional callback function, by default None. The callback function takes
three arguments: the model, the current time, and a boolean flag save
which indicates if the current state should be saved.
verbose (bool, optional) – Print additional information, by default False
comm (mpi4py.MPI_InterComm optional) – MPI communicator, by default None
outdir (Path, optional) – Output directory, by default Path(“results-regazzoni”)
initial_state (dict[str, float] | None, optional) – Initial state of the model, by default None which uses the default initial state
Steepness of the smooth diode in circulation.base.smooth_heavyside(),
which hard-codes it. The .ode file exposes it as a parameter, so it has to
be repeated here to keep the two descriptions of the model identical.
Translate the nested parameter dictionary into .ode parameter names.
The .ode file needs a flat namespace, so parameters["circulation"]["SYS"]["C_AR"] becomes C_AR_SYS and parameters["chambers"]["LV"]["EA"]
becomes EA_LV.
Two entries are computed rather than copied. The activation offsets
tC_eff_* and tR_eff_* are the contraction and relaxation onsets
reduced modulo the beat length. The .ode file applies each chamber’s
offset to the beat phase with a single wrap, which is exact only if both
lie in [0,RR) – and the published offsets do not (tC for the
atria is 0.9 s against a 0.8 s beat at the default heart rate). Reducing
them here is what makes the wrap correct.
Parameters:
parameters (dict[str, Any] | None) – Nested parameters as returned by Regazzoni2020.default_parameters(),
with units already removed. Defaults to the model’s own defaults.
Returns:
Keyword arguments for the generated init_parameter_values.
t_span (tuple[float, float]) – A tuple representing start and end of time
parameters (dict[str, float]) – Parameters used in the model, see default_parameters()
t_eval (np.ndarray, optional) – Time points to evaluate the solution, by default None.
If not provided, the default points from scipy.integrate.solve_ivp
will be used
Returns:
An array of activation points
Return type:
np.ndarray
Notes
The active stress is taken from Bestel et al. [3], characterized through
a time-dependent stress function \(\tau\) solution to the evolution equation
Time-dependent pressure derived from the Bestel model [3].
Parameters:
t_span (tuple[float, float]) – A tuple representing start and end of time
parameters (dict[str, float]) – Parameters used in the model, see default_parameters()
t_eval (np.ndarray, optional) – Time points to evaluate the solution, by default None.
If not provided, the default points from scipy.integrate.solve_ivp
will be used
Returns:
An array of pressure points
Return type:
np.ndarray
Notes
We consider a time-dependent pressure derived from the Bestel model.
The solution \(p = p(t)\) is characterized as solution to the evolution equation