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 | |||
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 SimWindowAC(CompName,ZoneNum,FirstHVACIteration,PowerMet,LatOutputProvided,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN May 2000
! MODIFIED Don Shirey, Aug 2009 (LatOutputProvided)
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of a window AC unit. Called from SimZone Equipment
! METHODOLOGY EMPLOYED:
! NA
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: TrimSigDigits
USE InputProcessor, ONLY: FindItemInList
USE DataZoneEnergyDemands, ONLY: ZoneSysEnergyDemand
USE DataHeatBalFanSys, ONLY: TempControlType
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT (IN) :: CompName ! name of the window AC unit
INTEGER, INTENT (IN) :: ZoneNum ! number of zone being served
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
REAL(r64), INTENT (OUT) :: PowerMet ! Sensible power supplied by window AC (W)
REAL(r64), INTENT (OUT) :: LatOutputProvided ! Latent add/removal supplied by window AC (kg/s), dehumid = negative
INTEGER, INTENT(INOUT):: CompIndex ! component index
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: WindACNum ! index of window AC unit being simulated
REAL(r64) :: QZnReq ! zone load (W)
REAL(r64) :: RemainingOutputToCoolingSP !- remaining load to cooling setpoint (W)
! FLOW
! First time SimWindowAC is called, get the input for all the window AC units
IF (GetWindowACInputFlag) THEN
CALL GetWindowAC
GetWindowACInputFlag = .FALSE.
END IF
! Find the correct Window AC Equipment
IF (CompIndex == 0) THEN
WindACNum = FindItemInList(CompName,WindAC%Name,NumWindAC)
IF (WindACNum == 0) THEN
CALL ShowFatalError('SimWindowAC: Unit not found='//TRIM(CompName))
ENDIF
CompIndex=WindACNum
ELSE
WindACNum=CompIndex
IF (WindACNum > NumWindAC .or. WindACNum < 1) THEN
CALL ShowFatalError('SimWindowAC: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(WindACNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumWindAC))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(WindACNum)) THEN
IF (CompName /= WindAC(WindACNum)%Name) THEN
CALL ShowFatalError('SimWindowAC: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(WindACNum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(WindAC(WindACNum)%Name))
ENDIF
CheckEquipName(WindACNum)=.false.
ENDIF
ENDIF
RemainingOutputToCoolingSP = ZoneSysEnergyDemand(ZoneNum)%RemainingOutputReqToCoolSP
IF(RemainingOutputToCoolingSP .LT. 0.0D0 .and. TempControlType(ZoneNum) .NE. SingleHeatingSetPoint)THEN
QZnReq = RemainingOutputToCoolingSP
ELSE
QZnReq = 0.0D0
END IF
ZoneEqDXCoil = .TRUE.
ZoneCoolingOnlyFan = .TRUE.
! Initialize the window AC unit
CALL InitWindowAC(WindACNum, QZnReq, ZoneNum, FirstHVACIteration)
CALL SimCyclingWindowAC(WindACNum,ZoneNum,FirstHVACIteration,PowerMet,QZnReq,LatOutputProvided)
! Report the result of the simulation
CALL ReportWindowAC(WindACNum)
ZoneEqDXCoil = .FALSE.
ZoneCoolingOnlyFan = .FALSE.
RETURN
END SUBROUTINE SimWindowAC