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 1 entries in each of the rate and state variable arrays.
C There are a total of 25 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C CONSTS(1) is Na_ext in component concentrations (mM).
C CONSTS(2) is Na_int in component concentrations (mM).
C CONSTS(3) is H_ext in component concentrations (mM).
C CONSTS(4) is H_int in component concentrations (mM).
C STATES(1) is NH4_ext in component concentrations (mM).
C CONSTS(5) is NH4_int in component concentrations (mM).
C ALGBRC(3) is J_NHE3_Na in component NHE3 (mM_per_s).
C ALGBRC(4) is J_NHE3_H in component NHE3 (mM_per_s).
C ALGBRC(5) is J_NHE3_NH4 in component NHE3 (mM_per_s).
C CONSTS(24) is J_NHE3_Na_Max in component NHE3 (mM_per_s).
C ALGBRC(6) is plot in component fluxes (mM).
C CONSTS(6) is x_T in component NHE3 (mM).
C ALGBRC(2) is sigma in component NHE3 (per_s).
C CONSTS(21) is P_Na in component NHE3 (per_s).
C CONSTS(22) is P_H in component NHE3 (per_s).
C CONSTS(23) is P_NH4 in component NHE3 (per_s).
C CONSTS(7) is P0_Na in component NHE3 (per_s).
C CONSTS(8) is P0_H in component NHE3 (per_s).
C CONSTS(9) is P0_NH4 in component NHE3 (per_s).
C CONSTS(10) is K_Na in component NHE3 (mM).
C CONSTS(11) is K_H in component NHE3 (mM).
C CONSTS(12) is K_NH4 in component NHE3 (mM).
C CONSTS(13) is K_I in component NHE3 (mM).
C CONSTS(14) is f_m in component NHE3 (dimensionless).
C CONSTS(15) is f_M in component NHE3 (dimensionless).
C CONSTS(16) is alpha_ext_Na in component NHE3 (dimensionless).
C CONSTS(17) is alpha_int_Na in component NHE3 (dimensionless).
C CONSTS(18) is beta_ext_H in component NHE3 (dimensionless).
C CONSTS(19) is beta_int_H in component NHE3 (dimensionless).
C ALGBRC(1) is gamma_ext_NH4 in component NHE3 (dimensionless).
C CONSTS(20) is gamma_int_NH4 in component NHE3 (dimensionless).
C RATES(1) is d/dt NH4_ext in component concentrations (mM).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 0.1
      CONSTS(2) = 0.0
      CONSTS(3) = 3.1623e-5
      CONSTS(4) = 1.0e-3
      STATES(1) = 1.0
      CONSTS(5) = 0.0
      CONSTS(6) = 1.0
      CONSTS(7) = 1.6e-3
      CONSTS(8) = 0.48e-3
      CONSTS(9) = 1.6e-3
      CONSTS(10) = 30.0
      CONSTS(11) = 72e-6
      CONSTS(12) = 27.0
      CONSTS(13) = 1.0e-6
      CONSTS(14) = 0.0
      CONSTS(15) = 2.0
      CONSTS(16) = CONSTS(1)/CONSTS(10)
      CONSTS(24) = 39.0000
      CONSTS(17) = CONSTS(2)/CONSTS(10)
      CONSTS(18) = CONSTS(3)/CONSTS(11)
      CONSTS(19) = CONSTS(4)/CONSTS(11)
      CONSTS(20) = CONSTS(5)/CONSTS(12)
      CONSTS(21) = ( CONSTS(7)*( CONSTS(15)*CONSTS(4)+ CONSTS(14)*CONSTS(13)))/(CONSTS(4)+CONSTS(13))
      CONSTS(22) = ( CONSTS(8)*( CONSTS(15)*CONSTS(4)+ CONSTS(14)*CONSTS(13)))/(CONSTS(4)+CONSTS(13))
      CONSTS(23) = ( CONSTS(9)*( CONSTS(15)*CONSTS(4)+ CONSTS(14)*CONSTS(13)))/(CONSTS(4)+CONSTS(13))
      CONSTS(24) = ( CONSTS(6)*CONSTS(21)*CONSTS(22))/(CONSTS(21)+CONSTS(22))
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = CONSTS(24)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = STATES(1)/CONSTS(12)
      ALGBRC(2) =  (1.00000+CONSTS(16)+CONSTS(18)+ALGBRC(1))*( CONSTS(21)*CONSTS(17)+ CONSTS(22)*CONSTS(19)+ CONSTS(23)*CONSTS(20))+ (1.00000+CONSTS(17)+CONSTS(19)+CONSTS(20))*( CONSTS(21)*CONSTS(16)+ CONSTS(22)*CONSTS(18)+ CONSTS(23)*ALGBRC(1))
      ALGBRC(3) =  (CONSTS(6)/ALGBRC(2))*( CONSTS(21)*CONSTS(22)*( CONSTS(17)*CONSTS(18) -  CONSTS(16)*CONSTS(19))+ CONSTS(21)*CONSTS(23)*( CONSTS(17)*ALGBRC(1) -  CONSTS(16)*CONSTS(20)))
      ALGBRC(4) =  (CONSTS(6)/ALGBRC(2))*( CONSTS(21)*CONSTS(22)*( CONSTS(16)*CONSTS(19) -  CONSTS(17)*CONSTS(18))+ CONSTS(22)*CONSTS(23)*( CONSTS(19)*ALGBRC(1) -  CONSTS(18)*CONSTS(20)))
      ALGBRC(5) =  (CONSTS(6)/ALGBRC(2))*( CONSTS(21)*CONSTS(23)*( CONSTS(16)*CONSTS(20) -  CONSTS(17)*ALGBRC(1))+ CONSTS(22)*CONSTS(23)*( CONSTS(18)*CONSTS(20) -  ALGBRC(1)*CONSTS(19)))
      ALGBRC(6) = - 1.00000/(ALGBRC(3)/CONSTS(24))
      RETURN
      END