C C There are a total of 8 entries in the algebraic variable array. C There are a total of 1 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 VOI is time in component environment (second). C ALGBRC(1) is F_isom in component contraction (newton). C CONSTS(12) is c in component contraction (newton). C STATES(1) is L_ce in component contraction (metre). C CONSTS(1) is L_ce_opt in component contraction (metre). C ALGBRC(2) is L in component contraction (metre). C CONSTS(2) is width in component contraction (metre). C CONSTS(3) is Factor in component contraction (per_second). C CONSTS(4) is A_REL in component contraction (newton). C CONSTS(5) is B_REL in component contraction (dimensionless). C ALGBRC(8) is v_ce in component contraction (metre_per_second). C ALGBRC(6) is F in component contraction (newton). C CONSTS(6) is F_max in component contraction (newton). C CONSTS(7) is q in component contraction (dimensionless). C ALGBRC(5) is c1 in component contraction (per_second). C ALGBRC(3) is c2 in component contraction (newton). C ALGBRC(7) is c3 in component contraction (per_newton_second). C CONSTS(8) is slope in component contraction (newton). C CONSTS(9) is F_asympt in component contraction (dimensionless). C ALGBRC(4) is L_see in component contraction (metre). C CONSTS(10) is L_slack in component contraction (metre). C CONSTS(11) is alpha in component contraction (newton_per_metre). C RATES(1) is d/dt L_ce in component contraction (metre). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 0.05 CONSTS(1) = 0.055 CONSTS(2) = 0.888 CONSTS(3) = 1 CONSTS(4) = 0.41 CONSTS(5) = 5.2 CONSTS(6) = 3277.4 CONSTS(7) = 1 CONSTS(8) = 2 CONSTS(9) = 1.5 CONSTS(10) = 0.42 CONSTS(11) = 1449.027 CONSTS(12) = - 1.00000/CONSTS(2) ** 2.00000 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = ( CONSTS(12)*STATES(1)/CONSTS(1) ** 2.00000 - ( 2.00000*CONSTS(12)*STATES(1))/CONSTS(1))+CONSTS(12)+1.00000 ALGBRC(2) = TERNRY(VOI.LE.1.00000, 1.00000, TERNRY(VOI.GT.1.00000.AND.VOI.LT.5.00000, 0.920000, 0.900000) ALGBRC(4) = ALGBRC(2) - STATES(1) ALGBRC(6) = CONSTS(11)*(ALGBRC(4) - CONSTS(10)) ALGBRC(8) = - CONSTS(3)*STATES(1)*(( (ALGBRC(1)+CONSTS(4))*CONSTS(5))/( 1.00000*(ALGBRC(6)/( CONSTS(6)*CONSTS(7)))+CONSTS(4)) - CONSTS(5)) RATES(1) = ALGBRC(8) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = ( CONSTS(12)*STATES(1)/CONSTS(1) ** 2.00000 - ( 2.00000*CONSTS(12)*STATES(1))/CONSTS(1))+CONSTS(12)+1.00000 ALGBRC(2) = TERNRY(VOI.LE.1.00000, 1.00000, TERNRY(VOI.GT.1.00000.AND.VOI.LT.5.00000, 0.920000, 0.900000) ALGBRC(4) = ALGBRC(2) - STATES(1) ALGBRC(6) = CONSTS(11)*(ALGBRC(4) - CONSTS(10)) ALGBRC(8) = - CONSTS(3)*STATES(1)*(( (ALGBRC(1)+CONSTS(4))*CONSTS(5))/( 1.00000*(ALGBRC(6)/( CONSTS(6)*CONSTS(7)))+CONSTS(4)) - CONSTS(5)) ALGBRC(3) = ALGBRC(1)*CONSTS(9) ALGBRC(5) = ( CONSTS(3)*CONSTS(5)*ALGBRC(1)+ALGBRC(3) ** 2.00000)/( (ALGBRC(1)+CONSTS(4))*CONSTS(8)) ALGBRC(7) = ALGBRC(5)/(ALGBRC(1)+ALGBRC(3)) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END