svFSIplus
CepModAp.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_AP_H
32 #define CEP_MOD_AP_H
33 
34 #include "Array.h"
35 #include "Vector.h"
36 
37 /// @brief This module defines data structures for Aliev-Panfilov cellular
38 /// activation model for cardiac electrophysiology.
39 ///
40 /// The classes defined here duplicate the data structures in the Fortran APMOD module defined in CEPMOD_AP.f
41 /// and PARAMS_AP.f files.
42 class CepModAp
43 {
44  public:
45  CepModAp();
46  ~CepModAp();
47 
48  // Scaling factors
49  /// Voltage scaling
50  double Vscale = 100.0;
51 
52  /// Time scaling
53  double Tscale = 12.90;
54 
55  /// Voltage offset parameter
56  double Voffset = -80.0;
57 
58  /// Model parameters
59  double alpha = 1.E-2;
60  double a = 2.E-3;
61  double b = 0.150;
62  double c = 8.0;
63  double mu1 = 0.20;
64  double mu2 = 0.30;
65 
66  // Electromechanics coupling parameters: active stress model
67  /// Resting voltage (mV)
68  double Vrest = -80.0;
69 
70  /// Critical voltage (mV)
71  double Vcrit = -30.0;
72 
73  /// Saturation potential
74  double eta_T = 5.E-3;
75 
76  /// Minimum activation (ms^{-1})
77  double eps_0 = 0.10;
78 
79  /// Maximum activation (ms^{-1})
80  double eps_i = 1.0;
81 
82  /// Transition rate (mV^{-1})
83  double xi_T = 1.0;
84 
85  /// Cm: Cell capacitance per unit surface area
86  double Cm = 1.0;
87 
88  /// sV: Surface to volume ratio
89  double sV = 1.0;
90 
91  /// rho: Cellular resistivity
92  double rho = 1.0;
93 
94  void actv_strs(const double X, const double dt, double& Tact, double& epsX);
95 
96  void getf(const int n, const Vector<double>& X, Vector<double>& f, const double fext);
97  void getj(const int n, const Vector<double>& X, Array<double>& Jac, const double Ksac);
98 
99  void init(const int nX, Vector<double> &X);
100  void init(const int nX, Vector<double> &X, double X0);
101  void init(const int nX, Vector<double> &X, Vector<double>& X0);
102 
103  void integ_cn2(const int nX, Vector<double>& Xn, const double Ts, const double Ti,
104  const double Istim, const double Ksac, Vector<int>& IPAR, Vector<double>& RPAR);
105  void integ_fe(const int nX, Vector<double>& X, const double Ts, const double Ti,
106  const double Istim, const double Ksac);
107  void integ_rk(const int nX, Vector<double>& X, const double Ts, const double Ti,
108  const double Istim, const double Ksac);
109 };
110 
111 #endif
112 
This module defines data structures for Aliev-Panfilov cellular activation model for cardiac electrop...
Definition: CepModAp.h:43
double xi_T
Transition rate (mV^{-1})
Definition: CepModAp.h:83
double sV
sV: Surface to volume ratio
Definition: CepModAp.h:89
double alpha
Model parameters.
Definition: CepModAp.h:59
double Cm
Cm: Cell capacitance per unit surface area.
Definition: CepModAp.h:86
void integ_rk(const int nX, Vector< double > &X, const double Ts, const double Ti, const double Istim, const double Ksac)
Time integration performed using 4th order Runge-Kutta method.
Definition: CepModAp.cpp:200
void integ_fe(const int nX, Vector< double > &X, const double Ts, const double Ti, const double Istim, const double Ksac)
Time integration performed using Forward Euler method.
Definition: CepModAp.cpp:182
double rho
rho: Cellular resistivity
Definition: CepModAp.h:92
double eps_i
Maximum activation (ms^{-1})
Definition: CepModAp.h:80
double Voffset
Voltage offset parameter.
Definition: CepModAp.h:56
void init(const int nX, Vector< double > &X)
SUBROUTINE AP_INIT0(nX, X)
Definition: CepModAp.cpp:84
double Tscale
Time scaling.
Definition: CepModAp.h:53
void actv_strs(const double X, const double dt, double &Tact, double &epsX)
Compute activation force for electromechanics based on active stress model.
Definition: CepModAp.cpp:47
double Vscale
Voltage scaling.
Definition: CepModAp.h:50
double Vcrit
Critical voltage (mV)
Definition: CepModAp.h:71
void integ_cn2(const int nX, Vector< double > &Xn, const double Ts, const double Ti, const double Istim, const double Ksac, Vector< int > &IPAR, Vector< double > &RPAR)
Time integration performed using Crank-Nicholson method.
Definition: CepModAp.cpp:105
double eta_T
Saturation potential.
Definition: CepModAp.h:74
double eps_0
Minimum activation (ms^{-1})
Definition: CepModAp.h:77
double Vrest
Resting voltage (mV)
Definition: CepModAp.h:68