NhsContractionModel.hpp

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 #ifndef NHSCONTRACTIONMODEL_HPP_
00029 #define NHSCONTRACTIONMODEL_HPP_
00030 
00031 #include "AbstractOdeBasedContractionModel.hpp"
00032 #include "Exception.hpp"
00033 
00034 
00049 class NhsContractionModel  : public AbstractOdeBasedContractionModel
00050 {
00051 friend class TestContractionModels;
00052 
00053 protected :
00055     double mLambda;
00057     double mDLambdaDt;
00059     double mCalciumI;
00060 
00061 
00063     double mCalciumTrop50;
00064 
00066     double mK1;
00068     double mK2;
00069 
00070     // Parameters
00071 
00073     static const double mKon;
00074 
00076     static const double mKrefoff;
00077 
00079     static const double mGamma;
00080 
00082     static const double mCalciumTroponinMax;
00083 
00085     static const double mAlphaR1;
00086 
00088     static const double mAlphaR2;
00089 
00091     static const double mKZ;
00092 
00094     static const unsigned mNr;
00095 
00097     static const double mBeta1;
00098 
00100     static const double mAlpha0;
00101 
00103     static const unsigned mN;
00104 
00106     static const double mZp;
00107 
00109     static const double mCalcium50ref;
00110 
00112     static const double mTref;
00113 
00115     static const double mBeta0;
00116 
00118     static const double mA;
00119 
00121     static const double mA1;
00122 
00124     static const double mA2;
00125 
00127     static const double mA3;
00128 
00130     static const double mAlpha1;
00131 
00133     static const double mAlpha2;
00134 
00136     static const double mAlpha3;
00137 
00142     void CalculateCalciumTrop50();
00143 
00149     double CalculateT0(double z);
00150 
00151 public :
00156     NhsContractionModel();
00157 
00164     void SetStretchAndStretchRate(double lambda, double dlambdaDt);
00165 
00171     void SetInputParameters(ContractionModelInputParameters& rInputParameters);
00172 
00177     void SetIntracellularCalciumConcentration(double calciumConcentration);
00178 
00183     double GetCalciumTroponinValue();
00184 
00192     void EvaluateYDerivatives(double time, const std::vector<double> &rY, std::vector<double> &rDY);
00193 
00197     double GetActiveTension();
00198 
00204     double GetNextActiveTension()
00205     {
00206         EXCEPTION("If using this in an 'explicit manner' call UpdateStateVariables() and then GetActiveTension(), otherwise use NhsModelWithBackwardSolver");
00207     }
00208 
00212     bool IsStretchDependent()
00213     {
00214         return true;
00215     }
00216 
00220     bool IsStretchRateDependent()
00221     {
00222         return true;
00223     }
00224 };
00225 #endif /*NHSCONTRACTIONMODEL_HPP_*/

Generated on Mon Apr 18 11:35:28 2011 for Chaste by  doxygen 1.5.5