Skip to content

Commit e3a306c

Browse files
authored
Merge pull request #14825 from mcgratta/master
FDS Source: Fix ISOSURFACE BCs
2 parents 214c80d + a02fe09 commit e3a306c

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

Source/dump.f90

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4296,13 +4296,16 @@ SUBROUTINE DUMP_ISOF(T,DT,NM)
42964296
QUANTITY => WORK3
42974297

42984298
ISOF_LOOP: DO N=1,N_ISOF
4299+
42994300
IS => ISOSURFACE_FILE(N)
43004301
ERROR = 0
43014302
ISOOFFSET = 1
43024303
HAVE_ISO2 = 0
43034304

43044305
! Fill up the dummy array QUANTITY with the appropriate gas phase output
4306+
43054307
IF (IS%DEBUG) THEN
4308+
43064309
ISO_CENX = REAL((XS_MIN + XF_MAX)/2.0_EB, FB)
43074310
ISO_CENY = REAL((YS_MIN + YF_MAX)/2.0_EB, FB)
43084311
ISO_CENZ = REAL((ZS_MIN + ZF_MAX)/2.0_EB, FB)
@@ -4313,7 +4316,9 @@ SUBROUTINE DUMP_ISOF(T,DT,NM)
43134316
ENDDO
43144317
ENDDO
43154318
ENDDO
4319+
43164320
ELSE
4321+
43174322
DO K=0,KBP1
43184323
DO J=0,JBP1
43194324
DO I=0,IBP1
@@ -4322,39 +4327,34 @@ SUBROUTINE DUMP_ISOF(T,DT,NM)
43224327
ENDDO
43234328
ENDDO
43244329

4325-
! Mirror QUANTITY into ghost cells
4326-
4327-
QUANTITY(0 ,0:JBP1,0:KBP1) = QUANTITY(1 ,0:JBP1,0:KBP1)
4328-
QUANTITY(IBP1,0:JBP1,0:KBP1) = QUANTITY(IBAR,0:JBP1,0:KBP1)
4329-
QUANTITY(0:IBP1,0 ,0:KBP1) = QUANTITY(0:IBP1,1 ,0:KBP1)
4330-
QUANTITY(0:IBP1,JBP1,0:KBP1) = QUANTITY(0:IBP1,JBAR,0:KBP1)
4331-
QUANTITY(0:IBP1,0:JBP1,0 ) = QUANTITY(0:IBP1,0:JBP1,1 )
4332-
QUANTITY(0:IBP1,0:JBP1,KBP1) = QUANTITY(0:IBP1,0:JBP1,KBAR)
43334330
CALL FILL_EDGES(QUANTITY)
43344331

4335-
! Average the data (which is assumed to be cell-centered) at cell corners
4332+
! Average the data (which is assumed to be cell-centered) at cell corners
43364333

43374334
DO K=0,KBAR
43384335
DO J=0,JBAR
43394336
DO I=0,IBAR
43404337
QQ(I,J,K,1) = REAL(S(I,J,K)*(QUANTITY(I,J,K)*B(I,J,K) + QUANTITY(I+1,J,K)*B(I+1,J,K)+ &
4341-
QUANTITY(I,J,K+1)*B(I,J,K+1) + QUANTITY(I+1,J,K+1)*B(I+1,J,K+1)+ &
4342-
QUANTITY(I,J+1,K)*B(I,J+1,K) + QUANTITY(I+1,J+1,K)*B(I+1,J+1,K)+ &
4343-
QUANTITY(I,J+1,K+1)*B(I,J+1,K+1)+ QUANTITY(I+1,J+1,K+1)*B(I+1,J+1,K+1)),FB)
4338+
QUANTITY(I,J,K+1)*B(I,J,K+1) + QUANTITY(I+1,J,K+1)*B(I+1,J,K+1)+ &
4339+
QUANTITY(I,J+1,K)*B(I,J+1,K) + QUANTITY(I+1,J+1,K)*B(I+1,J+1,K)+ &
4340+
QUANTITY(I,J+1,K+1)*B(I,J+1,K+1)+ QUANTITY(I+1,J+1,K+1)*B(I+1,J+1,K+1)),FB)
43444341
ENDDO
43454342
ENDDO
43464343
ENDDO
4344+
43474345
ENDIF
43484346

43494347
! Fill up QUANTITY2 and QQ2 arrays if the isosurface is colored with a second quantity
43504348

43514349
INDEX2_IF: IF ( IS%INDEX2 /= -1 ) THEN
4350+
43524351
HAVE_ISO2 = 1
43534352
QUANTITY2 => WORK4
43544353

43554354
! Fill up the dummy array QUANTITY2 with the appropriate gas phase output
43564355

43574356
IF (IS%DEBUG) THEN
4357+
43584358
DO K=0,KBAR+1
43594359
IF (K.EQ.KBAR+1) THEN
43604360
ZZ = 2.0_FB*ZPLT(KBAR) - ZPLT(KBAR-1)
@@ -4367,7 +4367,9 @@ SUBROUTINE DUMP_ISOF(T,DT,NM)
43674367
ENDDO
43684368
ENDDO
43694369
ENDDO
4370+
43704371
ELSE
4372+
43714373
DO K=0,KBP1
43724374
DO J=0,JBP1
43734375
DO I=0,IBP1
@@ -4376,17 +4378,9 @@ SUBROUTINE DUMP_ISOF(T,DT,NM)
43764378
ENDDO
43774379
ENDDO
43784380

4379-
! Mirror QUANTITY into ghost cells
4380-
4381-
QUANTITY2(0 ,0:JBP1,0:KBP1) = QUANTITY2(1 ,0:JBP1,0:KBP1)
4382-
QUANTITY2(IBP1,0:JBP1,0:KBP1) = QUANTITY2(IBAR,0:JBP1,0:KBP1)
4383-
QUANTITY2(0:IBP1,0 ,0:KBP1) = QUANTITY2(0:IBP1,1 ,0:KBP1)
4384-
QUANTITY2(0:IBP1,JBP1,0:KBP1) = QUANTITY2(0:IBP1,JBAR,0:KBP1)
4385-
QUANTITY2(0:IBP1,0:JBP1,0 ) = QUANTITY2(0:IBP1,0:JBP1,1 )
4386-
QUANTITY2(0:IBP1,0:JBP1,KBP1) = QUANTITY2(0:IBP1,0:JBP1,KBAR)
43874381
CALL FILL_EDGES(QUANTITY2)
43884382

4389-
! Average the data (which is assumed to be cell-centered) at cell corners
4383+
! Average the data (which is assumed to be cell-centered) at cell corners
43904384

43914385
DO KK=0,KBAR+1
43924386
K = MIN(KK, KBAR)
@@ -4401,6 +4395,7 @@ SUBROUTINE DUMP_ISOF(T,DT,NM)
44014395
ENDDO
44024396
ENDDO
44034397
ENDDO
4398+
44044399
ENDIF
44054400

44064401
ENDIF INDEX2_IF

0 commit comments

Comments
 (0)