/* There are a total of 2 entries in the algebraic variable array. There are a total of 8 entries in each of the rate and state variable arrays. There are a total of 14 entries in the constant variable array. */ /* * VOI is time in component environment (minute). * STATES[0] is Ca_m in component Ca_m (micromolar). * ALGEBRAIC[0] is J_min in component J_min (micromolar). * ALGEBRAIC[1] is J_mout in component J_mout (micromolar). * CONSTANTS[0] is k_min in component J_min (micromolar). * STATES[1] is Ca_cyt in component Ca_cyt (micromolar). * CONSTANTS[1] is K_m in component J_min (micromolar). * CONSTANTS[2] is n in component J_min (micromolar). * CONSTANTS[3] is k_mout in component J_mout (micromolar). * STATES[2] is J_ERch in component J_ERch (micromolar). * STATES[3] is J_ERpump in component J_ERpump (micromolar). * STATES[4] is J_ERleak in component J_ERleak (micromolar). * STATES[5] is J_in in component J_in (micromolar). * STATES[6] is J_out in component J_out (micromolar). * STATES[7] is Ca_ER in component Ca_ER (micromolar). * CONSTANTS[4] is beta in component J_ERch (dimensionless). * CONSTANTS[5] is k_0ch in component J_ERch (micromolar_per_minute). * CONSTANTS[6] is K_chcyt in component J_ERch (micromolar). * CONSTANTS[7] is K_chER in component J_ERch (micromolar). * CONSTANTS[8] is K_ERpump in component J_ERpump (micromolar). * CONSTANTS[9] is K_pump in component J_ERpump (micromolar). * CONSTANTS[10] is K_ERleak in component J_ERleak (per_minute). * CONSTANTS[11] is K_0in in component J_in (micromolar_per_minute). * CONSTANTS[12] is K_out in component J_out (per_minute). * RATES[0] is d/dt Ca_m in component Ca_m (micromolar). * RATES[1] is d/dt Ca_cyt in component Ca_cyt (micromolar). * RATES[7] is d/dt Ca_ER in component Ca_ER (micromolar). * RATES[2] is d/dt J_ERch in component J_ERch (micromolar). * RATES[3] is d/dt J_ERpump in component J_ERpump (micromolar). * RATES[4] is d/dt J_ERleak in component J_ERleak (micromolar). * RATES[5] is d/dt J_in in component J_in (micromolar). * RATES[6] is d/dt J_out in component J_out (micromolar). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.1; CONSTANTS[0] = 330; STATES[1] = 0.01; CONSTANTS[1] = 1.6; CONSTANTS[2] = 8; CONSTANTS[3] = 0.5; STATES[2] = 0.1; STATES[3] = 0.1; STATES[4] = 0.1; STATES[5] = 0.1; STATES[6] = 0.1; STATES[7] = 20; CONSTANTS[4] = 1.7; CONSTANTS[5] = 325; CONSTANTS[6] = 0.45; CONSTANTS[7] = 1; CONSTANTS[8] = 25; CONSTANTS[9] = 0.5; CONSTANTS[10] = 1; CONSTANTS[11] = 1.7; CONSTANTS[12] = 10; CONSTANTS[13] = CONSTANTS[11]*1.00000; RATES[0] = 0.1001; RATES[1] = 0.1001; RATES[7] = 0.1001; RATES[2] = 0.1001; RATES[3] = 0.1001; RATES[4] = 0.1001; RATES[6] = 0.1001; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - ALGEBRAIC[0] - ALGEBRAIC[1]; resid[1] = RATES[1] - (((((STATES[2] - STATES[3])+STATES[4]+STATES[5]) - STATES[6])+ALGEBRAIC[1]) - ALGEBRAIC[0])*1.00000; resid[2] = RATES[7] - ((STATES[3] - STATES[4]) - STATES[2])*1.00000; resid[3] = RATES[2] - CONSTANTS[4]*CONSTANTS[5]*( (pow(STATES[1], 4.00000)/(pow(CONSTANTS[6], 4.00000)+pow(STATES[1], 4.00000)))*(pow(STATES[7], 2.00000)/(pow(CONSTANTS[7], 2.00000)+pow(STATES[7], 2.00000))))*1.00000; resid[4] = RATES[3] - CONSTANTS[8]*(pow(STATES[1], 2.00000)/(pow(CONSTANTS[9], 2.00000)+pow(STATES[1], 2.00000))); resid[5] = RATES[4] - (( CONSTANTS[10]*STATES[7])/1.00000)*1.00000; resid[6] = RATES[6] - (( CONSTANTS[12]*STATES[1])/1.00000)*1.00000; resid[7] = RATES[5] - CONSTANTS[13]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = ( CONSTANTS[0]*pow(STATES[1], CONSTANTS[2]))/(pow(CONSTANTS[1], CONSTANTS[2])+pow(STATES[1], CONSTANTS[2])); ALGEBRAIC[1] = ( CONSTANTS[3]*STATES[0])/1.00000; } void getStateInformation(double* SI) { SI[0] = 1.0; SI[1] = 1.0; SI[2] = 1.0; SI[3] = 1.0; SI[4] = 1.0; SI[5] = 1.0; SI[6] = 1.0; SI[7] = 1.0; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }