C C There are a total of 2 entries in the algebraic variable array. C There are a total of 4 entries in each of the rate and state variable arrays. C There are a total of 12 entries in the constant variable array. C C C CONSTS(1) is n1_initial in component component (dimensionless). C CONSTS(2) is d1_initial in component component (dimensionless). C CONSTS(3) is n2_initial in component component (dimensionless). C CONSTS(4) is d2_initial in component component (dimensionless). C STATES(1) is n in component component (dimensionless). C STATES(2) is d in component component (dimensionless). C STATES(3) is n in component component (dimensionless). C STATES(4) is d in component component (dimensionless). C ALGBRC(1) is cell_1_neighbourhood_d_average in component component (dimensionless). C ALGBRC(2) is cell_2_neighbourhood_d_average in component component (dimensionless). C CONSTS(5) is start_boundary_d in component component (dimensionless). C CONSTS(6) is a in component component (dimensionless). C CONSTS(7) is b in component component (dimensionless). C CONSTS(8) is v in component component (dimensionless). C CONSTS(9) is k in component component (dimensionless). C CONSTS(10) is h in component component (dimensionless). C VOI is time in component component (dimensionless). C CONSTS(11) is start_boundary_d in component component (dimensionless). C CONSTS(12) is end_boundary_d in component component (dimensionless). C RATES(1) is d/dt n in component component (dimensionless). C RATES(2) is d/dt d in component component (dimensionless). C RATES(3) is d/dt n in component component (dimensionless). C RATES(4) is d/dt d in component component (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 1.0 CONSTS(2) = 1.0 CONSTS(3) = 0.99 CONSTS(4) = 0.99 CONSTS(5) = 0.0 CONSTS(6) = 0.01 CONSTS(7) = 100 CONSTS(8) = 1 CONSTS(9) = 2 CONSTS(10) = 2 CONSTS(11) = 0.0 CONSTS(12) = 0.0 STATES(1) = CONSTS(1) STATES(2) = CONSTS(2) STATES(3) = CONSTS(3) STATES(4) = CONSTS(4) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(2) = CONSTS(8)*(1.00000/(1.00000+ CONSTS(7)*STATES(1) ** CONSTS(10)) - STATES(2)) RATES(4) = CONSTS(8)*(1.00000/(1.00000+ CONSTS(7)*STATES(3) ** CONSTS(10)) - STATES(4)) ALGBRC(1) = (STATES(4)+CONSTS(5))*0.500000 RATES(1) = ALGBRC(1) ** CONSTS(9)/(CONSTS(6)+ALGBRC(1) ** CONSTS(9)) - STATES(1) ALGBRC(2) = (STATES(2)+CONSTS(12))*0.500000 RATES(3) = ALGBRC(2) ** CONSTS(9)/(CONSTS(6)+ALGBRC(2) ** CONSTS(9)) - STATES(3) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = (STATES(4)+CONSTS(5))*0.500000 ALGBRC(2) = (STATES(2)+CONSTS(12))*0.500000 RETURN END