Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | TprodGas | |||
real(kind=r64), | intent(in), | optional | Dimension(:) | :: | Par |
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.
FUNCTION FuelCellProductGasEnthResidual(TprodGas, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Brent Griffith NREL
! DATE WRITTEN Aug 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Provide function for call to regula falsi search
! Search for an product gas stream temperature that provides a
! certain enthaply. (enthalpy is based on Shomate and can't be inverted)
! METHODOLOGY EMPLOYED:
! Calculates residual function for product gas enthalpy
! calls procedure FigureProductGasesEnthalpy
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: TprodGas ! temperature, this is "x" being searched
REAL(r64), INTENT(IN), Dimension(:), optional :: Par ! par(1) = Generator Number
! par(2) = Desired Enthalpy
REAL(r64) :: Residuum ! F(x)
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
Integer :: GeneratorNum
REAL(r64) :: thisHmolalProdGases
REAL(r64) :: desiredHprodGases
REAL(r64) :: NdotProdGases
GeneratorNum = floor(PAR(1))
desiredHprodGases = PAR(2)
NdotProdGases = PAR(3)
Call FigureProductGasesEnthalpy(GeneratorNum, TprodGas, thisHmolalProdGases)
Residuum = (thisHmolalProdGases * NdotProdGases * 1000000.0d0) - desiredHprodGases
RETURN
END FUNCTION FuelCellProductGasEnthResidual