00001 /* 00002 00003 Copyright (C) University of Oxford, 2005-2011 00004 00005 University of Oxford means the Chancellor, Masters and Scholars of the 00006 University of Oxford, having an administrative office at Wellington 00007 Square, Oxford OX1 2JD, UK. 00008 00009 This file is part of Chaste. 00010 00011 Chaste is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU Lesser General Public License as published 00013 by the Free Software Foundation, either version 2.1 of the License, or 00014 (at your option) any later version. 00015 00016 Chaste is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00019 License for more details. The offer of Chaste under the terms of the 00020 License is subject to the License being interpreted in accordance with 00021 English Law and subject to any action against the University of Oxford 00022 being under the jurisdiction of the English Courts. 00023 00024 You should have received a copy of the GNU Lesser General Public License 00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>. 00026 00027 */ 00028 00029 #ifndef CorriasBuistSMCModified_HPP_ 00030 #define CorriasBuistSMCModified_HPP_ 00031 00032 00033 #include "ChasteSerialization.hpp" 00034 #include <boost/serialization/base_object.hpp> 00035 #include "AbstractCardiacCell.hpp" 00036 #include "AbstractStimulusFunction.hpp" 00051 class CorriasBuistSMCModified : public AbstractCardiacCell 00052 { 00053 friend class boost::serialization::access; 00054 template<class Archive> 00055 void serialize(Archive & archive, const unsigned int version) 00056 { 00057 archive & boost::serialization::base_object<AbstractCardiacCell >(*this); 00058 } 00059 00060 private: 00061 00067 double mScaleFactorCarbonMonoxide; 00068 00072 bool mFakeIccStimulusPresent; 00073 00074 double Cm; 00076 double Asurf_in_cm_square; 00077 double Asurf; 00079 double VolCell; 00080 double hCa; 00081 double sCa; 00083 /* concentrations */ 00084 double Ki; 00085 double Nai; 00086 double ACh; 00087 double CaiRest; 00089 /* maximum conductances*/ 00090 double gLVA_max; // (0.18 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00091 double gCaL_max; // (65.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00092 double gBK_max; // (45.7 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00093 double gKb_max; // (0.0144 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00094 double gKA_max; // (9.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00095 double gKr_max; // (35.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00096 double gNa_max; // (3.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00097 double gnsCC_max; // (50.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00098 double gcouple; // 1.3 nS * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00099 double JCaExt_max; 00101 /* Temperature corrections */ 00102 double Q10Ca; 00103 double Q10K; //1.365 00104 double Q10Na; 00105 double Texp; 00107 double T_correct_Ca ; 00108 double T_correct_K ; 00109 double T_correct_Na; 00110 double T_correct_gBK; // (nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00111 00112 /* Nernst potentials */ 00113 double EK; 00114 double ENa ; 00115 double EnsCC; 00117 double Ca_o; 00118 double K_o; 00119 double Na_o; 00121 /* Nernst parameters */ 00122 double R; 00123 double T; 00124 double F; 00125 double FoRT; 00126 double RToF; 00128 public: 00129 00136 CorriasBuistSMCModified(boost::shared_ptr<AbstractIvpOdeSolver> pSolver, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus); 00137 00141 ~CorriasBuistSMCModified(); 00142 00146 void VerifyStateVariables(); 00147 00154 double GetIIonic(const std::vector<double>* pStateVariables=NULL); 00155 00163 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY); 00164 00165 00172 void SetFakeIccStimulusPresent(bool present); 00173 00177 bool GetFakeIccStimulusPresent(); 00178 00182 double SetCarbonMonoxideScaleFactor(); 00183 00190 void SetCarbonMonoxideScaleFactor(double scaleFactor); 00191 00195 double GetCarbonMonoxideScaleFactor(); 00196 00197 }; 00198 00199 00200 // Needs to be included last 00201 #include "SerializationExportWrapper.hpp" 00202 CHASTE_CLASS_EXPORT(CorriasBuistSMCModified) 00203 00204 namespace boost 00205 { 00206 namespace serialization 00207 { 00208 template<class Archive> 00209 inline void save_construct_data( 00210 Archive & ar, const CorriasBuistSMCModified * t, const unsigned int fileVersion) 00211 { 00212 const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver(); 00213 const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction(); 00214 ar << p_solver; 00215 ar << p_stimulus; 00216 } 00217 00218 template<class Archive> 00219 inline void load_construct_data( 00220 Archive & ar, CorriasBuistSMCModified * t, const unsigned int fileVersion) 00221 { 00222 boost::shared_ptr<AbstractIvpOdeSolver> p_solver; 00223 boost::shared_ptr<AbstractStimulusFunction> p_stimulus; 00224 ar >> p_solver; 00225 ar >> p_stimulus; 00226 ::new(t)CorriasBuistSMCModified(p_solver, p_stimulus); 00227 } 00228 00229 } 00230 00231 } 00232 00233 #endif // CorriasBuistSMCModified_HPP_