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 51 entries in the constant variable array.
C
C
C VOI is t in component BG_HKE (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 K_Ki in component params_BG (per_fmol).
C CONSTS(4) is K_Ko in component params_BG (per_fmol).
C CONSTS(5) is K_Pi in component params_BG (per_fmol).
C CONSTS(6) is K_ATPi in component params_BG (per_fmol).
C CONSTS(7) is K_Hi in component params_BG (per_fmol).
C CONSTS(8) is K_Ho in component params_BG (per_fmol).
C CONSTS(9) is K_ADPi in component params_BG (per_fmol).
C CONSTS(34) is q_init_Ki in component params_BG (fmol).
C CONSTS(31) is q_init_Ko in component params_BG (fmol).
C CONSTS(37) is q_init_Pi in component params_BG (fmol).
C CONSTS(40) is q_init_ATPi in component params_BG (fmol).
C CONSTS(43) is q_init_Hi in component params_BG (fmol).
C CONSTS(46) is q_init_Ho in component params_BG (fmol).
C CONSTS(49) is q_init_ADPi in component params_BG (fmol).
C CONSTS(10) is K_1 in component params_BG (per_fmol).
C CONSTS(11) is q_init_1 in component params_BG (fmol).
C CONSTS(12) is K_2 in component params_BG (per_fmol).
C CONSTS(13) is q_init_2 in component params_BG (fmol).
C CONSTS(14) is K_3 in component params_BG (per_fmol).
C CONSTS(15) is q_init_3 in component params_BG (fmol).
C CONSTS(16) is K_4 in component params_BG (per_fmol).
C CONSTS(17) is q_init_4 in component params_BG (fmol).
C CONSTS(18) is kappa_r1 in component params_BG (fmol_per_s).
C CONSTS(19) is kappa_r2 in component params_BG (fmol_per_s).
C CONSTS(20) is kappa_r3 in component params_BG (fmol_per_s).
C CONSTS(21) is kappa_r4 in component params_BG (fmol_per_s).
C CONSTS(36) is mu_Ki in component BG_HKE (J_per_mol).
C CONSTS(33) is mu_Ko in component BG_HKE (J_per_mol).
C CONSTS(39) is mu_Pi in component BG_HKE (J_per_mol).
C CONSTS(42) is mu_ATPi in component BG_HKE (J_per_mol).
C CONSTS(45) is mu_Hi in component BG_HKE (J_per_mol).
C CONSTS(48) is mu_Ho in component BG_HKE (J_per_mol).
C CONSTS(51) is mu_ADPi in component BG_HKE (J_per_mol).
C ALGBRC(1) is mu_1 in component BG_HKE (J_per_mol).
C ALGBRC(19) is v_1 in component BG_HKE (fmol_per_s).
C ALGBRC(2) is mu_2 in component BG_HKE (J_per_mol).
C ALGBRC(11) is v_2 in component BG_HKE (fmol_per_s).
C ALGBRC(3) is mu_3 in component BG_HKE (J_per_mol).
C ALGBRC(15) is v_3 in component BG_HKE (fmol_per_s).
C ALGBRC(4) is mu_4 in component BG_HKE (J_per_mol).
C ALGBRC(20) is v_4 in component BG_HKE (fmol_per_s).
C ALGBRC(5) is A_f_r1 in component BG_HKE (J_per_mol).
C ALGBRC(7) is v_r1 in component BG_HKE (fmol_per_s).
C ALGBRC(6) is A_r_r1 in component BG_HKE (J_per_mol).
C ALGBRC(8) is A_f_r2 in component BG_HKE (J_per_mol).
C ALGBRC(10) is v_r2 in component BG_HKE (fmol_per_s).
C ALGBRC(9) is A_r_r2 in component BG_HKE (J_per_mol).
C ALGBRC(12) is A_f_r3 in component BG_HKE (J_per_mol).
C ALGBRC(14) is v_r3 in component BG_HKE (fmol_per_s).
C ALGBRC(13) is A_r_r3 in component BG_HKE (J_per_mol).
C ALGBRC(16) is A_f_r4 in component BG_HKE (J_per_mol).
C ALGBRC(18) is v_r4 in component BG_HKE (fmol_per_s).
C ALGBRC(17) is A_r_r4 in component BG_HKE (J_per_mol).
C CONSTS(35) is q_Ki in component BG_HKE (fmol).
C CONSTS(32) is q_Ko in component BG_HKE (fmol).
C CONSTS(41) is q_ATPi in component BG_HKE (fmol).
C CONSTS(38) is q_Pi in component BG_HKE (fmol).
C CONSTS(44) is q_Hi in component BG_HKE (fmol).
C CONSTS(47) is q_Ho in component BG_HKE (fmol).
C CONSTS(50) is q_ADPi in component BG_HKE (fmol).
C STATES(1) is q_1 in component BG_HKE (fmol).
C STATES(2) is q_2 in component BG_HKE (fmol).
C STATES(3) is q_3 in component BG_HKE (fmol).
C STATES(4) is q_4 in component BG_HKE (fmol).
C CONSTS(22) is V_i in component params_BG (pL).
C CONSTS(23) is K_i in component params_BG (mM).
C CONSTS(24) is K_o in component params_BG (mM).
C CONSTS(25) is ATPi in component params_BG (mM).
C CONSTS(26) is Hi in component params_BG (mM).
C CONSTS(27) is Ho in component params_BG (mM).
C CONSTS(28) is ADPi in component params_BG (mM).
C CONSTS(29) is Pi 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_HKE (fmol).
C RATES(2) is d/dt q_2 in component BG_HKE (fmol).
C RATES(3) is d/dt q_3 in component BG_HKE (fmol).
C RATES(4) is d/dt q_4 in component BG_HKE (fmol).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 8.31
      CONSTS(2) = 273.15
      CONSTS(3) = 149.65
      CONSTS(4) = 149.65
      CONSTS(5) = 149.65
      CONSTS(6) = 149.65
      CONSTS(7) = 149.65
      CONSTS(8) = 149.65
      CONSTS(9) = 149.65
      CONSTS(10) = 33.20
      CONSTS(11) = 0.0017
      CONSTS(12) = 4.25e+03
      CONSTS(13) = 0.0017
      CONSTS(14) = 344.59
      CONSTS(15) = 0.0017
      CONSTS(16) = 1.99
      CONSTS(17) = 0.0017
      CONSTS(18) = 0.36
      CONSTS(19) = 0.26
      CONSTS(20) = 1.01e+05
      CONSTS(21) = 1.01e+04
      CONSTS(22) = 0.09
      CONSTS(23) = 10
      CONSTS(24) = 1e-5
      CONSTS(25) = 1e-5
      CONSTS(26) = 1e-5
      CONSTS(27) = 1e-5
      CONSTS(28) = 1e-5
      CONSTS(29) = 1e-5
      CONSTS(30) = 0.09
      CONSTS(31) =  CONSTS(24)*CONSTS(30)
      CONSTS(32) = CONSTS(31)
      CONSTS(33) =  CONSTS(1)*CONSTS(2)*log( CONSTS(4)*CONSTS(32))
      CONSTS(34) =  CONSTS(23)*CONSTS(22)
      CONSTS(35) = CONSTS(34)
      CONSTS(36) =  CONSTS(1)*CONSTS(2)*log( CONSTS(3)*CONSTS(35))
      CONSTS(37) =  CONSTS(29)*CONSTS(22)
      CONSTS(38) = CONSTS(37)
      CONSTS(39) =  CONSTS(1)*CONSTS(2)*log( CONSTS(5)*CONSTS(38))
      CONSTS(40) =  CONSTS(25)*CONSTS(22)
      CONSTS(41) = CONSTS(40)
      CONSTS(42) =  CONSTS(1)*CONSTS(2)*log( CONSTS(6)*CONSTS(41))
      CONSTS(43) =  CONSTS(26)*CONSTS(22)
      CONSTS(44) = CONSTS(43)
      CONSTS(45) =  CONSTS(1)*CONSTS(2)*log( CONSTS(7)*CONSTS(44))
      CONSTS(46) =  CONSTS(27)*CONSTS(22)
      CONSTS(47) = CONSTS(46)
      CONSTS(48) =  CONSTS(1)*CONSTS(2)*log( CONSTS(8)*CONSTS(47))
      CONSTS(49) =  CONSTS(28)*CONSTS(22)
      CONSTS(50) = CONSTS(49)
      CONSTS(51) =  CONSTS(1)*CONSTS(2)*log( CONSTS(9)*CONSTS(50))
      STATES(1) = CONSTS(11)
      STATES(2) = CONSTS(13)
      STATES(3) = CONSTS(15)
      STATES(4) = CONSTS(17)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(1)*CONSTS(2)*log( CONSTS(10)*STATES(1))
      ALGBRC(5) = ALGBRC(1)+CONSTS(33)
      ALGBRC(2) =  CONSTS(1)*CONSTS(2)*log( CONSTS(12)*STATES(2))
      ALGBRC(6) = ALGBRC(2)+CONSTS(39)
      ALGBRC(7) =  CONSTS(18)*(EXP(ALGBRC(5)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(6)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(8) = ALGBRC(2)+CONSTS(42)
      ALGBRC(3) =  CONSTS(1)*CONSTS(2)*log( CONSTS(14)*STATES(3))
      ALGBRC(9) = ALGBRC(3)+CONSTS(36)
      ALGBRC(10) =  CONSTS(19)*(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(45)
      ALGBRC(4) =  CONSTS(1)*CONSTS(2)*log( CONSTS(16)*STATES(4))
      ALGBRC(13) = ALGBRC(4)+CONSTS(51)
      ALGBRC(14) =  CONSTS(20)*(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(48)
      ALGBRC(18) =  CONSTS(21)*(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(10)*STATES(1))
      ALGBRC(5) = ALGBRC(1)+CONSTS(33)
      ALGBRC(2) =  CONSTS(1)*CONSTS(2)*log( CONSTS(12)*STATES(2))
      ALGBRC(6) = ALGBRC(2)+CONSTS(39)
      ALGBRC(7) =  CONSTS(18)*(EXP(ALGBRC(5)/( CONSTS(1)*CONSTS(2))) - EXP(ALGBRC(6)/( CONSTS(1)*CONSTS(2))))
      ALGBRC(8) = ALGBRC(2)+CONSTS(42)
      ALGBRC(3) =  CONSTS(1)*CONSTS(2)*log( CONSTS(14)*STATES(3))
      ALGBRC(9) = ALGBRC(3)+CONSTS(36)
      ALGBRC(10) =  CONSTS(19)*(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(45)
      ALGBRC(4) =  CONSTS(1)*CONSTS(2)*log( CONSTS(16)*STATES(4))
      ALGBRC(13) = ALGBRC(4)+CONSTS(51)
      ALGBRC(14) =  CONSTS(20)*(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(48)
      ALGBRC(18) =  CONSTS(21)*(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
Source
Derived from workspace HKE - The Physics of Physiology at changeset 2f86140bdd58.
Collaboration
To begin collaborating on this work, please use your git client and issue this command:
License
The terms of use/license for this work is unspecified.