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 0 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 19 entries in the constant variable array.
C
C
C VOI is time in component environment (minute).
C CONSTS(1) is ADHC in component thirst_drinking_and_salt_appetite (dimensionless).
C CONSTS(2) is ANM in component thirst_drinking_and_salt_appetite (dimensionless).
C CONSTS(3) is POT in component thirst_drinking_and_salt_appetite (mmHg).
C CONSTS(13) is STH in component effect_of_salt_appetite_stimulation_on_thirst (dimensionless).
C CONSTS(4) is ANMSLT in component parameter_values (dimensionless).
C CONSTS(5) is Z10 in component parameter_values (mmHg).
C CONSTS(6) is Z11 in component parameter_values (per_mmHg2).
C CONSTS(11) is ANMSML in component effect_of_salt_appetite_stimulation_on_thirst (dimensionless).
C CONSTS(12) is STH1 in component effect_of_salt_appetite_stimulation_on_thirst (dimensionless).
C CONSTS(14) is AHCM in component effect_of_antidiuretic_hormone_on_thirst (dimensionless).
C CONSTS(7) is AHTHM in component parameter_values (dimensionless).
C CONSTS(15) is ANMTH in component effect_of_angiotensin_on_thirst (dimensionless).
C CONSTS(8) is ANMTM in component parameter_values (dimensionless).
C STATES(1) is TVD in component rate_of_fluid_intake (L_per_minute).
C CONSTS(9) is DR in component parameter_values (L_per_minute).
C CONSTS(10) is TVDDL in component parameter_values (minute).
C CONSTS(17) is AHTH in component rate_of_fluid_intake (dimensionless).
C CONSTS(16) is AHTH1 in component rate_of_fluid_intake (dimensionless).
C CONSTS(19) is TVZ in component rate_of_fluid_intake (L_per_minute).
C CONSTS(18) is TVZ1 in component rate_of_fluid_intake (L_per_minute).
C RATES(1) is d/dt TVD in component rate_of_fluid_intake (L_per_minute).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 1.0
      CONSTS(2) = 0.987545
      CONSTS(3) = 35.1148
      CONSTS(4) = 2
      CONSTS(5) = 45
      CONSTS(6) = 0.01
      CONSTS(7) = 2
      CONSTS(8) = 1.5
      STATES(1) = 0.000980838
      CONSTS(9) = 0
      CONSTS(10) = 30
      CONSTS(11) =  (CONSTS(2) - 1.00000)*CONSTS(4)+1.00000
      CONSTS(12) =  CONSTS(5) - CONSTS(3) ** 2.00000*CONSTS(6)*CONSTS(11)
      CONSTS(13) = TERNRY(CONSTS(12).LT.0.800000, 0.800000, TERNRY(CONSTS(12).GT.8.00000, 8.00000, CONSTS(12))
      CONSTS(14) =  (CONSTS(1) - 1.00000)*CONSTS(7)+1.00000
      CONSTS(15) =  (CONSTS(2) - 1.00000)*CONSTS(8)*0.00100000
      CONSTS(16) =  CONSTS(14)*CONSTS(13)*0.00100000
      CONSTS(17) = TERNRY(CONSTS(16).LT.0.00000, 0.00000, CONSTS(16))
      CONSTS(18) =  (CONSTS(15)+CONSTS(17))*1.00000
      CONSTS(19) = TERNRY(CONSTS(18).LT.0.00000, 0.00000, CONSTS(18))
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = ((CONSTS(19)+CONSTS(9)) - STATES(1))/CONSTS(10)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END