/* There are a total of 0 entries in the algebraic variable array. There are a total of 4 entries in each of the rate and state variable arrays. There are a total of 7 entries in the constant variable array. */ /* * VOI is time in component environment (second). * STATES[0] is C1 in component C1 (dimensionless). * CONSTANTS[0] is O2C1 in component reaction_constants (second_order_rate_constant). * CONSTANTS[1] is C1O2 in component reaction_constants (first_order_rate_constant). * CONSTANTS[2] is C1C2 in component reaction_constants (first_order_rate_constant). * CONSTANTS[3] is C2C1 in component reaction_constants (first_order_rate_constant). * STATES[1] is C2 in component C2 (dimensionless). * STATES[2] is O2 in component O2 (dimensionless). * CONSTANTS[4] is Ca in component reaction_constants (micromolar). * STATES[3] is O1 in component O1 (dimensionless). * CONSTANTS[5] is O1O2 in component reaction_constants (second_order_rate_constant). * CONSTANTS[6] is O2O1 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[3] is d/dt O1 in component O1 (dimensionless). * RATES[2] is d/dt O2 in component O2 (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.25; CONSTANTS[0] = 2.62; CONSTANTS[1] = 2277.0; CONSTANTS[2] = 60.8; CONSTANTS[3] = 198.0; STATES[1] = 0.25; STATES[2] = 0.25; CONSTANTS[4] = 50.0; STATES[3] = 0.25; CONSTANTS[5] = 2.41; CONSTANTS[6] = 85.1; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = ( CONSTANTS[0]*CONSTANTS[4]*STATES[2]+ CONSTANTS[3]*STATES[1]) - ( CONSTANTS[1]*STATES[0]+ CONSTANTS[2]*STATES[0]); RATES[1] = CONSTANTS[2]*STATES[0] - CONSTANTS[3]*STATES[1]; RATES[3] = CONSTANTS[6]*STATES[2] - CONSTANTS[5]*CONSTANTS[4]*STATES[3]; RATES[2] = ( CONSTANTS[5]*CONSTANTS[4]*STATES[3]+ CONSTANTS[1]*STATES[0]) - ( CONSTANTS[6]*STATES[2]+ CONSTANTS[0]*CONSTANTS[4]*STATES[2]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }