svZeroDSolver
Loading...
Searching...
No Matches
ChamberElastanceInductorExponential.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the
2// University of California, and others. SPDX-License-Identifier: BSD-3-Clause
3/**
4 * @file ChamberElastanceInductorExponential.h
5 * @brief model::ChamberElastanceInductorExponential source file
6 */
7#ifndef SVZERODSOLVER_MODEL_CHAMBERELASTANCEINDUCTOREXPONENTIAL_HPP_
8#define SVZERODSOLVER_MODEL_CHAMBERELASTANCEINDUCTOREXPONENTIAL_HPP_
9
11
12/**
13 * @brief Cardiac chamber with exponential passive pressure-volume relation.
14 *
15 * Extends ChamberElastanceInductor with an exponential passive P-V
16 * relationship for modeling atrial chambers. Based on the atrial model in
17 * \cite sankaran2012patient and \cite menon2023predictors.
18 *
19 * ### Governing equations
20 *
21 * The pressure-volume relation replaces the linear form with:
22 *
23 * \f[
24 * P_{in} = A(t) \, E_{max} (V_c - V_{aso})
25 * + (1 - A(t)) \, K_{xp} \left( e^{K_{xv}(V_c - V_{aso})} - 1 \right)
26 * \f]
27 *
28 * The inductor and volume conservation equations are inherited unchanged.
29 *
30 * ### Parameters
31 *
32 * ### Parameters
33 *
34 * * `0` Emax: Maximum (active) elastance
35 * * `1` Impedance: Outflow inductance
36 * * `2` Kxp: Passive pressure scaling
37 * * `3` Kxv: Passive volume scaling
38 * * `4` Vaso: Passive resting volume
39 *
40 */
42 public:
43 /**
44 * @brief Construct a new ChamberElastanceInductorExponential object
45 *
46 * @param id Global ID of the block
47 * @param model The model to which the block belongs
48 */
51 id, model, BlockType::chamber_elastance_inductor_exponential,
52 {{"Impedance", InputParameter()},
53 {"Emax", InputParameter()},
54 {"Kxp", InputParameter()},
55 {"Kxv", InputParameter()},
56 {"Vaso", InputParameter()}}) {}
57
58 /**
59 * @brief Local IDs of the parameters (Impedance=0 and Emax=1 shared with
60 * base class)
61 */
63 KXP = 2,
64 KXV = 3,
65 VASO = 4,
66 };
67
68 void update_time(SparseSystem& system, std::vector<double>& parameters);
69 void update_solution(SparseSystem& system, std::vector<double>& parameters,
70 const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
71 const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
72
73 /// @brief Number of triplets of element
75
76 protected:
77 void get_elastance_values(std::vector<double>& parameters) override;
78};
79
80#endif // SVZERODSOLVER_MODEL_CHAMBERELASTANCEINDUCTOREXPONENTIAL_HPP_
BlockType
The types of blocks supported by the solver.
Definition BlockType.h:15
model::ChamberElastanceInductor source file
const int id
Global ID of the block.
Definition Block.h:78
const Model * model
The model to which the block belongs.
Definition Block.h:79
void get_elastance_values(std::vector< double > &parameters) override
Compute elastance and rest volume from activation and parameters.
Definition ChamberElastanceInductorExponential.cpp:7
TripletsContributions num_triplets
Number of triplets of element.
Definition ChamberElastanceInductorExponential.h:74
void update_time(SparseSystem &system, std::vector< double > &parameters)
Update the time-dependent contributions of the element in a sparse system.
Definition ChamberElastanceInductorExponential.cpp:15
ExponentialParamId
Local IDs of the parameters (Impedance=0 and Emax=1 shared with base class).
Definition ChamberElastanceInductorExponential.h:62
ChamberElastanceInductorExponential(int id, Model *model)
Construct a new ChamberElastanceInductorExponential object.
Definition ChamberElastanceInductorExponential.h:49
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.
Definition ChamberElastanceInductorExponential.cpp:24
ChamberElastanceInductor(int id, Model *model)
Construct a new ChamberElastanceInductor object.
Definition ChamberElastanceInductor.h:121
Model of 0D elements.
Definition Model.h:55
Sparse system.
Definition SparseSystem.h:30
Handles the properties of input parameters.
Definition Parameter.h:100
The number of triplets that the element contributes to the global system.
Definition Block.h:27