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 GetSteamBaseboardInput
! SUBROUTINE INFORMATION:
! AUTHOR Daeho Kang
! DATE WRITTEN September 2009
! 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:
! HWBaseboardRadiator module
! USE STATEMENTS:
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 FluidProperties, ONLY: FindRefrigerant
USE DataIPShortCuts
USE DataSizing
USE ReportSizingManager, ONLY: ReportSizingOutput
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetSteamBaseboardInput:'
REAL(r64), PARAMETER :: MaxFraction = 1.0d0 ! Maximum limit of fractional values
REAL(r64), PARAMETER :: MinFraction = 0.0d0 ! Minimum limit of fractional values
REAL(r64), PARAMETER :: MaxSteamFlowRate = 10.0d0 ! Maximum limit of steam volume flow rate in m3/s
REAL(r64), PARAMETER :: MinSteamFlowRate = 0.0d0 ! Minimum limit of steam volume flow rate in m3/s
! 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
LOGICAL :: SteamMessageNeeded
SteamMessageNeeded=.true.
NumSteamBaseboards = GetNumObjectsFound(cCMO_BBRadiator_Steam)
! Count total number of baseboard units
ALLOCATE(SteamBaseboard(NumSteamBaseboards))
ALLOCATE(CheckEquipName(NumSteamBaseboards))
CheckEquipName=.true.
! Get the data from the user input related to baseboard heaters
DO BaseboardNum = 1, NumSteamBaseboards
CALL GetObjectItem(cCMO_BBRadiator_Steam,BaseboardNum,cAlphaArgs,NumAlphas,&
rNumericArgs,NumNumbers,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),SteamBaseboard%EquipID,BaseboardNum,IsNotOK,IsBlank,cCMO_BBRadiator_Steam//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
ENDIF
CALL VerifyUniqueBaseboardName(cCMO_BBRadiator_Steam,cAlphaArgs(1),errflag,cCMO_BBRadiator_Steam//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
SteamBaseboard(BaseboardNum)%EquipID = cAlphaArgs(1) ! Name of the baseboard
SteamBaseboard(BaseboardNum)%EquipType = TypeOf_Baseboard_Rad_Conv_Steam !'ZoneHVAC:Baseboard:RadiantConvective:Steam'
! Get schedule
SteamBaseboard(BaseboardNum)%Schedule = cAlphaArgs(2)
IF (lAlphaFieldBlanks(2)) THEN
SteamBaseboard(BaseboardNum)%SchedPtr = ScheduleAlwaysOn
ELSE
SteamBaseboard(BaseboardNum)%SchedPtr = GetScheduleIndex(cAlphaArgs(2))
IF (SteamBaseboard(BaseboardNum)%SchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//TRIM(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound=.true.
ENDIF
ENDIF
! Get inlet node number
SteamBaseboard(BaseboardNum)%SteamInletNode = &
GetOnlySingleNode(cAlphaArgs(3),ErrorsFound,cCMO_BBRadiator_Steam,cAlphaArgs(1), &
NodeType_Steam, NodeConnectionType_Inlet,1,ObjectIsNotParent)
! Get outlet node number
SteamBaseboard(BaseboardNum)%SteamOutletNode = &
GetOnlySingleNode(cAlphaArgs(4),ErrorsFound,cCMO_BBRadiator_Steam,cAlphaArgs(1), &
NodeType_Steam,NodeConnectionType_Outlet,1,ObjectIsNotParent)
CALL TestCompSet(cCMO_BBRadiator_Steam,cAlphaArgs(1),cAlphaArgs(3), &
cAlphaArgs(4),'Hot Steam Nodes')
! Desired degree of cooling
SteamBaseboard(BaseboardNum)%DegofSubCooling = rNumericArgs(1)
! Maximum steam flow rate
SteamBaseboard(BaseboardNum)%SteamVolFlowRateMax = rNumericArgs(2)
IF(SteamBaseboard(BaseboardNum)%SteamVolFlowRateMax >= MaxSteamFlowRate) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(2))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxSteamFlowRate,2))//'].')
SteamBaseboard(BaseboardNum)%SteamVolFlowRateMax = MaxSteamFlowRate
ELSE IF (SteamBaseboard(BaseboardNum)%SteamVolFlowRateMax <= MinSteamFlowRate .AND. &
SteamBaseboard(BaseboardNum)%SteamVolFlowRateMax /= autosize) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(2))//' was less than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinSteamFlowRate,2))//'].')
SteamBaseboard(BaseboardNum)%SteamVolFlowRateMax = MinSteamFlowRate
END IF
SteamBaseboard(BaseboardNum)%Offset = rNumericArgs(3)
! Set default convergence tolerance
IF (SteamBaseboard(BaseboardNum)%Offset .LE. 0.0d0) THEN
SteamBaseboard(BaseboardNum)%Offset = 0.001d0
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(6))//' was less than the allowable minimum.')
CALL ShowContinueError('...reset to default value=[0.001].')
END IF
! Fraction of radiant heat out of the total heating rate of the unit
SteamBaseboard(BaseboardNum)%FracRadiant = rNumericArgs(4)
IF (SteamBaseboard(BaseboardNum)%FracRadiant < MinFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(7))//' was lower than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinFraction,3))//'].')
SteamBaseboard(BaseboardNum)%FracRadiant = MinFraction
ELSE IF (SteamBaseboard(BaseboardNum)%FracRadiant > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(7))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,3))//'].')
SteamBaseboard(BaseboardNum)%FracRadiant = MaxFraction
END IF
! Remaining fraction is added to the zone as convective heat transfer
AllFracsSummed = SteamBaseboard(BaseboardNum)%FracRadiant
IF (AllFracsSummed > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", Fraction Radiant was higher than the allowable maximum.')
SteamBaseboard(BaseboardNum)%FracRadiant = MaxFraction
SteamBaseboard(BaseboardNum)%FracConvect = 0.0d0
ELSE
SteamBaseboard(BaseboardNum)%FracConvect = 1.0d0 - AllFracsSummed
END IF
! Fraction of radiant heat addition to the people within the radiant heating capacity specified by the user
SteamBaseboard(BaseboardNum)%FracDistribPerson = rNumericArgs(5)
IF (SteamBaseboard(BaseboardNum)%FracDistribPerson < MinFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(8))//' was lower than the allowable minimum.')
CALL ShowContinueError('...reset to minimum value=['//trim(RoundSigDigits(MinFraction,3))//'].')
SteamBaseboard(BaseboardNum)%FracDistribPerson = MinFraction
END IF
IF (SteamBaseboard(BaseboardNum)%FracDistribPerson > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(8))//' was higher than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,3))//'].')
SteamBaseboard(BaseboardNum)%FracDistribPerson = MaxFraction
END IF
!
SteamBaseboard(BaseboardNum)%TotSurfToDistrib = NumNumbers - 5
! IF (SteamBaseboard(BaseboardNum)%TotSurfToDistrib > MaxDistribSurfaces) THEN
! CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//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.')
! SteamBaseboard(BaseboardNum)%TotSurfToDistrib = MaxDistribSurfaces
! END IF
IF ( (SteamBaseboard(BaseboardNum)%TotSurfToDistrib < MinDistribSurfaces) .AND. &
(SteamBaseboard(BaseboardNum)%FracRadiant > MinFraction) ) THEN
CALL ShowSevereError(RoutineName//cCMO_BBRadiator_Steam//'="'//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.
SteamBaseboard(BaseboardNum)%TotSurfToDistrib = 0
END IF
! Allocate the surfaces and fractions
ALLOCATE(SteamBaseboard(BaseboardNum)%SurfaceName(SteamBaseboard(BaseboardNum)%TotSurfToDistrib))
SteamBaseboard(BaseboardNum)%SurfaceName=' '
ALLOCATE(SteamBaseboard(BaseboardNum)%SurfacePtr(SteamBaseboard(BaseboardNum)%TotSurfToDistrib))
SteamBaseboard(BaseboardNum)%SurfacePtr=0
ALLOCATE(SteamBaseboard(BaseboardNum)%FracDistribToSurf(SteamBaseboard(BaseboardNum)%TotSurfToDistrib))
SteamBaseboard(BaseboardNum)%FracDistribToSurf=0.0d0
AllFracsSummed = SteamBaseboard(BaseboardNum)%FracDistribPerson
Do SurfNum = 1,SteamBaseboard(BaseboardNum)%TotSurfToDistrib
SteamBaseboard(BaseboardNum)%SurfaceName(SurfNum) = cAlphaArgs(SurfNum + 4)
SteamBaseboard(BaseboardNum)%SurfacePtr(SurfNum) = FindItemInList(cAlphaArgs(SurfNum + 4),Surface%Name,TotSurfaces)
SteamBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) = rNumericArgs(SurfNum + 5)
IF (SteamBaseboard(BaseboardNum)%SurfacePtr(SurfNum) == 0 ) THEN
CALL ShowSevereError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cAlphaFieldNames(SurfNum+4))//'="'//trim(cAlphaArgs(SurfNum + 4))//'" invalid - not found.')
ErrorsFound = .true.
END IF
IF (SteamBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) > MaxFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(SurfNum+6))//'was greater than the allowable maximum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MaxFraction,1))//'].')
SteamBaseboard(BaseboardNum)%TotSurfToDistrib = MaxFraction
END IF
IF (SteamBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum) < MinFraction) THEN
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//trim(cAlphaArgs(1))// &
'", '//trim(cNumericFieldNames(SurfNum+6))//'was less than the allowable minimum.')
CALL ShowContinueError('...reset to maximum value=['//trim(RoundSigDigits(MinFraction,1))//'].')
SteamBaseboard(BaseboardNum)%TotSurfToDistrib = MinFraction
END IF
IF (SteamBaseboard(BaseboardNum)%SurfacePtr(SurfNum) /= 0 ) THEN
Surface(SteamBaseboard(BaseboardNum)%SurfacePtr(SurfNum))%IntConvSurfGetsRadiantHeat = .TRUE.
ENDIF
AllFracsSummed = AllFracsSummed + SteamBaseboard(BaseboardNum)%FracDistribToSurf(SurfNum)
End DO ! surfaces
IF (AllFracsSummed > (MaxFraction + 0.01d0) ) THEN
CALL ShowSevereError('Fraction of radiation distributed to surfaces sums up to greater than 1 for '//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Occurs in Baseboard Heater='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
IF ( (AllFracsSummed < (MaxFraction - 0.01d0)) .AND. & ! User didn't distribute all of the
(SteamBaseboard(BaseboardNum)%FracRadiant > MinFraction) ) THEN ! radiation warn that some will be lost
CALL ShowWarningError(RoutineName//cCMO_BBRadiator_Steam//'="'//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
IF (SteamIndex == 0 .and. BaseboardNum == 1) THEN
SteamIndex=FindRefrigerant('Steam')
IF (SteamIndex == 0) THEN
CALL ShowSevereError(RoutineName//'Steam Properties for '//TRIM(cAlphaArgs(1))// &
' not found.')
IF (SteamMessageNeeded) CALL ShowContinueError('Steam Fluid Properties should have been included in the input file.')
ErrorsFound=.true.
SteamMessageNeeded=.false.
ENDIF
ENDIF
SteamBaseboard(BaseBoardNum)%FluidIndex=SteamIndex
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//cCMO_BBRadiator_Steam//'Errors found getting input. Program terminates.')
END IF
! Setup Report variables for the Coils
DO BaseboardNum = 1, NumSteamBaseboards
! CurrentModuleObject='ZoneHVAC:Baseboard:RadiantConvective:Steam'
CALL SetupOutputVariable('Baseboard Total Heating Rate [W]', SteamBaseboard(BaseboardNum)%TotPower, &
'System','Average',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Convective Heating Rate [W]', SteamBaseboard(BaseboardNum)%ConvPower, &
'System','Average',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Radiant Heating Rate [W]', SteamBaseboard(BaseboardNum)%RadPower, &
'System','Average',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Total Heating Energy [J]', SteamBaseboard(BaseboardNum)%TotEnergy, &
'System','Sum',SteamBaseboard(BaseboardNum)%EquipID, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='BASEBOARD',GroupKey='System')
CALL SetupOutputVariable('Baseboard Convective Heating Energy [J]', SteamBaseboard(BaseboardNum)%ConvEnergy, &
'System','Sum',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Radiant Heating Energy [J]', SteamBaseboard(BaseboardNum)%RadEnergy, &
'System','Sum',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Steam Energy [J]', SteamBaseboard(BaseboardNum)%Energy, &
'System','Sum',SteamBaseboard(BaseboardNum)%EquipID, &
ResourceTypeKey='PLANTLOOPHEATINGDEMAND',EndUseKey='BASEBOARD',GroupKey='System')
CALL SetupOutputVariable('Baseboard Steam Rate [W]', SteamBaseboard(BaseboardNum)%Power, &
'System','Average',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Steam Mass Flow Rate [kg/s]', SteamBaseboard(BaseboardNum)%SteamMassFlowRate, &
'System','Average',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Steam Inlet Temperature [C]', SteamBaseboard(BaseboardNum)%SteamInletTemp, &
'System','Average',SteamBaseboard(BaseboardNum)%EquipID)
CALL SetupOutputVariable('Baseboard Steam Outlet Temperature [C]', SteamBaseboard(BaseboardNum)%SteamOutletTemp, &
'System','Average',SteamBaseboard(BaseboardNum)%EquipID)
END DO
RETURN
END SUBROUTINE GetSteamBaseboardInput