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 GetElectricBaseboardInput
! 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 gets the input for the Baseboard units.
! METHODOLOGY EMPLOYED:
! Standard input processor calls.
! REFERENCES:
! Hot water baseboard module
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, VerifyName, FindItemInList, MakeUPPERCase
USE DataSurfaces, ONLY: Surface, TotSurfaces
USE GlobalNames, ONLY: VerifyUniqueBaseboardName
USE General, ONLY: RoundSigDigits
USE ScheduleManager, ONLY: GetScheduleIndex
USE DataIPShortCuts
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetBaseboardInput: ' ! include trailing blank space
REAL(r64), PARAMETER :: MaxFraction = 1.0d0 ! Maximum limit of fractional values
REAL(r64), PARAMETER :: MinFraction = 0.0d0 ! Minimum limit of fractional values
! 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
INTEGER :: ElecBBNum
INTEGER :: NumAlphas
INTEGER :: NumNumbers
INTEGER :: SurfNum ! surface number that radiant heat delivered
INTEGER :: IOSTAT
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
LOGICAL :: errflag
cCurrentModuleObject = cCMO_BBRadiator_Electric
NumElecBaseboards = GetNumObjectsFound(cCurrentModuleObject)
! object is extensible, no max args needed as IPShortCuts being used
ALLOCATE(ElecBaseboard(NumElecBaseboards))
ALLOCATE(CheckEquipName(NumElecBaseboards))
CheckEquipName=.true.
DO BaseboardNum = 1, NumElecBaseboards
CALL GetObjectItem(cCurrentModuleObject,BaseboardNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),ElecBaseboard%EquipName,BaseboardNum,IsNotOK,IsBlank,TRIM(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
CYCLE
ENDIF
CALL VerifyUniqueBaseboardName(TRIM(cCurrentModuleObject),cAlphaArgs(1),errflag,TRIM(cCurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
ElecBaseboard(BaseboardNum)%EquipName = cAlphaArgs(1) ! name of this baseboard
ElecBaseboard(BaseboardNum)%EquipType = BaseboardRadiator_Electric
ElecBaseboard(BaseboardNum)%Schedule = cAlphaArgs(2)
IF (lAlphaFieldBlanks(2)) THEN
ElecBaseboard(BaseboardNum)%SchedPtr = ScheduleAlwaysOn
ELSE
ElecBaseboard(BaseboardNum)%SchedPtr = GetScheduleIndex(cAlphaArgs(2))
IF (ElecBaseboard(BaseboardNum)%SchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//': invalid '//TRIM(cAlphaFieldNames(2))// &
' entered ='//TRIM(cAlphaArgs(2))// &
' for '//TRIM(cAlphaFieldNames(1))//'='//TRIM(cAlphaArgs(1)))
ErrorsFound=.true.
END IF
ENDIF
! get inlet node number
ElecBaseboard(BaseboardNum)%NominalCapacity = rNumericArgs(1)
ElecBaseboard(BaseboardNum)%BaseBoardEfficiency = rNumericArgs(2)
ElecBaseboard(BaseboardNum)%FracRadiant = rNumericArgs(3)
IF (ElecBaseboard(BaseboardNum)%FracRadiant < MinFraction) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(3))//' was lower than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinFraction,2))//'].')
ElecBaseboard(BaseboardNum)%FracRadiant = MinFraction
END IF
IF (ElecBaseboard(BaseboardNum)%FracRadiant > MaxFraction) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(3))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,2))//'].')
ElecBaseboard(BaseboardNum)%FracRadiant = MaxFraction
END IF
! Remaining fraction is added to the zone as convective heat transfer
AllFracsSummed = ElecBaseboard(BaseboardNum)%FracRadiant
IF (AllFracsSummed > MaxFraction) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", Fraction Radiant was higher than the allowable maximum.')
ElecBaseboard(BaseboardNum)%FracRadiant = MaxFraction
ElecBaseboard(BaseboardNum)%FracConvect = 0.0d0
ELSE
ElecBaseboard(BaseboardNum)%FracConvect = 1.0d0 - AllFracsSummed
END IF
ElecBaseboard(BaseboardNum)%FracDistribPerson = rNumericArgs(4)
IF (ElecBaseboard(BaseboardNum)%FracDistribPerson < MinFraction) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(4))//' was lower than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinFraction,2))//'].')
ElecBaseboard(BaseboardNum)%FracDistribPerson = MinFraction
END IF
IF (ElecBaseboard(BaseboardNum)%FracDistribPerson > MaxFraction) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(4))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,2))//'].')
ElecBaseboard(BaseboardNum)%FracDistribPerson = MaxFraction
END IF
ElecBaseboard(BaseboardNum)%TotSurfToDistrib = NumNumbers - 4
! IF (ElecBaseboard(BaseboardNum)%TotSurfToDistrib > MaxDistribSurfaces) THEN
! CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//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.')
! ElecBaseboard(BaseboardNum)%TotSurfToDistrib = MaxDistribSurfaces
! END IF
IF ( (ElecBaseboard(BaseboardNum)%TotSurfToDistrib < MinDistribSurfaces) .AND. &
(ElecBaseboard(BaseboardNum)%FracRadiant > MinFraction) ) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//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.
ElecBaseboard(BaseboardNum)%TotSurfToDistrib = 0 ! error
END IF
ALLOCATE(ElecBaseboard(BaseboardNum)%SurfaceName(ElecBaseboard(BaseboardNum)%TotSurfToDistrib))
ElecBaseboard(BaseboardNum)%SurfaceName=' '
ALLOCATE(ElecBaseboard(BaseboardNum)%SurfacePtr(ElecBaseboard(BaseboardNum)%TotSurfToDistrib))
ElecBaseboard(BaseboardNum)%SurfacePtr=0
ALLOCATE(ElecBaseboard(BaseboardNum)%FracDistribToSurf(ElecBaseboard(BaseboardNum)%TotSurfToDistrib))
ElecBaseboard(BaseboardNum)%FracDistribToSurf=0.0d0
AllFracsSummed = ElecBaseboard(BaseboardNum)%FracDistribPerson
Do SurfNum = 1,ElecBaseboard(BaseboardNum)%TotSurfToDistrib
ElecBaseboard(BaseboardNum)%SurfaceName(SurfNum) = cAlphaArgs(SurfNum + 2)
ElecBaseboard(BaseboardNum)%SurfacePtr(SurfNum) = FindItemInList(cAlphaArgs(SurfNum + 2),Surface%Name,TotSurfaces)
ElecBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) = rNumericArgs(SurfNum + 4)
IF (ElecBaseboard(BaseboardNum)%SurfacePtr(SurfNum) == 0 ) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cAlphaFieldNames(SurfNum+2))//'="'//trim(cAlphaArgs(SurfNum + 2))//'" invalid - not found.')
ErrorsFound = .true.
END IF
IF (ElecBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) > MaxFraction) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(SurfNum+4))//'was greater than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,2))//'].')
ElecBaseboard(BaseboardNum)%TotSurfToDistrib = MaxFraction
END IF
IF (ElecBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) < MinFraction) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(SurfNum+4))//'was less than the allowable minimum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MinFraction,2))//'].')
ElecBaseboard(BaseboardNum)%TotSurfToDistrib = MinFraction
END IF
IF (ElecBaseboard(BaseboardNum)%SurfacePtr(SurfNum) /= 0 ) THEN
Surface(ElecBaseboard(BaseboardNum)%SurfacePtr(SurfNum))%IntConvSurfGetsRadiantHeat = .TRUE.
ENDIF
AllFracsSummed = AllFracsSummed + ElecBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum)
End DO ! Surfaces
IF (AllFracsSummed > (MaxFraction + 0.01d0) ) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//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
(ElecBaseboard(BaseboardNum)%FracRadiant > MinFraction) ) THEN ! radiation warn that some will be lost
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'//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//TRIM(cCurrentModuleObject)//'Errors found getting input. Program terminates.')
END IF
DO BaseboardNum = 1,NumElecBaseboards
! Setup Report variables for the Electric BaseBoards
! CurrentModuleObject='ZoneHVAC:Baseboard:RadiantConvective:Electric'
CALL SetupOutputVariable('Baseboard Total Heating Rate [W]', ElecBaseboard(BaseboardNum)%TotPower, &
'System','Average',ElecBaseboard(BaseboardNum)%EquipName)
CALL SetupOutputVariable('Baseboard Convective Heating Rate [W]', ElecBaseboard(BaseboardNum)%ConvPower, &
'System','Average',ElecBaseboard(BaseboardNum)%EquipName)
CALL SetupOutputVariable('Baseboard Radiant Heating Rate [W]', ElecBaseboard(BaseboardNum)%RadPower, &
'System','Average',ElecBaseboard(BaseboardNum)%EquipName)
CALL SetupOutputVariable('Baseboard Electric Energy [J]',ElecBaseboard(BaseboardNum)%ElecUseLoad, &
'System','Sum',ElecBaseboard(BaseboardNum)%EquipName, &
ResourceTypeKey='Electric',EndUseKey='HEATING',GroupKey='System')
CALL SetupOutputVariable('Baseboard Electric Power [W]',ElecBaseboard(BaseboardNum)%ElecUseRate, &
'System','Average',ElecBaseboard(BaseboardNum)%EquipName)
CALL SetupOutputVariable('Baseboard Total Heating Energy [J]', ElecBaseboard(BaseboardNum)%TotEnergy, &
'System','Sum',ElecBaseboard(BaseboardNum)%EquipName, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='BASEBOARD',GroupKey='System')
CALL SetupOutputVariable('Baseboard Convective Heating Energy [J]', ElecBaseboard(BaseboardNum)%ConvEnergy, &
'System','Sum',ElecBaseboard(BaseboardNum)%EquipName)
CALL SetupOutputVariable('Baseboard Radiant Heating Energy [J]', ElecBaseboard(BaseboardNum)%RadEnergy, &
'System','Sum',ElecBaseboard(BaseboardNum)%EquipName)
END DO
RETURN
END SUBROUTINE GetElectricBaseboardInput