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 7 entries in the algebraic variable array.
C There are a total of 3 entries in each of the rate and state variable arrays.
C There are a total of 14 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(4) is i_Ca in component i_Ca (microA_per_cm2).
C ALGBRC(7) 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 STATES(2) is m in component i_Ca_m_gate (dimensionless).
C ALGBRC(2) is m_infinity in component i_Ca_m_gate (dimensionless).
C ALGBRC(5) is lambda_m in component i_Ca_m_gate (per_millisecond).
C CONSTS(7) is lambda_m_bar in component i_Ca_m_gate (per_millisecond).
C CONSTS(8) is V1 in component i_Ca_m_gate (millivolt).
C CONSTS(9) is V2 in component i_Ca_m_gate (millivolt).
C CONSTS(10) is E_K in component i_K (millivolt).
C CONSTS(11) is g_K in component i_K (milliS_per_cm2).
C STATES(3) is n in component i_K_n_gate (dimensionless).
C ALGBRC(3) is n_infinity in component i_K_n_gate (dimensionless).
C ALGBRC(6) is lambda_n in component i_K_n_gate (per_millisecond).
C CONSTS(12) is lambda_n_bar in component i_K_n_gate (per_millisecond).
C CONSTS(13) is V3 in component i_K_n_gate (millivolt).
C CONSTS(14) 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 m in component i_Ca_m_gate (dimensionless).
C RATES(3) 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) = 540.0
CONSTS(3) = 2.0
CONSTS(4) = -50.00
CONSTS(5) = 100.0
CONSTS(6) = 4.0
STATES(2) = 0.1
CONSTS(7) = 1.0
CONSTS(8) = 0.0
CONSTS(9) = 15.0
CONSTS(10) = -70.0
CONSTS(11) = 8.0
STATES(3) = 0.1
CONSTS(12) = 0.1
CONSTS(13) = 10.0
CONSTS(14) = 10.0
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(8))/CONSTS(9)))
ALGBRC(5) = CONSTS(7)*cosh((STATES(1) - CONSTS(8))/( 2.00000*CONSTS(9)))
RATES(2) = ALGBRC(5)*(ALGBRC(2) - STATES(2))
ALGBRC(3) = 0.500000*(1.00000+ tanh((STATES(1) - CONSTS(13))/CONSTS(14)))
ALGBRC(6) = CONSTS(12)*cosh((STATES(1) - CONSTS(13))/( 2.00000*CONSTS(14)))
RATES(3) = ALGBRC(6)*(ALGBRC(3) - STATES(3))
ALGBRC(1) = CONSTS(3)*(STATES(1) - CONSTS(4))
ALGBRC(4) = CONSTS(6)*STATES(2)*(STATES(1) - CONSTS(5))
ALGBRC(7) = CONSTS(11)*STATES(3)*(STATES(1) - CONSTS(10))
RATES(1) = (CONSTS(2) - (ALGBRC(1)+ALGBRC(4)+ALGBRC(7)))/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(8))/CONSTS(9)))
ALGBRC(5) = CONSTS(7)*cosh((STATES(1) - CONSTS(8))/( 2.00000*CONSTS(9)))
ALGBRC(3) = 0.500000*(1.00000+ tanh((STATES(1) - CONSTS(13))/CONSTS(14)))
ALGBRC(6) = CONSTS(12)*cosh((STATES(1) - CONSTS(13))/( 2.00000*CONSTS(14)))
ALGBRC(1) = CONSTS(3)*(STATES(1) - CONSTS(4))
ALGBRC(4) = CONSTS(6)*STATES(2)*(STATES(1) - CONSTS(5))
ALGBRC(7) = CONSTS(11)*STATES(3)*(STATES(1) - CONSTS(10))
RETURN
END
