From 45f3ae00f63c8d26119d59bd638f011db45602ec Mon Sep 17 00:00:00 2001 From: mcgratta Date: Thu, 2 Jan 2025 16:15:43 -0500 Subject: [PATCH 1/3] Revert "FDS Source: Issue #13963. Clean up exterior patch logic" This reverts commit f5f45088720e94561c896d8519ce9e6132961d51. --- Source/dump.f90 | 31 +++++++++++++++++++++++-------- Source/type.f90 | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Source/dump.f90 b/Source/dump.f90 index fbdd3a636c..6da3385495 100644 --- a/Source/dump.f90 +++ b/Source/dump.f90 @@ -1510,7 +1510,8 @@ SUBROUTINE WRITE_SMOKEVIEW_FILE USE HVAC_ROUTINES, ONLY: N_DUCT_QUANTITY,N_NODE_QUANTITY, DUCT_QUANTITY_ARRAY,NODE_QUANTITY_ARRAY USE TRAN, ONLY: TRAN_TYPE,TRANS USE MISC_FUNCTIONS, ONLY : ACCUMULATE_STRING -INTEGER :: N,NN,I,J,K,NM,NX,NY,NZ,NIN,NXL,NYL,NZL,COLOR_INDEX,IZERO,STATE_INDEX,TYPE_INDEX,HI1,HI2,VI1,VI2,FACE_INDEX,N_CVENT +INTEGER :: N,NN,I,J,K,NM,NX,NY,NZ,NIN,NXL,NYL,NZL,COLOR_INDEX,IZERO,STATE_INDEX,SURF_INDEX,& + TYPE_INDEX,HI1,HI2,VI1,VI2,FACE_INDEX,VRGB(3),N_CVENT INTEGER, ALLOCATABLE, DIMENSION(:,:,:) :: VENT_INDICES REAL(EB) :: X1,Y1,Z1,X2,Y2,Z2,XX,YY,ZZ,PERT1(4),PERT2(4),XMIN,YMIN,ZMIN,XA,YA,ZA TYPE SEGMENT_TYPE @@ -2287,8 +2288,11 @@ SUBROUTINE WRITE_SMOKEVIEW_FILE VT%BOUNDARY_TYPE==PERIODIC_BOUNDARY .OR. & VT%TYPE_INDICATOR==2) THEN ! Render this vent invisible in Smokeview WHERE (VENT_INDICES(HI1:HI2,VI1:VI2,FACE_INDEX)==0) VENT_INDICES(HI1:HI2,VI1:VI2,FACE_INDEX) = -1 - ELSE ! Vent on a solid wall + ELSE ! Make solid color vents invisible (they will be replaced by dummy vents) WHERE (VENT_INDICES(HI1:HI2,VI1:VI2,FACE_INDEX)==0) VENT_INDICES(HI1:HI2,VI1:VI2,FACE_INDEX) = N + VT%COLOR_INDICATOR = 8 + VT%TYPE_INDICATOR = -2 + VT%TRANSPARENCY = 0._EB ENDIF ENDDO VENT_LOOP @@ -2359,9 +2363,11 @@ SUBROUTINE WRITE_SMOKEVIEW_FILE ENDDO DO N=1,M%N_EXTERIOR_PATCH + SURF_INDEX = DEFAULT_SURF_INDEX EP => M%EXTERIOR_PATCH(N) + IF (EP%VENT_INDEX>0) SURF_INDEX = M%VENTS(EP%VENT_INDEX)%SURF_INDEX WRITE(MYSTR,'(6F14.5,I6,I4)') M%X(EP%I1),M%X(EP%I2),M%Y(EP%J1),M%Y(EP%J2), & - M%Z(EP%K1),M%Z(EP%K2),M%N_VENT+N,DEFAULT_SURF_INDEX; CALL ADDSTR + M%Z(EP%K1),M%Z(EP%K2),M%N_VENT+N,SURF_INDEX; CALL ADDSTR ENDDO DO N=1,M%N_VENT @@ -2387,8 +2393,15 @@ SUBROUTINE WRITE_SMOKEVIEW_FILE DO N=1,M%N_EXTERIOR_PATCH COLOR_INDEX = 99 TYPE_INDEX = 0 + VRGB = -1 EP => M%EXTERIOR_PATCH(N) - WRITE(MYSTR,'(8I5)') EP%I1,EP%I2,EP%J1,EP%J2,EP%K1,EP%K2,COLOR_INDEX,TYPE_INDEX; CALL ADDSTR + IF (EP%VENT_INDEX>0) VRGB = M%VENTS(EP%VENT_INDEX)%RGB + IF (VRGB(1)<0) THEN + WRITE(MYSTR,'(8I5)') EP%I1,EP%I2,EP%J1,EP%J2,EP%K1,EP%K2,COLOR_INDEX,TYPE_INDEX; CALL ADDSTR + ELSE + WRITE(MYSTR,'(8I5,4F13.5)') EP%I1,EP%I2,EP%J1,EP%J2,EP%K1,EP%K2,COLOR_INDEX,TYPE_INDEX, & + REAL(VRGB,FB)/255._FB,1._EB; CALL ADDSTR + ENDIF ENDDO ! Write out information about circular vents to Smokeview file @@ -2461,17 +2474,18 @@ END SUBROUTINE EOL SUBROUTINE DUMMY_VENTS(FI,N1,N2) INTEGER, INTENT(IN) :: N1,N2,FI -INTEGER :: I,J,II,JJ,ISTP,JSTP +INTEGER :: I,J,II,JJ,ISTP,JSTP,VENT_INDEX JLOOP: DO J=1,N2 ILOOP: DO I=1,N1 - IF (VENT_INDICES(I,J,FI)/=0) CYCLE ILOOP + IF (VENT_INDICES(I,J,FI)==-1) CYCLE ILOOP + VENT_INDEX = VENT_INDICES(I,J,FI) ISTP = N1 JSTP = N2 JJLOOP: DO JJ=J+1,N2 - IF (VENT_INDICES(I,JJ,FI)/=0) THEN + IF (VENT_INDICES(I,JJ,FI)/=VENT_INDEX) THEN JSTP = JJ-1 EXIT JJLOOP ENDIF @@ -2479,7 +2493,7 @@ SUBROUTINE DUMMY_VENTS(FI,N1,N2) IILOOP: DO II=I+1,N1 JJLOOP2: DO JJ=J,JSTP - IF (VENT_INDICES(II,JJ,FI)/=0) THEN + IF (VENT_INDICES(II,JJ,FI)/=VENT_INDEX) THEN ISTP = II-1 EXIT IILOOP ENDIF @@ -2504,6 +2518,7 @@ SUBROUTINE DUMMY_VENTS(FI,N1,N2) CASE (6) ; EP%K1=M%KBAR ; EP%K2=M%KBAR ; EP%I1=I-1 ; EP%I2=ISTP ; EP%J1=J-1 ; EP%J2=JSTP ; EP%IOR=-3 EP%KG1=EP%K1 ; EP%KG2=EP%K2 ; EP%IG1=I ; EP%IG2=ISTP; EP%JG1=J ; EP%JG2=JSTP END SELECT + EP%VENT_INDEX = VENT_INDEX ENDDO ILOOP ENDDO JLOOP diff --git a/Source/type.f90 b/Source/type.f90 index 52c6509a09..c52a5606ac 100644 --- a/Source/type.f90 +++ b/Source/type.f90 @@ -1555,7 +1555,7 @@ MODULE TYPES END TYPE RAD_FILE_TYPE TYPE PATCH_TYPE - INTEGER :: I1,I2,J1,J2,K1,K2,IG1,IG2,JG1,JG2,KG1,KG2,IOR=0,OBST_INDEX=0,MESH_INDEX=0 + INTEGER :: I1,I2,J1,J2,K1,K2,IG1,IG2,JG1,JG2,KG1,KG2,IOR=0,OBST_INDEX=0,VENT_INDEX=0,MESH_INDEX=0 END TYPE PATCH_TYPE TYPE BOUNDARY_FILE_TYPE From 4e6fb0c9b2b660fec43bc86b482282360ad4305c Mon Sep 17 00:00:00 2001 From: rmcdermo Date: Fri, 3 Jan 2025 09:32:55 -0500 Subject: [PATCH 2/3] Makefile: use O3 for ompi_gnu_linux --- Build/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/makefile b/Build/makefile index 483d9fc11c..557168a48a 100644 --- a/Build/makefile +++ b/Build/makefile @@ -343,7 +343,7 @@ ompi_intel_linux : setup $(obj_mpi) #*** GNU Compilers *** -ompi_gnu_linux : FFLAGS = -m64 -O2 -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(FFLAGSMKL_GNU_OPENMPI) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) +ompi_gnu_linux : FFLAGS = -m64 -O3 -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(FFLAGSMKL_GNU_OPENMPI) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_gnu_linux : LFLAGSMKL = $(LFLAGSMKL_GNU_OPENMPI) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) ompi_gnu_linux : FCOMPL = $(COMP_FC) ompi_gnu_linux : FOPENMPFLAGS = -fopenmp From a9e0311b85576858bb39ef408b712f9ab1bb1e48 Mon Sep 17 00:00:00 2001 From: rmcdermo Date: Fri, 3 Jan 2025 09:35:17 -0500 Subject: [PATCH 3/3] FDS Source: minor adjustment to CHAR_DENSITY_THRESHOLD in TEST_NEW_CHAR_MODEL --- Source/wall.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/wall.f90 b/Source/wall.f90 index 91355aa347..bf10653df3 100644 --- a/Source/wall.f90 +++ b/Source/wall.f90 @@ -2888,7 +2888,7 @@ SUBROUTINE PERFORM_PYROLYSIS REAL(EB), DIMENSION(MAX_LPC) :: Q_DOT_PART,M_DOT_PART INTEGER :: ITER,MAX_ITER LOGICAL :: REMOVE_LAYER -REAL(EB), PARAMETER :: M_DOT_ERROR_TOL=1.E-6_EB, CHAR_DENSITY_THRESHOLD=5.7_EB ! approx. ASH_DENSITY +REAL(EB), PARAMETER :: M_DOT_ERROR_TOL=1.E-6_EB, CHAR_DENSITY_THRESHOLD=5._EB ! approx. ASH_DENSITY ! Get surface oxygen mass fraction