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

Cardiac chamber with exponential passive pressure-volume relation. More...

#include <ChamberElastanceInductorExponential.h>

Inheritance diagram for ChamberElastanceInductorExponential:
[legend]

Public Types

enum  ExponentialParamId {
  KXP = 2 ,
  KXV = 3 ,
  VASO = 4
}
 Local IDs of the parameters (Impedance=0 and Emax=1 shared with base class). More...
Public Types inherited from ChamberElastanceInductor
enum  ParamId {
  IMPEDANCE = 0 ,
  EMAX = 1 ,
  EMIN = 2 ,
  VRD = 3 ,
  VRS = 4
}
 Local IDs of the parameters (shared indices first). More...

Public Member Functions

 ChamberElastanceInductorExponential (int id, Model *model)
 Construct a new ChamberElastanceInductorExponential object.
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.
Public Member Functions inherited from ChamberElastanceInductor
 ChamberElastanceInductor (int id, Model *model)
 Construct a new ChamberElastanceInductor object.
void setup_dofs (DOFHandler &dofhandler) override
 Set up the degrees of freedom (DOF) of the block.
void update_constant (SparseSystem &system, std::vector< double > &parameters) override
 Update the constant contributions of the element in a sparse system.
void set_activation_function (std::unique_ptr< ActivationFunction > af) override
 Set activation function (for chamber blocks that use one).
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 post_solve (Eigen::Matrix< double, Eigen::Dynamic, 1 > &y)
 Modify the solution after solving it.
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 {6, 2, 1}
 Number of triplets of element.
Public Attributes inherited from ChamberElastanceInductor
TripletsContributions num_triplets {6, 2, 0}
 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.

Protected Member Functions

void get_elastance_values (std::vector< double > &parameters) override
 Compute elastance and rest volume from activation and parameters.
Protected Member Functions inherited from ChamberElastanceInductor
 ChamberElastanceInductor (int id, Model *model, BlockType block_type, std::vector< std::pair< std::string, InputParameter > > params)
 Construct a ChamberElastanceInductor with custom block type and parameters. Used by derived classes.

Additional Inherited Members

Protected Attributes inherited from ChamberElastanceInductor
double Elas = 0.0
 Current chamber elastance.
double Vrest = 0.0
 Current rest volume.
double act_ = 0.0
std::unique_ptr< ActivationFunctionactivation_func_
 Activation function.

Detailed Description

Cardiac chamber with exponential passive pressure-volume relation.

Extends ChamberElastanceInductor with an exponential passive P-V relationship for modeling atrial chambers. Based on the atrial model in [9] and [5].

Governing equations

The pressure-volume relation replaces the linear form with:

\‍[P_{in} = A(t) \, E_{max} (V_c - V_{aso})
       + (1 - A(t)) \, K_{xp} \left( e^{K_{xv}(V_c - V_{aso})} - 1 \right)
\‍]

The inductor and volume conservation equations are inherited unchanged.

Parameters

Parameters

  • 0 Emax: Maximum (active) elastance
  • 1 Impedance: Outflow inductance
  • 2 Kxp: Passive pressure scaling
  • 3 Kxv: Passive volume scaling
  • 4 Vaso: Passive resting volume

Member Enumeration Documentation

◆ ExponentialParamId

Local IDs of the parameters (Impedance=0 and Emax=1 shared with base class).

Constructor & Destructor Documentation

◆ ChamberElastanceInductorExponential()

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

Construct a new ChamberElastanceInductorExponential object.

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

Member Function Documentation

◆ get_elastance_values()

void ChamberElastanceInductorExponential::get_elastance_values ( std::vector< double > & parameters)
overrideprotectedvirtual

Compute elastance and rest volume from activation and parameters.

Parameters
parametersParameters of the model

Reimplemented from ChamberElastanceInductor.

◆ update_solution()

void ChamberElastanceInductorExponential::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 ChamberElastanceInductorExponential::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 ChamberElastanceInductor.

Member Data Documentation

◆ num_triplets

TripletsContributions ChamberElastanceInductorExponential::num_triplets {6, 2, 1}

Number of triplets of element.


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