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 AIRMOV
!
! SUBROUTINE INFORMATION:
! AUTHOR George Walton
! DATE WRITTEN Extracted from AIRNET
! MODIFIED Lixing Gu, 2/1/04
! Revised the subroutine to meet E+ needs
! MODIFIED Lixing Gu, 6/8/05
!
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is a driver for AIRNET to calculate nodal pressures and linkage airflows
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER I, M, N, ITER
! FLOW:
! Compute zone air properties.
DO N=1,NetworkNumOfNodes
RHOZ(N) = PsyRhoAirFnPbTdbW(StdBaroPress+PZ(N),TZ(N),WZ(N))
if (AirflowNetworkNodeData(N)%ExtNodeNum > 0) then
RHOZ(N) = PsyRhoAirFnPbTdbW(StdBaroPress+PZ(N),OutDryBulbTemp,OutHumRat)
TZ(N) = OutDryBulbTemp
WZ(N) = OutHumRat
end if
SQRTDZ(N) = SQRT(RHOZ(N))
VISCZ(N) = 1.71432d-5+4.828d-8*TZ(N)
IF(LIST.GE.2) WRITE(Unit21,903) 'D,V:',N,RHOZ(N),VISCZ(N)
END DO
IF(AirflowNetworkSimu%InitFlag.EQ.0) THEN
DO N=1,NetworkNumOfNodes
IF(AirflowNetworkNodeData(N)%NodeTypeNum.EQ.0) PZ(N) = 0.0d0
END DO
END IF
! Compute stack pressures.
DO I=1,NetworkNumOfLinks
N = AirflowNetworkLinkageData(I)%NodeNums(1)
M = AirflowNetworkLinkageData(I)%NodeNums(2)
IF(AFLOW(I).GT.0.0d0) THEN
PS(I) = 9.80d0*( RHOZ(N)*(AirflowNetworkNodeData(N)%NodeHeight-AirflowNetworkNodeData(M)%NodeHeight) &
+AirflowNetworkLinkageData(I)%NodeHeights(2)*(RHOZ(M)-RHOZ(N)) )
ELSE IF(AFLOW(I).LT.0.0d0) THEN
PS(I) = 9.80d0*( RHOZ(M)*(AirflowNetworkNodeData(N)%NodeHeight-AirflowNetworkNodeData(M)%NodeHeight) &
+AirflowNetworkLinkageData(I)%NodeHeights(1)*(RHOZ(M)-RHOZ(N)) )
ELSE
PS(I) = 4.90d0*( (RHOZ(N)+RHOZ(M))*(AirflowNetworkNodeData(N)%NodeHeight-AirflowNetworkNodeData(M)%NodeHeight) &
+ (AirflowNetworkLinkageData(I)%NodeHeights(1)+AirflowNetworkLinkageData(I)%NodeHeights(2))*(RHOZ(M)-RHOZ(N)))
END IF
END DO
! Calculate pressure field in a large opening
CALL PSTACK
CALL SOLVZP(IK,AD,AU,ITER)
! Report element flows and zone pressures.
DO N=1,NetworkNumOfNodes
SUMAF(N) = 0.0d0
END DO
IF(LIST.GE.1) WRITE(Unit21,900)
DO I=1,NetworkNumOfLinks
N = AirflowNetworkLinkageData(I)%NodeNums(1)
M = AirflowNetworkLinkageData(I)%NodeNums(2)
IF(LIST.GE.1) THEN
WRITE(Unit21,901) 'Flow: ',I,N,M,AirflowNetworkLinkSimu(I)%DP,AFLOW(I),AFLOW2(I)
END IF
SUMAF(N) = SUMAF(N)-AFLOW(I)-AFLOW2(I)
SUMAF(M) = SUMAF(M)+AFLOW(I)+AFLOW2(I)
END DO
DO N=1,NetworkNumOfNodes
IF(LIST.GE.1) WRITE(Unit21,903) 'Room: ',N,PZ(N),SUMAF(N),TZ(N)
END DO
DO I=1,NetworkNumOfLinks
if (AFLOW2(i) .ne. 0.0d0) then
Continue
end if
if (AFLOW(i) > 0.0d0) then
AirflowNetworkLinkSimu(I)%FLOW = AFLOW(I)
AirflowNetworkLinkSimu(I)%FLOW2 = 0.0d0
else
AirflowNetworkLinkSimu(I)%FLOW = 0.0d0
AirflowNetworkLinkSimu(I)%FLOW2 = -AFLOW(I)
end if
If (AirflowNetworkCompData(AirflowNetworkLinkageData(I)%CompNum)%CompTypeNum == CompTypeNum_HOP) Then
if (AFLOW2(I) .ne. 0.0d0) then
AirflowNetworkLinkSimu(I)%FLOW = AFLOW(I)+AFLOW2(I)
AirflowNetworkLinkSimu(I)%FLOW2 = AFLOW2(I)
end if
end if
if (AirflowNetworkLinkageData(I)%DetOpenNum > 0) then
if (AFLOW2(I) .ne. 0.0d0) then
AirflowNetworkLinkSimu(I)%FLOW = AFLOW(I)+AFLOW2(I)
AirflowNetworkLinkSimu(I)%FLOW2 = AFLOW2(I)
end if
end if
If (AirflowNetworkCompData(AirflowNetworkLinkageData(I)%CompNum)%CompTypeNum == CompTypeNum_SOP .AND. &
AFLOW2(I) .ne. 0.0d0) then
if (AFLOW(i) >= 0.0d0) then
AirflowNetworkLinkSimu(I)%FLOW = AFLOW(I)
AirflowNetworkLinkSimu(I)%FLOW2 = abs(AFLOW2(I))
else
AirflowNetworkLinkSimu(I)%FLOW = abs(AFLOW2(I))
AirflowNetworkLinkSimu(I)%FLOW2 = -AFLOW(I)
End If
end if
END DO
DO I=1,NetworkNumOfNodes
AirflowNetworkNodeSimu(I)%PZ = PZ(I)
END DO
900 FORMAT(/,11X,'i n m DP',12x,'F1',12X,'F2')
901 FORMAT(1X,A6,3I5,3F14.6)
902 FORMAT(/,11X,'n P',12x,'sumF')
903 FORMAT(1X,A6,I5,3F14.6)
907 FORMAT(/,' CPU seconds for ',A,F12.3)
RETURN
END SUBROUTINE AIRMOV