A closed-loop multiscale model of the cardiovascular system: application to heart pacing and open-loop response