Skip to content

Commit 67195e1

Browse files
committed
FDS Source: Fix issue 13862. Missing ABS for duct velocity in UPDATE_HVAC_MASS_TRANSPORT
1 parent ccd2c20 commit 67195e1

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3916,7 +3916,7 @@ \subsection{Louvered HVAC Vents}
39163916
\subsection{HVAC Mass Transport}
39173917
\label{info:hvacmasstransport}
39183918

3919-
FDS can account for the time delay of species and enthalpy transport through HVAC networks by discretizing individual HVAC ducts. This can by done using either \ct{N_CELLS} on an HVAC duct input or by setting \ct{HVAC_MASS_TRANSPORT_CELL_L}. The input \ct{N_CELLS} divides the length on the duct into \ct{N_CELLS} uniform segments. The parameter \ct{HVAC_MASS_TRANSPORT_CELL_L} defines a cell length that is applied to all ducts in an input file unless overridden by \ct{N_CELLS}. IF specified, the number of cells for a duct is taken as the nearest integer of the duct \ct{LENGTH} divided by \ct{HVAC_MASS_TRANSPORT_CELL_L}. The current HVAC solver does not account for heat loss in the HVAC network.
3919+
FDS can account for the time delay of species and enthalpy transport through HVAC networks by discretizing individual HVAC ducts. This can by done using either \ct{N_CELLS} on an HVAC duct input or by setting \ct{HVAC_MASS_TRANSPORT_CELL_L} on \ct{MISC}. The input \ct{N_CELLS} divides the length on the duct into \ct{N_CELLS} uniform segments. The parameter \ct{HVAC_MASS_TRANSPORT_CELL_L} defines a cell length that is applied to all ducts in an input file unless overridden by \ct{N_CELLS}. When specified, the number of cells for a duct is the duct \ct{LENGTH} divided by \ct{HVAC_MASS_TRANSPORT_CELL_L} rounded to the nearest integer (minimum of 1 cell). The current HVAC solver does not account for heat loss in the HVAC network.
39203920

39213921
If a duct is discretized, then all other ducts in that ductrun must also be discretized. There is no requirement that the same cell size be used for all ducts in a ductrun. A ductrun is any collection of interconnected HVAC components where a path exists between two components via traversing ducts in the ductrun.
39223922

@@ -12577,7 +12577,7 @@ \section{\texorpdfstring{{\tt MISC}}{MISC} (Miscellaneous Parameters)}
1257712577
\ct{H_F_REFERENCE_TEMPERATURE} & Real & Section~\ref{info:enthalpy} & $^\circ$C & 25. \\ \hline
1257812578
\ct{HUMIDITY} & Real & Section~\ref{info:humidity} & \% & 40. \\ \hline
1257912579
\ct{HVAC_LOCAL_PRESSURE} & Logical & Section~\ref{info:HVAC} & & \ct{T} \\ \hline
12580-
\ct{HVAC_MASS_TRANSPORT_CELL_L} & Logical & Section ~\ref{info:hvacmasstransport} & & \ct{F} \\ \hline
12580+
\ct{HVAC_MASS_TRANSPORT_CELL_L} & Real & Section ~\ref{info:hvacmasstransport} & m & \\ \hline
1258112581
\ct{HVAC_PRES_RELAX} & Real & Section ~\ref{info:HVAC} & & 1.0 \\ \hline
1258212582
\ct{HVAC_QFAN} & Logical & Section ~\ref{info:HVAC_QFAN} & & \ct{F} \\ \hline
1258312583
\ct{IBLANK_SMV} & Logical & Section~\ref{info:SLCF} & & \ct{T} \\ \hline

Source/hvac.f90

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3510,17 +3510,18 @@ SUBROUTINE UPDATE_HVAC_MASS_TRANSPORT(DT,NR)
35103510
MASS_FLUX = DU%RHO_D * DU%VEL(NEW)
35113511

35123512
! Set up of CFL and sub time step
3513-
DT_CFL = DU%DX/(2*DU%VEL(NEW)) ! CFL for Godunov pure upwinding scheme
3513+
DT_CFL = ABS(DU%DX/(2*DU%VEL(NEW))) ! CFL for Godunov pure upwinding scheme
35143514
N_SUBSTEPS = MAX(1,CEILING(DT/DT_CFL))
35153515
DT_DUCT = DT/REAL(N_SUBSTEPS,EB)
35163516

3517+
! Set upwind face indices and allocate flux arrays
3518+
ALLOCATE(ZZ_F(0:DU%N_CELLS,N_TRACKED_SPECIES))
3519+
ALLOCATE(CPT_F(0:DU%N_CELLS))
3520+
ALLOCATE(CPT_C(DU%N_CELLS))
3521+
ALLOCATE(RHOCPT_C(DU%N_CELLS))
3522+
ALLOCATE(RHOZZ_C(DU%N_CELLS,N_TRACKED_SPECIES))
3523+
35173524
SUBSTEP_LOOP: DO NS = 1,N_SUBSTEPS
3518-
! Set upwind face indices and allocate flux arrays
3519-
ALLOCATE(ZZ_F(0:DU%N_CELLS,N_TRACKED_SPECIES))
3520-
ALLOCATE(CPT_F(0:DU%N_CELLS))
3521-
ALLOCATE(CPT_C(DU%N_CELLS))
3522-
ALLOCATE(RHOCPT_C(DU%N_CELLS))
3523-
ALLOCATE(RHOZZ_C(DU%N_CELLS,N_TRACKED_SPECIES))
35243525

35253526
! Populates upwind face variables, accounting for direction of flow (i.e. includes relevant node value as first/last face)
35263527
IF (DU%VEL(NEW)>0._EB) THEN
@@ -3556,13 +3557,14 @@ SUBROUTINE UPDATE_HVAC_MASS_TRANSPORT(DT,NR)
35563557
DU%CP_C(NC) = HGAS / DU%TMP_C(NC)
35573558
ENDDO DU_UPDATE_LOOP
35583559

3559-
DEALLOCATE(RHOZZ_C)
3560-
DEALLOCATE(ZZ_F)
3561-
DEALLOCATE(CPT_F)
3562-
DEALLOCATE(CPT_C)
3563-
DEALLOCATE(RHOCPT_C)
3564-
35653560
ENDDO SUBSTEP_LOOP
3561+
3562+
DEALLOCATE(RHOZZ_C)
3563+
DEALLOCATE(ZZ_F)
3564+
DEALLOCATE(CPT_F)
3565+
DEALLOCATE(CPT_C)
3566+
DEALLOCATE(RHOCPT_C)
3567+
35663568
ENDDO DUCT_LOOP
35673569

35683570

0 commit comments

Comments
 (0)