Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | CompName | |||
real(kind=r64), | intent(in) | :: | SpeedRatio | |||
real(kind=r64), | intent(in) | :: | CycRatio | |||
integer, | intent(inout) | :: | CompIndex | |||
integer, | intent(in), | optional | :: | SpeedNum | ||
integer, | intent(in), | optional | :: | FanOpMode | ||
integer, | intent(in), | optional | :: | CompOp |
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 SimDXCoilMultiSpeed(CompName,SpeedRatio,CycRatio,CompIndex,SpeedNum,FanOpMode,CompOp)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2002
! MODIFIED Lixing Gu, Sep. 2007
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of a multi speed DX coil.
! METHODOLOGY EMPLOYED:
! NA
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT (IN) :: CompName ! name of the fan coil unit
REAL(r64) , INTENT (IN) :: SpeedRatio ! = (CompressorSpeed - CompressorSpeedMin) /
! (CompressorSpeedMax - CompressorSpeedMin)
! for variable speed or 2 speed compressors
REAL(r64) , INTENT (IN) :: CycRatio ! cycling part load ratio for variable speed
! or 2 speed compressors
INTEGER, INTENT(INOUT) :: CompIndex
INTEGER, INTENT(IN), OPTIONAL :: SpeedNum ! Speed number for multispeed cooling coil onlyn
INTEGER, INTENT(IN), OPTIONAL :: FanOpMode ! Fan operation mode
INTEGER, INTENT(IN), OPTIONAL :: CompOp ! Compressor on/off; 1=on, 0=off
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: Blank = ' '
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: DXCoilNum ! index of fan coil unit being simulated
! FLOW
! First time SimDXCoil is called, get the input for all the DX coils (condensing units)
IF (GetCoilsInputFlag) THEN
CALL GetDXCoils
GetCoilsInputFlag = .FALSE. ! Set GetInputFlag false so you don't get coil inputs again
END IF
! find correct DX Coil
IF (CompIndex == 0) THEN
DXCoilNum = FindItemInList(CompName,DXCoil%Name,NumDXCoils)
IF (DXCoilNum == 0) THEN
CALL ShowFatalError('DX Coil not found='//TRIM(CompName))
ENDIF
CompIndex=DXCoilNum
ELSE
DXCoilNum=CompIndex
IF (DXCoilNum > NumDXCoils .or. DXCoilNum < 1) THEN
CALL ShowFatalError('SimDXCoilMultiSpeed: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(DXCoilNum))// &
', Number of DX Coils='//TRIM(TrimSigDigits(NumDXCoils))// &
', Coil name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(DXCoilNum)) THEN
IF (CompName /= Blank .AND. CompName /= DXCoil(DXCoilNum)%Name) THEN
CALL ShowFatalError('SimDXCoilMultiSpeed: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(DXCoilNum))// &
', Coil name='//TRIM(CompName)//', stored Coil Name for that index='// &
TRIM(DXCoil(DXCoilNum)%Name))
ENDIF
CheckEquipName(DXCoilNum)=.false.
ENDIF
ENDIF
CurDXCoilNum = DXCoilNum
! Initialize the DX coil unit
CALL InitDXCoil(DXCoilNum)
! Select the correct unit type
SELECT CASE(DXCoil(DXCoilNum)%DXCoilType_Num)
CASE (CoilDX_CoolingTwoSpeed)
CALL CalcMultiSpeedDXCoil(DXCoilNum,SpeedRatio,CycRatio)
CASE (CoilDX_MultiSpeedCooling)
If (PRESENT(SpeedNum)) CALL CalcMultiSpeedDXCoilCooling(DXCoilNum,SpeedRatio,CycRatio,SpeedNum,FanOpMode,CompOp) !Objexx:OPTIONAL FanOpMode, CompOp used without PRESENT check
CASE (CoilDX_MultiSpeedHeating)
If (PRESENT(SpeedNum)) CALL CalcMultiSpeedDXCoilHeating(DXCoilNum,SpeedRatio,CycRatio,SpeedNum,FanOpMode) !Objexx:OPTIONAL FanOpMode used without PRESENT check
CASE DEFAULT
CALL ShowSevereError('Error detected in DX Coil='//TRIM(CompName))
CALL ShowContinueError('Invalid DX Coil Type='//TRIM(DXCoil(DXCoilNum)%DXCoilType))
CALL ShowFatalError('Preceding condition causes termination.')
END SELECT
! Update the unit outlet nodes
CALL UpdateDXCoil(DXCoilNum)
! Report the result of the simulation
CALL ReportDXCoil(DXCoilNum)
RETURN
END SUBROUTINE SimDXCoilMultiSpeed