svZeroDSolver
Loading...
Searching...
No Matches
ClosedLoopHeartPulmonary Class Reference

Heart and pulmonary circulation model. More...

#include <ClosedLoopHeartPulmonary.h>

Inheritance diagram for ClosedLoopHeartPulmonary:
[legend]

Public Types

enum  ParamId {
  TSA = 0 ,
  TPWAVE = 1 ,
  ERV_S = 2 ,
  ELV_S = 3 ,
  IML = 4 ,
  IMR = 5 ,
  LRA_V = 6 ,
  RRA_V = 7 ,
  LRV_A = 8 ,
  RRV_A = 9 ,
  LLA_V = 10 ,
  RLA_V = 11 ,
  LLV_A = 12 ,
  RLV_AO = 13 ,
  VRV_U = 14 ,
  VLV_U = 15 ,
  RPD = 16 ,
  CP = 17 ,
  CPA = 18 ,
  KXP_RA = 19 ,
  KXV_RA = 20 ,
  KXP_LA = 21 ,
  KXV_LA = 22 ,
  EMAX_RA = 23 ,
  EMAX_LA = 24 ,
  VASO_RA = 25 ,
  VASO_LA = 26
}
 Local IDs of the parameters. More...
 

Public Member Functions

 ClosedLoopHeartPulmonary (int id, Model *model)
 Construct a new ClosedLoopHeartPulmonary object.
 
void setup_dofs (DOFHandler &dofhandler)
 Set up the degrees of freedom (DOF) of the block.
 
void update_constant (SparseSystem &system, std::vector< double > &parameters)
 Update the constant contributions of the element in a sparse system.
 
void update_time (SparseSystem &system, std::vector< double > &parameters)
 Update the time-dependent contributions of the element in a sparse system.
 
void update_solution (SparseSystem &system, std::vector< double > &parameters, 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.
 
void post_solve (Eigen::Matrix< double, Eigen::Dynamic, 1 > &y)
 Modify the solution after solving it.
 
- Public Member Functions inherited from Block
 Block (int id, Model *model, BlockType block_type, BlockClass block_class, std::vector< std::pair< std::string, InputParameter > > input_params)
 Construct a new Block object.
 
 ~Block ()
 Destroy the Block object.
 
 Block (const Block &)=delete
 Copy the Block object.
 
std::string get_name ()
 Get the name of the block.
 
void update_vessel_type (VesselType type)
 Update vessel type of the block.
 
void setup_params_ (const std::vector< int > &param_ids)
 Setup parameter IDs for the block.
 
void setup_dofs_ (DOFHandler &dofhandler, int num_equations, const std::list< std::string > &internal_var_names)
 Set up the degrees of freedom (DOF) of the block.
 
virtual void setup_model_dependent_params ()
 Setup parameters that depend on the model.
 
virtual void setup_initial_state_dependent_params (State initial_state, std::vector< double > &parameters)
 Setup parameters that depend on the initial state.
 
virtual void update_gradient (Eigen::SparseMatrix< double > &jacobian, Eigen::Matrix< double, Eigen::Dynamic, 1 > &residual, Eigen::Matrix< double, Eigen::Dynamic, 1 > &alpha, std::vector< double > &y, std::vector< double > &dy)
 Set the gradient of the block contributions with respect to the parameters.
 
virtual TripletsContributions get_num_triplets ()
 Get number of triplets of element.
 

Public Attributes

TripletsContributions num_triplets {33, 10, 2}
 Number of triplets of element.
 
- Public Attributes inherited from Block
const int id
 Global ID of the block.
 
const Modelmodel
 The model to which the block belongs.
 
const BlockType block_type
 Type of this block.
 
const BlockClass block_class
 Class of this block.
 
VesselType vessel_type = VesselType::neither
 Vessel type of this block.
 
const std::vector< std::pair< std::string, InputParameter > > input_params
 Map from name to input parameter.
 
std::vector< Node * > inlet_nodes
 Inlet nodes.
 
std::vector< Node * > outlet_nodes
 Outlet nodes.
 
bool steady = false
 Toggle steady behavior.
 
bool input_params_list = false
 Are input parameters given as a list?
 
std::vector< int > global_param_ids
 Global IDs for the block parameters.
 
std::vector< int > global_var_ids
 Global variable indices of the local element contributions.
 
std::vector< int > global_eqn_ids
 Global equation indices of the local element contributions.
 
TripletsContributions num_triplets
 Number of triplets of element.
 

Detailed Description

Heart and pulmonary circulation model.

Models the mechanics of the 4 heart chambers and pulmonary circulation

References: [7] and [4]

TODO: Equations and circuit diagram

Parameters

Parameter sequence for constructing this block

  • 0 Atrial systole time fraction
  • 1 Time for P-wave
  • 2 Scaling for right ventricle elastance
  • 3 Scaling for left ventricle elastance
  • 4 Scaling for intramyocardial pressure (left coronaries)
  • 5 Scaling for intramyocardial pressure (right coronaries)
  • 6 Right atrium inductance
  • 7 Right atrium outflow resistance
  • 8 Right ventricle inductance
  • 9 Right ventricle outflow resistance
  • 10 Left atrium inductance
  • 11 Left atrium outflow resistance
  • 12 Left ventricle inductance
  • 13 Left ventricle outflow resistance
  • 14 Right ventricle unstressed volume
  • 15 Left ventricle unstressed volume
  • 16 Pulmonary resistance
  • 17 Pulmonary capacitance
  • 18 Aortic capacitance
  • 19 Right atrium pressure scaling
  • 20 Right atrium volume scaling
  • 21 Left atrium pressure scaling
  • 22 Left atrium volume scaling
  • 23 Right atrium elastance
  • 24 Left atrium elastance
  • 25 Right atrium resting volume
  • 26 Left atrium resting volume

Internal variables

Names of internal variables in this block's output:

  • V_RA: Right atrium volume
  • Q_RA: Right atrium outflow
  • P_RV: Right ventricle pressure
  • V_RV: Right ventricle volume
  • Q_RV: Right ventricle outflow
  • P_pul: Pulmonary pressure
  • P_LA: Left atrium pressure
  • V_LA: Left atrium volume
  • Q_LA: Left atrium outflow
  • P_LV: Left ventricle pressure
  • V_LV: Left ventricle volume
  • Q_LV: Left ventricle outflow

Member Enumeration Documentation

◆ ParamId

Local IDs of the parameters.

Enumerator
TSA 

Fractions of cardiac cycle (not sure)

TPWAVE 

Fraction of cardiac cycle (P-wave)

ERV_S 

Scaling for right ventricle elastance.

ELV_S 

Scaling for left ventricle elastance.

IML 

Scaling for intramyocardial pressure (left coronaries)

IMR 

Scaling for intramyocardial pressure (right coronaries)

LRA_V 

Right atrium inductance.

RRA_V 

Right atrium outflow resistance.

LRV_A 

Right ventricle inductance.

RRV_A 

Right ventricle outflow resistance.

LLA_V 

Left atrium inductance.

RLA_V 

Left atrium outflow resistance.

LLV_A 

Left ventricle inductance.

RLV_AO 

Left ventricle outflow resistance.

VRV_U 

Right ventricle unstressed volume.

VLV_U 

Left ventricle unstressed volume.

RPD 

Pulmonary resistance.

CP 

Pulmonary capacitance.

CPA 

Aortic capacitance.

KXP_RA 

Right atrium pressure-volume relationship (?)

KXV_RA 

Right atrium pressure-volume relationship (?)

KXP_LA 

Left atrium pressure-volume relationship (?)

KXV_LA 

Left atrium pressure-volume relationship (?)

EMAX_RA 

Right atrium elastance (?)

EMAX_LA 

Left atrium elastance (?)

VASO_RA 

Right atrium rest volume (?)

VASO_LA 

Left atrium rest volume (?)

Constructor & Destructor Documentation

◆ ClosedLoopHeartPulmonary()

ClosedLoopHeartPulmonary::ClosedLoopHeartPulmonary ( int id,
Model * model )
inline

Construct a new ClosedLoopHeartPulmonary object.

Parameters
idGlobal ID of the block
modelThe model to which the block belongs

Member Function Documentation

◆ post_solve()

void ClosedLoopHeartPulmonary::post_solve ( Eigen::Matrix< double, Eigen::Dynamic, 1 > & y)
virtual

Modify the solution after solving it.

Parameters
yCurrent solution

Reimplemented from Block.

◆ setup_dofs()

void ClosedLoopHeartPulmonary::setup_dofs ( DOFHandler & dofhandler)
virtual

Set up the degrees of freedom (DOF) of the block.

Set global_var_ids and global_eqn_ids of the element based on the number of equations and the number of internal variables of the element.

Parameters
dofhandlerDegree-of-freedom handler to register variables and equations at

Reimplemented from Block.

◆ update_constant()

void ClosedLoopHeartPulmonary::update_constant ( SparseSystem & system,
std::vector< double > & parameters )
virtual

Update the constant contributions of the element in a sparse system.

Parameters
systemSystem to update contributions at
parametersParameters of the model

Reimplemented from Block.

◆ update_solution()

void ClosedLoopHeartPulmonary::update_solution ( SparseSystem & system,
std::vector< double > & parameters,
const Eigen::Matrix< double, Eigen::Dynamic, 1 > & y,
const Eigen::Matrix< double, Eigen::Dynamic, 1 > & dy )
virtual

Update the solution-dependent contributions of the element in a sparse system.

Parameters
systemSystem to update contributions at
parametersParameters of the model
yCurrent solution
dyCurrent derivate of the solution

Reimplemented from Block.

◆ update_time()

void ClosedLoopHeartPulmonary::update_time ( SparseSystem & system,
std::vector< double > & parameters )
virtual

Update the time-dependent contributions of the element in a sparse system.

Parameters
systemSystem to update contributions at
parametersParameters of the model

Reimplemented from Block.

Member Data Documentation

◆ num_triplets

TripletsContributions ClosedLoopHeartPulmonary::num_triplets {33, 10, 2}

Number of triplets of element.

Number of triplets that the element contributes to the global system (relevant for sparse memory reservation)


The documentation for this class was generated from the following files: