LifeV
IonicGoldbeter.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief Intracellular Calcium model from Goldbeter et al. (1990). By "potential" we
30  @brief refer to the cytosolic calcium concentration, whereas the gating variable
31  @brief represents the sarcoplasmic calcium concentration
32 
33  @date 09-2013
34 
35  @author Ricardo Ruiz <ricardo.ruizbaier@unil.ch>
36 
37  @contributors
38  @mantainer Ricardo Ruiz <ricardo.ruizbaier@epfl.ch>
39  @last update 09-2013
40  */
41 
42 #include <lifev/electrophysiology/solver/IonicModels/IonicGoldbeter.hpp>
43 
44 
45 #include <Teuchos_RCP.hpp>
46 #include <Teuchos_ParameterList.hpp>
47 #include "Teuchos_XMLParameterListHelpers.hpp"
48 
49 namespace LifeV
50 {
51 // ===================================================
52 //! Constructors
53 // ===================================================
55  super ( 2 ),
56  M_nu1 ( 1.58 ),
57  M_nu2 ( 16.0 ),
58  M_nu3 ( 91.0 ),
59  M_nu4 ( 2.0 ),
60  M_nu5 ( 0.2 ),
61  M_k1 ( 0.0 ),
62  M_k2 ( 1.0 ),
63  M_k3 ( 4.0 ),
64  M_k4 ( 0.7481)
65 
66 {
67  M_restingConditions.at (0) = 0.1;
68  M_restingConditions.at (1) = 1.6;
69 }
70 
71 IonicGoldbeter::IonicGoldbeter ( Teuchos::ParameterList& parameterList ) :
72  super ( 2 )
73 {
74  M_nu1 = parameterList.get ("nu1", 1.58);
75  M_nu2 = parameterList.get ("nu2", 16.0);
76  M_nu3 = parameterList.get ("nu3", 1.58);
77  M_nu4 = parameterList.get ("nu4", 16.0);
78  M_nu5 = parameterList.get ("nu5", 1.58);
79  M_k1 = parameterList.get ("k1", 0.0);
80  M_k2 = parameterList.get ("k2", 1.0);
81  M_k3 = parameterList.get ("k3", 4.0);
82  M_k4 = parameterList.get ("k4", 0.7481);
83 
84 }
85 
87 {
88 
89  M_nu1 = model.M_nu1;
90  M_nu2 = model.M_nu2;
91  M_nu3 = model.M_nu3;
92  M_nu4 = model.M_nu4;
93  M_nu5 = model.M_nu5;
94  M_k1 = model.M_k1;
95  M_k2 = model.M_k2;
96  M_k3 = model.M_k3;
97  M_k4 = model.M_k4;
98 
99  M_numberOfEquations = model.M_numberOfEquations;
100  M_restingConditions = model.M_restingConditions;
101 }
102 
103 // ===================================================
104 //! Operator
105 // ===================================================
107 {
108  M_nu1 = model.M_nu1;
109  M_nu2 = model.M_nu2;
110  M_nu3 = model.M_nu3;
111  M_nu4 = model.M_nu4;
112  M_nu5 = model.M_nu5;
113  M_k1 = model.M_k1;
114  M_k2 = model.M_k2;
115  M_k3 = model.M_k3;
116  M_k4 = model.M_k4;
117 
118  M_numberOfEquations = model.M_numberOfEquations;
119  M_restingConditions = model.M_restingConditions;
120 
121  return *this;
122 }
123 
124 
125 // ===================================================
126 //! Methods
127 // ===================================================
128 //Only sarcoplasmic calcium
129 void IonicGoldbeter::computeGatingRhs ( const std::vector<Real>& v,
130  std::vector<Real>& rhs )
131 {
132 
133  Real dr = M_nu2 * std::pow ( v[0], 2.0) / (M_k2 + std::pow (v[0], 2.0) ) - M_nu3 * std::pow (v[0], 4.0) * std::pow (v[1], 2.0) /
134  ( (M_k3 + std::pow (v[1], 2.0) ) * (M_k4 + std::pow (v[0], 4.0) ) ) - M_nu5 * v[1];
135 
136  rhs[0] = dr;
137 
138 }
139 
140 //Both cytosolic (V) and sarcoplasmic calcium (r)
141 void IonicGoldbeter::computeRhs ( const std::vector<Real>& v,
142  std::vector<Real>& rhs )
143 {
144 
145  Real dr = M_nu2 * std::pow (v[0], 2.0) / (M_k2 + std::pow (v[0], 2.0) ) - M_nu3 * std::pow (v[0], 4.0) * std::pow (v[1], 2.0) /
146  ( (M_k3 + std::pow (v[1], 2.0) ) * (M_k4 + std::pow (v[0], 4.0) ) ) - M_nu5 * v[1];
147  Real dV = M_nu1 - M_nu2 * std::pow (v[0], 2.0) / (M_k2 + std::pow (v[0], 2.0) ) + M_nu3 * std::pow (v[0], 4.0) * std::pow (v[1], 2.0) /
148  ( (M_k3 + std::pow (v[1], 2.0) ) * (M_k4 + std::pow (v[0], 4.0) ) ) - M_nu4 * v[0];
149 
150  rhs[0] = dV;
151  rhs[1] = dr;
152 
153 }
154 
155 
156 Real IonicGoldbeter::computeLocalPotentialRhs ( const std::vector<Real>& v )
157 {
158  return (M_nu1 - M_nu2 * std::pow (v[0], 2.0) / (M_k2 + std::pow (v[0], 2.0) ) + M_nu3 * std::pow (v[0], 4.0) * std::pow (v[1], 2.0) /
159  ( (M_k3 + std::pow (v[1], 2.0) ) * (M_k4 + std::pow (v[0], 4.0) ) ) - M_nu4 * v[0] );
160 }
161 
162 
163 
164 
166 {
167  std::cout << "\n\n\t\tIntracellularCalciumGoldbeter Informations\n\n";
168  std::cout << "number of unkowns: " << this->Size() << std::endl;
169 
170  std::cout << "\n\t\tList of model parameters:\n\n";
171  std::cout << "nu1: " << this->Nu1() << std::endl;
172  std::cout << "nu2: " << this->Nu2() << std::endl;
173  std::cout << "nu3: " << this->Nu3() << std::endl;
174  std::cout << "nu4: " << this->Nu4() << std::endl;
175  std::cout << "nu5: " << this->Nu5() << std::endl;
176 
177 
178  std::cout << "k1: " << this->K1() << std::endl;
179  std::cout << "k2: " << this->K2() << std::endl;
180  std::cout << "k3: " << this->K3() << std::endl;
181  std::cout << "k4: " << this->K4() << std::endl;
182 
183  std::cout << "\n\t\t End of IntracellularCalciumGoldbeter Informations\n\n\n";
184 
185 }
186 
187 
188 }
IonicGoldbeter()
Constructor.
IonicGoldbeter(Teuchos::ParameterList &parameterList)
IonicGoldbeter(const IonicGoldbeter &model)
void computeRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
This methods contains the actual evaluation of the rhs of all state variablesin the model (0D version...
void updateInverseJacobian(const UInt &iQuadPt)
void computeGatingRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
Methods.
Real computeLocalPotentialRhs(const std::vector< Real > &v)
This methods contains the actual evaluation of the rhs of the voltage equation only (0D version) ...
IonicGoldbeter & operator=(const IonicGoldbeter &model)
Operator.
double Real
Generic real data.
Definition: LifeV.hpp:175
Real M_nu1
Model Parameters.
ElectroIonicModel super
void showMe()
Display information about the model.