Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | UA | |||
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 SimpleCoolingCoilUAResidual(UA, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2011
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (Design Coil Load - Coil Cooling Output) / Design Coil Load.
! Coil Cooling Output depends on the UA which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Puts UA into the water coil data structure, calls CoolingCoil, and calculates
! the residual as defined above.
! REFERENCES:
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: UA ! UA of coil
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = design coil load [W]
REAL(r64) :: Residuum ! residual to be minimized to zero
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: CoilIndex
INTEGER :: FanOpMode
REAL(r64) :: PartLoadRatio
CoilIndex = INT(Par(2))
IF(Par(3) .EQ. 1.0d0) THEN
FanOpMode = CycFanCycCoil
ELSE
FanOpMode = ContFanCycCoil
END IF
PartLoadRatio = Par(4)
WaterCoil(CoilIndex)%UACoilExternal = UA
WaterCoil(CoilIndex)%UACoilInternal = WaterCoil(CoilIndex)%UACoilExternal*3.3d0
WaterCoil(CoilIndex)%UACoilTotal = 1.0d0/(1.d0/WaterCoil(CoilIndex)%UACoilExternal+1.d0/WaterCoil(CoilIndex)%UACoilInternal)
WaterCoil(CoilIndex)%TotCoilOutsideSurfArea=EstimateHEXSurfaceArea(CoilIndex)
WaterCoil(CoilIndex)%UACoilInternalPerUnitArea=WaterCoil(CoilIndex)%UACoilInternal/ &
WaterCoil(CoilIndex)%TotCoilOutsideSurfArea
WaterCoil(CoilIndex)%UAWetExtPerUnitArea=WaterCoil(CoilIndex)%UACoilExternal/WaterCoil(CoilIndex)%TotCoilOutsideSurfArea
WaterCoil(CoilIndex)%UADryExtPerUnitArea=WaterCoil(CoilIndex)%UAWetExtPerUnitArea
CALL CoolingCoil(CoilIndex, .TRUE., DesignCalc, FanOpMode, PartLoadRatio)
Residuum = (Par(1) - WaterCoil(CoilIndex)%TotWaterCoolingCoilRate) / Par(1)
RETURN
END FUNCTION SimpleCoolingCoilUAResidual