C C There are a total of 3 entries in the algebraic variable array. C There are a total of 2 entries in each of the rate and state variable arrays. C There are a total of 15 entries in the constant variable array. C C C ALGBRC(1) is time in component environment (second). C VOI is tau in component environment (dimensionless). C CONSTS(13) is C_0 in component reaction_constants (per_second). C ALGBRC(2) is A in component a (molar). C STATES(1) is a in component a (dimensionless). C CONSTS(1) is alpha in component reaction_constants (dimensionless). C CONSTS(2) is beta in component reaction_constants (dimensionless). C CONSTS(3) is K in component reaction_constants (dimensionless). C CONSTS(14) is C_1 in component reaction_constants (molar). C STATES(2) is g in component g (dimensionless). C ALGBRC(3) is G in component g (molar). C CONSTS(4) is gamma in component reaction_constants (dimensionless). C CONSTS(5) is L in component reaction_constants (dimensionless). C CONSTS(15) is C_2 in component reaction_constants (molar). C CONSTS(6) is k2 in component reaction_constants (per_second). C CONSTS(7) is k3 in component reaction_constants (per_second). C CONSTS(8) is k6 in component reaction_constants (per_second). C CONSTS(9) is k7 in component reaction_constants (per_second). C CONSTS(10) is k0 in component reaction_constants (molar_per_second). C CONSTS(11) is k4 in component reaction_constants (per_molar2_per_second). C CONSTS(12) is km in component reaction_constants (molar_per_second). C RATES(1) is d/dt a in component a (dimensionless). C RATES(2) is d/dt g in component g (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 4.39927 CONSTS(1) = 0.008 CONSTS(2) = 1.485 CONSTS(3) = 30 STATES(2) = 1.96477 CONSTS(4) = 11.385 CONSTS(5) = 0.1 CONSTS(6) = 6e-4 CONSTS(7) = 0.0000048 CONSTS(8) = 0.000891 CONSTS(9) = 0.006831 CONSTS(10) = 8.7831e-11 CONSTS(11) = 2.1e12 CONSTS(12) = 6.9001e-14 CONSTS(13) = CONSTS(6) CONSTS(14) = (CONSTS(6)/CONSTS(11)) ** (1.0 / 2) CONSTS(15) = (CONSTS(6)/CONSTS(11)) ** (1.0 / 2) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = CONSTS(3) - ( (1.00000+CONSTS(1)+CONSTS(2))*STATES(1)+ STATES(1)*STATES(2) ** 2.00000) RATES(2) = ( (1.00000 - CONSTS(1))*STATES(1)+ STATES(1)*STATES(2) ** 2.00000) - (CONSTS(5)+ CONSTS(4)*STATES(2)) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = VOI/CONSTS(13) ALGBRC(2) = CONSTS(14)*STATES(1) ALGBRC(3) = CONSTS(15)*STATES(2) RETURN END