luo_rudy_1991.cpp

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #include "luo_rudy_1991.hpp"
00014 #include <cmath>
00015 #include <cassert>
00016 #include "Exception.hpp"
00017 #include "OdeSystemInformation.hpp"
00018 
00019     Cellluo_rudy_1991FromCellML::Cellluo_rudy_1991FromCellML(boost::shared_ptr<AbstractIvpOdeSolver> pSolver, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
00020         : AbstractCardiacCell(
00021                 pSolver,
00022                 8,
00023                 0,
00024                 pIntracellularStimulus)
00025     {
00026         // Time units: millisecond
00027         // 
00028         mpSystemInfo = OdeSystemInformation<Cellluo_rudy_1991FromCellML>::Instance();
00029         Init();
00030 
00031     }
00032     
00033     Cellluo_rudy_1991FromCellML::~Cellluo_rudy_1991FromCellML()
00034     {
00035     }
00036     
00037     void Cellluo_rudy_1991FromCellML::VerifyStateVariables()
00038     {}
00039 
00040     double Cellluo_rudy_1991FromCellML::GetIIonic()
00041     {
00042         std::vector<double>& rY = rGetStateVariables();
00043         double var_membrane__V = rY[0];
00044         // Units: millivolt; Initial value: -83.853
00045         double var_fast_sodium_current_m_gate__m = rY[1];
00046         // Units: dimensionless; Initial value: 0.00187018
00047         double var_fast_sodium_current_h_gate__h = rY[2];
00048         // Units: dimensionless; Initial value: 0.9804713
00049         double var_fast_sodium_current_j_gate__j = rY[3];
00050         // Units: dimensionless; Initial value: 0.98767124
00051         double var_slow_inward_current_d_gate__d = rY[4];
00052         // Units: dimensionless; Initial value: 0.00316354
00053         double var_slow_inward_current_f_gate__f = rY[5];
00054         // Units: dimensionless; Initial value: 0.99427859
00055         double var_time_dependent_potassium_current_X_gate__X = rY[6];
00056         // Units: dimensionless; Initial value: 0.16647703
00057         double var_intracellular_calcium_concentration__Cai = rY[7];
00058         // Units: millimolar; Initial value: 0.0002
00059         
00060         const double var_membrane__R = 8314.0;
00061         const double var_membrane__T = 310.0;
00062         const double var_membrane__F = 96484.6;
00063         const double var_fast_sodium_current__j = var_fast_sodium_current_j_gate__j;
00064         const double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00065         const double var_fast_sodium_current__g_Na = 23.0;
00066         const double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00067         const double var_fast_sodium_current__V = var_membrane__V;
00068         const double var_fast_sodium_current__R = var_membrane__R;
00069         const double var_fast_sodium_current__F = var_membrane__F;
00070         const double var_ionic_concentrations__Nao = 140.0;
00071         const double var_fast_sodium_current__Nao = var_ionic_concentrations__Nao;
00072         const double var_ionic_concentrations__Nai = 18.0;
00073         const double var_fast_sodium_current__Nai = var_ionic_concentrations__Nai;
00074         const double var_fast_sodium_current__T = var_membrane__T;
00075         const double var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Nao / var_fast_sodium_current__Nai);
00076         const double var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * var_fast_sodium_current__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
00077         const double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00078         const double var_slow_inward_current__d = var_slow_inward_current_d_gate__d;
00079         const double var_slow_inward_current__f = var_slow_inward_current_f_gate__f;
00080         const double var_slow_inward_current__V = var_membrane__V;
00081         const double var_slow_inward_current__Cai = var_intracellular_calcium_concentration__Cai;
00082         const double var_slow_inward_current__E_si = 7.7 - (13.0287 * log(var_slow_inward_current__Cai / 1.0));
00083         const double var_slow_inward_current__i_si = 0.09 * var_slow_inward_current__d * var_slow_inward_current__f * (var_slow_inward_current__V - var_slow_inward_current__E_si);
00084         const double var_membrane__i_si = var_slow_inward_current__i_si;
00085         const double var_time_dependent_potassium_current__V = var_membrane__V;
00086         const double var_time_dependent_potassium_current_Xi_gate__V = var_time_dependent_potassium_current__V;
00087         const double var_time_dependent_potassium_current_Xi_gate__Xi = (var_time_dependent_potassium_current_Xi_gate__V > (-100.0)) ? ((2.837 * (exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 77.0)) - 1.0)) / ((var_time_dependent_potassium_current_Xi_gate__V + 77.0) * exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 35.0)))) : 1.0;
00088         const double var_time_dependent_potassium_current__Xi = var_time_dependent_potassium_current_Xi_gate__Xi;
00089         const double var_ionic_concentrations__Ko = 5.4;
00090         const double var_time_dependent_potassium_current__Ko = var_ionic_concentrations__Ko;
00091         const double var_time_dependent_potassium_current__g_K = 0.282 * sqrt(var_time_dependent_potassium_current__Ko / 5.4);
00092         const double var_time_dependent_potassium_current__X = var_time_dependent_potassium_current_X_gate__X;
00093         const double var_time_dependent_potassium_current__PR_NaK = 0.01833;
00094         const double var_time_dependent_potassium_current__F = var_membrane__F;
00095         const double var_time_dependent_potassium_current__Nao = var_ionic_concentrations__Nao;
00096         const double var_ionic_concentrations__Ki = 145.0;
00097         const double var_time_dependent_potassium_current__Ki = var_ionic_concentrations__Ki;
00098         const double var_time_dependent_potassium_current__Nai = var_ionic_concentrations__Nai;
00099         const double var_time_dependent_potassium_current__T = var_membrane__T;
00100         const double var_time_dependent_potassium_current__R = var_membrane__R;
00101         const double var_time_dependent_potassium_current__E_K = ((var_time_dependent_potassium_current__R * var_time_dependent_potassium_current__T) / var_time_dependent_potassium_current__F) * log((var_time_dependent_potassium_current__Ko + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nao)) / (var_time_dependent_potassium_current__Ki + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nai)));
00102         const double var_time_dependent_potassium_current__i_K = var_time_dependent_potassium_current__g_K * var_time_dependent_potassium_current__X * var_time_dependent_potassium_current__Xi * (var_time_dependent_potassium_current__V - var_time_dependent_potassium_current__E_K);
00103         const double var_membrane__i_K = var_time_dependent_potassium_current__i_K;
00104         const double var_time_independent_potassium_current__V = var_membrane__V;
00105         const double var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
00106         const double var_time_independent_potassium_current__Ki = var_ionic_concentrations__Ki;
00107         const double var_time_independent_potassium_current__R = var_membrane__R;
00108         const double var_time_independent_potassium_current__F = var_membrane__F;
00109         const double var_time_independent_potassium_current__Ko = var_ionic_concentrations__Ko;
00110         const double var_time_independent_potassium_current__T = var_membrane__T;
00111         const double var_time_independent_potassium_current__E_K1 = ((var_time_independent_potassium_current__R * var_time_independent_potassium_current__T) / var_time_independent_potassium_current__F) * log(var_time_independent_potassium_current__Ko / var_time_independent_potassium_current__Ki);
00112         const double var_time_independent_potassium_current_K1_gate__E_K1 = var_time_independent_potassium_current__E_K1;
00113         const double var_time_independent_potassium_current_K1_gate__beta_K1 = ((0.49124 * exp(0.08032 * ((var_time_independent_potassium_current_K1_gate__V + 5.476) - var_time_independent_potassium_current_K1_gate__E_K1))) + (1.0 * exp(0.06175 * (var_time_independent_potassium_current_K1_gate__V - (var_time_independent_potassium_current_K1_gate__E_K1 + 594.31))))) / (1.0 + exp((-0.5143) * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) + 4.753)));
00114         const double var_time_independent_potassium_current_K1_gate__alpha_K1 = 1.02 / (1.0 + exp(0.2385 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) - 59.215)));
00115         const double var_time_independent_potassium_current_K1_gate__K1_infinity = var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + var_time_independent_potassium_current_K1_gate__beta_K1);
00116         const double var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity;
00117         const double var_time_independent_potassium_current__g_K1 = 0.6047 * sqrt(var_time_independent_potassium_current__Ko / 5.4);
00118         const double var_time_independent_potassium_current__i_K1 = var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K1);
00119         const double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00120         const double var_plateau_potassium_current__g_Kp = 0.0183;
00121         const double var_plateau_potassium_current__V = var_membrane__V;
00122         const double var_plateau_potassium_current__Kp = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current__V) / 5.98));
00123         const double var_plateau_potassium_current__E_K1 = var_time_independent_potassium_current__E_K1;
00124         const double var_plateau_potassium_current__E_Kp = var_plateau_potassium_current__E_K1;
00125         const double var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_Kp);
00126         const double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00127         const double var_background_current__E_b =  -59.87;
00128         const double var_background_current__g_b = 0.03921;
00129         const double var_background_current__V = var_membrane__V;
00130         const double var_background_current__i_b = var_background_current__g_b * (var_background_current__V - var_background_current__E_b);
00131         const double var_membrane__i_b = var_background_current__i_b;
00132         
00133         return (var_membrane__i_Na+var_membrane__i_si+var_membrane__i_K+var_membrane__i_K1+var_membrane__i_Kp+var_membrane__i_b);
00134     }
00135     
00136     void Cellluo_rudy_1991FromCellML::EvaluateYDerivatives(double var_environment__time, const std::vector<double>& rY, std::vector<double>& rDY)
00137     {
00138         // Inputs:
00139         // Time units: millisecond
00140         var_environment__time *= 1.0;
00141         double var_membrane__V = rY[0];
00142         // Units: millivolt; Initial value: -83.853
00143         double var_fast_sodium_current_m_gate__m = rY[1];
00144         // Units: dimensionless; Initial value: 0.00187018
00145         double var_fast_sodium_current_h_gate__h = rY[2];
00146         // Units: dimensionless; Initial value: 0.9804713
00147         double var_fast_sodium_current_j_gate__j = rY[3];
00148         // Units: dimensionless; Initial value: 0.98767124
00149         double var_slow_inward_current_d_gate__d = rY[4];
00150         // Units: dimensionless; Initial value: 0.00316354
00151         double var_slow_inward_current_f_gate__f = rY[5];
00152         // Units: dimensionless; Initial value: 0.99427859
00153         double var_time_dependent_potassium_current_X_gate__X = rY[6];
00154         // Units: dimensionless; Initial value: 0.16647703
00155         double var_intracellular_calcium_concentration__Cai = rY[7];
00156         // Units: millimolar; Initial value: 0.0002
00157         
00158         
00159         // Mathematics
00160         const double var_membrane__R = 8314.0;
00161         const double var_membrane__T = 310.0;
00162         const double var_membrane__F = 96484.6;
00163         const double var_membrane__C = 1.0;
00164         const double var_membrane__I_stim = GetStimulus((1.0/1)*var_environment__time);
00165         const double var_fast_sodium_current__j = var_fast_sodium_current_j_gate__j;
00166         const double var_fast_sodium_current__h = var_fast_sodium_current_h_gate__h;
00167         const double var_fast_sodium_current__g_Na = 23.0;
00168         const double var_fast_sodium_current__m = var_fast_sodium_current_m_gate__m;
00169         const double var_fast_sodium_current__V = var_membrane__V;
00170         const double var_fast_sodium_current__R = var_membrane__R;
00171         const double var_fast_sodium_current__F = var_membrane__F;
00172         const double var_ionic_concentrations__Nao = 140.0;
00173         const double var_fast_sodium_current__Nao = var_ionic_concentrations__Nao;
00174         const double var_ionic_concentrations__Nai = 18.0;
00175         const double var_fast_sodium_current__Nai = var_ionic_concentrations__Nai;
00176         const double var_fast_sodium_current__T = var_membrane__T;
00177         const double var_fast_sodium_current__E_Na = ((var_fast_sodium_current__R * var_fast_sodium_current__T) / var_fast_sodium_current__F) * log(var_fast_sodium_current__Nao / var_fast_sodium_current__Nai);
00178         const double var_fast_sodium_current__i_Na = var_fast_sodium_current__g_Na * pow(var_fast_sodium_current__m, 3.0) * var_fast_sodium_current__h * var_fast_sodium_current__j * (var_fast_sodium_current__V - var_fast_sodium_current__E_Na);
00179         const double var_membrane__i_Na = var_fast_sodium_current__i_Na;
00180         const double var_slow_inward_current__d = var_slow_inward_current_d_gate__d;
00181         const double var_slow_inward_current__f = var_slow_inward_current_f_gate__f;
00182         const double var_slow_inward_current__V = var_membrane__V;
00183         const double var_slow_inward_current__Cai = var_intracellular_calcium_concentration__Cai;
00184         const double var_slow_inward_current__E_si = 7.7 - (13.0287 * log(var_slow_inward_current__Cai / 1.0));
00185         const double var_slow_inward_current__i_si = 0.09 * var_slow_inward_current__d * var_slow_inward_current__f * (var_slow_inward_current__V - var_slow_inward_current__E_si);
00186         const double var_membrane__i_si = var_slow_inward_current__i_si;
00187         const double var_time_dependent_potassium_current__V = var_membrane__V;
00188         const double var_time_dependent_potassium_current_Xi_gate__V = var_time_dependent_potassium_current__V;
00189         const double var_time_dependent_potassium_current_Xi_gate__Xi = (var_time_dependent_potassium_current_Xi_gate__V > (-100.0)) ? ((2.837 * (exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 77.0)) - 1.0)) / ((var_time_dependent_potassium_current_Xi_gate__V + 77.0) * exp(0.04 * (var_time_dependent_potassium_current_Xi_gate__V + 35.0)))) : 1.0;
00190         const double var_time_dependent_potassium_current__Xi = var_time_dependent_potassium_current_Xi_gate__Xi;
00191         const double var_ionic_concentrations__Ko = 5.4;
00192         const double var_time_dependent_potassium_current__Ko = var_ionic_concentrations__Ko;
00193         const double var_time_dependent_potassium_current__g_K = 0.282 * sqrt(var_time_dependent_potassium_current__Ko / 5.4);
00194         const double var_time_dependent_potassium_current__X = var_time_dependent_potassium_current_X_gate__X;
00195         const double var_time_dependent_potassium_current__PR_NaK = 0.01833;
00196         const double var_time_dependent_potassium_current__F = var_membrane__F;
00197         const double var_time_dependent_potassium_current__Nao = var_ionic_concentrations__Nao;
00198         const double var_ionic_concentrations__Ki = 145.0;
00199         const double var_time_dependent_potassium_current__Ki = var_ionic_concentrations__Ki;
00200         const double var_time_dependent_potassium_current__Nai = var_ionic_concentrations__Nai;
00201         const double var_time_dependent_potassium_current__T = var_membrane__T;
00202         const double var_time_dependent_potassium_current__R = var_membrane__R;
00203         const double var_time_dependent_potassium_current__E_K = ((var_time_dependent_potassium_current__R * var_time_dependent_potassium_current__T) / var_time_dependent_potassium_current__F) * log((var_time_dependent_potassium_current__Ko + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nao)) / (var_time_dependent_potassium_current__Ki + (var_time_dependent_potassium_current__PR_NaK * var_time_dependent_potassium_current__Nai)));
00204         const double var_time_dependent_potassium_current__i_K = var_time_dependent_potassium_current__g_K * var_time_dependent_potassium_current__X * var_time_dependent_potassium_current__Xi * (var_time_dependent_potassium_current__V - var_time_dependent_potassium_current__E_K);
00205         const double var_membrane__i_K = var_time_dependent_potassium_current__i_K;
00206         const double var_time_independent_potassium_current__V = var_membrane__V;
00207         const double var_time_independent_potassium_current_K1_gate__V = var_time_independent_potassium_current__V;
00208         const double var_time_independent_potassium_current__Ki = var_ionic_concentrations__Ki;
00209         const double var_time_independent_potassium_current__R = var_membrane__R;
00210         const double var_time_independent_potassium_current__F = var_membrane__F;
00211         const double var_time_independent_potassium_current__Ko = var_ionic_concentrations__Ko;
00212         const double var_time_independent_potassium_current__T = var_membrane__T;
00213         const double var_time_independent_potassium_current__E_K1 = ((var_time_independent_potassium_current__R * var_time_independent_potassium_current__T) / var_time_independent_potassium_current__F) * log(var_time_independent_potassium_current__Ko / var_time_independent_potassium_current__Ki);
00214         const double var_time_independent_potassium_current_K1_gate__E_K1 = var_time_independent_potassium_current__E_K1;
00215         const double var_time_independent_potassium_current_K1_gate__beta_K1 = ((0.49124 * exp(0.08032 * ((var_time_independent_potassium_current_K1_gate__V + 5.476) - var_time_independent_potassium_current_K1_gate__E_K1))) + (1.0 * exp(0.06175 * (var_time_independent_potassium_current_K1_gate__V - (var_time_independent_potassium_current_K1_gate__E_K1 + 594.31))))) / (1.0 + exp((-0.5143) * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) + 4.753)));
00216         const double var_time_independent_potassium_current_K1_gate__alpha_K1 = 1.02 / (1.0 + exp(0.2385 * ((var_time_independent_potassium_current_K1_gate__V - var_time_independent_potassium_current_K1_gate__E_K1) - 59.215)));
00217         const double var_time_independent_potassium_current_K1_gate__K1_infinity = var_time_independent_potassium_current_K1_gate__alpha_K1 / (var_time_independent_potassium_current_K1_gate__alpha_K1 + var_time_independent_potassium_current_K1_gate__beta_K1);
00218         const double var_time_independent_potassium_current__K1_infinity = var_time_independent_potassium_current_K1_gate__K1_infinity;
00219         const double var_time_independent_potassium_current__g_K1 = 0.6047 * sqrt(var_time_independent_potassium_current__Ko / 5.4);
00220         const double var_time_independent_potassium_current__i_K1 = var_time_independent_potassium_current__g_K1 * var_time_independent_potassium_current__K1_infinity * (var_time_independent_potassium_current__V - var_time_independent_potassium_current__E_K1);
00221         const double var_membrane__i_K1 = var_time_independent_potassium_current__i_K1;
00222         const double var_plateau_potassium_current__g_Kp = 0.0183;
00223         const double var_plateau_potassium_current__V = var_membrane__V;
00224         const double var_plateau_potassium_current__Kp = 1.0 / (1.0 + exp((7.488 - var_plateau_potassium_current__V) / 5.98));
00225         const double var_plateau_potassium_current__E_K1 = var_time_independent_potassium_current__E_K1;
00226         const double var_plateau_potassium_current__E_Kp = var_plateau_potassium_current__E_K1;
00227         const double var_plateau_potassium_current__i_Kp = var_plateau_potassium_current__g_Kp * var_plateau_potassium_current__Kp * (var_plateau_potassium_current__V - var_plateau_potassium_current__E_Kp);
00228         const double var_membrane__i_Kp = var_plateau_potassium_current__i_Kp;
00229         const double var_background_current__E_b =  -59.87;
00230         const double var_background_current__g_b = 0.03921;
00231         const double var_background_current__V = var_membrane__V;
00232         const double var_background_current__i_b = var_background_current__g_b * (var_background_current__V - var_background_current__E_b);
00233         const double var_membrane__i_b = var_background_current__i_b;
00234         const double var_fast_sodium_current_m_gate__V = var_fast_sodium_current__V;
00235         const double var_fast_sodium_current_m_gate__alpha_m = (0.32 * (var_fast_sodium_current_m_gate__V + 47.13)) / (1.0 - exp((-0.1) * (var_fast_sodium_current_m_gate__V + 47.13)));
00236         const double var_fast_sodium_current_m_gate__beta_m = 0.08 * exp((-var_fast_sodium_current_m_gate__V) / 11.0);
00237         const double var_fast_sodium_current_h_gate__V = var_fast_sodium_current__V;
00238         const double var_fast_sodium_current_h_gate__alpha_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? (0.135 * exp((80.0 + var_fast_sodium_current_h_gate__V) / (-6.8))) : 0.0;
00239         const double var_fast_sodium_current_h_gate__beta_h = (var_fast_sodium_current_h_gate__V < (-40.0)) ? ((3.56 * exp(0.079 * var_fast_sodium_current_h_gate__V)) + (310000.0 * exp(0.35 * var_fast_sodium_current_h_gate__V))) : (1.0 / (0.13 * (1.0 + exp((var_fast_sodium_current_h_gate__V + 10.66) / (-11.1)))));
00240         const double var_fast_sodium_current_j_gate__V = var_fast_sodium_current__V;
00241         const double var_fast_sodium_current_j_gate__alpha_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? (((((-127140.0) * exp(0.2444 * var_fast_sodium_current_j_gate__V)) - (3.474e-05 * exp((-0.04391) * var_fast_sodium_current_j_gate__V))) * (var_fast_sodium_current_j_gate__V + 37.78)) / (1.0 + exp(0.311 * (var_fast_sodium_current_j_gate__V + 79.23)))) : 0.0;
00242         const double var_fast_sodium_current_j_gate__beta_j = (var_fast_sodium_current_j_gate__V < (-40.0)) ? ((0.1212 * exp((-0.01052) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1378) * (var_fast_sodium_current_j_gate__V + 40.14)))) : ((0.3 * exp((-2.535e-07) * var_fast_sodium_current_j_gate__V)) / (1.0 + exp((-0.1) * (var_fast_sodium_current_j_gate__V + 32.0))));
00243         const double var_slow_inward_current_d_gate__V = var_slow_inward_current__V;
00244         const double var_slow_inward_current_d_gate__alpha_d = (0.095 * exp((-0.01) * (var_slow_inward_current_d_gate__V - 5.0))) / (1.0 + exp((-0.072) * (var_slow_inward_current_d_gate__V - 5.0)));
00245         const double var_slow_inward_current_d_gate__beta_d = (0.07 * exp((-0.017) * (var_slow_inward_current_d_gate__V + 44.0))) / (1.0 + exp(0.05 * (var_slow_inward_current_d_gate__V + 44.0)));
00246         const double var_slow_inward_current_f_gate__V = var_slow_inward_current__V;
00247         const double var_slow_inward_current_f_gate__alpha_f = (0.012 * exp((-0.008) * (var_slow_inward_current_f_gate__V + 28.0))) / (1.0 + exp(0.15 * (var_slow_inward_current_f_gate__V + 28.0)));
00248         const double var_slow_inward_current_f_gate__beta_f = (0.0065 * exp((-0.02) * (var_slow_inward_current_f_gate__V + 30.0))) / (1.0 + exp((-0.2) * (var_slow_inward_current_f_gate__V + 30.0)));
00249         const double var_time_dependent_potassium_current_X_gate__V = var_time_dependent_potassium_current__V;
00250         const double var_time_dependent_potassium_current_X_gate__alpha_X = (0.0005 * exp(0.083 * (var_time_dependent_potassium_current_X_gate__V + 50.0))) / (1.0 + exp(0.057 * (var_time_dependent_potassium_current_X_gate__V + 50.0)));
00251         const double var_time_dependent_potassium_current_X_gate__beta_X = (0.0013 * exp((-0.06) * (var_time_dependent_potassium_current_X_gate__V + 20.0))) / (1.0 + exp((-0.04) * (var_time_dependent_potassium_current_X_gate__V + 20.0)));
00252         const double var_intracellular_calcium_concentration__i_si = var_slow_inward_current__i_si;
00253         
00254         double d_dt_membrane__V;
00255         if (mSetVoltageDerivativeToZero)
00256         {
00257             d_dt_membrane__V = 0.0;
00258         }
00259         else
00260         {
00261             d_dt_membrane__V = ((-1.0) / var_membrane__C) * (var_membrane__I_stim + var_membrane__i_Na + var_membrane__i_si + var_membrane__i_K + var_membrane__i_K1 + var_membrane__i_Kp + var_membrane__i_b);
00262         }
00263         
00264         const double d_dt_fast_sodium_current_m_gate__m = (var_fast_sodium_current_m_gate__alpha_m * (1.0 - var_fast_sodium_current_m_gate__m)) - (var_fast_sodium_current_m_gate__beta_m * var_fast_sodium_current_m_gate__m);
00265         const double d_dt_fast_sodium_current_h_gate__h = (var_fast_sodium_current_h_gate__alpha_h * (1.0 - var_fast_sodium_current_h_gate__h)) - (var_fast_sodium_current_h_gate__beta_h * var_fast_sodium_current_h_gate__h);
00266         const double d_dt_fast_sodium_current_j_gate__j = (var_fast_sodium_current_j_gate__alpha_j * (1.0 - var_fast_sodium_current_j_gate__j)) - (var_fast_sodium_current_j_gate__beta_j * var_fast_sodium_current_j_gate__j);
00267         const double d_dt_slow_inward_current_d_gate__d = (var_slow_inward_current_d_gate__alpha_d * (1.0 - var_slow_inward_current_d_gate__d)) - (var_slow_inward_current_d_gate__beta_d * var_slow_inward_current_d_gate__d);
00268         const double d_dt_slow_inward_current_f_gate__f = (var_slow_inward_current_f_gate__alpha_f * (1.0 - var_slow_inward_current_f_gate__f)) - (var_slow_inward_current_f_gate__beta_f * var_slow_inward_current_f_gate__f);
00269         const double d_dt_time_dependent_potassium_current_X_gate__X = (var_time_dependent_potassium_current_X_gate__alpha_X * (1.0 - var_time_dependent_potassium_current_X_gate__X)) - (var_time_dependent_potassium_current_X_gate__beta_X * var_time_dependent_potassium_current_X_gate__X);
00270         const double d_dt_intracellular_calcium_concentration__Cai = (((-0.0001) / 1.0) * var_intracellular_calcium_concentration__i_si) + (0.07 * (0.0001 - var_intracellular_calcium_concentration__Cai));
00271         
00272         rDY[0] = 1.0*d_dt_membrane__V;
00273         rDY[1] = 1.0*d_dt_fast_sodium_current_m_gate__m;
00274         rDY[2] = 1.0*d_dt_fast_sodium_current_h_gate__h;
00275         rDY[3] = 1.0*d_dt_fast_sodium_current_j_gate__j;
00276         rDY[4] = 1.0*d_dt_slow_inward_current_d_gate__d;
00277         rDY[5] = 1.0*d_dt_slow_inward_current_f_gate__f;
00278         rDY[6] = 1.0*d_dt_time_dependent_potassium_current_X_gate__X;
00279         rDY[7] = 1.0*d_dt_intracellular_calcium_concentration__Cai;
00280     }
00281     
00282 template<>
00283 void OdeSystemInformation<Cellluo_rudy_1991FromCellML>::Initialise(void)
00284 {
00285     // Time units: millisecond
00286     // 
00287     this->mVariableNames.push_back("V");
00288     this->mVariableUnits.push_back("millivolt");
00289     this->mInitialConditions.push_back(-83.853);
00290 
00291     this->mVariableNames.push_back("m");
00292     this->mVariableUnits.push_back("dimensionless");
00293     this->mInitialConditions.push_back(0.00187018);
00294 
00295     this->mVariableNames.push_back("h");
00296     this->mVariableUnits.push_back("dimensionless");
00297     this->mInitialConditions.push_back(0.9804713);
00298 
00299     this->mVariableNames.push_back("j");
00300     this->mVariableUnits.push_back("dimensionless");
00301     this->mInitialConditions.push_back(0.98767124);
00302 
00303     this->mVariableNames.push_back("d");
00304     this->mVariableUnits.push_back("dimensionless");
00305     this->mInitialConditions.push_back(0.00316354);
00306 
00307     this->mVariableNames.push_back("f");
00308     this->mVariableUnits.push_back("dimensionless");
00309     this->mInitialConditions.push_back(0.99427859);
00310 
00311     this->mVariableNames.push_back("X");
00312     this->mVariableUnits.push_back("dimensionless");
00313     this->mInitialConditions.push_back(0.16647703);
00314 
00315     this->mVariableNames.push_back("Cai");
00316     this->mVariableUnits.push_back("millimolar");
00317     this->mInitialConditions.push_back(0.0002);
00318 
00319     this->mInitialised = true;
00320 }
00321 
00322 
00323 // Serialization for Boost >= 1.36
00324 #include "SerializationExportWrapperForCpp.hpp"
00325 CHASTE_CLASS_EXPORT(Cellluo_rudy_1991FromCellML)

Generated by  doxygen 1.6.2