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