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.
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 GetHWBaseboardInput
! SUBROUTINE INFORMATION:
! AUTHOR Daeho Kang
! DATE WRITTEN Aug 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets the input for the baseboard units.
! METHODOLOGY EMPLOYED:
! Standard input processor calls.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataLoopNode, ONLY: Node, NodeType_Water, NodeConnectionType_Inlet, NodeConnectionType_Outlet, ObjectIsNotParent
!unused0909 USE DataGlobals, ONLY: NumOfZones
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, FindItemInList, SameString, VerifyName
USE NodeInputManager, ONLY: GetOnlySingleNode
USE BranchNodeConnections, ONLY: TestCompSet
USE DataSurfaces, ONLY: Surface, TotSurfaces
USE ScheduleManager, ONLY: GetScheduleIndex, GetCurrentScheduleValue
USE GlobalNames, ONLY: VerifyUniqueBaseboardName
USE General, ONLY: RoundSigDigits
USE DataSizing, ONLY: Autosize, FinalZoneSizing
USE DataIPShortCuts
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetHWBaseboardInput:'
REAL(r64), PARAMETER :: MaxFraction = 1.0d0
REAL(r64), PARAMETER :: MinFraction = 0.0d0
REAL(r64), PARAMETER :: MaxWaterTempAvg = 150.0d0 ! Maximum limit of average water temperature in degree C
REAL(r64), PARAMETER :: MinWaterTempAvg = 20.0d0 ! Minimum limit of average water temperature in degree C
REAL(r64), PARAMETER :: HighWaterMassFlowRate = 10.0d0 ! Maximum limit of water mass flow rate in kg/s
REAL(r64), PARAMETER :: LowWaterMassFlowRate = 0.00001d0 ! Minimum limit of water mass flow rate in kg/s
REAL(r64), PARAMETER :: MaxWaterFlowRate = 10.0d0 ! Maximum limit of water volume flow rate in m3/s
REAL(r64), PARAMETER :: MinWaterFlowRate = 0.00001d0 ! Minimum limit of water volume flow rate in m3/s
REAL(r64), PARAMETER :: WaterTempAvgDefault = 87.78d0 ! Default water mass flow rate in kg/s
REAL(r64), PARAMETER :: WaterMassFlowDefault = 0.063d0 ! Default water mass flow rate in kg/s
REAL(r64), PARAMETER :: AirInletTempStd = 18.0d0 ! Standard air inlet temperature in degree C
REAL(r64), PARAMETER :: CPAirStd = 1005.0d0 ! Average specific heat of air at between 25C and 40C in J/kg-k
! INTEGER, PARAMETER :: MaxDistribSurfaces = 20 ! Maximum number of surfaces that a baseboard heater can radiate to
INTEGER, PARAMETER :: MinDistribSurfaces = 1 ! Minimum number of surfaces that a baseboard heater can radiate to
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: AllFracsSummed ! Sum of the fractions radiant
INTEGER :: BaseboardNum ! Baseboard number
INTEGER :: NumAlphas ! Number of Alphas for each GetobjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetobjectItem call
INTEGER :: SurfNum ! Surface number Do loop counter
INTEGER :: IOSTAT
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
LOGICAL :: errflag
NumHWBaseboards = GetNumObjectsFound(cCMO_BBRadiator_Water)
! Count total number of baseboard units
ALLOCATE(HWBaseboard(NumHWBaseboards))
ALLOCATE(CheckEquipName(NumHWBaseboards))
CheckEquipName=.true.
! Get the data from the user input related to baseboard heaters
DO BaseboardNum = 1, NumHWBaseboards
CALL GetObjectItem(cCMO_BBRadiator_Water,BaseboardNum,cAlphaArgs,NumAlphas, &
rNumericArgs,NumNumbers,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),HWBaseboard%EquipID,BaseboardNum,IsNotOK,IsBlank,cCMO_BBRadiator_Water//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
ENDIF
CALL VerifyUniqueBaseboardName(cCMO_BBRadiator_Water,cAlphaArgs(1),errflag,cCMO_BBRadiator_Water//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
HWBaseboard(BaseboardNum)%EquipID = cAlphaArgs(1) ! Name of this baseboard
HWBaseboard(BaseboardNum)%EquipType = TypeOf_Baseboard_Rad_Conv_Water !'ZoneHVAC:Baseboard:RadiantConvective:Water'
! Get schedule
HWBaseboard(BaseboardNum)%Schedule = cAlphaArgs(2)
IF (lAlphaFieldBlanks(2)) THEN
HWBaseboard(BaseboardNum)%SchedPtr = ScheduleAlwaysOn
ELSE
HWBaseboard(BaseboardNum)%SchedPtr = GetScheduleIndex(cAlphaArgs(2))
IF (HWBaseboard(BaseboardNum)%SchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//TRIM(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound=.true.
END IF
ENDIF
! Get inlet node number
HWBaseboard(BaseboardNum)%WaterInletNode = &
GetOnlySingleNode(cAlphaArgs(3),ErrorsFound,cCMO_BBRadiator_Water,cAlphaArgs(1), &
NodeType_Water,NodeConnectionType_Inlet,1,ObjectIsNotParent)
! Get outlet node number
HWBaseboard(BaseboardNum)%WaterOutletNode = &
GetOnlySingleNode(cAlphaArgs(4),ErrorsFound,cCMO_BBRadiator_Water,cAlphaArgs(1), &
NodeType_Water,NodeConnectionType_Outlet,1,ObjectIsNotParent)
CALL TestCompSet(cCMO_BBRadiator_Water,cAlphaArgs(1),cAlphaArgs(3), &
cAlphaArgs(4),'Hot Water Nodes')
HWBaseboard(BaseboardNum)%WaterTempAvg = rNumericArgs(1)
IF (HWBaseboard(BaseboardNum)%WaterTempAvg > MaxWaterTempAvg + 0.001d0) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(1))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxWaterTempAvg,2))//'].')
HWBaseboard(BaseboardNum)%WaterTempAvg = MaxWaterTempAvg
ELSE IF (HWBaseboard(BaseboardNum)%WaterTempAvg < MinWaterTempAvg - 0.001d0) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(1))//' was lower than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinWaterTempAvg,2))//'].')
HWBaseboard(BaseboardNum)%WaterTempAvg = MinWaterTempAvg
END IF
HWBaseboard(BaseboardNum)%WaterMassFlowRateStd = rNumericArgs(2)
IF (HWBaseboard(BaseboardNum)%WaterMassFlowRateStd < LowWaterMassFlowRate-0.0001d0 .OR. &
HWBaseboard(BaseboardNum)%WaterMassFlowRateStd > HighWaterMassFlowRate+0.0001d0 ) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(2))//' is an invalid Standard Water mass flow rate.')
CALL ShowContinueError('...reset to a default value=['//trim(RoundSigDigits(WaterMassFlowDefault,1))//'].')
HWBaseboard(BaseboardNum)%WaterMassFlowRateStd = WaterMassFlowDefault
END IF
HWBaseboard(BaseboardNum)%RatedCapacity = rNumericArgs(3)
HWBaseboard(BaseboardNum)%WaterVolFlowRateMax = rNumericArgs(4)
IF (ABS(HWBaseboard(BaseboardNum)%WaterVolFlowRateMax) <= MinWaterFlowRate) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(4))//' was less than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinWaterFlowRate,2))//'].')
HWBaseboard(BaseboardNum)%WaterVolFlowRateMax = MinWaterFlowRate
ELSE IF(HWBaseboard(BaseboardNum)%WaterVolFlowRateMax > MaxWaterFlowRate) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(4))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxWaterFlowRate,2))//'].')
HWBaseboard(BaseboardNum)%WaterVolFlowRateMax = MaxWaterFlowRate
END IF
HWBaseboard(BaseboardNum)%Offset = rNumericArgs(5)
! Set default convergence tolerance
IF (HWBaseboard(BaseboardNum)%Offset .LE. 0.0d0) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(5))//' was less than the allowable minimum.')
CALL ShowContinueError('...reset to a default value=['//trim(RoundSigDigits(MaxFraction,2))//'].')
HWBaseboard(BaseboardNum)%Offset = 0.001d0
END IF
HWBaseboard(BaseboardNum)%FracRadiant = rNumericArgs(6)
IF (HWBaseboard(BaseboardNum)%FracRadiant < MinFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(6))//' was lower than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinFraction,2))//'].')
HWBaseboard(BaseboardNum)%FracRadiant = MinFraction
END IF
IF (HWBaseboard(BaseboardNum)%FracRadiant > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(6))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,2))//'].')
HWBaseboard(BaseboardNum)%FracRadiant = MaxFraction
END IF
! Remaining fraction is added to the zone as convective heat transfer
AllFracsSummed = HWBaseboard(BaseboardNum)%FracRadiant
IF (AllFracsSummed > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", Fraction Radiant was higher than the allowable maximum.')
HWBaseboard(BaseboardNum)%FracRadiant = MaxFraction
HWBaseboard(BaseboardNum)%FracConvect = 0.0d0
ELSE
HWBaseboard(BaseboardNum)%FracConvect = 1.0d0 - AllFracsSummed
END IF
HWBaseboard(BaseboardNum)%FracDistribPerson = rNumericArgs(7)
IF (HWBaseboard(BaseboardNum)%FracDistribPerson < MinFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(7))//' was lower than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinFraction,3))//'].')
HWBaseboard(BaseboardNum)%FracDistribPerson = MinFraction
END IF
IF (HWBaseboard(BaseboardNum)%FracDistribPerson > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(7))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,3))//'].')
HWBaseboard(BaseboardNum)%FracDistribPerson = MaxFraction
END IF
HWBaseboard(BaseboardNum)%TotSurfToDistrib = NumNumbers - 7
! IF (HWBaseboard(BaseboardNum)%TotSurfToDistrib > MaxDistribSurfaces) THEN
! CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
! '", the number of surface/radiant fraction groups entered was higher than the allowable maximum.')
! CALL ShowContinueError('...only the maximum value=['//trim(RoundSigDigits(MaxDistribSurfaces))// &
! '] will be processed.')
! HWBaseboard(BaseboardNum)%TotSurfToDistrib = MaxDistribSurfaces
! END IF
IF ( (HWBaseboard(BaseboardNum)%TotSurfToDistrib < MinDistribSurfaces) .AND. &
(HWBaseboard(BaseboardNum)%FracRadiant > MinFraction) ) THEN
CALL ShowSevereError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", the number of surface/radiant fraction groups entered was less than the allowable minimum.')
CALL ShowContinueError('...the minimum that must be entered=['//trim(RoundSigDigits(MinDistribSurfaces))//'].')
ErrorsFound = .true.
HWBaseboard(BaseboardNum)%TotSurfToDistrib = 0 ! error
END IF
ALLOCATE(HWBaseboard(BaseboardNum)%SurfaceName(HWBaseboard(BaseboardNum)%TotSurfToDistrib))
HWBaseboard(BaseboardNum)%SurfaceName=' '
ALLOCATE(HWBaseboard(BaseboardNum)%SurfacePtr(HWBaseboard(BaseboardNum)%TotSurfToDistrib))
HWBaseboard(BaseboardNum)%SurfacePtr=0
ALLOCATE(HWBaseboard(BaseboardNum)%FracDistribToSurf(HWBaseboard(BaseboardNum)%TotSurfToDistrib))
HWBaseboard(BaseboardNum)%FracDistribToSurf=0.0d0
AllFracsSummed = HWBaseboard(BaseboardNum)%FracDistribPerson
Do SurfNum = 1,HWBaseboard(BaseboardNum)%TotSurfToDistrib
HWBaseboard(BaseboardNum)%SurfaceName(SurfNum) = cAlphaArgs(SurfNum + 4)
HWBaseboard(BaseboardNum)%SurfacePtr(SurfNum) = FindItemInList(cAlphaArgs(SurfNum + 4),Surface%Name,TotSurfaces)
HWBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) = rNumericArgs(SurfNum + 7)
IF (HWBaseboard(BaseboardNum)%SurfacePtr(SurfNum) == 0 ) THEN
CALL ShowSevereError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cAlphaFieldNames(SurfNum+4))//'="'//trim(cAlphaArgs(SurfNum + 4))//'" invalid - not found.')
ErrorsFound = .true.
END IF
IF (HWBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(SurfNum+7))//'was greater than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,2))//'].')
HWBaseboard(BaseboardNum)%TotSurfToDistrib = MaxFraction
END IF
IF (HWBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) < MinFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(SurfNum+7))//'was less than the allowable minimum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MinFraction,2))//'].')
HWBaseboard(BaseboardNum)%TotSurfToDistrib = MinFraction
END IF
IF (HWBaseboard(BaseboardNum)%SurfacePtr(SurfNum) /= 0 ) THEN
Surface( HWBaseboard(BaseboardNum)%SurfacePtr(SurfNum) )%IntConvSurfGetsRadiantHeat = .TRUE.
ENDIF
AllFracsSummed = AllFracsSummed + HWBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum)
End DO ! Surfaces
IF (AllFracsSummed > (MaxFraction + 0.01d0) ) THEN
CALL ShowSevereError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", Summed radiant fractions for people + surface groups > 1.0')
ErrorsFound = .TRUE.
END IF
IF ( (AllFracsSummed < (MaxFraction - 0.01d0)) .AND. & ! User didn't distribute all of the
(HWBaseboard(BaseboardNum)%FracRadiant > MinFraction) ) THEN ! radiation warn that some will be lost
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Water//'="'//trim(cAlphaArgs(1))// &
'", Summed radiant fractions for people + surface groups < 1.0')
CALL ShowContinueError('The rest of the radiant energy delivered by the baseboard heater will be lost')
END IF
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//cCMO_BBRadiator_Water//'Errors found getting input. Program terminates.')
END IF
! Setup Report variables for the Coils
DO BaseboardNum = 1, NumHWBaseboards
! CurrentModuleObject='ZoneHVAC:Baseboard:RadiantConvective:Water'
CALL SetupOutputVariable('Baseboard Total Heating Rate [W]', HWBaseboard(BaseboardNum)%TotPower, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Convective Heating Rate [W]', HWBaseboard(BaseboardNum)%ConvPower, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Radiant Heating Rate [W]', HWBaseboard(BaseboardNum)%RadPower, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Total Heating Energy [J]', HWBaseboard(BaseboardNum)%TotEnergy, &
'System','Sum',HWBaseboard(BaseboardNum)%EquipID, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='BASEBOARD',GroupKey='System')
CALL SetupOutputVariable('Baseboard Convective Heating Energy [J]', HWBaseboard(BaseboardNum)%ConvEnergy, &
'System','Sum',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Radiant Heating Energy [J]', HWBaseboard(BaseboardNum)%RadEnergy, &
'System','Sum',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Hot Water Energy [J]', HWBaseboard(BaseboardNum)%Energy, &
'System','Sum',HWBaseboard(BaseboardNum)%EquipID, &
ResourceTypeKey='PLANTLOOPHEATINGDEMAND',EndUseKey='BASEBOARD',GroupKey='System')
CALL SetupOutputVariable('Baseboard Hot Water Mass Flow Rate [kg/s]', HWBaseboard(BaseboardNum)%WaterMassFlowRate, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Air Mass Flow Rate [kg/s]', HWBaseboard(BaseboardNum)%AirMassFlowRate, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Air Inlet Temperature [C]', HWBaseboard(BaseboardNum)%AirInletTemp, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Air Outlet Temperature [C]', HWBaseboard(BaseboardNum)%AirOutletTemp, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Water Inlet Temperature [C]', HWBaseboard(BaseboardNum)%WaterInletTemp, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Water Outlet Temperature [C]', HWBaseboard(BaseboardNum)%WaterOutletTemp, &
'System','Average',HWBaseboard(BaseboardNum)%EquipID)
END DO
RETURN
END SUBROUTINE GetHWBaseboardInput