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 4 entries in each of the rate and state variable arrays. C There are a total of 17 entries in the constant variable array. C C C VOI is time in component environment (minute). C CONSTS(1) is AMK in component electrolytes (dimensionless). C CONSTS(2) is TVD in component electrolytes (L_per_minute). C CONSTS(3) is NOD in component electrolytes (monovalent_mEq_per_minute). C CONSTS(4) is STH in component electrolytes (dimensionless). C CONSTS(5) is KOD in component electrolytes (monovalent_mEq_per_minute). C CONSTS(6) is VUD in component electrolytes (L_per_minute). C ALGBRC(4) is VEC in component extracellular_fluid_volume (litre). C ALGBRC(5) is CNA in component extracellular_Na_concentration (monovalent_mEq_per_litre). C CONSTS(7) is NID in component parameter_values (monovalent_mEq_per_minute). C CONSTS(8) is TRPL in component parameter_values (L_per_minute). C CONSTS(12) is NED in component extracellular_Na_concentration (monovalent_mEq_per_minute). C STATES(1) is NAE in component extracellular_Na_concentration (monovalent_mEq). C CONSTS(13) is AMK1 in component aldosterone_effect_on_cellular_K_distribution (dimensionless). C CONSTS(9) is ALCLK in component parameter_values (dimensionless). C ALGBRC(6) is CKE in component extracellular_K_concentration (monovalent_mEq_per_litre). C ALGBRC(1) is KE in component extracellular_K_concentration (monovalent_mEq). C STATES(2) is KTOT in component extracellular_K_concentration (monovalent_mEq). C CONSTS(10) is KID in component parameter_values (monovalent_mEq_per_minute). C CONSTS(14) is KTOTD in component extracellular_K_concentration (monovalent_mEq_per_minute). C STATES(3) is VIC in component intracellular_fluid_volume (litre). C ALGBRC(3) is CKI in component intracellular_K_concentration (monovalent_mEq_per_litre). C ALGBRC(2) is KI in component intracellular_K_concentration (monovalent_mEq). C ALGBRC(8) is VID in component intracellular_fluid_volume (L_per_minute). C CONSTS(11) is VIDML in component parameter_values (litre2_per_monovalent_mEq_per_minute). C ALGBRC(7) is CCD in component intracellular_fluid_volume (monovalent_mEq_per_litre). C STATES(4) is VTW in component total_body_water (litre). C RATES(1) is d/dt NAE in component extracellular_Na_concentration (monovalent_mEq). C RATES(2) is d/dt KTOT in component extracellular_K_concentration (monovalent_mEq). C RATES(3) is d/dt VIC in component intracellular_fluid_volume (litre). C RATES(4) is d/dt VTW in component total_body_water (litre). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 1.037 CONSTS(2) = 0.000980838 CONSTS(3) = 0.0959449 CONSTS(4) = 0.977181 CONSTS(5) = 0.0804374 CONSTS(6) = 0.000989 CONSTS(7) = 0.1 CONSTS(8) = 0 STATES(1) = 2109.91 CONSTS(9) = 0.3 STATES(2) = 3622.54 CONSTS(10) = 0.08 STATES(3) = 25.0404 CONSTS(11) = 0.01 STATES(4) = 39.8952 CONSTS(12) = ( CONSTS(7)*CONSTS(4) - CONSTS(3))+ CONSTS(8)*142.000 CONSTS(13) = (CONSTS(1) - 1.00000)*CONSTS(9)+1.00000 CONSTS(14) = CONSTS(10) - CONSTS(5) CONSTS(14) = CONSTS(2) - CONSTS(6) CONSTS(15) = CONSTS(12) CONSTS(16) = CONSTS(14) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(4) = CONSTS(14) RATES(1) = CONSTS(15) RATES(2) = CONSTS(16) ALGBRC(4) = STATES(4) - STATES(3) ALGBRC(5) = STATES(1)/ALGBRC(4) ALGBRC(1) = (STATES(2) - 3000.00)/( CONSTS(13)*9.33330) ALGBRC(2) = STATES(2) - ALGBRC(1) ALGBRC(3) = ALGBRC(2)/STATES(3) ALGBRC(7) = ALGBRC(3) - ALGBRC(5) ALGBRC(8) = ALGBRC(7)*CONSTS(11) RATES(3) = ALGBRC(8) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(4) = STATES(4) - STATES(3) ALGBRC(5) = STATES(1)/ALGBRC(4) ALGBRC(1) = (STATES(2) - 3000.00)/( CONSTS(13)*9.33330) ALGBRC(2) = STATES(2) - ALGBRC(1) ALGBRC(3) = ALGBRC(2)/STATES(3) ALGBRC(7) = ALGBRC(3) - ALGBRC(5) ALGBRC(8) = ALGBRC(7)*CONSTS(11) ALGBRC(6) = ALGBRC(1)/ALGBRC(4) RETURN END