00001 /* 00002 00003 Copyright (c) 2005-2015, University of Oxford. 00004 All rights reserved. 00005 00006 University of Oxford means the Chancellor, Masters and Scholars of the 00007 University of Oxford, having an administrative office at Wellington 00008 Square, Oxford OX1 2JD, UK. 00009 00010 This file is part of Chaste. 00011 00012 Redistribution and use in source and binary forms, with or without 00013 modification, are permitted provided that the following conditions are met: 00014 * Redistributions of source code must retain the above copyright notice, 00015 this list of conditions and the following disclaimer. 00016 * Redistributions in binary form must reproduce the above copyright notice, 00017 this list of conditions and the following disclaimer in the documentation 00018 and/or other materials provided with the distribution. 00019 * Neither the name of the University of Oxford nor the names of its 00020 contributors may be used to endorse or promote products derived from this 00021 software without specific prior written permission. 00022 00023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00024 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00026 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 00027 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00028 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00029 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00030 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00031 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00032 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 00034 */ 00035 00036 #ifndef CorriasBuistSMCModified_HPP_ 00037 #define CorriasBuistSMCModified_HPP_ 00038 00039 00040 #include "ChasteSerialization.hpp" 00041 #include <boost/serialization/base_object.hpp> 00042 #include "AbstractCardiacCell.hpp" 00043 #include "AbstractStimulusFunction.hpp" 00058 class CorriasBuistSMCModified : public AbstractCardiacCell 00059 { 00060 friend class boost::serialization::access; 00068 template<class Archive> 00069 void serialize(Archive & archive, const unsigned int version) 00070 { 00071 archive & boost::serialization::base_object<AbstractCardiacCell >(*this); 00072 } 00073 00074 private: 00075 00081 double mScaleFactorCarbonMonoxide; 00082 00086 bool mFakeIccStimulusPresent; 00087 00088 double Cm; 00090 double Asurf_in_cm_square; 00091 double Asurf; 00093 double VolCell; 00094 double hCa; 00095 double sCa; 00097 /* concentrations */ 00098 double Ki; 00099 double Nai; 00100 double ACh; 00101 double CaiRest; 00103 /* maximum conductances*/ 00104 double gLVA_max; // (0.18 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00105 double gCaL_max; // (65.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00106 double gBK_max; // (45.7 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00107 double gKb_max; // (0.0144 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00108 double gKA_max; // (9.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00109 double gKr_max; // (35.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00110 double gNa_max; // (3.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00111 double gnsCC_max; // (50.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00112 double gcouple; // 1.3 nS * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00113 double JCaExt_max; 00115 /* Temperature corrections */ 00116 double Q10Ca; 00117 double Q10K; //1.365 00118 double Q10Na; 00119 double Texp; 00121 double T_correct_Ca ; 00122 double T_correct_K ; 00123 double T_correct_Na; 00124 double T_correct_gBK; // (nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2 00125 00126 /* Nernst potentials */ 00127 double EK; 00128 double ENa ; 00129 double EnsCC; 00131 double Ca_o; 00132 double K_o; 00133 double Na_o; 00135 /* Nernst parameters */ 00136 double R; 00137 double T; 00138 double F; 00139 double FoRT; 00140 double RToF; 00142 public: 00143 00150 CorriasBuistSMCModified(boost::shared_ptr<AbstractIvpOdeSolver> pSolver, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus); 00151 00155 ~CorriasBuistSMCModified(); 00156 00160 void VerifyStateVariables(); 00161 00168 double GetIIonic(const std::vector<double>* pStateVariables=NULL); 00169 00177 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY); 00178 00179 00186 void SetFakeIccStimulusPresent(bool present); 00187 00191 bool GetFakeIccStimulusPresent(); 00192 00196 double SetCarbonMonoxideScaleFactor(); 00197 00204 void SetCarbonMonoxideScaleFactor(double scaleFactor); 00205 00209 double GetCarbonMonoxideScaleFactor(); 00210 00211 }; 00212 00213 00214 // Needs to be included last 00215 #include "SerializationExportWrapper.hpp" 00216 CHASTE_CLASS_EXPORT(CorriasBuistSMCModified) 00217 00218 namespace boost 00219 { 00220 namespace serialization 00221 { 00222 template<class Archive> 00223 inline void save_construct_data( 00224 Archive & ar, const CorriasBuistSMCModified * t, const unsigned int fileVersion) 00225 { 00226 const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver(); 00227 const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction(); 00228 ar << p_solver; 00229 ar << p_stimulus; 00230 } 00231 00232 template<class Archive> 00233 inline void load_construct_data( 00234 Archive & ar, CorriasBuistSMCModified * t, const unsigned int fileVersion) 00235 { 00236 boost::shared_ptr<AbstractIvpOdeSolver> p_solver; 00237 boost::shared_ptr<AbstractStimulusFunction> p_stimulus; 00238 ar >> p_solver; 00239 ar >> p_stimulus; 00240 ::new(t)CorriasBuistSMCModified(p_solver, p_stimulus); 00241 } 00242 00243 } 00244 00245 } 00246 00247 #endif // CorriasBuistSMCModified_HPP_