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 4 entries in each of the rate and state variable arrays.
C There are a total of 11 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C CONSTS(1) is sigma in component parameters (dm).
C CONSTS(2) is CNG_tot in component parameters (mole_per_dm_squared).
C CONSTS(3) is CaM_tot in component parameters (mole_per_dm_cubed).
C CONSTS(4) is km_CNG_0 in component parameters (per_second).
C CONSTS(5) is km_CaM4 in component parameters (per_second).
C CONSTS(6) is kp_CaM4 in component parameters (dm_6_per_second_per_mole_squared).
C CONSTS(7) is kp_CNG_i in component parameters (dm_3_per_second_per_mole).
C CONSTS(8) is km_CNG_i in component parameters (per_second).
C CONSTS(9) is i_Ca in component parameters (per_second).
C CONSTS(10) is k_Ca in component parameters (mole_per_dm_squared_per_second).
C CONSTS(11) is K_Ca in component parameters (mole_per_dm_cubed).
C ALGBRC(1) is kp_act in component parameters (per_second).
C STATES(1) is CNG_o in component dCNG_o_dt (mole_per_dm_squared).
C ALGBRC(2) is CNG_o_normalized in component dCNG_o_dt (dimensionless).
C STATES(2) is CNG_i in component dCNG_i_dt (mole_per_dm_squared).
C STATES(3) is CaM4 in component dCaM4_dt (mole_per_dm_cubed).
C STATES(4) is Ca in component dCa_dt (mole_per_dm_cubed).
C ALGBRC(3) is Ca_normalized in component dCa_dt (dimensionless).
C ALGBRC(4) is CaM4_normalized in component dCaM4_dt (dimensionless).
C ALGBRC(5) is CNG_i_normalized in component dCNG_i_dt (dimensionless).
C ALGBRC(6) is CNG_c in component dCNG_c_dt (mole_per_dm_squared).
C ALGBRC(7) is CaM in component dCaM_dt (mole_per_dm_cubed).
C RATES(1) is d/dt CNG_o in component dCNG_o_dt (mole_per_dm_squared).
C RATES(4) is d/dt Ca in component dCa_dt (mole_per_dm_cubed).
C RATES(3) is d/dt CaM4 in component dCaM4_dt (mole_per_dm_cubed).
C RATES(2) is d/dt CNG_i in component dCNG_i_dt (mole_per_dm_squared).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
CONSTS(1) = 5e-7
CONSTS(2) = 1.3e-13
CONSTS(3) = 2e-5
CONSTS(4) = 1e-2
CONSTS(5) = 2.5
CONSTS(6) = 1.1e9
CONSTS(7) = 2.1e6
CONSTS(8) = 3.4e-1
CONSTS(9) = 2e4
CONSTS(10) = 1e-10
CONSTS(11) = 1.2e-7
STATES(1) = 0
STATES(2) = 0
STATES(3) = 0
STATES(4) = 0
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
RATES(4) = ( (STATES(1)/CONSTS(1))*CONSTS(9) - ( (CONSTS(10)/CONSTS(1))*STATES(4))/(STATES(4)+CONSTS(11))) - 4.00000*( CONSTS(6)*STATES(4) ** 2.00000*((CONSTS(3) - STATES(3)) - STATES(2)/CONSTS(1)) - CONSTS(5)*STATES(3))
RATES(3) = (( CONSTS(6)*STATES(4) ** 2.00000*((CONSTS(3) - STATES(3)) - STATES(2)/CONSTS(1)) - CONSTS(5)*STATES(3)) - (CONSTS(7)/CONSTS(1))*STATES(3)*(CONSTS(2) - STATES(1)))+ (CONSTS(8)/CONSTS(1))*STATES(2)
RATES(2) = - CONSTS(8)*STATES(2)+ CONSTS(7)*STATES(3)*(CONSTS(2) - STATES(2))
ALGBRC(1) = TERNRY(VOI.GT.0.100000.AND.VOI.LT.0.200000, 5.50000, TERNRY(VOI.GT.4.10000.AND.VOI.LT.4.20000, 5.50000, 1.60000e-05)
RATES(1) = ( ALGBRC(1)*((CONSTS(2) - STATES(1)) - STATES(2)) - CONSTS(4)*STATES(1)) - CONSTS(7)*STATES(1)*STATES(3)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = TERNRY(VOI.GT.0.100000.AND.VOI.LT.0.200000, 5.50000, TERNRY(VOI.GT.4.10000.AND.VOI.LT.4.20000, 5.50000, 1.60000e-05)
ALGBRC(2) = STATES(1)/CONSTS(2)
ALGBRC(3) = STATES(4)*10000.0
ALGBRC(4) = STATES(3)/CONSTS(3)
ALGBRC(5) = STATES(2)/CONSTS(2)
ALGBRC(6) = (CONSTS(2) - STATES(1)) - STATES(2)
ALGBRC(7) = (CONSTS(3) - STATES(3)) - (1.00000/CONSTS(1))*STATES(2)
RETURN
END
REAL FUNCTION TERNRY(TEST, VALA, VALB)
LOGICAL TEST
REAL VALA, VALB
IF (TEST) THEN
TERNRY = VALA
ELSE
TERNRY = VALB
ENDIF
RETURN
END
