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 8 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 10 entries in the constant variable array. C C C VOI is t in component environment (second). C CONSTS(1) is C_m in component environment (fF). C CONSTS(2) is w_i in component environment (pL). C CONSTS(3) is w_o in component environment (pL). C STATES(1) is q_mem in component environment (fC). C CONSTS(4) is R in component environment (J_per_K_per_mol). C CONSTS(5) is T in component environment (kelvin). C CONSTS(6) is F in component environment (C_per_mol). C ALGBRC(7) is v_CaB in component CaB (fmol_per_sec). C STATES(2) is q_Ca_o in component environment (fmol). C STATES(3) is q_Ca_i in component environment (fmol). C ALGBRC(1) is V_mem in component environment (J_per_C). C ALGBRC(8) is I_mem_CaB in component CaB (fA). C CONSTS(7) is kappa_CaB in component CaB_parameters (fmol_per_sec). C CONSTS(8) is K_Ca_i in component CaB_parameters (per_fmol). C CONSTS(9) is K_Ca_o in component CaB_parameters (per_fmol). C CONSTS(10) is zCa in component CaB_parameters (dimensionless). C ALGBRC(2) is mu_Ca_i in component CaB (J_per_mol). C ALGBRC(3) is mu_Ca_o in component CaB (J_per_mol). C ALGBRC(4) is Af_CaB in component CaB (J_per_mol). C ALGBRC(5) is Ar_CaB in component CaB (J_per_mol). C ALGBRC(6) is Am_CaB in component CaB (J_per_mol). C RATES(3) is d/dt q_Ca_i in component environment (fmol). C RATES(2) is d/dt q_Ca_o in component environment (fmol). C RATES(1) is d/dt q_mem in component environment (fC). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 1e6 CONSTS(2) = 25.8 CONSTS(3) = 3.52 STATES(1) = -8.5e4 CONSTS(4) = 8.31 CONSTS(5) = 310 CONSTS(6) = 96500 STATES(2) = 9.3276 STATES(3) = 0.00456 CONSTS(7) = 2.73233e-05 CONSTS(8) = 0.000151953 CONSTS(9) = 0.00100872 CONSTS(10) = 2 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = STATES(1)/CONSTS(1) ALGBRC(2) = CONSTS(4)*CONSTS(5)*log( CONSTS(8)*STATES(3)) ALGBRC(4) = ALGBRC(2)+ CONSTS(10)*CONSTS(6)*ALGBRC(1) ALGBRC(3) = CONSTS(4)*CONSTS(5)*log( CONSTS(9)*STATES(2)) ALGBRC(5) = ALGBRC(3) ALGBRC(6) = CONSTS(10)*CONSTS(6)*ALGBRC(1) ALGBRC(7) = TERNRY(ALGBRC(6).EQ.0.00000, CONSTS(7)*(EXP(ALGBRC(4)/( CONSTS(4)*CONSTS(5))) - EXP(ALGBRC(5)/( CONSTS(4)*CONSTS(5)))), ((( CONSTS(7)*ALGBRC(6))/( CONSTS(4)*CONSTS(5)))/(EXP(ALGBRC(6)/( CONSTS(4)*CONSTS(5))) - 1.00000))*(EXP(ALGBRC(4)/( CONSTS(4)*CONSTS(5))) - EXP(ALGBRC(5)/( CONSTS(4)*CONSTS(5))))) RATES(3) = - ALGBRC(7) RATES(2) = ALGBRC(7) ALGBRC(8) = - CONSTS(10)*CONSTS(6)*ALGBRC(7) RATES(1) = ALGBRC(8) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = STATES(1)/CONSTS(1) ALGBRC(2) = CONSTS(4)*CONSTS(5)*log( CONSTS(8)*STATES(3)) ALGBRC(4) = ALGBRC(2)+ CONSTS(10)*CONSTS(6)*ALGBRC(1) ALGBRC(3) = CONSTS(4)*CONSTS(5)*log( CONSTS(9)*STATES(2)) ALGBRC(5) = ALGBRC(3) ALGBRC(6) = CONSTS(10)*CONSTS(6)*ALGBRC(1) ALGBRC(7) = TERNRY(ALGBRC(6).EQ.0.00000, CONSTS(7)*(EXP(ALGBRC(4)/( CONSTS(4)*CONSTS(5))) - EXP(ALGBRC(5)/( CONSTS(4)*CONSTS(5)))), ((( CONSTS(7)*ALGBRC(6))/( CONSTS(4)*CONSTS(5)))/(EXP(ALGBRC(6)/( CONSTS(4)*CONSTS(5))) - 1.00000))*(EXP(ALGBRC(4)/( CONSTS(4)*CONSTS(5))) - EXP(ALGBRC(5)/( CONSTS(4)*CONSTS(5))))) ALGBRC(8) = - CONSTS(10)*CONSTS(6)*ALGBRC(7) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END