35 #include "NhsContractionModel.hpp"
36 #include "OdeSystemInformation.hpp"
37 #include "EulerIvpOdeSolver.hpp"
77 double one_plus_beta0_times_lam_minus_one_over_two_gamma = (1 +
mBeta0*(
mLambda-1))/(2*
mGamma);
80 mCalciumTrop50 /= (Ca50ref_times_one_plus_beta1_times_lam_minus_one + (1-one_plus_beta0_times_lam_minus_one_over_two_gamma)*
mKrefoff/
mKon);
88 double z_max =
mAlpha0 -
mK2*calcium_ratio_to_n;
116 mK1 /= zp_to_n_plus_K_to_n * zp_to_n_plus_K_to_n;
140 assert(calciumConcentration > 0.0);
150 const std::vector<double> &rY,
151 std::vector<double> &rDY)
155 const double& calcium_troponin = rY[0];
156 const double& z = rY[1];
157 const double& Q1 = rY[2];
158 const double& Q2 = rY[3];
159 const double& Q3 = rY[4];
162 #define COVERAGE_IGNORE
163 if(calcium_troponin < 0)
165 EXCEPTION(
"CalciumTrop concentration went negative");
175 #undef COVERAGE_IGNORE
178 double Q = Q1 + Q2 + Q3;
184 Ta = T0*(1+(2+
mA)*Q)/(1+Q);
188 Ta = T0*(1+
mA*Q)/(1-Q);
196 rDY[1] =
mAlpha0 * ca_trop_to_ca_trop50_ratio_to_n * (1-z)
214 return T0*(1+(2+
mA)*Q)/(1+Q);
218 return T0*(1+
mA*Q)/(1-Q);
225 this->mVariableNames.push_back(
"CalciumTroponin");
226 this->mVariableUnits.push_back(
"microMols");
227 this->mInitialConditions.push_back(0);
229 this->mVariableNames.push_back(
"z");
230 this->mVariableUnits.push_back(
"");
231 this->mInitialConditions.push_back(0);
233 this->mVariableNames.push_back(
"Q1");
234 this->mVariableUnits.push_back(
"");
235 this->mInitialConditions.push_back(0);
237 this->mVariableNames.push_back(
"Q2");
238 this->mVariableUnits.push_back(
"");
239 this->mInitialConditions.push_back(0);
241 this->mVariableNames.push_back(
"Q3");
242 this->mVariableUnits.push_back(
"");
243 this->mInitialConditions.push_back(0);
245 this->mInitialised =
true;
static const double mBeta0
void SetStretchAndStretchRate(double lambda, double dlambdaDt)
double CalculateT0(double z)
double SmallPow(double x, unsigned exponent)
std::vector< double > mStateVariables
static const double mTref
#define EXCEPTION(message)
void ResetToInitialConditions()
double GetActiveTension()
static const unsigned mNr
static const double mAlphaR1
const double DOUBLE_UNSET
static const double mAlpha0
void SetInputParameters(ContractionModelInputParameters &rInputParameters)
static const double mAlpha3
double GetCalciumTroponinValue()
static const double mCalciumTroponinMax
void SetIntracellularCalciumConcentration(double calciumConcentration)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
static const double mBeta1
void CalculateCalciumTrop50()
boost::shared_ptr< AbstractOdeSystemInformation > mpSystemInfo
static const double mCalcium50ref
static const double mAlpha2
static const double mGamma
static const double mAlpha1
static const double mAlphaR2
static const double mKrefoff