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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | BaseboardNum | |||
integer, | intent(in) | :: | ControlledZoneNumSub | |||
logical, | intent(in) | :: | FirstHVACIteration |
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.
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 InitElectricBaseboard(BaseboardNum, ControlledZoneNumSub, FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN Nov 2001
! MODIFIED Feb 2010 Daeho Kang for radiant component
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine initializes the Baseboard units during simulation.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataLoopNode, ONLY: Node
USE DataZoneEquipment, ONLY: ZoneEquipInputsFilled,CheckZoneEquipmentList,ZoneEquipConfig
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: BaseboardNum
INTEGER, INTENT(IN) :: ControlledZoneNumSub
LOGICAL, INTENT(IN) :: FirstHVACIteration
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ZoneNode
LOGICAL,SAVE :: MyOneTimeFlag = .true.
LOGICAL,SAVE :: ZoneEquipmentListChecked = .false. ! True after the Zone Equipment List has been checked for items
INTEGER :: ZoneNum
INTEGER :: Loop
LOGICAL, ALLOCATABLE,Save, DIMENSION(:) :: MyEnvrnFlag
! Do the one time initializations
IF (MyOneTimeFlag) THEN
! initialize the environment and sizing flags
ALLOCATE(MyEnvrnFlag(NumElecBaseboards))
ALLOCATE(MySizeFlag(NumElecBaseboards))
ALLOCATE(ZeroSourceSumHATsurf(NumofZones))
ZeroSourceSumHATsurf = 0.0D0
ALLOCATE(QBBElecRadSource(NumElecBaseboards))
QBBElecRadSource = 0.0D0
ALLOCATE(QBBElecRadSrcAvg(NumElecBaseboards))
QBBElecRadSrcAvg = 0.0D0
ALLOCATE(LastQBBElecRadSrc(NumElecBaseboards))
LastQBBElecRadSrc = 0.0D0
ALLOCATE(LastSysTimeElapsed(NumElecBaseboards))
LastSysTimeElapsed = 0.0D0
ALLOCATE(LastTimeStepSys(NumElecBaseboards))
LastTimeStepSys = 0.0D0
MyEnvrnFlag = .TRUE.
MySizeFlag = .TRUE.
MyOneTimeFlag = .false.
END IF
IF (ElecBaseboard(BaseboardNum)%ZonePtr <= 0) &
ElecBaseboard(BaseboardNum)%ZonePtr = ZoneEquipConfig(ControlledZoneNumSub)%ActualZoneNum
IF ( .NOT. SysSizingCalc .AND. MySizeFlag(BaseboardNum)) THEN
! for each coil, do the sizing once.
CALL SizeElectricBaseboard(BaseboardNum)
MySizeFlag(BaseboardNum) = .FALSE.
END IF
! need to check all units to see if they are on ZoneHVAC:EquipmentList or issue warning
IF (.not. ZoneEquipmentListChecked .and. ZoneEquipInputsFilled) THEN
ZoneEquipmentListChecked=.true.
DO Loop=1,NumElecBaseboards
IF (CheckZoneEquipmentList(cCMO_BBRadiator_Electric,ElecBaseboard(Loop)%EquipName)) CYCLE
CALL ShowSevereError('InitBaseboard: Unit=['//cCMO_BBRadiator_Electric//','// &
TRIM(ElecBaseboard(Loop)%EquipName)// &
'] is not on any ZoneHVAC:EquipmentList. It will not be simulated.')
ENDDO
ENDIF
! Do the Begin Environment initializations
IF (BeginEnvrnFlag .and. MyEnvrnFlag(BaseboardNum)) THEN
! Initialize
ZeroSourceSumHATsurf =0.0D0
QBBElecRadSource =0.0D0
QBBElecRadSrcAvg =0.0D0
LastQBBElecRadSrc =0.0D0
LastSysTimeElapsed =0.0D0
LastTimeStepSys =0.0D0
MyEnvrnFlag(BaseboardNum) = .FALSE.
END IF
IF (.not. BeginEnvrnFlag) THEN
MyEnvrnFlag(BaseboardNum) = .true.
ENDIF
! Do the Begin Day initializations
IF (BeginDayFlag) THEN
END IF
IF (BeginTimeStepFlag .AND. FirstHVACIteration) THEN
ZoneNum = ElecBaseboard(BaseboardNum)%ZonePtr
ZeroSourceSumHATsurf(ZoneNum) = SumHATsurf(ZoneNum)
QBBElecRadSrcAvg(BaseboardNum) = 0.0D0
LastQBBElecRadSrc(BaseboardNum) = 0.0D0
LastSysTimeElapsed(BaseboardNum) = 0.0D0
LastTimeStepSys(BaseboardNum) = 0.0D0
END IF
! Do the every time step initializations
ZoneNode = ZoneEquipConfig(ControlledZoneNumSub)%ZoneNode
ElecBaseboard(BaseboardNum)%AirInletTemp = Node(ZoneNode)%Temp
ElecBaseboard(BaseboardNum)%AirInletHumRat = Node(ZoneNode)%HumRat
! Set the reporting variables to zero at each timestep.
ElecBaseboard(BaseboardNum)%TotPower = 0.0d0
ElecBaseboard(BaseboardNum)%Power = 0.0d0
ElecBaseboard(BaseboardNum)%ConvPower = 0.0d0
ElecBaseboard(BaseboardNum)%RadPower = 0.0d0
ElecBaseboard(BaseboardNum)%TotEnergy = 0.0d0
ElecBaseboard(BaseboardNum)%Energy = 0.0d0
ElecBaseboard(BaseboardNum)%ConvEnergy = 0.0d0
ElecBaseboard(BaseboardNum)%RadEnergy = 0.0d0
ElecBaseboard(BaseboardNum)%ElecUseLoad = 0.0d0
ElecBaseboard(BaseboardNum)%ElecUseRate = 0.0d0
RETURN
END SUBROUTINE InitElectricBaseboard