C C There are a total of 1 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 11 entries in the constant variable array. C C C VOI is time in component environment (millisecond). C CONSTS(1) is C in component membrane (microF_per_mm2). C CONSTS(2) is T in component membrane (per_millisecond). C STATES(1) is Y in component membrane (dimensionless). C CONSTS(8) is Y_infinity_Vm in component membrane (dimensionless). C CONSTS(3) is Vm in component membrane (millivolt). C ALGBRC(1) is I_ion in component membrane (microA_per_mm2). C CONSTS(9) is i1_Vm in component membrane (microA_per_mm2). C CONSTS(11) is i0_Vm in component membrane (microA_per_mm2). C CONSTS(10) is f_Vm in component membrane (microA_per_mm2). C CONSTS(4) is af in component membrane (dimensionless). C CONSTS(5) is bf in component membrane (dimensionless). C CONSTS(6) is cf in component membrane (dimensionless). C CONSTS(7) is df in component membrane (dimensionless). C RATES(1) is d/dt Y in component membrane (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 0.01 CONSTS(2) = 50.0 STATES(1) = 0.07 CONSTS(3) = -78.6 CONSTS(4) = 0.00003837854 CONSTS(5) = 0.00584649 CONSTS(6) = 0.2531834 CONSTS(7) = 2.356256 CONSTS(8) = TERNRY(CONSTS(3).LT.-80.0000, 0.00000, TERNRY(CONSTS(3).GT.-60.0000, 1.00000, (CONSTS(3)+80.0000)/20.0000) CONSTS(9) = TERNRY(CONSTS(3).LT.-70.0000, 0.0500000+ 0.00500000*(CONSTS(3)+70.0000), TERNRY(CONSTS(3).GT.0.00000, 0.0600000+ 0.00425000*CONSTS(3), 0.0500000+( 0.0100000*(CONSTS(3)+70.0000))/70.0000) CONSTS(10) = TERNRY(CONSTS(3).LT.-74.3000, 0.0784000+ 0.0200000*(CONSTS(3)+74.3000), TERNRY(CONSTS(3).GT.-27.8000, -0.988400+ 0.0171000*(CONSTS(3)+27.8000), CONSTS(4)*CONSTS(3) ** 3.00000+ CONSTS(5)*CONSTS(3) ** 2.00000+ CONSTS(6)*CONSTS(3)+CONSTS(7)) CONSTS(11) = CONSTS(9)+CONSTS(10) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = (1.00000/CONSTS(2))*(CONSTS(8) - STATES(1)) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = - STATES(1)*CONSTS(9) - (1.00000 - STATES(1))*CONSTS(11) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END