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 CalcMundtModel(ZoneNum)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN September 2001
! RE-ENGINEERED July 2003, EnergyPlus Implementation (CC)
! MODIFIED February 2004, fix allocate-deallocate problem (CC)
! PURPOSE OF THIS SUBROUTINE:
! Compute the simplified version of Mundt and store results in Air data Manager
! argument passing is plentiful but are IN and nothing out.
! these variables are scaler conditions at current HB day,timestep, and iteration
! This subroutine is USE'ed by heat balance driver (top level module)
! METHODOLOGY EMPLOYED:
! apply Mundt's simple model for delta Temp head-foot and update values in Air data manager.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataRoomAirModel, ONLY : ConvectiveFloorSplit, InfiltratFloorSplit
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:
REAL(r64) :: TAirFoot ! air temperature at the floor
REAL(r64) :: TAirCeil ! air temperature at the ceiling
REAL(r64) :: TLeaving ! air temperature leaving zone (= return air temp)
REAL(r64) :: TControlPoint ! air temperature at thermostat
REAL(r64) :: Slope ! vertical air temperature gradient (slope) from Mundt equations
REAL(r64) :: QequipConvFloor ! convective gain at the floor due to internal heat sources
REAL(r64) :: QSensInfilFloor ! convective gain at the floor due to infiltration
REAL(r64) :: FloorSumHAT ! sum of hci*area*temp at the floor
REAL(r64) :: FloorSumHA ! sum of hci*area at the floor
REAL(r64) :: TThisNode ! dummy variable for air node temp
INTEGER :: NodeNum ! index for air nodes
INTEGER :: SurfNum ! index for surfaces
INTEGER :: SurfCounted ! number of surfaces assciated with an air node
! FLOW:
! apply floor splits
QequipConvFloor = ConvectiveFloorSplit(ZoneNum)*ConvIntGain
QSensInfilfloor = - InfiltratFloorSplit(ZoneNum)*QventCool
! Begin computations for Mundt model
! do summations for floor surfaces of this zone
FloorSumHAT = SUM(FloorSurf%Area*FloorSurf%Hc*FloorSurf%Temp)
FloorSumHA = SUM(FloorSurf%Area*FloorSurf%Hc)
! Eq 2.2 in ASHRAE RP 1222 Final report
TAirFoot = ((ZoneAirDensity*CpAir*SupplyAirVolumeRate*SupplyAirTemp)+(FloorSumHAT)+QequipConvFloor+QSensInfilfloor) &
/((ZoneAirDensity*CpAir*SupplyAirVolumeRate)+(FloorSumHA))
! prevent dividing by zero due to zero cooling load (or zero supply air flow rate)
IF (QsysCoolTot.LE.0.0d0) THEN
TLeaving = SupplyAirTemp
ELSE
! Eq 2.3 in ASHRAE RP 1222 Final report
TLeaving = (QsysCoolTot/(ZoneAirDensity*CpAir*SupplyAirVolumeRate))+SupplyAirTemp
END IF
! Eq 2.4 in ASHRAE RP 1222 Final report
Slope = (TLeaving - TAirFoot)/(LineNode(MundtZoneNum,ReturnNodeID)%Height-LineNode(MundtZoneNum,MundtFootAirID)%Height)
! check slope
IF (Slope > MaxSlope ) THEN
Slope = MaxSlope
TAirFoot = TLeaving - (Slope*(LineNode(MundtZoneNum,ReturnNodeID)%Height-LineNode(MundtZoneNum,MundtFootAirID)%Height))
END IF
IF (Slope < MinSlope) THEN ! pretty much vertical
Slope = MinSlope
TAirFoot = TLeaving
END IF
! Eq 2.4 in ASHRAE RP 1222 Final report
TAirCeil = TLeaving - (Slope*(LineNode(MundtZoneNum,ReturnNodeID)%Height-LineNode(MundtZoneNum,MundtCeilAirID)%Height))
TControlPoint = TLeaving - (Slope*(LineNode(MundtZoneNum,ReturnNodeID)%Height-LineNode(MundtZoneNum,TstatNodeID)%Height))
! determine air node temperatures in this zone
CALL SetNodeResult(SupplyNodeID, SupplyAirTemp)
CALL SetNodeResult(ReturnNodeID, TLeaving)
CALL SetNodeResult(MundtCeilAirID, TAirCeil)
CALL SetNodeResult(MundtFootAirID, TAirFoot)
CALL SetNodeResult(TstatNodeID, TControlPoint)
DO SurfNum = 1, NumFloorSurfs
CALL SetSurfTmeanAir(FloorSurfSetIDs(SurfNum), TAirFoot)
END DO
SurfCounted = COUNT(LineNode(MundtZoneNum,MundtCeilAirID)%SurfMask)
TheseSurfIDS = PACK(ID1dSurf,LineNode(MundtZoneNum,MundtCeilAirID)%SurfMask)
DO SurfNum = 1, SurfCounted
CALL SetSurfTmeanAir(TheseSurfIDS(SurfNum), TAirCeil)
END DO
DO NodeNum = 1, NumRoomNodes
TThisNode = TLeaving - (Slope*(LineNode(MundtZoneNum,ReturnNodeID)%Height - &
LineNode(MundtZoneNum,RoomnodeIDs(NodeNum))%Height))
CALL SetNodeResult(RoomNodeIDS(NodeNum), TThisNode)
SurfCounted = COUNT(LineNode(MundtZoneNum,RoomNodeIDs(NodeNum))%SurfMask)
TheseSurfIDS = PACK(ID1dSurf,LineNode(MundtZoneNum,RoomNodeIDs(NodeNum))%SurfMask)
DO SurfNum = 1, SurfCounted
CALL SetSurfTmeanAir(TheseSurfIDS(SurfNum), TThisNode)
END DO
END DO
RETURN
END SUBROUTINE CalcMundtModel