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