svFSIplus
CepModBo.h
1 /* Copyright (c) Stanford University, The Regents of the University of California, and others.
2  *
3  * All Rights Reserved.
4  *
5  * See Copyright-SimVascular.txt for additional details.
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining
8  * a copy of this software and associated documentation files (the
9  * "Software"), to deal in the Software without restriction, including
10  * without limitation the rights to use, copy, modify, merge, publish,
11  * distribute, sublicense, and/or sell copies of the Software, and to
12  * permit persons to whom the Software is furnished to do so, subject
13  * to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included
16  * in all copies or substantial portions of the Software.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
19  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef CEP_MOD_BO_H
32 #define CEP_MOD_BO_H
33 
34 #include "Array.h"
35 #include "Vector.h"
36 #include <array>
37 
39 
40 /// @brief This module defines data structures for Bueno-Orovio cellular
41 /// activation model for cardiac electrophysiology.
42 ///
43 /// The classes defined here duplicate the data structures in the Fortran BOMOD module defined
44 /// in CEPMOD_BO.f and PARAMS_BO.f files.
45 class CepModBo
46 {
47  public:
48  CepModBo();
49  ~CepModBo();
50 
51  // Scaling factors
52  /// Voltage scaling
53  double Vscale = 85.70;
54  /// Time scaling
55  double Tscale = 1.0;
56  /// Voltage offset parameter
57  double Voffset = -84.0;
58 
59  /// Model parameters (epi, endo, myo)
60  ///
61  /// \todo [TODO:DaveP] these guys should be maps map<int,double>.
62  ///
63  BoModelParam u_o = {0.0, 0.0, 0.0};
64  BoModelParam u_u = {1.550, 1.56, 1.61};
65  BoModelParam theta_v = {0.30, 0.3, 0.3};
66  BoModelParam theta_w = {0.130, 0.13, 0.13};
67  BoModelParam thetam_v = {6.E-3, 0.2, 0.1};
68  BoModelParam theta_o = {6.E-3, 6.E-3, 5.E-3};
69  BoModelParam taum_v1 = {60.0, 75., 80.};
70  BoModelParam taum_v2 = {1.15E3, 10., 1.4506};
71  BoModelParam taup_v = {1.45060, 1.4506, 1.4506};
72  BoModelParam taum_w1 = {60.0, 6., 70.};
73  BoModelParam taum_w2 = {15.0, 140., 8.};
74  BoModelParam km_w = {65.0, 200., 200.};
75  BoModelParam um_w = {3.E-2, 1.6E-2, 1.6E-2};
76  BoModelParam taup_w = {200.0, 280., 280.};
77  BoModelParam tau_fi = {0.110, 0.1, 0.078};
78  BoModelParam tau_o1 = {400.0, 470., 410.};
79  BoModelParam tau_o2 = {6.0, 6., 7.};
80  BoModelParam tau_so1 = {30.01810, 40., 91.};
81  BoModelParam tau_so2 = {0.99570, 1.2, 0.8};
82  BoModelParam k_so = {2.04580, 2., 2.1};
83  BoModelParam u_so = {0.650, 0.65, 0.6};
84  BoModelParam tau_s1 = {2.73420, 2.7342, 2.7342};
85  BoModelParam tau_s2 = {16.0, 2., 2.};
86  BoModelParam k_s = {2.09940, 2.0994, 2.0994};
87  BoModelParam u_s = {0.90870, 0.9087, 0.9087};
88  BoModelParam tau_si = {1.88750, 2.9013, 3.3849};
89  BoModelParam tau_winf = {7.E-2, 2.73E-2, 1.E-2};
90  BoModelParam ws_inf = {0.940, 0.78, 0.5};
91 
92  // Electromechanics coupling parameters: active stress model
93  /// Resting voltage (mV)
94  double Vrest = -84.0;
95  /// Critical voltage (mV)
96  double Vcrit = -30.0;
97  /// Saturation potential
98  double eta_T = 5.E-3;
99  /// Minimum activation (ms^{-1})
100  double eps_0 = 0.10;
101  /// Maximum activation (ms^{-1})
102  double eps_i = 1.0;
103  /// Transition rate (mV^{-1})
104  double xi_T = 1.0;
105 
106  // Electromechanics coupling parameters: active strain model
107  /// Active force of sacromere (-mM^{-2})
108  double alFa = -4.E+6;
109  /// Resting Ca concentration (mM) := slow inward current variable (s)
110  double c0 = 2.155E-4;
111  /// Viscous-type constant (ms-mM^{-2})
112  double mu_C = 5.E+6;
113 
114  // Force-length relationship parameters
115  /// Initial length of sacromeres (um)
116  double SL0 = 1.950;
117  /// Min. length of sacromeres (um)
118  double SLmin = 1.70;
119  /// Max. length of sacromeres (um)
120  double SLmax = 2.60;
121  /// Fourier coefficients
122  double f0 = -4333.6183355821190;
123  double fc1 = 2570.3953553521950;
124  double fs1 = -2051.8272789919760;
125  double fc2 = 1329.536116891330;
126  double fs2 = 302.2167845582220;
127  double fc3 = 104.9437703051160;
128  double fs3 = 218.3751742294220;
129 
130  /// Cm: Cell capacitance per unit surface area
131  double Cm = 1.0;
132  /// sV: Surface to volume ratio
133  double sV = 1.0;
134  /// rho: Cellular resistivity
135  double rho = 1.0;
136 
137  void actv_strn(const double c, const double I4f, const double dt, double& gf);
138  void actv_strs(const double X, const double dt, double& Tact, double& epsX);
139 
140  double delta(const double r);
141 
142  void getf(const int i, const int n, const Vector<double>& X, Vector<double>& f, const double fext,
143  Vector<double>& RPAR);
144  void getj(const int i, const int n, const Vector<double>& X, Array<double>& JAC);
145 
146  void init(const int nX, Vector<double> &X);
147 
148  void integ_cn2(const int imyo, const int nX, Vector<double>& X, const double Ts, const double Ti,
149  const double Istim, const double Ksac, Vector<int>& IPAR, Vector<double>& RPAR);
150 
151  void integ_fe(const int imyo, const int nX, Vector<double>& X, const double Ts, const double Ti,
152  const double Istim, const double Ksac, Vector<double>& RPAR);
153 
154  void integ_rk(const int imyo, const int nX, Vector<double>& X, const double Ts, const double Ti,
155  const double Istim, const double Ksac, Vector<double>& RPAR);
156 
157  double step(const double r);
158 
159 };
160 
161 #endif
162 
This module defines data structures for Bueno-Orovio cellular activation model for cardiac electrophy...
Definition: CepModBo.h:46
double Cm
Cm: Cell capacitance per unit surface area.
Definition: CepModBo.h:131
double c0
Resting Ca concentration (mM) := slow inward current variable (s)
Definition: CepModBo.h:110
void actv_strs(const double X, const double dt, double &Tact, double &epsX)
Compute activation force for electromechanics based on active stress model.
Definition: CepModBo.cpp:67
double Tscale
Time scaling.
Definition: CepModBo.h:55
double f0
Fourier coefficients.
Definition: CepModBo.h:122
double eps_i
Maximum activation (ms^{-1})
Definition: CepModBo.h:102
double Voffset
Voltage offset parameter.
Definition: CepModBo.h:57
BoModelParam u_o
Definition: CepModBo.h:63
double SLmax
Max. length of sacromeres (um)
Definition: CepModBo.h:120
void getf(const int i, const int n, const Vector< double > &X, Vector< double > &f, const double fext, Vector< double > &RPAR)
The 'zone_id' parameter is the myocardium zone id: 1, 2 or 3.
Definition: CepModBo.cpp:87
double Vcrit
Critical voltage (mV)
Definition: CepModBo.h:96
double xi_T
Transition rate (mV^{-1})
Definition: CepModBo.h:104
double Vscale
Voltage scaling.
Definition: CepModBo.h:53
double Vrest
Resting voltage (mV)
Definition: CepModBo.h:94
double rho
rho: Cellular resistivity
Definition: CepModBo.h:135
double alFa
Active force of sacromere (-mM^{-2})
Definition: CepModBo.h:108
double SL0
Initial length of sacromeres (um)
Definition: CepModBo.h:116
double sV
sV: Surface to volume ratio
Definition: CepModBo.h:133
double mu_C
Viscous-type constant (ms-mM^{-2})
Definition: CepModBo.h:112
double eta_T
Saturation potential.
Definition: CepModBo.h:98
void actv_strn(const double c, const double I4f, const double dt, double &gf)
Compute macroscopic fiber strain based on sacromere force-length relationship and slow inward current...
Definition: CepModBo.cpp:47
double eps_0
Minimum activation (ms^{-1})
Definition: CepModBo.h:100
double SLmin
Min. length of sacromeres (um)
Definition: CepModBo.h:118