34#ifndef SVZERODSOLVER_MODEL_CLOSEDLOOPHEARTPULMONARY_HPP_
35#define SVZERODSOLVER_MODEL_CLOSEDLOOPHEARTPULMONARY_HPP_
44#define _USE_MATH_DEFINES
207 const Eigen::Matrix<double, Eigen::Dynamic, 1> &y,
208 const Eigen::Matrix<double, Eigen::Dynamic, 1> &dy);
215 void post_solve(Eigen::Matrix<double, Eigen::Dynamic, 1> &y);
231 double psi_ra, psi_la, psi_ra_derivative,
241 void get_activation_and_elastance_functions(std::vector<double> ¶meters);
250 void get_psi_ra_la(std::vector<double> ¶meters,
251 const Eigen::Matrix<double, Eigen::Dynamic, 1> &y);
258 void get_valve_positions(
const Eigen::Matrix<double, Eigen::Dynamic, 1> &y);
BlockType
The types of blocks supported by the solver.
Definition BlockType.h:42
BlockClass
The classes/categories of blocks supported. Some classes require special handling (e....
Definition BlockType.h:64
SparseSystem source file.
Base class for 0D model components.
Definition Block.h:101
const int id
Global ID of the block.
Definition Block.h:103
const Model * model
The model to which the block belongs.
Definition Block.h:104
Heart and pulmonary circulation model.
Definition ClosedLoopHeartPulmonary.h:107
ClosedLoopHeartPulmonary(int id, Model *model)
Construct a new ClosedLoopHeartPulmonary object.
Definition ClosedLoopHeartPulmonary.h:115
void setup_dofs(DOFHandler &dofhandler)
Set up the degrees of freedom (DOF) of the block.
Definition ClosedLoopHeartPulmonary.cpp:35
void update_solution(SparseSystem &system, std::vector< double > ¶meters, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &dy)
Update the solution-dependent contributions of the element in a sparse system.
Definition ClosedLoopHeartPulmonary.cpp:129
void post_solve(Eigen::Matrix< double, Eigen::Dynamic, 1 > &y)
Modify the solution after solving it.
Definition ClosedLoopHeartPulmonary.cpp:310
ParamId
Local IDs of the parameters.
Definition ClosedLoopHeartPulmonary.h:137
@ KXV_RA
Right atrium pressure-volume relationship (?)
Definition ClosedLoopHeartPulmonary.h:158
@ RRA_V
Right atrium outflow resistance.
Definition ClosedLoopHeartPulmonary.h:145
@ KXP_RA
Right atrium pressure-volume relationship (?)
Definition ClosedLoopHeartPulmonary.h:157
@ VRV_U
Right ventricle unstressed volume.
Definition ClosedLoopHeartPulmonary.h:152
@ LRV_A
Right ventricle inductance.
Definition ClosedLoopHeartPulmonary.h:146
@ RLV_AO
Left ventricle outflow resistance.
Definition ClosedLoopHeartPulmonary.h:151
@ EMAX_RA
Right atrium elastance (?)
Definition ClosedLoopHeartPulmonary.h:161
@ TPWAVE
Fraction of cardiac cycle (P-wave)
Definition ClosedLoopHeartPulmonary.h:139
@ IML
Scaling for intramyocardial pressure (left coronaries)
Definition ClosedLoopHeartPulmonary.h:142
@ IMR
Scaling for intramyocardial pressure (right coronaries)
Definition ClosedLoopHeartPulmonary.h:143
@ VASO_LA
Left atrium rest volume (?)
Definition ClosedLoopHeartPulmonary.h:164
@ LLV_A
Left ventricle inductance.
Definition ClosedLoopHeartPulmonary.h:150
@ ELV_S
Scaling for left ventricle elastance.
Definition ClosedLoopHeartPulmonary.h:141
@ CP
Pulmonary capacitance.
Definition ClosedLoopHeartPulmonary.h:155
@ VLV_U
Left ventricle unstressed volume.
Definition ClosedLoopHeartPulmonary.h:153
@ RLA_V
Left atrium outflow resistance.
Definition ClosedLoopHeartPulmonary.h:149
@ EMAX_LA
Left atrium elastance (?)
Definition ClosedLoopHeartPulmonary.h:162
@ TSA
Fractions of cardiac cycle (not sure)
Definition ClosedLoopHeartPulmonary.h:138
@ KXP_LA
Left atrium pressure-volume relationship (?)
Definition ClosedLoopHeartPulmonary.h:159
@ CPA
Aortic capacitance.
Definition ClosedLoopHeartPulmonary.h:156
@ RPD
Pulmonary resistance.
Definition ClosedLoopHeartPulmonary.h:154
@ LLA_V
Left atrium inductance.
Definition ClosedLoopHeartPulmonary.h:148
@ ERV_S
Scaling for right ventricle elastance.
Definition ClosedLoopHeartPulmonary.h:140
@ VASO_RA
Right atrium rest volume (?)
Definition ClosedLoopHeartPulmonary.h:163
@ KXV_LA
Left atrium pressure-volume relationship (?)
Definition ClosedLoopHeartPulmonary.h:160
@ RRV_A
Right ventricle outflow resistance.
Definition ClosedLoopHeartPulmonary.h:147
@ LRA_V
Right atrium inductance.
Definition ClosedLoopHeartPulmonary.h:144
void update_time(SparseSystem &system, std::vector< double > ¶meters)
Update the time-dependent contributions of the element in a sparse system.
Definition ClosedLoopHeartPulmonary.cpp:106
TripletsContributions num_triplets
Number of triplets of element.
Definition ClosedLoopHeartPulmonary.h:223
void update_constant(SparseSystem &system, std::vector< double > ¶meters)
Update the constant contributions of the element in a sparse system.
Definition ClosedLoopHeartPulmonary.cpp:41
Degree-of-freedom handler.
Definition DOFHandler.h:48
Model of 0D elements.
Definition Model.h:75
Sparse system.
Definition SparseSystem.h:57
The number of triplets that the element contributes to the global system.
Definition Block.h:52