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 | |||
integer, | intent(in) | :: | ZoneNum | |||
integer, | intent(in) | :: | ControlledZoneNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
real(kind=r64), | intent(out) | :: | PowerMet | |||
real(kind=r64), | intent(out) | :: | LatOutputProvided | |||
integer, | intent(inout) | :: | CompIndex |
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 SimFanCoilUnit(CompName,ZoneNum,ControlledZoneNum,FirstHVACIteration,PowerMet,LatOutputProvided,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN March 2000
! MODIFIED Don Shirey, Aug 2009 (LatOutputProvided)
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of a fan coil unit. Called from SimZone Equipment
! 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
INTEGER, INTENT (IN) :: ZoneNum ! number of zone being served
INTEGER, INTENT (IN) :: ControlledZoneNum ! index into ZoneEquipConfig array; may not be equal to ZoneNum
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
REAL(r64), INTENT (OUT) :: PowerMet ! Sensible power supplied (W)
REAL(r64), INTENT (OUT) :: LatOutputProvided ! Latent add/removal supplied by window AC (kg/s), dehumid = negative
INTEGER, INTENT(INOUT):: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: FanCoilNum ! index of fan coil unit being simulated
! FLOW
! First time SimFanCoilUnit is called, get the input for all the fan coil units
IF (GetFanCoilInputFlag) THEN
CALL GetFanCoilUnits
GetFanCoilInputFlag = .FALSE.
END IF
! Find the correct Fan Coil Equipment
IF (CompIndex == 0) THEN
FanCoilNum = FindItemInList(CompName,FanCoil%Name,NumFanCoils)
IF (FanCoilNum == 0) THEN
CALL ShowFatalError('SimFanCoil: Unit not found='//TRIM(CompName))
ENDIF
CompIndex=FanCoilNum
ELSE
FanCoilNum=CompIndex
IF (FanCoilNum > NumFanCoils .or. FanCoilNum < 1) THEN
CALL ShowFatalError('SimFanCoil: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(FanCoilNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumFanCoils))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(FanCoilNum)) THEN
IF (CompName /= FanCoil(FanCoilNum)%Name) THEN
CALL ShowFatalError('SimFanCoil: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(FanCoilNum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(FanCoil(FanCoilNum)%Name))
ENDIF
CheckEquipName(FanCoilNum)=.false.
ENDIF
ENDIF
ZoneEqFanCoil = .TRUE.
! Initialize the fan coil unit
CALL InitFanCoilUnits(FanCoilNum,ZoneNum)
! Select the correct unit type
SELECT CASE(FanCoil(FanCoilNum)%UnitType_Num)
CASE (FanCoilUnit_4Pipe)
CALL Sim4PipeFanCoil(FanCoilNum,ZoneNum,ControlledZoneNum,FirstHVACIteration,PowerMet,LatOutputProvided)
END SELECT
! Report the result of the simulation
CALL ReportFanCoilUnit(FanCoilNum)
ZoneEqFanCoil = .FALSE.
RETURN
END SUBROUTINE SimFanCoilUnit