Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ZoneNum |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE SetSurfHBDataForMundtModel(ZoneNum)
! SUBROUTINE INFORMATION:
! AUTHOR Chanvit Chantrasrisalai
! DATE WRITTEN July 2003
! MODIFIED February 2004, fix allocate-deallocate problem (CC)
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! map data from air domain back to surface domain for each particular zone
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataLoopNode, ONLY : Node
USE DataRoomAirModel, ONLY : AirModel, DirectCoupling
USE DataSurfaces, ONLY : Surface, AdjacentAirTemp, ZoneMeanAirTemp
USE DataHeatBalance, ONLY : Zone, TempEffBulkAir
USE DataZoneEquipment, ONLY : ZoneEquipConfig
USE DataHeatBalFanSys, ONLY : MAT, ZT, TempZoneThermostatSetpoint, TempTstatAir
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ZoneNum ! index number for the specified zone
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: SurfNum ! index for surfaces
INTEGER :: SurfFirst ! index number of the first surface in the zone
INTEGER :: NumOfSurfs ! number of surfaces in the zone
INTEGER :: ZoneNodeNum ! index number of the zone node
REAL(r64) :: DeltaTemp ! dummy variable for temperature difference
REAL(r64) :: TRoomAverage ! dummy variable for mean air temperature
! FLOW:
! get surface info
SurfFirst = ZoneData(ZoneNum)%SurfFirst
NumOfSurfs = ZoneData(ZoneNum)%NumOfSurfs
IF ((SupplyAirVolumeRate.GT.0.0001d0).AND.(QsysCoolTot.GT.0.0001d0)) THEN ! Controlled zone when the system is on
IF (AirModel(ZoneNum)%TempCoupleScheme.EQ.DirectCoupling) THEN
! Use direct coupling scheme to report air temperatures back to surface/system domains
! a) Bulk air temperatures -> TempEffBulkAir(SurfNum)
DO SurfNum = 1, NumOfSurfs
TempEffBulkAir(SurfFirst+SurfNum-1) = MundtAirSurf(MundtZoneNum,SurfNum)%TmeanAir
! set flag for reference air temperature
Surface(SurfFirst+SurfNum-1)%TAirRef = AdjacentAirTemp
ENDDO
! b) Average zone air temperature -> ZT(ZoneNum)
! For Mundt model, average room air is the weighted value of floor and ceiling air temps
TRoomAverage = (LineNode(MundtZoneNum,MundtCeilAirID)%Temp+LineNode(MundtZoneNum,MundtFootAirID)%Temp) / 2
!ZT(ZoneNum) = TRoomAverage
! c) Leaving-zone air temperature -> Node(ZoneNode)%Temp
ZoneNodeNum = Zone(ZoneNum)%SystemZoneNodeNumber
Node(ZoneNodeNum)%Temp = LineNode(MundtZoneNum,ReturnNodeID)%Temp
! d) Thermostat air temperature -> TempTstatAir(ZoneNum)
TempTstatAir(ZoneNum) = LineNode(MundtZoneNum,TstatNodeID)%Temp
ELSE
! Use indirect coupling scheme to report air temperatures back to surface/system domains
! a) Bulk air temperatures -> TempEffBulkAir(SurfNum)
DO SurfNum = 1, NumOfSurfs
DeltaTemp = MundtAirSurf(MundtZoneNum,SurfNum)%TmeanAir - LineNode(MundtZoneNum,TstatNodeID)%Temp
TempEffBulkAir(SurfFirst+SurfNum-1) = TempZoneThermostatSetpoint(ZoneNum) + DeltaTemp
! set flag for reference air temperature
Surface(SurfFirst+SurfNum-1)%TAirRef = AdjacentAirTemp
ENDDO
! b) Average zone air temperature -> ZT(ZoneNum)
! For Mundt model, average room air is the weighted value of floor and ceiling air temps
TRoomAverage = (LineNode(MundtZoneNum,MundtCeilAirID)%Temp+LineNode(MundtZoneNum,MundtFootAirID)%Temp) / 2
DeltaTemp = TRoomAverage - LineNode(MundtZoneNum,TstatNodeID)%Temp
! ZT(ZoneNum) = TempZoneThermostatSetpoint(ZoneNum) + DeltaTemp
! c) Leaving-zone air temperature -> Node(ZoneNode)%Temp
ZoneNodeNum = Zone(ZoneNum)%SystemZoneNodeNumber
DeltaTemp = LineNode(MundtZoneNum,ReturnNodeID)%Temp - LineNode(MundtZoneNum,TstatNodeID)%Temp
Node(ZoneNodeNum)%Temp = TempZoneThermostatSetpoint(ZoneNum) + DeltaTemp
! d) Thermostat air temperature -> TempTstatAir(ZoneNum)
TempTstatAir(ZoneNum) = ZT(ZoneNum) ! for indirect coupling, control air temp is equal to mean air temp?
END IF
! set flag to indicate that Mundt model is used for this zone at the present time
AirModel(ZoneNum)%SimAirModel = .TRUE.
ELSE ! Controlled zone when the system is off --> Use the mixing model instead of the Mundt model
! Bulk air temperatures -> TempEffBulkAir(SurfNum)
DO SurfNum = 1, NumOfSurfs
TempEffBulkAir(SurfFirst+SurfNum-1) = MAT(ZoneNum)
! set flag for reference air temperature
Surface(SurfFirst+SurfNum-1)%TAirRef = ZoneMeanAirTemp
ENDDO
! set flag to indicate that Mundt model is NOT used for this zone at the present time
AirModel(ZoneNum)%SimAirModel = .FALSE.
END IF
RETURN
END SUBROUTINE SetSurfHBDataForMundtModel