Generated Code
The following is f77 code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
C
C There are a total of 6 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 13 entries in the constant variable array.
C
C
C VOI is time in component environment (millisecond).
C STATES(1) is V in component V (millivolt).
C CONSTS(1) is C in component V (microF_per_cm2).
C CONSTS(2) is i_app in component V (microA_per_cm2).
C ALGBRC(1) is i_L in component i_L (microA_per_cm2).
C ALGBRC(5) is i_Ca in component i_Ca (microA_per_cm2).
C ALGBRC(6) is i_K in component i_K (microA_per_cm2).
C CONSTS(3) is g_L in component i_L (milliS_per_cm2).
C CONSTS(4) is E_L in component i_L (millivolt).
C CONSTS(5) is E_Ca in component i_Ca (millivolt).
C CONSTS(6) is g_Ca in component i_Ca (milliS_per_cm2).
C ALGBRC(3) is m_infinity in component i_Ca (dimensionless).
C CONSTS(7) is V1 in component i_Ca (millivolt).
C CONSTS(8) is V2 in component i_Ca (millivolt).
C CONSTS(9) is E_K in component i_K (millivolt).
C CONSTS(10) is g_K in component i_K (milliS_per_cm2).
C STATES(2) is n in component i_K_n_gate (dimensionless).
C ALGBRC(2) is n_infinity in component i_K_n_gate (dimensionless).
C ALGBRC(4) is lambda_n in component i_K_n_gate (per_millisecond).
C CONSTS(11) is lambda_n_bar in component i_K_n_gate (per_millisecond).
C CONSTS(12) is V3 in component i_K_n_gate (millivolt).
C CONSTS(13) is V4 in component i_K_n_gate (millivolt).
C RATES(1) is d/dt V in component V (millivolt).
C RATES(2) is d/dt n in component i_K_n_gate (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = -50
CONSTS(1) = 20.0
CONSTS(2) = 300.0
CONSTS(3) = 2.0
CONSTS(4) = -50.00
CONSTS(5) = 100.0
CONSTS(6) = 4.0
CONSTS(7) = 10.0
CONSTS(8) = 15.0
CONSTS(9) = -70.0
CONSTS(10) = 8.0
STATES(2) = 0.001
CONSTS(11) = 0.066666667
CONSTS(12) = -1.0
CONSTS(13) = 14.5
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(2) = 0.500000*(1.00000+ tanh((STATES(1) - CONSTS(12))/CONSTS(13)))
ALGBRC(4) = CONSTS(11)*cosh((STATES(1) - CONSTS(12))/( 2.00000*CONSTS(13)))
RATES(2) = ALGBRC(4)*(ALGBRC(2) - STATES(2))
ALGBRC(1) = CONSTS(3)*(STATES(1) - CONSTS(4))
ALGBRC(3) = 0.500000*(1.00000+ tanh((STATES(1) - CONSTS(7))/CONSTS(8)))
ALGBRC(5) = CONSTS(6)*ALGBRC(3)*(STATES(1) - CONSTS(5))
ALGBRC(6) = CONSTS(10)*STATES(2)*(STATES(1) - CONSTS(9))
RATES(1) = (CONSTS(2) - (ALGBRC(1)+ALGBRC(5)+ALGBRC(6)))/CONSTS(1)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(2) = 0.500000*(1.00000+ tanh((STATES(1) - CONSTS(12))/CONSTS(13)))
ALGBRC(4) = CONSTS(11)*cosh((STATES(1) - CONSTS(12))/( 2.00000*CONSTS(13)))
ALGBRC(1) = CONSTS(3)*(STATES(1) - CONSTS(4))
ALGBRC(3) = 0.500000*(1.00000+ tanh((STATES(1) - CONSTS(7))/CONSTS(8)))
ALGBRC(5) = CONSTS(6)*ALGBRC(3)*(STATES(1) - CONSTS(5))
ALGBRC(6) = CONSTS(10)*STATES(2)*(STATES(1) - CONSTS(9))
RETURN
END
