create predefined report entries
SUBROUTINE GetVarSpeedCoilInput
! SUBROUTINE INFORMATION:
! AUTHOR Bo Shen
! DATE WRITTEN March, 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for HPs and stores it in HP data structures
! METHODOLOGY EMPLOYED:
! Uses "Get" routines to read in data.
! REFERENCES:
! n/a
! USE STATEMENTS:
USE InputProcessor
USE NodeInputManager
USE BranchNodeConnections, ONLY: TestCompSet
USE GlobalNames, ONLY: VerifyUniqueCoilName
USE OutputReportPredefined
USE General, ONLY: TrimSigDigits
USE CurveManager, ONLY: GetCurveIndex, GetCurveType, CurveValue, SetCurveOutputMinMaxValues
USE OutAirNodeManager, ONLY: CheckOutAirNodeNumber
USE WaterManager, ONLY: SetupTankDemandComponent, SetupTankSupplyComponent
USE ScheduleManager, ONLY: GetScheduleIndex
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER (len=*), PARAMETER :: RoutineName='GetVarSpeedCoilInput: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: DXCoilNum ! The Water to Air HP that you are currently loading input into
INTEGER :: NumCool ! Counter for cooling coil, water source
INTEGER :: NumCoolAS ! Counter for cooling coil, air source
INTEGER :: NumHeat ! Counter for heating coil, water source
INTEGER :: NumHeatAS ! Counter for heating coil, air source
INTEGER :: WatertoAirHPNum ! Counter
INTEGER :: I ! Loop index increment
INTEGER :: NumAlphas ! Number of variables in String format
INTEGER :: NumNums ! Number of variables in Numeric format
INTEGER :: NumParams ! Total number of input fields
INTEGER :: MaxNums=0 ! Maximum number of numeric input fields
INTEGER :: MaxAlphas=0 ! Maximum number of alpha input fields
INTEGER :: IOSTAT
INTEGER :: AlfaFieldIncre !increment number of Alfa field
LOGICAL :: ErrorsFound = .FALSE. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
LOGICAL :: errflag
REAL(r64) :: CurveVal ! Used to verify modifier curves equal 1 at rated conditions
CHARACTER (len=MaxNameLength) :: CurrentModuleObject ! for ease in getting objects
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: AlphArray ! Alpha input items for object
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
REAL(r64), ALLOCATABLE, DIMENSION(:) :: NumArray ! Numeric input items for object
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
NumCool = GetNumObjectsFound('COIL:COOLING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT')
NumHeat = GetNumObjectsFound('COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT')
NumCoolAS = GetNumObjectsFound('COIL:COOLING:DX:VARIABLESPEED')
NumHeatAS = GetNumObjectsFound('COIL:HEATING:DX:VARIABLESPEED')
NumWatertoAirHPs = NumCool+NumHeat+NumCoolAS+NumHeatAS
DXCoilNum=0
IF(NumWatertoAirHPs <= 0) THEN
CALL ShowSevereError('No Equipment found in SimWatertoAirHPSimple')
ErrorsFound=.TRUE.
END IF
! Allocate Arrays
IF (NumWatertoAirHPs.GT.0) THEN
ALLOCATE(VarSpeedCoil(NumWatertoAirHPs))
ENDIF
CALL GetObjectDefMaxArgs('COIL:COOLING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT',NumParams,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT',NumParams,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('COIL:COOLING:DX:VARIABLESPEED',NumParams,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('COIL:HEATING:DX:VARIABLESPEED',NumParams,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
ALLOCATE(AlphArray(MaxAlphas))
AlphArray=' '
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks=.TRUE.
ALLOCATE(cNumericFields(MaxNums))
cNumericFields=' '
ALLOCATE(lNumericBlanks(MaxNums))
lNumericBlanks=.TRUE.
ALLOCATE(NumArray(MaxNums))
NumArray=0.0d0
! Get the data for cooling coil, WATER SOURCE
CurrentModuleObject = 'Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit' !for reporting
DO WatertoAirHPNum = 1, NumCool
DXCoilNum= DXCoilNum + 1
AlfaFieldIncre = 1
CALL GetObjectItem(CurrentModuleObject,DXCoilNum,AlphArray,NumAlphas, &
NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(AlphArray(1),VarSpeedCoil%Name,DXCoilNum-1, ISNotOK,ISBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
CALL VerifyUniqueCoilName(CurrentModuleObject,AlphArray(1),errflag,TRIM(CurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
VarSpeedCoil(DXCoilNum)%Name = TRIM(AlphArray(1))
VarSpeedCoil(DXCoilNum)%CoolHeatType = 'COOLING'
VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum = TypeOf_CoilVSWAHPCoolingEquationFit
VarSpeedCoil(DXCoilNum)%NumOfSpeeds = INT(NumArray(1))
VarSpeedCoil(DXCoilNum)%NormSpedLevel = INT(NumArray(2))
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal=NumArray(3)
VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate = NumArray(4)
VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate=NumArray(5)
VarSpeedCoil(DXCoilNum)%Twet_Rated=NumArray(6)
VarSpeedCoil(DXCoilNum)%Gamma_Rated=NumArray(7)
VarSpeedCoil(DXCoilNum)%HOTGASREHEATFLG=INT(NumArray(8))
VarSpeedCoil(DXCoilNum)%CondenserType = WaterCooled
VarSpeedCoil(DXCoilNum)%WaterInletNodeNum = &
GetOnlySingleNode(AlphArray(2),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Water,NodeConnectionType_Inlet,2,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%WaterOutletNodeNum = &
GetOnlySingleNode(AlphArray(3),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Water,NodeConnectionType_Outlet,2,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%AirInletNodeNum = &
GetOnlySingleNode(AlphArray(4),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%AirOutletNodeNum = &
GetOnlySingleNode(AlphArray(5),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(2),AlphArray(3),'Water Nodes')
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(4),AlphArray(5),'Air Nodes')
! If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 2) Then
If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 1) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(1))//' must be >= 1.'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(1),0)))
ErrorsFound=.TRUE.
End If
If (VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) THEN
VarSpeedCoil(DXCoilNum)%NormSpedLevel = VarSpeedCoil(DXCoilNum)%NumOfSpeeds
END IF
If ((VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) &
.OR. (VarSpeedCoil(DXCoilNum)%NormSpedLevel <= 0)) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(2))//' must be valid speed level'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(2),0)))
ErrorsFound=.TRUE.
End If
!part load curve
VarSpeedCoil(DXCoilNum)%PLFFPLR = GetCurveIndex(AlphArray(6)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%PLFFPLR .EQ. 0) THEN
IF (lAlphaBlanks(6)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(6))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(6))//'="'//TRIM(AlphArray(6))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%PLFFPLR,1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)&
//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(6))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
END IF
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I) = NumArray(9+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSRatedSHR(I) = NumArray(10+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSRatedCOP(I) = NumArray(11+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I) = NumArray(12+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(I) = NumArray(13+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSWasteHeatFrac(I) = NumArray(14+(I-1)*6)
AlfaFieldIncre = 7+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))&
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is BiQuadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I),RatedInletWetbulbTemp,RatedInletWaterTemp)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 8+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre ))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre ))//'="' &
//TRIM(AlphArray(AlfaFieldIncre ))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)// &
'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre ))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName// &
trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre ))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 9+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre =10+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//&
TRIM(cAlphaFields(AlfaFieldIncre))//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Biquadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I),RatedInletWetbulbTemp,RatedInletWaterTemp)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(1))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre =11+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))&
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject) &
//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre =12+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre =13+(I-1)*7
! Read waste heat modifier curve name
VarSpeedCoil(DXCoilNum)%MSWasteHeat(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSWasteHeat(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal types are BiQuadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSWasteHeat(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSWasteHeat(I),RatedInletWaterTemp,RatedInletAirTemp)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSWasteHeat(I))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
END DO
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedPercentTotCap(I) =VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(VarSpeedCoil(DXCoilNum)%NumOfSpeeds)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowPerRatedTotCap(I) = VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowPerRatedTotCap(I) = VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)
END DO
CALL SetupOutputVariable('Cooling Coil Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%Energy,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='Cooling',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Total Cooling Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergyLoadTotal,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='COOLINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergySensible,'System','Summed',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Latent Cooling Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergyLatent,'System','Summed',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Source Side Heat Transfer Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergySource,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='PLANTLOOPCOOLINGDEMAND',EndUseKey='COOLINGCOILS',GroupKey='System')
!for table output, being consistent with outher water-to-air coils
! IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal /= AutoSize) THEN
! VarSpeedCoil(DXCoilNum)%RatedCapCoolSens = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
! *VarSpeedCoil(DXCoilNum)%MSRatedSHR(VarSpeedCoil(DXCoilNum)%NormSpedLevel)
! ELSE
! VarSpeedCoil(DXCoilNum)%RatedCapCoolSens = AUTOSIZE
! END IF
VarSpeedCoil(DXCoilNum)%RatedCapCoolSens = AUTOSIZE !always auto-sized, to be determined in the sizing calculation
! BAN Sept 30 2103, CR9322, commented out, now it is redundant, it is reported from sizing routine
!!create predefined report entries
!CALL PreDefTableEntry(pdchCoolCoilType,VarSpeedCoil(DXCoilNum)%Name,CurrentModuleObject)
!CALL PreDefTableEntry(pdchCoolCoilTotCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
!CALL PreDefTableEntry(pdchCoolCoilSensCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
!CALL PreDefTableEntry(pdchCoolCoilLatCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
! - VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
!CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens &
! / VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
!CALL PreDefTableEntry(pdchCoolCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,&
! VarSpeedCoil(DXCoilNum)%MSRatedCOP(VarSpeedCoil(DXCoilNum)%NormSpedLevel))
END DO
!-------------------------AIR SOURCE, COOLING---BEGIN
! Get the data for cooling coil, AIR SOURCE
CurrentModuleObject = 'Coil:Cooling:DX:VariableSpeed' !for reporting
DO WatertoAirHPNum = 1, NumCoolAS
DXCoilNum= DXCoilNum + 1
AlfaFieldIncre = 1
CALL GetObjectItem(CurrentModuleObject,DXCoilNum,AlphArray,NumAlphas, &
NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(AlphArray(1),VarSpeedCoil%Name,DXCoilNum-1, ISNotOK,ISBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
CALL VerifyUniqueCoilName(CurrentModuleObject,AlphArray(1),errflag,TRIM(CurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
VarSpeedCoil(DXCoilNum)%Name = TRIM(AlphArray(1))
VarSpeedCoil(DXCoilNum)%CoolHeatType = 'COOLING'
VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum = Coil_CoolingAirToAirVariableSpeed
VarSpeedCoil(DXCoilNum)%NumOfSpeeds = INT(NumArray(1))
VarSpeedCoil(DXCoilNum)%NormSpedLevel = INT(NumArray(2))
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal=NumArray(3)
VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate = NumArray(4)
VarSpeedCoil(DXCoilNum)%Twet_Rated=NumArray(5)
VarSpeedCoil(DXCoilNum)%Gamma_Rated=NumArray(6)
VarSpeedCoil(DXCoilNum)%AirInletNodeNum = &
GetOnlySingleNode(AlphArray(2),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%AirOutletNodeNum = &
GetOnlySingleNode(AlphArray(3),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(2),AlphArray(3),'Air Nodes')
If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 1) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(1))//' must be >= 1.'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(1),0)))
ErrorsFound=.TRUE.
End If
If (VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) THEN
VarSpeedCoil(DXCoilNum)%NormSpedLevel = VarSpeedCoil(DXCoilNum)%NumOfSpeeds
END IF
If ((VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) &
.OR. (VarSpeedCoil(DXCoilNum)%NormSpedLevel <= 0)) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(2))//' must be valid speed level'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(2),0)))
ErrorsFound=.TRUE.
End If
!part load curve
VarSpeedCoil(DXCoilNum)%PLFFPLR = GetCurveIndex(AlphArray(4)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%PLFFPLR .EQ. 0) THEN
IF (lAlphaBlanks(4)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(6))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(4))//'="'//TRIM(AlphArray(4))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%PLFFPLR,1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)&
//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(4))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
END IF
! outdoor condenser node
IF (lAlphaBlanks(5)) THEN
VarSpeedCoil(DXCoilNum)%CondenserInletNodeNum = 0
ELSE
VarSpeedCoil(DXCoilNum)%CondenserInletNodeNum = &
GetOnlySingleNode(AlphArray(5),ErrorsFound,TRIM(CurrentModuleObject),VarSpeedCoil(DXCoilNum)%Name, &
NodeType_Air,NodeConnectionType_OutsideAirReference,1,ObjectIsNotParent)
IF (.not. CheckOutAirNodeNumber(VarSpeedCoil(DXCoilNum)%CondenserInletNodeNum)) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)// &
'", may be invalid')
CALL ShowContinueError(TRIM(cAlphaFields(10))//'="'//TRIM(AlphArray(5))// &
'", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.')
CALL ShowContinueError('This node needs to be included in an air system or the coil model will not be valid' &
//', and the simulation continues')
END IF
ENDIF
IF ((SameString(AlphArray(6),'AirCooled')) .OR. lAlphaBlanks(6)) THEN
VarSpeedCoil(DXCoilNum)%CondenserType = AirCooled
ELSEIF (SameString(AlphArray(6),'EvaporativelyCooled')) THEN
VarSpeedCoil(DXCoilNum)%CondenserType = EvapCooled
VarSpeedCoil(DXCoilNum)%ReportEvapCondVars = .TRUE.
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cAlphaFields(6))//'="'//TRIM(AlphArray(6))//'":')
CALL ShowContinueError('...must be AirCooled or EvaporativelyCooled.')
ErrorsFound = .TRUE.
END IF
VarSpeedCoil(DXCoilNum)%EvapCondPumpElecNomPower = NumArray(7)
IF (VarSpeedCoil(DXCoilNum)%EvapCondPumpElecNomPower .LT. 0.0d0) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//trim(cNumericFields(7))//' cannot be < 0.0.')
CALL ShowContinueError('...entered value=['//trim(TrimSigDigits(NumArray(7),2))//'].')
ErrorsFound = .TRUE.
END IF
!Set crankcase heater capacity
VarSpeedCoil(DXCoilNum)%CrankcaseHeaterCapacity = NumArray(8)
IF (VarSpeedCoil(DXCoilNum)%CrankcaseHeaterCapacity .LT. 0.0d0) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//trim(cNumericFields(8))//' cannot be < 0.0.')
CALL ShowContinueError('...entered value=['//trim(TrimSigDigits(NumArray(8),2))//'].')
ErrorsFound = .TRUE.
END IF
!Set crankcase heater cutout temperature
VarSpeedCoil(DXCoilNum)%MaxOATCrankcaseHeater = NumArray(9)
! Get Water System tank connections
! A7, \field Name of Water Storage Tank for Supply
VarSpeedCoil(DXCoilNum)%EvapWaterSupplyName = AlphArray(7)
IF (lAlphaBlanks(7)) THEN
VarSpeedCoil(DXCoilNum)%EvapWaterSupplyMode = WaterSupplyFromMains
ELSE
VarSpeedCoil(DXCoilNum)%EvapWaterSupplyMode = WaterSupplyFromTank
CALL SetupTankDemandComponent(VarSpeedCoil(DXCoilNum)%Name,TRIM(CurrentModuleObject), &
VarSpeedCoil(DXCoilNum)%EvapWaterSupplyName, ErrorsFound, VarSpeedCoil(DXCoilNum)%EvapWaterSupTankID, &
VarSpeedCoil(DXCoilNum)%EvapWaterTankDemandARRID )
ENDIF
!A8; \field Name of Water Storage Tank for Condensate Collection
VarSpeedCoil(DXCoilNum)%CondensateCollectName = AlphArray(8)
IF (lAlphaBlanks(8)) THEN
VarSpeedCoil(DXCoilNum)%CondensateCollectMode = CondensateDiscarded
ELSE
VarSpeedCoil(DxCoilNum)%CondensateCollectMode = CondensateToTank
CALL SetupTankSupplyComponent(VarSpeedCoil(DXCoilNum)%Name,TRIM(CurrentModuleObject), &
VarSpeedCoil(DXCoilNum)%CondensateCollectName, ErrorsFound, VarSpeedCoil(DXCoilNum)%CondensateTankID, &
VarSpeedCoil(DXCoilNum)%CondensateTankSupplyARRID )
END IF
! Basin heater power as a function of temperature must be greater than or equal to 0
VarSpeedCoil(DxCoilNum)%BasinHeaterPowerFTempDiff = NumArray(10)
IF(NumArray(10) .LT. 0.0d0) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//trim(cNumericFields(10))//' must be >= 0.0.')
CALL ShowContinueError('...entered value=['//trim(TrimSigDigits(NumArray(10),2))//'].')
ErrorsFound = .TRUE.
END IF
VarSpeedCoil(DxCoilNum)%BasinHeaterSetPointTemp = NumArray(11)
IF(VarSpeedCoil(DxCoilNum)%BasinHeaterPowerFTempDiff .GT. 0.0d0) THEN
IF(VarSpeedCoil(DxCoilNum)%BasinHeaterSetPointTemp < 2.0d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)// &
'", freeze possible')
CALL ShowContinueError('...'//trim(cNumericFields(11))//' is < 2 {C}. Freezing could occur.')
CALL ShowContinueError('...entered value=['//trim(TrimSigDigits(NumArray(11),2))//'].')
END IF
END IF
IF(.NOT. lAlphaBlanks(9))THEN
VarSpeedCoil(DxCoilNum)%BasinHeaterSchedulePtr = GetScheduleIndex(AlphArray(9))
IF(VarSpeedCoil(DxCoilNum)%BasinHeaterSchedulePtr .EQ. 0)THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(14))//'="'//TRIM(AlphArray(9))//'".')
CALL ShowContinueError('Basin heater will be available to operate throughout the simulation.')
END IF
END IF
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I) = NumArray(12+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSRatedSHR(I) = NumArray(13+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSRatedCOP(I) = NumArray(14+(I-1)*6)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I) = NumArray(15+(I-1)*6)
VarSpeedCoil(DXCoilNum)%EvapCondAirFlow(I) = NumArray(16+(I-1)*6)
VarSpeedCoil(DXCoilNum)%EvapCondEffect(I) = NumArray(17+(I-1)*6)
IF (VarSpeedCoil(DXCoilNum)%EvapCondEffect(I) .LT. 0.0d0 .OR. VarSpeedCoil(DXCoilNum)%EvapCondEffect(I) .GT. 1.0d0) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//trim(cNumericFields(17+(I-1)*6))//' cannot be < 0.0 or > 1.0.')
CALL ShowContinueError('...entered value=['//trim(TrimSigDigits(NumArray(17+(I-1)*6),2))//'].')
ErrorsFound = .TRUE.
END IF
AlfaFieldIncre = 10+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))&
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is BiQuadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I),RatedInletWetbulbTemp,RatedAmbAirTemp)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 11+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre ))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre ))//'="' &
//TRIM(AlphArray(AlfaFieldIncre ))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)// &
'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre ))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName// &
trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre ))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre =12+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//&
TRIM(cAlphaFields(AlfaFieldIncre))//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Biquadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I),RatedInletWetbulbTemp,RatedAmbAirTemp)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(1))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre =13+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))&
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject) &
//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
END DO
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedPercentTotCap(I) =VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(VarSpeedCoil(DXCoilNum)%NumOfSpeeds)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowPerRatedTotCap(I) = VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)
VarSpeedCoil(DXCoilNum)%MSRatedEvapCondVolFlowPerRatedTotCap(I) = VarSpeedCoil(DXCoilNum)%EvapCondAirFlow(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)
END DO
CALL SetupOutputVariable('Cooling Coil Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%Energy,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='Cooling',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Total Cooling Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergyLoadTotal,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='COOLINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergySensible,'System','Summed',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Latent Cooling Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergyLatent,'System','Summed',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Source Side Heat Transfer Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergySource,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='PLANTLOOPCOOLINGDEMAND',EndUseKey='COOLINGCOILS',GroupKey='System')
VarSpeedCoil(DXCoilNum)%RatedCapCoolSens = AUTOSIZE !always auto-sized, to be determined in the sizing calculation
! BAN Sept 30 2103, CR9322, commented out, now it is redundant, it is reported from sizing routine
!create predefined report entries
!CALL PreDefTableEntry(pdchCoolCoilType,VarSpeedCoil(DXCoilNum)%Name,CurrentModuleObject)
!CALL PreDefTableEntry(pdchCoolCoilTotCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
!CALL PreDefTableEntry(pdchCoolCoilSensCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
!CALL PreDefTableEntry(pdchCoolCoilLatCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
! - VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
!CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens &
! / VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
!CALL PreDefTableEntry(pdchCoolCoilNomEff,VarSpeedCoil(DXCoilNum)%Name, &
! VarSpeedCoil(DXCoilNum)%MSRatedCOP(VarSpeedCoil(DXCoilNum)%NormSpedLevel))
END DO
!-------------------------AIR SOURCE COOLING---END
! Get the data for heating coil, WATER SOURCE
CurrentModuleObject = 'Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit'
DO WatertoAirHPNum = 1, NumHeat
DXCoilNum= DXCoilNum + 1
CALL GetObjectItem(CurrentModuleObject,WatertoAirHPNum,AlphArray,NumAlphas, &
NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(AlphArray(1),VarSpeedCoil%Name,DXCoilNum-1, ISNotOK,ISBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
CALL VerifyUniqueCoilName(CurrentModuleObject,AlphArray(1),errflag,TRIM(CurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
VarSpeedCoil(DXCoilNum)%Name = TRIM(AlphArray(1))
VarSpeedCoil(DXCoilNum)%CoolHeatType = 'HEATING'
VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum = TypeOf_CoilVSWAHPHeatingEquationFit
VarSpeedCoil(DXCoilNum)%NumOfSpeeds = INT(NumArray(1))
VarSpeedCoil(DXCoilNum)%NormSpedLevel = INT(NumArray(2))
VarSpeedCoil(DXCoilNum)%RatedCapHeat=NumArray(3)
VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate = NumArray(4)
VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate=NumArray(5)
VarSpeedCoil(DXCoilNum)%CondenserType = WaterCooled
VarSpeedCoil(DXCoilNum)%WaterInletNodeNum = &
GetOnlySingleNode(AlphArray(2),ErrorsFound,TRIM(CurrentModuleObject), &
AlphArray(1),NodeType_Water,NodeConnectionType_Inlet,2,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%WaterOutletNodeNum = &
GetOnlySingleNode(AlphArray(3),ErrorsFound,TRIM(CurrentModuleObject), &
AlphArray(1),NodeType_Water,NodeConnectionType_Outlet,2,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%AirInletNodeNum = &
GetOnlySingleNode(AlphArray(4),ErrorsFound,TRIM(CurrentModuleObject), &
AlphArray(1),NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%AirOutletNodeNum = &
GetOnlySingleNode(AlphArray(5),ErrorsFound,TRIM(CurrentModuleObject), &
AlphArray(1),NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(2),AlphArray(3),'Water Nodes')
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(4),AlphArray(5),'Air Nodes')
! If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 2) Then
If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 1) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(1))//' must be >= 1.'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(1),0)))
ErrorsFound=.TRUE.
End If
If (VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) THEN
VarSpeedCoil(DXCoilNum)%NormSpedLevel = VarSpeedCoil(DXCoilNum)%NumOfSpeeds
END IF
If ((VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) &
.OR. (VarSpeedCoil(DXCoilNum)%NormSpedLevel <= 0)) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(2))//' must be valid speed level'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(2),0)))
ErrorsFound=.TRUE.
End If
!part load curve
VarSpeedCoil(DXCoilNum)%PLFFPLR = GetCurveIndex(AlphArray(6)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%PLFFPLR .EQ. 0) THEN
IF (lAlphaBlanks(6)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(6))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(6))//'="'//TRIM(AlphArray(6))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%PLFFPLR,1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(6))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
END IF
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I) = NumArray(6+(I-1)*5)
VarSpeedCoil(DXCoilNum)%MSRatedCOP(I) = NumArray(7+(I-1)*5)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I) = NumArray(8+(I-1)*5)
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(I) = NumArray(9+(I-1)*5)
VarSpeedCoil(DXCoilNum)%MSWasteHeatFrac(I) = NumArray(10+(I-1)*5)
AlfaFieldIncre = 7+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is BiQuadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I),RatedInletAirTempHeat,RatedInletWaterTempHeat)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 8+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))//'="' &
//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 9+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))//'="'//TRIM(AlphArray(14+(I-1)*6))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 10+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Biquadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I),RatedInletAirTempHeat,RatedInletWaterTempHeat)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(1))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 11+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))//'="'// &
TRIM(AlphArray(16+(I-1)*6))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject) &
//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 12+(I-1)*7
VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))// &
'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)&
//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRWaterFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 13+(I-1)*7
! Read waste heat modifier curve name
VarSpeedCoil(DXCoilNum)%MSWasteHeat(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSWasteHeat(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal types are BiQuadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSWasteHeat(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSWasteHeat(I),RatedInletAirTempHeat,RatedInletWaterTempHeat)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSWasteHeat(I))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
END DO
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedPercentTotCap(I) =VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(VarSpeedCoil(DXCoilNum)%NumOfSpeeds)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowPerRatedTotCap(I) = VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowPerRatedTotCap(I) = VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)
END DO
CALL SetupOutputVariable('Heating Coil Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%Energy,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='Heating',GroupKey='System')
CALL SetupOutputVariable('Heating Coil Heating Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergyLoadTotal,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='HEATINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Heating Coil Source Side Heat Transfer Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergySource,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='PLANTLOOPHEATINGDEMAND',EndUseKey='HEATINGCOILS',GroupKey='System')
!create predefined report entries
CALL PreDefTableEntry(pdchHeatCoilType,VarSpeedCoil(DXCoilNum)%Name,CurrentModuleObject)
CALL PreDefTableEntry(pdchHeatCoilNomCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapHeat)
CALL PreDefTableEntry(pdchHeatCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,&
VarSpeedCoil(DXCoilNum)%MSRatedCOP(VarSpeedCoil(DXCoilNum)%NormSpedLevel))
END DO
!-------------------------AIR SOURCE, HEATING---BEGIN
! Get the data for heating coil, AIR SOURCE
CurrentModuleObject = 'COIL:HEATING:DX:VARIABLESPEED'
DO WatertoAirHPNum = 1, NumHeatAS
DXCoilNum= DXCoilNum + 1
CALL GetObjectItem(CurrentModuleObject,WatertoAirHPNum,AlphArray,NumAlphas, &
NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(AlphArray(1),VarSpeedCoil%Name,DXCoilNum-1, ISNotOK,ISBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
CALL VerifyUniqueCoilName(CurrentModuleObject,AlphArray(1),errflag,TRIM(CurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
VarSpeedCoil(DXCoilNum)%Name = TRIM(AlphArray(1))
VarSpeedCoil(DXCoilNum)%CoolHeatType = 'HEATING'
VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum = Coil_HeatingAirToAirVariableSpeed
VarSpeedCoil(DXCoilNum)%NumOfSpeeds = INT(NumArray(1))
VarSpeedCoil(DXCoilNum)%NormSpedLevel = INT(NumArray(2))
VarSpeedCoil(DXCoilNum)%RatedCapHeat=NumArray(3)
VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate = NumArray(4)
VarSpeedCoil(DXCoilNum)%AirInletNodeNum = &
GetOnlySingleNode(AlphArray(2),ErrorsFound,TRIM(CurrentModuleObject), &
AlphArray(1),NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent)
VarSpeedCoil(DXCoilNum)%AirOutletNodeNum = &
GetOnlySingleNode(AlphArray(3),ErrorsFound,TRIM(CurrentModuleObject), &
AlphArray(1),NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(2),AlphArray(3),'Air Nodes')
If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 1) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(1))//' must be >= 1.'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(1),0)))
ErrorsFound=.TRUE.
End If
If (VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) THEN
VarSpeedCoil(DXCoilNum)%NormSpedLevel = VarSpeedCoil(DXCoilNum)%NumOfSpeeds
END IF
If ((VarSpeedCoil(DXCoilNum)%NormSpedLevel > VarSpeedCoil(DXCoilNum)%NumOfSpeeds) &
.OR. (VarSpeedCoil(DXCoilNum)%NormSpedLevel <= 0)) Then
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(2))//' must be valid speed level'// &
' entered number is '//TRIM(TrimSigDigits(NumArray(2),0)))
ErrorsFound=.TRUE.
End If
!part load curve
VarSpeedCoil(DXCoilNum)%PLFFPLR = GetCurveIndex(AlphArray(4)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%PLFFPLR .EQ. 0) THEN
IF (lAlphaBlanks(4)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(4))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(4))//'="'//TRIM(AlphArray(4))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%PLFFPLR,1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'&
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(4))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
END IF
VarSpeedCoil(DXCoilNum)%DefrostEIRFT = GetCurveIndex(AlphArray(5)) ! convert curve name to number
IF (SameString(AlphArray(6),'ReverseCycle')) THEN
IF (VarSpeedCoil(DXCoilNum)%DefrostEIRFT .EQ. 0) THEN
IF (lAlphaBlanks(5)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(5))//' is blank.')
CALL ShowContinueError('...field is required because '//trim(cAlphaFields(6))//' is "ReverseCycle".')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(5))//'="'//TRIM(AlphArray(5))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is BiQuadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%DefrostEIRFT))
CASE('BIQUADRATIC')
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(5))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%DefrostEIRFT)))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
END IF
IF (SameString(AlphArray(6),'ReverseCycle')) VarSpeedCoil(DXCoilNum)%DefrostStrategy = ReverseCycle
IF (SameString(AlphArray(6),'Resistive')) VarSpeedCoil(DXCoilNum)%DefrostStrategy = Resistive
IF (VarSpeedCoil(DXCoilNum)%DefrostStrategy .EQ.0) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(6))//'="'//TRIM(AlphArray(6))//'".')
CALL ShowContinueError('...valid values for this field are ReverseCycle or Resistive.')
ErrorsFound = .TRUE.
END IF
IF (SameString(AlphArray(7),'Timed')) VarSpeedCoil(DXCoilNum)%DefrostControl = Timed
IF (SameString(AlphArray(7),'OnDemand')) VarSpeedCoil(DXCoilNum)%DefrostControl = OnDemand
IF (VarSpeedCoil(DXCoilNum)%DefrostControl .EQ.0) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(7))//'="'//TRIM(AlphArray(7))//'".')
CALL ShowContinueError('...valid values for this field are Timed or OnDemand.')
ErrorsFound = .TRUE.
END IF
!Set minimum OAT for heat pump compressor operation
VarSpeedCoil(DXCoilNum)%MinOATCompressor = NumArray(5)
! reserved for HSPF calculation
VarSpeedCoil(DXCoilNum)%OATempCompressorOn = NumArray(6)
!Set maximum outdoor temp for defrost to occur
VarSpeedCoil(DXCoilNum)%MaxOATDefrost = NumArray(7)
!Set crankcase heater capacity
VarSpeedCoil(DXCoilNum)%CrankcaseHeaterCapacity = NumArray(8)
IF (VarSpeedCoil(DXCoilNum)%CrankcaseHeaterCapacity .LT. 0.0d0) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...'//TRIM(cNumericFields(9))//' cannot be < 0.0.')
CALL ShowContinueError('...entered value=['//trim(TrimSigDigits(NumArray(9),2))//'].')
ErrorsFound = .TRUE.
END IF
!Set crankcase heater cutout temperature
VarSpeedCoil(DXCoilNum)%MaxOATCrankcaseHeater = NumArray(9)
!Set defrost time period
VarSpeedCoil(DXCoilNum)%DefrostTime = NumArray(10)
IF(VarSpeedCoil(DXCoilNum)%DefrostTime .EQ. 0.0d0 .AND. VarSpeedCoil(DXCoilNum)%DefrostControl .EQ. 1) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", ')
CALL ShowContinueError('...'//TRIM(cNumericFields(5))//' = 0.0 for defrost control = TIMED.')
END IF
!Set defrost capacity (for resistive defrost)
VarSpeedCoil(DXCoilNum)%DefrostCapacity = NumArray(11)
IF(VarSpeedCoil(DXCoilNum)%DefrostCapacity .EQ. 0.0d0 .AND. VarSpeedCoil(DXCoilNum)%DefrostStrategy .EQ. 2) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", ')
CALL ShowContinueError('...'//TRIM(cNumericFields(6))//' = 0.0 for defrost strategy = RESISTIVE.')
END IF
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I) = NumArray(12+(I-1)*3)
VarSpeedCoil(DXCoilNum)%MSRatedCOP(I) = NumArray(13+(I-1)*3)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I) = NumArray(14+(I-1)*3)
IF (VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I) < 1.d-10) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid value')
CALL ShowContinueError('...too small '//trim(cNumericFields(12+(I-1)*3))//'=['// &
trim(RoundSigDigits(VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I),2))//'].')
ErrorsFound=.true.
ENDIF
AlfaFieldIncre = 8+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is BiQuadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I),RatedInletAirTempHeat,RatedAmbAirTempHeat)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(I))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 9+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))//'="' &
//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 10+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre)) &
//'="'//TRIM(AlphArray(AlfaFieldIncre))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Biquadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I)))
CASE('BIQUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(I),RatedInletAirTempHeat,RatedAmbAirTempHeat)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRFTemp(1))))
CALL ShowContinueError('Curve type must be BiQuadratic.')
ErrorsFound=.TRUE.
END SELECT
END IF
AlfaFieldIncre = 11+(I-1)*4
VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) = GetCurveIndex(AlphArray(AlfaFieldIncre)) ! convert curve name to number
IF (VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I) .EQ. 0) THEN
IF (lAlphaBlanks(AlfaFieldIncre)) THEN
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", missing')
CALL ShowContinueError('...required '//trim(cAlphaFields(AlfaFieldIncre))//' is blank.')
ELSE
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...not found '//TRIM(cAlphaFields(AlfaFieldIncre))//'="'//TRIM(AlphArray(16+(I-1)*6))//'".')
END IF
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal type is Quadratic
SELECT CASE(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I)))
CASE('QUADRATIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="' &
//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE('CUBIC')
CurveVal = CurveValue(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I),1.0d0)
IF(CurveVal .GT. 1.10d0 .OR. CurveVal .LT. 0.90d0) THEN
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject) &
//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", curve values')
CALL ShowContinueError('...'//TRIM(cAlphaFields(AlfaFieldIncre))//' output is not equal to 1.0 '// &
'(+ or - 10%) at rated conditions.')
CALL ShowContinueError('...Curve output at rated conditions = '//TRIM(TrimSigDigits(CurveVal,3)))
END IF
CASE DEFAULT
CALL ShowSevereError(RoutineName//trim(CurrentModuleObject)//'="'//trim(VarSpeedCoil(DXCoilNum)%Name)//'", invalid')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(AlfaFieldIncre))//' type for this object = '// &
TRIM(GetCurveType(VarSpeedCoil(DXCoilNum)%MSEIRAirFFlow(I))))
CALL ShowContinueError('Curve type must be Quadratic or Cubic.')
ErrorsFound=.TRUE.
END SELECT
END IF
END DO
IF (ErrorsFound) CYCLE
Do I=1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedPercentTotCap(I) =VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(VarSpeedCoil(DXCoilNum)%NumOfSpeeds)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowPerRatedTotCap(I) = VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(I)/ &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(I)
END DO
CALL SetupOutputVariable('Heating Coil Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%Energy,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='Heating',GroupKey='System')
CALL SetupOutputVariable('Heating Coil Heating Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergyLoadTotal,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='HEATINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Heating Coil Source Side Heat Transfer Energy [J]', &
VarSpeedCoil(DXCoilNum)%EnergySource,'System','Summed',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='PLANTLOOPHEATINGDEMAND',EndUseKey='HEATINGCOILS',GroupKey='System')
!create predefined report entries
CALL PreDefTableEntry(pdchHeatCoilType,VarSpeedCoil(DXCoilNum)%Name,CurrentModuleObject)
CALL PreDefTableEntry(pdchHeatCoilNomCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapHeat)
CALL PreDefTableEntry(pdchHeatCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,&
VarSpeedCoil(DXCoilNum)%MSRatedCOP(VarSpeedCoil(DXCoilNum)%NormSpedLevel))
END DO
!-------------------------AIR SOURCE HEATING---END
DEALLOCATE(AlphArray)
DEALLOCATE(cAlphaFields)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(cNumericFields)
DEALLOCATE(lNumericBlanks)
DEALLOCATE(NumArray)
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found getting input. Program terminates.')
ENDIF
DO DXCoilNum=1,NumWatertoAirHPs
IF((VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum .EQ. Coil_CoolingAirToAirVariableSpeed) .OR. &
(VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum .EQ. Coil_HeatingAirToAirVariableSpeed)) THEN
! Setup Report variables for the Heat Pump
!cooling and heating coils separately
IF(VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum .EQ. Coil_CoolingAirToAirVariableSpeed) THEN
! air source cooling coils
CALL SetupOutputVariable('Cooling Coil Air Mass Flow Rate [kg/s]', &
VarSpeedCoil(DXCoilNum)%AirMassFlowRate,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Inlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%InletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Inlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%InletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Latent Cooling Rate [W]', &
VarSpeedCoil(DXCoilNum)%QLatent,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Outlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%OutletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Outlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%OutletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSensible,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Total Cooling Rate [W]', &
VarSpeedCoil(DXCoilNum)%QLoadTotal,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Part Load Ratio []', &
VarSpeedCoil(DXCoilNum)%PartLoadRatio,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%Power,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Runtime Fraction []', &
VarSpeedCoil(DXCoilNum)%RunFrac,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Source Side Heat Transfer Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSource,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Upper Speed Level []', &
VarSpeedCoil(DXCoilNum)%SpeedNumReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Neighboring Speed Levels Ratio []', &
VarSpeedCoil(DXCoilNum)%SpeedRatioReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
IF (VarSpeedCoil(DXCoilNum)%CondensateCollectMode == CondensateToTank) THEN
CALL SetupOutputVariable('Cooling Coil Condensate Volume Flow Rate [m3/s]', &
VarSpeedCoil(DXCoilNum)%CondensateVdot, 'System','Average', VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Condensate Volume [m3]',VarSpeedCoil(DXCoilNum)%CondensateVol,&
'System','Sum', VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='OnSiteWater', &
EndUseKey='Condensate', GroupKey='System')
ENDIF
IF (VarSpeedCoil(DXCoilNum)%ReportEvapCondVars) THEN
CALL SetupOutputVariable('Cooling Coil Condenser Inlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%CondInletTemp,'System','Average', VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Evaporative Condenser Water Volume [m3]',&
VarSpeedCoil(DXCoilNum)%EvapWaterConsump, &
'System','Sum',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Water',EndUseKey='Cooling',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Evaporative Condenser Mains Water Volume [m3]', &
VarSpeedCoil(DXCoilNum)%EvapWaterConsump, &
'System','Sum',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='MainsWater',EndUseKey='Cooling',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Evaporative Condenser Pump Electric Power [W]',&
VarSpeedCoil(DXCoilNum)%EvapCondPumpElecPower, &
'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Evaporative Condenser Pump Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%EvapCondPumpElecConsumption,'System','Sum',&
VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='COOLING',GroupKey='System')
IF(VarSpeedCoil(DXCoilNum)%BasinHeaterPowerFTempDiff .GT. 0.0d0)THEN
CALL SetupOutputVariable('Cooling Coil Basin Heater Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%BasinHeaterPower,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Basin Heater Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%BasinHeaterConsumption,'System','Sum',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='COOLING',GroupKey='System')
END IF
END IF
CALL SetupOutputVariable('Cooling Coil Crankcase Heater Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%CrankcaseHeaterPower,'System',&
'Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Crankcase Heater Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%CrankcaseHeaterConsumption, &
'System','Sum',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='COOLING',GroupKey='System')
ELSE
! air source heating coils
CALL SetupOutputVariable('Heating Coil Air Mass Flow Rate [kg/s]', &
VarSpeedCoil(DXCoilNum)%AirMassFlowRate,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Inlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%InletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Inlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%InletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Outlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%OutletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Outlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%OutletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Sensible Heating Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSensible,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Heating Rate [W]', &
VarSpeedCoil(DXCoilNum)%QLoadTotal,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Part Load Ratio []', &
VarSpeedCoil(DXCoilNum)%PartLoadRatio,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%Power,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Runtime Fraction []', &
VarSpeedCoil(DXCoilNum)%RunFrac,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Source Side Heat Transfer Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSource,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Upper Speed Level []', &
VarSpeedCoil(DXCoilNum)%SpeedNumReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Neighboring Speed Levels Ratio []', &
VarSpeedCoil(DXCoilNum)%SpeedRatioReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Defrost Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%DefrostPower,'System','Average',&
VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Defrost Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%DefrostConsumption,'System',&
'Sum',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='HEATING',GroupKey='System')
CALL SetupOutputVariable('Heating Coil Crankcase Heater Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%CrankcaseHeaterPower,'System',&
'Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Crankcase Heater Electric Energy [J]', &
VarSpeedCoil(DXCoilNum)%CrankcaseHeaterConsumption, &
'System','Sum',VarSpeedCoil(DXCoilNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='HEATING',GroupKey='System')
END IF
ELSE
IF (VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum == TypeOf_CoilVSWAHPCoolingEquationFit) THEN
! cooling WAHP coil
! Setup Report variables for water source Heat Pump
CALL SetupOutputVariable('Cooling Coil Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%Power,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Total Cooling Rate [W]', &
VarSpeedCoil(DXCoilNum)%QLoadTotal,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSensible,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Latent Cooling Rate [W]', &
VarSpeedCoil(DXCoilNum)%QLatent,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Source Side Heat Transfer Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSource,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Part Load Ratio []', &
VarSpeedCoil(DXCoilNum)%PartLoadRatio,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Runtime Fraction []', &
VarSpeedCoil(DXCoilNum)%RunFrac,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Mass Flow Rate [kg/s]', &
VarSpeedCoil(DXCoilNum)%AirMassFlowRate,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Inlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%InletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Inlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%InletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Outlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%OutletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Air Outlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%OutletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Source Side Mass Flow Rate [kg/s]', &
VarSpeedCoil(DXCoilNum)%WaterMassFlowRate,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Source Side Inlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%InletWaterTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Source Side Outlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%OutletWaterTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Upper Speed Level []', &
VarSpeedCoil(DXCoilNum)%SpeedNumReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Neighboring Speed Levels Ratio []', &
VarSpeedCoil(DXCoilNum)%SpeedRatioReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Recoverable Heat Transfer Rate [W]', &
VarSpeedCoil(DXCoilNum)%QWasteHeat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
ELSEIF (VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum == TypeOf_CoilVSWAHPHeatingEquationFit) THEN
! heating WAHP coil
! Setup Report variables for water source Heat Pump
CALL SetupOutputVariable('Heating Coil Electric Power [W]', &
VarSpeedCoil(DXCoilNum)%Power,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Heating Rate [W]', &
VarSpeedCoil(DXCoilNum)%QLoadTotal,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Sensible Heating Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSensible,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Source Side Heat Transfer Rate [W]', &
VarSpeedCoil(DXCoilNum)%QSource,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Part Load Ratio []', &
VarSpeedCoil(DXCoilNum)%PartLoadRatio,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Runtime Fraction []', &
VarSpeedCoil(DXCoilNum)%RunFrac,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Mass Flow Rate [kg/s]', &
VarSpeedCoil(DXCoilNum)%AirMassFlowRate,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Inlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%InletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Inlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%InletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Outlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%OutletAirDBTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Air Outlet Humidity Ratio [kgWater/kgDryAir]', &
VarSpeedCoil(DXCoilNum)%OutletAirHumRat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Source Side Mass Flow Rate [kg/s]', &
VarSpeedCoil(DXCoilNum)%WaterMassFlowRate,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Source Side Inlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%InletWaterTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Source Side Outlet Temperature [C]', &
VarSpeedCoil(DXCoilNum)%OutletWaterTemp,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Upper Speed Level []', &
VarSpeedCoil(DXCoilNum)%SpeedNumReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Neighboring Speed Levels Ratio []', &
VarSpeedCoil(DXCoilNum)%SpeedRatioReport,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
CALL SetupOutputVariable('Heating Coil Recoverable Heat Transfer Rate [W]', &
VarSpeedCoil(DXCoilNum)%QWasteHeat,'System','Average',VarSpeedCoil(DXCoilNum)%Name)
ENDIF
END IF
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in getting '//TRIM(CurrentModuleObject)//' input. '//&
'Preceding condition(s) causes termination.')
END IF
RETURN
END SUBROUTINE GetVarSpeedCoilInput