/* There are a total of 0 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 17 entries in the constant variable array. */ /* * VOI is time in component environment (second). * STATES[0] is C1 in component C1 (dimensionless). * CONSTANTS[0] is C1C2 in component reaction_constants (second_order_rate_constant). * CONSTANTS[1] is C2C1 in component reaction_constants (first_order_rate_constant). * STATES[1] is C2 in component C2 (dimensionless). * CONSTANTS[2] is Ca in component reaction_constants (micromolar). * CONSTANTS[3] is C2C3 in component reaction_constants (second_order_rate_constant). * CONSTANTS[4] is C3C2 in component reaction_constants (first_order_rate_constant). * CONSTANTS[5] is C2C5 in component reaction_constants (first_order_rate_constant). * CONSTANTS[6] is C5C2 in component reaction_constants (first_order_rate_constant). * STATES[2] is C3 in component C3 (dimensionless). * STATES[3] is C5 in component C5 (dimensionless). * CONSTANTS[7] is O1C3 in component reaction_constants (first_order_rate_constant). * CONSTANTS[8] is C3O1 in component reaction_constants (first_order_rate_constant). * CONSTANTS[9] is O2C3 in component reaction_constants (first_order_rate_constant). * CONSTANTS[10] is C3O2 in component reaction_constants (first_order_rate_constant). * CONSTANTS[11] is O3C3 in component reaction_constants (first_order_rate_constant). * CONSTANTS[12] is C3O3 in component reaction_constants (first_order_rate_constant). * STATES[4] is O1 in component O1 (dimensionless). * STATES[5] is O2 in component O2 (dimensionless). * STATES[6] is O3 in component O3 (dimensionless). * STATES[7] is C4 in component C4 (dimensionless). * CONSTANTS[13] is O2C4 in component reaction_constants (first_order_rate_constant). * CONSTANTS[14] is C4O2 in component reaction_constants (first_order_rate_constant). * CONSTANTS[15] is O3C4 in component reaction_constants (first_order_rate_constant). * CONSTANTS[16] is C4O3 in component reaction_constants (first_order_rate_constant). * RATES[0] is d/dt C1 in component C1 (dimensionless). * RATES[1] is d/dt C2 in component C2 (dimensionless). * RATES[2] is d/dt C3 in component C3 (dimensionless). * RATES[7] is d/dt C4 in component C4 (dimensionless). * RATES[3] is d/dt C5 in component C5 (dimensionless). * RATES[4] is d/dt O1 in component O1 (dimensionless). * RATES[5] is d/dt O2 in component O2 (dimensionless). * RATES[6] is d/dt O3 in component O3 (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.125; CONSTANTS[0] = 2.5; CONSTANTS[1] = 13.3; STATES[1] = 0.125; CONSTANTS[2] = 20.0; CONSTANTS[3] = 68.0; CONSTANTS[4] = 8000.0; CONSTANTS[5] = 0.13; CONSTANTS[6] = 3.6; STATES[2] = 0.125; STATES[3] = 0.125; CONSTANTS[7] = 3400.0; CONSTANTS[8] = 1100.0; CONSTANTS[9] = 92.0; CONSTANTS[10] = 17.0; CONSTANTS[11] = 138.0; CONSTANTS[12] = 14.0; STATES[4] = 0.125; STATES[5] = 0.125; STATES[6] = 0.125; STATES[7] = 0.125; CONSTANTS[13] = 1900.0; CONSTANTS[14] = 520.0; CONSTANTS[15] = 300.0; CONSTANTS[16] = 46.0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[1]*STATES[1] - CONSTANTS[0]*CONSTANTS[2]*STATES[1]; RATES[1] = ( CONSTANTS[0]*CONSTANTS[2]*STATES[0]+ CONSTANTS[4]*STATES[2]+ CONSTANTS[6]*STATES[3]) - ( CONSTANTS[1]*STATES[1]+ CONSTANTS[3]*CONSTANTS[2]*STATES[1]+ CONSTANTS[5]*STATES[1]); RATES[2] = ( CONSTANTS[3]*CONSTANTS[2]*STATES[1]+ CONSTANTS[7]*STATES[4]+ CONSTANTS[11]*STATES[6]+ CONSTANTS[9]*STATES[5]) - ( CONSTANTS[4]*STATES[2]+ CONSTANTS[8]*STATES[2]+ CONSTANTS[10]*STATES[2]+ CONSTANTS[12]*STATES[2]); RATES[7] = ( CONSTANTS[13]*STATES[5]+ CONSTANTS[15]*STATES[6]) - ( CONSTANTS[14]*STATES[7]+ CONSTANTS[16]*STATES[7]); RATES[3] = CONSTANTS[5]*STATES[1] - CONSTANTS[6]*STATES[3]; RATES[4] = CONSTANTS[8]*STATES[2] - CONSTANTS[7]*STATES[4]; RATES[5] = ( CONSTANTS[10]*STATES[2]+ CONSTANTS[14]*STATES[7]) - ( CONSTANTS[9]*STATES[5]+ CONSTANTS[13]*STATES[5]); RATES[6] = ( CONSTANTS[12]*STATES[2]+ CONSTANTS[16]*STATES[7]) - ( CONSTANTS[11]*STATES[6]+ CONSTANTS[15]*STATES[6]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }