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(8) 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(9) is alpha in component reaction_constants (dimensionless). C CONSTS(10) is beta in component reaction_constants (dimensionless). C CONSTS(11) is K in component reaction_constants (dimensionless). C STATES(2) is g in component g (dimensionless). C CONSTS(12) is C_1 in component reaction_constants (molar). C ALGBRC(3) is G in component g (molar). C CONSTS(13) is gamma in component reaction_constants (dimensionless). C CONSTS(14) is L in component reaction_constants (dimensionless). C CONSTS(15) is C_2 in component reaction_constants (molar). C CONSTS(1) is k2 in component reaction_constants (per_second). C CONSTS(2) is k3 in component reaction_constants (per_second). C CONSTS(3) is k6 in component reaction_constants (per_second). C CONSTS(4) is k7 in component reaction_constants (per_second). C CONSTS(5) is k0 in component reaction_constants (molar_per_second). C CONSTS(6) is k4 in component reaction_constants (per_molar2_per_second). C CONSTS(7) 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) = 7.68e-8 STATES(2) = 3.43e-8 CONSTS(1) = 6e-4 CONSTS(2) = 0.0000048 CONSTS(3) = 0.000891 CONSTS(4) = 0.006831 CONSTS(5) = 8.7831e-11 CONSTS(6) = 2.1e12 CONSTS(7) = 6.9001e-14 CONSTS(8) = CONSTS(1) CONSTS(9) = CONSTS(2)/CONSTS(1) CONSTS(10) = CONSTS(3)/CONSTS(1) CONSTS(11) = (( CONSTS(5) ** 2.00000*CONSTS(6))/CONSTS(1) ** 3.00000) ** (1.0 / 2) CONSTS(12) = (CONSTS(1)/CONSTS(6)) ** (1.0 / 2) CONSTS(13) = CONSTS(4)/CONSTS(1) CONSTS(14) = (( CONSTS(7) ** 2.00000*CONSTS(6))/CONSTS(1) ** 3.00000) ** (1.0 / 2) CONSTS(15) = (CONSTS(1)/CONSTS(6)) ** (1.0 / 2) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = CONSTS(11) - ( (1.00000+CONSTS(9)+CONSTS(10))*STATES(1)+ STATES(1)*STATES(2) ** 2.00000) RATES(2) = ( (1.00000 - CONSTS(9))*STATES(1)+ STATES(1)*STATES(2) ** 2.00000) - (CONSTS(14)+ CONSTS(13)*STATES(2)) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = VOI/CONSTS(8) ALGBRC(2) = CONSTS(12)*STATES(1) ALGBRC(3) = CONSTS(15)*STATES(2) RETURN END