*DECK THMCCD
      REAL FUNCTION THMCCD(TEMP,POROS,FRACPU)
*
*-----------------------------------------------------------------------
*
*Purpose:
* compute the product of the heat capacity of fuel (in J/Kg/K) times
* its density (in Kg/m^3).
*
*Copyright:
* Copyright (C) 2012 Ecole Polytechnique de Montreal.
*
*Author(s): A. Hebert
*
*Parameters: input
* TEMP    fuel temperature in Celsius.
* POROS   oxyde porosity.
* FRACPU  Plutonium mass fraction in fuel.
* 
*Parameters: output
* THMCCD  product of the heat capacity of fuel times its density
*         (in J/K/m^3).
*         
*-----------------------------------------------------------------------
*
      IMPLICIT NONE
*----
*  SUBROUTINE ARGUMENTS
*----
      REAL TEMP,POROS,FRACPU
*----
*  LOCAL VARIABLES
*  CP:    heat capacity in J/Kg/K
*  DENS0: fuel density with zero porosity
*  ROURA: Uranium density in Kg/m^3
*  ROPLU: Plutonium density in Kg/m^3
*----
      REAL CP,DENS0,RO,ROURA,ROPLU
      PARAMETER (ROURA=10960.0,ROPLU=11460.0)
*
      CP=277.28+0.052756*TEMP
      IF(FRACPU.EQ.0.0) THEN
*        UOX
         RO=(1.0-POROS)*ROURA
      ELSE
*        MOX
         DENS0=100.0/((FRACPU/ROPLU)+((100.0-FRACPU)/ROURA))
         RO=(1.-POROS)*DENS0
      ENDIF
      THMCCD=RO*CP
      RETURN
      END
