C C There are a total of 1 entries in the algebraic variable array. C There are a total of 3 entries in each of the rate and state variable arrays. C There are a total of 11 entries in the constant variable array. C C C VOI is time in component environment (day). C STATES(1) is phi_I in component phi_I (cells_per_mm3). C CONSTS(1) is alpha in component model_parameters (dimensionless). C CONSTS(2) is k1 in component model_parameters (dimensionless). C CONSTS(3) is k2 in component model_parameters (first_order_rate_constant). C CONSTS(4) is k3 in component model_parameters (per_cells_per_mm3). C CONSTS(5) is d1 in component model_parameters (first_order_rate_constant). C STATES(2) is phi_R in component phi_R (cells_per_mm3). C ALGBRC(1) is K_T in component K_T (cells_per_mm3_day). C STATES(3) is T in component T (pg_per_mm3). C CONSTS(6) is k4 in component model_parameters (second_order_rate_constant). C CONSTS(7) is d2 in component model_parameters (first_order_rate_constant). C CONSTS(8) is tau1 in component K_T (mm6_cells_per_pg3_day). C CONSTS(9) is tau2 in component K_T (mm3_cells_per_pg2_day). C CONSTS(10) is tau3 in component K_T (cells_per_pg_day). C CONSTS(11) is tau4 in component K_T (cells_per_mm3_day). C RATES(1) is d/dt phi_I in component phi_I (cells_per_mm3). C RATES(2) is d/dt phi_R in component phi_R (cells_per_mm3). C RATES(3) is d/dt T in component T (pg_per_mm3). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 200.0 CONSTS(1) = 0.5 CONSTS(2) = 0.05 CONSTS(3) = 0.693 CONSTS(4) = 0.002 CONSTS(5) = 0.2 STATES(2) = 200.0 STATES(3) = 6.0 CONSTS(6) = 0.07 CONSTS(7) = 9.1 CONSTS(8) = -2.47 CONSTS(9) = 21.94 CONSTS(10) = 6.41 CONSTS(11) = 1.75 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(3) = CONSTS(6)*STATES(1) - CONSTS(7)*STATES(3) ALGBRC(1) = CONSTS(8)*STATES(3) ** 3.00000+ CONSTS(9)*STATES(3) ** 2.00000+ CONSTS(10)*STATES(3)+CONSTS(11) RATES(1) = ( CONSTS(1)*ALGBRC(1)+ CONSTS(2)*CONSTS(3)*STATES(1)*(1.00000 - CONSTS(4)*(STATES(1)+STATES(2)))) - CONSTS(5)*STATES(1) RATES(2) = ( (1.00000 - CONSTS(1))*ALGBRC(1)+ CONSTS(2)*CONSTS(3)*STATES(2)*(1.00000 - CONSTS(4)*(STATES(1)+STATES(2)))) - CONSTS(5)*STATES(2) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(8)*STATES(3) ** 3.00000+ CONSTS(9)*STATES(3) ** 2.00000+ CONSTS(10)*STATES(3)+CONSTS(11) RETURN END