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 InitHWBaseboard(BaseboardNum, ControlledZoneNumSub, FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Russ Taylor
! Rick Strand
! DATE WRITTEN Nov 1997
! Feb 2001
! MODIFIED Aug 2007 Daeho Kang (Add radiant component)
! Sept 2010 Brent Griffith (plant interactions)
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine initializes the baseboard units, and determines the UA values during simulation.
! METHODOLOGY EMPLOYED:
! The initialization subrotines both in high temperature radiant radiator
! and convective only baseboard radiator are combined and modified. In addition,
! an UA value calculation by LMTD method is added.
! The heater is assumed to be crossflow with both fluids unmixed.
! REFERENCES:
! 1. Incropera and DeWitt, Fundamentals of Heat and Mass Transfer
! Chapter 11.3, p. 510, eq. 11.15 and 11.17
! 2. I=B=R Ratings for Baseboards, Baseboard Radiation, Finned Tube (Commercial) Radiation,
! and Indirect Fired Water Heaters, January 2007 Edition
! USE STATEMENTS:
USE DataGlobals, ONLY: BeginEnvrnFlag, NumofZones
USE DataLoopNode, ONLY: Node
USE DataEnvironment, ONLY: StdRhoAir
USE PlantUtilities, ONLY: InitComponentNodes
USE DataPlant, ONLY: ScanPlantLoopsForObject
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(IN) :: FirstHVACIteration
INTEGER, INTENT(IN) :: BaseboardNum
INTEGER, INTENT(IN) :: ControlledZoneNumSub
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: Constant = 0.0062d0 ! Constant of linear equation for air mass flow rate
REAL(r64), PARAMETER :: Coeff = 0.0000275d0 ! Correlation coefficient to capacity
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: MyOneTimeFlag = .true.
LOGICAL, SAVE :: ZoneEquipmentListChecked = .false.
LOGICAL, ALLOCATABLE,Save, DIMENSION(:) :: MyEnvrnFlag
INTEGER :: Loop
INTEGER :: WaterInletNode
INTEGER :: ZoneNode
INTEGER :: ZoneNum
REAL(r64) :: RhoAirStdInit
REAL(r64) :: rho !local fluid density
REAL(r64) :: Cp ! local fluid specific heat
LOGICAL :: errFlag
! Do the one time initializations
IF (MyOneTimeFlag) THEN
! Initialize the environment and sizing flags
ALLOCATE(MyEnvrnFlag(NumHWBaseboards))
ALLOCATE(MySizeFlag(NumHWBaseboards))
ALLOCATE(ZeroSourceSumHATsurf(NumofZones))
ZeroSourceSumHATsurf = 0.0D0
ALLOCATE(QBBRadSource(NumHWBaseboards))
QBBRadSource = 0.0D0
ALLOCATE(QBBRadSrcAvg(NumHWBaseboards))
QBBRadSrcAvg = 0.0D0
ALLOCATE(LastQBBRadSrc(NumHWBaseboards))
LastQBBRadSrc = 0.0D0
ALLOCATE(LastSysTimeElapsed(NumHWBaseboards))
LastSysTimeElapsed = 0.0D0
ALLOCATE(LastTimeStepSys(NumHWBaseboards))
LastTimeStepSys = 0.0D0
ALLOCATE(SetLoopIndexFlag(NumHWBaseboards))
MyEnvrnFlag = .TRUE.
MySizeFlag = .TRUE.
MyOneTimeFlag = .false.
SetLoopIndexFlag = .TRUE.
DO Loop = 1, NumHWBaseboards
! Air mass flow rate is obtained from the following linear equation (reset if autosize is used)
! m_dot = 0.0062 + 2.75e-05*q
HWBaseboard(Loop)%AirMassFlowRateStd = Constant + Coeff * HWBaseboard(Loop)%RatedCapacity
END DO
ENDIF
IF (HWBaseboard(BaseboardNum)%ZonePtr <= 0) &
HWBaseboard(BaseboardNum)%ZonePtr = ZoneEquipConfig(ControlledZoneNumSub)%ActualZoneNum
! 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,NumHWBaseboards
IF (CheckZoneEquipmentList(cCMO_BBRadiator_Water,HWBaseboard(Loop)%EquipID)) CYCLE
CALL ShowSevereError('InitBaseboard: Unit=['//TRIM(cCMO_BBRadiator_Water)//','// &
TRIM(HWBaseboard(Loop)%EquipID)// &
'] is not on any ZoneHVAC:EquipmentList. It will not be simulated.')
END DO
ENDIF
IF(SetLoopIndexFlag(BaseboardNum))THEN
IF(ALLOCATED(PlantLoop))THEN
errFlag=.false.
CALL ScanPlantLoopsForObject(HWBaseboard(BaseboardNum)%EquipID, &
HWBaseboard(BaseboardNum)%EquipType, &
HWBaseboard(BaseboardNum)%LoopNum, &
HWBaseboard(BaseboardNum)%LoopSideNum, &
HWBaseboard(BaseboardNum)%BranchNum, &
HWBaseboard(BaseboardNum)%CompNum, &
errFlag=errFlag)
IF (errFlag) THEN
CALL ShowFatalError('InitHWBaseboard: Program terminated for previous conditions.')
ENDIF
SetLoopIndexFlag(BaseboardNum) = .FALSE.
ENDIF
ENDIF
IF (.NOT. SysSizingCalc .AND. MySizeFlag(BaseboardNum) .AND. .NOT. SetLoopIndexFlag(BaseboardNum)) THEN
! For each coil, do the sizing once
CALL SizeHWBaseboard(BaseboardNum)
MySizeFlag(BaseboardNum) = .FALSE.
END IF
! Do the Begin Environment initializations
IF (BeginEnvrnFlag .and. MyEnvrnFlag(BaseboardNum)) THEN
! Initialize
RhoAirStdInit = StdRhoAir
WaterInletNode = HWBaseboard(BaseboardNum)%WaterInletNode
rho = GetDensityGlycol(PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidIndex,&
'BaseboardRadiatorWater:InitHWBaseboard')
HWBaseboard(BaseboardNum)%WaterMassFlowRateMax = rho * HWBaseboard(BaseboardNum)%WaterVolFlowRateMax
CALL InitComponentNodes(0.d0,HWBaseboard(BaseboardNum)%WaterMassFlowRateMax, &
HWBaseboard(BaseboardNum)%WaterInletNode, &
HWBaseboard(BaseboardNum)%WaterOutletNode, &
HWBaseboard(BaseboardNum)%LoopNum, &
HWBaseboard(BaseboardNum)%LoopSideNum, &
HWBaseboard(BaseboardNum)%BranchNum, &
HWBaseboard(BaseboardNum)%CompNum)
Node(WaterInletNode)%Temp = 60.0d0
Cp = GetSpecificHeatGlycol(PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidName, &
Node(WaterInletNode)%Temp, &
PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidIndex, &
'BaseboardRadiatorWater:InitHWBaseboard')
Node(WaterInletNode)%Enthalpy = Cp * Node(WaterInletNode)%Temp
Node(WaterInletNode)%Quality = 0.0d0
Node(WaterInletNode)%Press = 0.0d0
Node(WaterInletNode)%HumRat = 0.0d0
ZeroSourceSumHATsurf =0.0D0
QBBRadSource =0.0D0
QBBRadSrcAvg =0.0D0
LastQBBRadSrc =0.0D0
LastSysTimeElapsed =0.0D0
LastTimeStepSys =0.0D0
MyEnvrnFlag(BaseboardNum) = .FALSE.
END IF
IF (.not. BeginEnvrnFlag) THEN
MyEnvrnFlag(BaseboardNum) = .true.
ENDIF
IF (BeginTimeStepFlag .AND. FirstHVACIteration) THEN
ZoneNum = HWBaseboard(BaseboardNum)%ZonePtr
ZeroSourceSumHATsurf(ZoneNum) = SumHATsurf(ZoneNum)
QBBRadSrcAvg(BaseboardNum) = 0.0D0
LastQBBRadSrc(BaseboardNum) = 0.0D0
LastSysTimeElapsed(BaseboardNum) = 0.0D0
LastTimeStepSys(BaseboardNum) = 0.0D0
END IF
! Do the every time step initializations
WaterInletNode = HWBaseboard(BaseboardNum)%WaterInletNode
ZoneNode = ZoneEquipConfig(ControlledZoneNumSub)%ZoneNode
HWBaseboard(BaseboardNum)%WaterMassFlowRate = Node(WaterInletNode)%MassFlowRate
HWBaseboard(BaseboardNum)%WaterInletTemp = Node(WaterInletNode)%Temp
HWBaseboard(BaseboardNum)%WaterInletEnthalpy = Node(WaterInletNode)%Enthalpy
HWBaseboard(BaseboardNum)%AirInletTemp = Node(ZoneNode)%Temp
HWBaseboard(BaseboardNum)%AirInletHumRat = Node(ZoneNode)%HumRat
HWBaseboard(BaseboardNum)%TotPower = 0.0d0
HWBaseboard(BaseboardNum)%Power = 0.0d0
HWBaseboard(BaseboardNum)%ConvPower = 0.0d0
HWBaseboard(BaseboardNum)%RadPower = 0.0d0
HWBaseboard(BaseboardNum)%TotEnergy = 0.0d0
HWBaseboard(BaseboardNum)%Energy = 0.0d0
HWBaseboard(BaseboardNum)%ConvEnergy = 0.0d0
HWBaseboard(BaseboardNum)%RadEnergy = 0.0d0
RETURN
END SUBROUTINE InitHWBaseboard