C C There are a total of 2 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 8 entries in the constant variable array. C C C CONSTS(7) is k2 in component moussa (per_sec). C CONSTS(8) is k1 in component moussa (per_sec). C STATES(1) is X1 in component moussa (conc). C STATES(2) is X2 in component moussa (conc). C VOI is time in component moussa (second). C ALGBRC(1) is A in component moussa (conc). C ALGBRC(2) is D in component moussa (conc). C CONSTS(1) is R in component moussa (gas_constant). C CONSTS(2) is E1 in component moussa (J_per_mole). C CONSTS(3) is E2 in component moussa (J_per_mole). C CONSTS(4) is A1 in component moussa (per_sec). C CONSTS(5) is A2 in component moussa (per_sec). C CONSTS(6) is T in component moussa (kelvin). C RATES(1) is d/dt X1 in component moussa (conc). C RATES(2) is d/dt X2 in component moussa (conc). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 1 STATES(2) = 0 CONSTS(1) = 8.3 CONSTS(2) = 2.5E5 CONSTS(3) = 1.28E5 CONSTS(4) = 0.0683E38 CONSTS(5) = 0.0283E19 CONSTS(6) = 325 CONSTS(7) = CONSTS(5)*EXP(- CONSTS(3)/( CONSTS(1)*CONSTS(6))) CONSTS(8) = CONSTS(4)*EXP(- CONSTS(2)/( CONSTS(1)*CONSTS(6))) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = - CONSTS(8)*STATES(1) RATES(2) = CONSTS(8)*STATES(1) - CONSTS(7)*STATES(2) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = STATES(1)+STATES(2) ALGBRC(2) = 1.00000 - ALGBRC(1) RETURN END