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 20 entries in the algebraic variable array.
C There are a total of 4 entries in each of the rate and state variable arrays.
C There are a total of 48 entries in the constant variable array.
C
C
C VOI is t in component BG_Hpump (second).
C CONSTS(1) is R in component params_BG (J_per_K_mol).
C CONSTS(2) is T in component params_BG (kelvin).
C CONSTS(3) is F in component params_BG (C_per_mol).
C CONSTS(4) is K_Hi in component params_BG (per_fmol).
C CONSTS(37) is q_init_Hi in component params_BG (fmol).
C CONSTS(5) is K_Ho in component params_BG (per_fmol).
C CONSTS(34) is q_init_Ho in component params_BG (fmol).
C CONSTS(6) is K_Pi in component params_BG (per_fmol).
C CONSTS(40) is q_init_Pi in component params_BG (fmol).
C CONSTS(7) is K_ATPi in component params_BG (per_fmol).
C CONSTS(43) is q_init_ATPi in component params_BG (fmol).
C CONSTS(8) is K_ADPi in component params_BG (per_fmol).
C CONSTS(46) is q_init_ADPi in component params_BG (fmol).
C CONSTS(9) is K_1 in component params_BG (per_fmol).
C CONSTS(10) is q_init_1 in component params_BG (fmol).
C CONSTS(11) is K_2 in component params_BG (per_fmol).
C CONSTS(12) is q_init_2 in component params_BG (fmol).
C CONSTS(13) is K_3 in component params_BG (per_fmol).
C CONSTS(14) is q_init_3 in component params_BG (fmol).
C CONSTS(15) is K_4 in component params_BG (per_fmol).
C CONSTS(16) is q_init_4 in component params_BG (fmol).
C CONSTS(17) is kappa_r1 in component params_BG (fmol_per_s).
C CONSTS(18) is kappa_r2 in component params_BG (fmol_per_s).
C CONSTS(19) is kappa_r3 in component params_BG (fmol_per_s).
C CONSTS(20) is kappa_r4 in component params_BG (fmol_per_s).
C CONSTS(39) is mu_Hi in component BG_Hpump (J_per_mol).
C CONSTS(36) is mu_Ho in component BG_Hpump (J_per_mol).
C CONSTS(42) is mu_Pi in component BG_Hpump (J_per_mol).
C CONSTS(45) is mu_ATPi in component BG_Hpump (J_per_mol).
C CONSTS(48) is mu_ADPi in component BG_Hpump (J_per_mol).
C ALGBRC(1) is mu_1 in component BG_Hpump (J_per_mol).
C ALGBRC(19) is v_1 in component BG_Hpump (fmol_per_s).
C ALGBRC(2) is mu_2 in component BG_Hpump (J_per_mol).
C ALGBRC(11) is v_2 in component BG_Hpump (fmol_per_s).
C ALGBRC(3) is mu_3 in component BG_Hpump (J_per_mol).
C ALGBRC(15) is v_3 in component BG_Hpump (fmol_per_s).
C ALGBRC(4) is mu_4 in component BG_Hpump (J_per_mol).
C ALGBRC(20) is v_4 in component BG_Hpump (fmol_per_s).
C ALGBRC(5) is A_f_r1 in component BG_Hpump (J_per_mol).
C ALGBRC(7) is v_r1 in component BG_Hpump (fmol_per_s).
C ALGBRC(6) is A_r_r1 in component BG_Hpump (J_per_mol).
C ALGBRC(8) is A_f_r2 in component BG_Hpump (J_per_mol).
C ALGBRC(10) is v_r2 in component BG_Hpump (fmol_per_s).
C ALGBRC(9) is A_r_r2 in component BG_Hpump (J_per_mol).
C ALGBRC(12) is A_f_r3 in component BG_Hpump (J_per_mol).
C ALGBRC(14) is v_r3 in component BG_Hpump (fmol_per_s).
C ALGBRC(13) is A_r_r3 in component BG_Hpump (J_per_mol).
C ALGBRC(16) is A_f_r4 in component BG_Hpump (J_per_mol).
C ALGBRC(18) is v_r4 in component BG_Hpump (fmol_per_s).
C ALGBRC(17) is A_r_r4 in component BG_Hpump (J_per_mol).
C CONSTS(38) is q_Hi in component BG_Hpump (fmol).
C CONSTS(35) is q_Ho in component BG_Hpump (fmol).
C CONSTS(41) is q_Pi in component BG_Hpump (fmol).
C CONSTS(44) is q_ATPi in component BG_Hpump (fmol).
C CONSTS(47) is q_ADPi in component BG_Hpump (fmol).
C STATES(1) is q_1 in component BG_Hpump (fmol).
C STATES(2) is q_2 in component BG_Hpump (fmol).
C STATES(3) is q_3 in component BG_Hpump (fmol).
C STATES(4) is q_4 in component BG_Hpump (fmol).
C CONSTS(21) is z_zr1 in component params_BG (dimensionless).
C CONSTS(22) is z_zr2 in component params_BG (dimensionless).
C CONSTS(32) is mu_zr1 in component BG_Hpump (J_per_mol).
C CONSTS(33) is mu_zr2 in component BG_Hpump (J_per_mol).
C CONSTS(31) is V_Vm in component BG_Hpump (volt).
C CONSTS(23) is V_E in component params_BG (volt).
C CONSTS(24) is V_i in component params_BG (pL).
C CONSTS(25) is H_i in component params_BG (mM).
C CONSTS(26) is H_o in component params_BG (mM).
C CONSTS(27) is Pi_i in component params_BG (mM).
C CONSTS(28) is ATP_i in component params_BG (mM).
C CONSTS(29) is ADP_i in component params_BG (mM).
C CONSTS(30) is V_o in component params_BG (pL).
C RATES(1) is d/dt q_1 in component BG_Hpump (fmol).
C RATES(2) is d/dt q_2 in component BG_Hpump (fmol).
C RATES(3) is d/dt q_3 in component BG_Hpump (fmol).
C RATES(4) is d/dt q_4 in component BG_Hpump (fmol).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
CONSTS(1) = 8.31
CONSTS(2) = 273.15
CONSTS(3) = 96485
CONSTS(4) = 1
CONSTS(5) = 1
CONSTS(6) = 1
CONSTS(7) = 1
CONSTS(8) = 1
CONSTS(9) = 1
CONSTS(10) = 1
CONSTS(11) = 1
CONSTS(12) = 1
CONSTS(13) = 1
CONSTS(14) = 1
CONSTS(15) = 1
CONSTS(16) = 1
CONSTS(17) = 1
CONSTS(18) = 1
CONSTS(19) = 1
CONSTS(20) = 1
CONSTS(21) = 1
CONSTS(22) = 1
CONSTS(23) = -0.05
CONSTS(24) = 0.09
CONSTS(25) = 1
CONSTS(26) = 1e-5
CONSTS(27) = 1e-5
CONSTS(28) = 1e-5
CONSTS(29) = 1e-5
CONSTS(30) = 0.09
CONSTS(31) = CONSTS(23)
CONSTS(32) = CONSTS(21)*CONSTS(3)*CONSTS(31)
CONSTS(33) = CONSTS(22)*CONSTS(3)*CONSTS(31)
CONSTS(34) = CONSTS(26)*CONSTS(30)
CONSTS(35) = CONSTS(34)
CONSTS(36) = CONSTS(1)*CONSTS(2)*log( CONSTS(5)*CONSTS(35))
CONSTS(37) = CONSTS(25)*CONSTS(24)
CONSTS(38) = CONSTS(37)
CONSTS(39) = CONSTS(1)*CONSTS(2)*log( CONSTS(4)*CONSTS(38))
CONSTS(40) = CONSTS(27)*CONSTS(24)
CONSTS(41) = CONSTS(40)
CONSTS(42) = CONSTS(1)*CONSTS(2)*log( CONSTS(6)*CONSTS(41))
CONSTS(43) = CONSTS(28)*CONSTS(24)
CONSTS(44) = CONSTS(43)
CONSTS(45) = CONSTS(1)*CONSTS(2)*log( CONSTS(7)*CONSTS(44))
CONSTS(46) = CONSTS(29)*CONSTS(24)
CONSTS(47) = CONSTS(46)
CONSTS(48) = CONSTS(1)*CONSTS(2)*log( CONSTS(8)*CONSTS(47))
STATES(1) = CONSTS(10)
STATES(2) = CONSTS(12)
STATES(3) = CONSTS(14)
STATES(4) = CONSTS(16)
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = CONSTS(1)*CONSTS(2)*log( CONSTS(9)*STATES(1))
ALGBRC(5) = ALGBRC(1)
ALGBRC(2) = CONSTS(1)*CONSTS(2)*log( CONSTS(11)*STATES(2))
ALGBRC(6) = ALGBRC(2)+CONSTS(42)
ALGBRC(7) = CONSTS(17)*(EXP(ALGBRC(5)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(6)/( CONSTS(1)*CONSTS(2))))
ALGBRC(8) = ALGBRC(2)+CONSTS(45)
ALGBRC(3) = CONSTS(1)*CONSTS(2)*log( CONSTS(13)*STATES(3))
ALGBRC(9) = ALGBRC(3)
ALGBRC(10) = CONSTS(18)*(EXP(ALGBRC(8)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(9)/( CONSTS(1)*CONSTS(2))))
ALGBRC(11) = ALGBRC(7) - ALGBRC(10)
RATES(2) = ALGBRC(11)
ALGBRC(12) = ALGBRC(3)+CONSTS(39)
ALGBRC(4) = CONSTS(1)*CONSTS(2)*log( CONSTS(15)*STATES(4))
ALGBRC(13) = ALGBRC(4)+CONSTS(48)+CONSTS(32)
ALGBRC(14) = CONSTS(19)*(EXP(ALGBRC(12)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(13)/( CONSTS(1)*CONSTS(2))))
ALGBRC(15) = ALGBRC(10) - ALGBRC(14)
RATES(3) = ALGBRC(15)
ALGBRC(16) = ALGBRC(4)
ALGBRC(17) = ALGBRC(1)+CONSTS(36)+CONSTS(33)
ALGBRC(18) = CONSTS(20)*(EXP(ALGBRC(16)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(17)/( CONSTS(1)*CONSTS(2))))
ALGBRC(19) = ALGBRC(18) - ALGBRC(7)
RATES(1) = ALGBRC(19)
ALGBRC(20) = ALGBRC(14) - ALGBRC(18)
RATES(4) = ALGBRC(20)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = CONSTS(1)*CONSTS(2)*log( CONSTS(9)*STATES(1))
ALGBRC(5) = ALGBRC(1)
ALGBRC(2) = CONSTS(1)*CONSTS(2)*log( CONSTS(11)*STATES(2))
ALGBRC(6) = ALGBRC(2)+CONSTS(42)
ALGBRC(7) = CONSTS(17)*(EXP(ALGBRC(5)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(6)/( CONSTS(1)*CONSTS(2))))
ALGBRC(8) = ALGBRC(2)+CONSTS(45)
ALGBRC(3) = CONSTS(1)*CONSTS(2)*log( CONSTS(13)*STATES(3))
ALGBRC(9) = ALGBRC(3)
ALGBRC(10) = CONSTS(18)*(EXP(ALGBRC(8)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(9)/( CONSTS(1)*CONSTS(2))))
ALGBRC(11) = ALGBRC(7) - ALGBRC(10)
ALGBRC(12) = ALGBRC(3)+CONSTS(39)
ALGBRC(4) = CONSTS(1)*CONSTS(2)*log( CONSTS(15)*STATES(4))
ALGBRC(13) = ALGBRC(4)+CONSTS(48)+CONSTS(32)
ALGBRC(14) = CONSTS(19)*(EXP(ALGBRC(12)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(13)/( CONSTS(1)*CONSTS(2))))
ALGBRC(15) = ALGBRC(10) - ALGBRC(14)
ALGBRC(16) = ALGBRC(4)
ALGBRC(17) = ALGBRC(1)+CONSTS(36)+CONSTS(33)
ALGBRC(18) = CONSTS(20)*(EXP(ALGBRC(16)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(17)/( CONSTS(1)*CONSTS(2))))
ALGBRC(19) = ALGBRC(18) - ALGBRC(7)
ALGBRC(20) = ALGBRC(14) - ALGBRC(18)
RETURN
END
