Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | GeneratorNum | |||
real(kind=r64), | intent(in) | :: | FluidTemp | |||
real(kind=r64), | intent(out) | :: | Cp |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE FigureHXleavingGasHeatCap(GeneratorNum, FluidTemp, Cp)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Aug. 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
INTEGER, INTENT(IN) :: GeneratorNum ! ID of generator FuelCell data structure
REAL(r64), INTENT(IN) :: FluidTemp ! degree C
REAL(r64), INTENT(OUT) :: Cp ! (J/mol*K)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: Tsho ! temp for Shomate eq in (Kelvin/1000)
REAL(r64) :: Tkel ! temp for NASA eq. in Kelvin
REAL(r64) :: tempCp
INTEGER :: thisConstit !loop index
INTEGER :: gasID !look up into Gas structure
REAL(r64) :: A ! shomate coeff
REAL(r64) :: B ! shomate coeff
REAL(r64) :: C ! shomate coeff
REAL(r64) :: D ! shomate coeff
REAL(r64) :: E ! shomate coeff
REAL(r64) :: A1 ! NASA poly coeff
REAL(r64) :: A2 ! NASA poly coeff
REAL(r64) :: A3 ! NASA poly coeff
REAL(r64) :: A4 ! NASA poly coeff
REAL(r64) :: A5 ! NASA poly coeff
Tsho = (FluidTemp +KelvinConv) / 1000.0d0
Tkel = (FluidTemp +KelvinConv)
! loop through fuel constituents and sum up Cp
tempCp = 0.0d0
DO thisConstit=1, Size(FuelCell(GeneratorNum)%ExhaustHX%GasLibID)
gasID = FuelCell(GeneratorNum)%ExhaustHX%GasLibID(thisConstit)
IF (gasID > 0) THEN
IF (GasPhaseThermoChemistryData(gasID)%ThermoMode == NISTShomate) THEN
A = GasPhaseThermoChemistryData(gasID)%ShomateA
B = GasPhaseThermoChemistryData(gasID)%ShomateB
C = GasPhaseThermoChemistryData(gasID)%ShomateC
D = GasPhaseThermoChemistryData(gasID)%ShomateD
E = GasPhaseThermoChemistryData(gasID)%ShomateE
tempCp = tempCp + ((A + B*Tsho + C*Tsho**2 + D*Tsho**3 + E/(Tsho**2)) &
* FuelCell(GeneratorNum)%ExhaustHX%ConstitMolalFract(thisConstit))
ENDIF
IF (GasPhaseThermoChemistryData(gasID)%ThermoMode == NASAPolynomial) THEN
A1 = GasPhaseThermoChemistryData(gasID)%NASA_A1
A2 = GasPhaseThermoChemistryData(gasID)%NASA_A2
A3 = GasPhaseThermoChemistryData(gasID)%NASA_A3
A4 = GasPhaseThermoChemistryData(gasID)%NASA_A4
A5 = GasPhaseThermoChemistryData(gasID)%NASA_A5
tempCp = tempCp + (A1 + A2*Tkel + A3*Tkel**2 + A4*Tkel**3 + A5*Tkel**4)*RinKJperMolpK &
* FuelCell(GeneratorNum)%ExhaustHX%ConstitMolalFract(thisConstit)
ENDIF
ENDIF
ENDDO
Cp = tempCp
RETURN
END SUBROUTINE FigureHXleavingGasHeatCap