Generated Code
The following is c code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
/*
There are a total of 0 entries in the algebraic variable array.
There are a total of 7 entries in each of the rate and state variable arrays.
There are a total of 10 entries in the constant variable array.
*/
/*
* VOI is time in component environment (minute).
* STATES[0] is Ca_cyt in component Ca_cyt (micromolar).
* STATES[1] is J_ERch in component J_ERch (micromolar).
* STATES[2] is J_ERpump in component J_ERpump (micromolar).
* STATES[3] is J_ERleak in component J_ERleak (micromolar).
* STATES[4] is J_in in component J_in (micromolar).
* STATES[5] is J_out in component J_out (micromolar).
* STATES[6] is Ca_ER in component Ca_ER (micromolar).
* CONSTANTS[0] is beta in component J_ERch (dimensionless).
* CONSTANTS[1] is k_0ch in component J_ERch (micromolar_per_minute).
* CONSTANTS[2] is K_chcyt in component J_ERch (micromolar).
* CONSTANTS[3] is K_chER in component J_ERch (micromolar).
* CONSTANTS[4] is K_ERpump in component J_ERpump (micromolar).
* CONSTANTS[5] is K_pump in component J_ERpump (micromolar).
* CONSTANTS[6] is K_ERleak in component J_ERleak (per_minute).
* CONSTANTS[7] is K_0in in component J_in (micromolar_per_minute).
* CONSTANTS[8] is K_out in component J_out (per_minute).
* RATES[0] is d/dt Ca_cyt in component Ca_cyt (micromolar).
* RATES[6] is d/dt Ca_ER in component Ca_ER (micromolar).
* RATES[1] is d/dt J_ERch in component J_ERch (micromolar).
* RATES[2] is d/dt J_ERpump in component J_ERpump (micromolar).
* RATES[3] is d/dt J_ERleak in component J_ERleak (micromolar).
* RATES[4] is d/dt J_in in component J_in (micromolar).
* RATES[5] is d/dt J_out in component J_out (micromolar).
*/
void
initConsts(double* CONSTANTS, double* RATES, double *STATES)
{
STATES[0] = 0.01;
STATES[1] = 0.1;
STATES[2] = 0.1;
STATES[3] = 0.1;
STATES[4] = 0.1;
STATES[5] = 0.1;
STATES[6] = 20;
CONSTANTS[0] = 1.7;
CONSTANTS[1] = 325;
CONSTANTS[2] = 0.45;
CONSTANTS[3] = 1;
CONSTANTS[4] = 25;
CONSTANTS[5] = 0.5;
CONSTANTS[6] = 1;
CONSTANTS[7] = 1.7;
CONSTANTS[8] = 10;
CONSTANTS[9] = CONSTANTS[7]*1.00000;
}
void
computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
RATES[4] = CONSTANTS[9];
RATES[0] = (((STATES[1] - STATES[2])+STATES[3]+STATES[4]) - STATES[5])*1.00000;
RATES[6] = ((STATES[2] - STATES[3]) - STATES[1])*1.00000;
RATES[1] = CONSTANTS[0]*CONSTANTS[1]*( (pow(STATES[0], 4.00000)/(pow(CONSTANTS[2], 4.00000)+pow(STATES[0], 4.00000)))*(pow(STATES[6], 2.00000)/(pow(CONSTANTS[3], 2.00000)+pow(STATES[6], 2.00000))))*1.00000;
RATES[2] = CONSTANTS[4]*(pow(STATES[0], 2.00000)/(pow(CONSTANTS[5], 2.00000)+pow(STATES[0], 2.00000)));
RATES[3] = (( CONSTANTS[6]*STATES[6])/1.00000)*1.00000;
RATES[5] = (( CONSTANTS[8]*STATES[0])/1.00000)*1.00000;
}
void
computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC)
{
}
