Skip to content

Commit 959a42b

Browse files
authored
Merge pull request #15437 from mcgratta/master
FDS Source: Fix logic for particle position
2 parents 966b9cf + 3f9d61c commit 959a42b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Source/part.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,9 +1013,9 @@ SUBROUTINE INSERT_VOLUMETRIC_PARTICLES
10131013
! If the INIT volume is outside the current mesh, return
10141014

10151015
IF (IN%SHAPE/='RING' .AND. IN%SHAPE/='LINE') THEN
1016-
IF ((IN_X1-XF)>50._EB*TWO_EPSILON_EB .OR. (IN_X2-XS)<-50._EB*TWO_EPSILON_EB .OR. &
1017-
(IN_Y1-YF)>50._EB*TWO_EPSILON_EB .OR. (IN_Y2-YS)<-50._EB*TWO_EPSILON_EB .OR. &
1018-
(IN_Z1-ZF)>50._EB*TWO_EPSILON_EB .OR. (IN_Z2-ZS)<-50._EB*TWO_EPSILON_EB) RETURN
1016+
IF ((IN_X1-XF)>-50._EB*TWO_EPSILON_EB .OR. (IN_X2-XS)<50._EB*TWO_EPSILON_EB .OR. &
1017+
(IN_Y1-YF)>-50._EB*TWO_EPSILON_EB .OR. (IN_Y2-YS)<50._EB*TWO_EPSILON_EB .OR. &
1018+
(IN_Z1-ZF)>-50._EB*TWO_EPSILON_EB .OR. (IN_Z2-ZS)<50._EB*TWO_EPSILON_EB) RETURN
10191019
ELSEIF (IN%SHAPE=='RING') THEN
10201020
IF (RING_MESH_INTERSECTION_ARC(NM,IN%X0,IN%Y0,IN%RADIUS)<TWO_EPSILON_EB) RETURN
10211021
ELSE

Source/read.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12886,12 +12886,12 @@ SUBROUTINE READ_INIT
1288612886
MESH_LOOP: DO NM=1,NMESHES
1288712887
M=>MESHES(NM)
1288812888
IF (XYZ(1)>=M%XS .AND. XYZ(1)<=M%XF .AND. XYZ(2)>=M%YS .AND. XYZ(2)<=M%YF .AND. XYZ(3)>=M%ZS .AND. XYZ(3)<=M%ZF) THEN
12889-
IF (ABS(XYZ(1)-M%XS)<TWO_EPSILON_EB) XYZ(1) = XYZ(1) + 0.01_EB*M%DXI
12890-
IF (ABS(XYZ(1)-M%XF)<TWO_EPSILON_EB) XYZ(1) = XYZ(1) - 0.01_EB*M%DXI
12891-
IF (ABS(XYZ(2)-M%YS)<TWO_EPSILON_EB) XYZ(2) = XYZ(2) + 0.01_EB*M%DETA
12892-
IF (ABS(XYZ(2)-M%YF)<TWO_EPSILON_EB) XYZ(2) = XYZ(2) - 0.01_EB*M%DETA
12893-
IF (ABS(XYZ(3)-M%ZS)<TWO_EPSILON_EB) XYZ(3) = XYZ(3) + 0.01_EB*M%DZETA
12894-
IF (ABS(XYZ(3)-M%ZF)<TWO_EPSILON_EB) XYZ(3) = XYZ(3) - 0.01_EB*M%DZETA
12889+
IF (ABS(XYZ(1)-M%XS)<50._EB*TWO_EPSILON_EB) XYZ(1) = XYZ(1) + 0.01_EB*M%DXI
12890+
IF (ABS(XYZ(1)-M%XF)<50._EB*TWO_EPSILON_EB) XYZ(1) = XYZ(1) - 0.01_EB*M%DXI
12891+
IF (ABS(XYZ(2)-M%YS)<50._EB*TWO_EPSILON_EB) XYZ(2) = XYZ(2) + 0.01_EB*M%DETA
12892+
IF (ABS(XYZ(2)-M%YF)<50._EB*TWO_EPSILON_EB) XYZ(2) = XYZ(2) - 0.01_EB*M%DETA
12893+
IF (ABS(XYZ(3)-M%ZS)<50._EB*TWO_EPSILON_EB) XYZ(3) = XYZ(3) + 0.01_EB*M%DZETA
12894+
IF (ABS(XYZ(3)-M%ZF)<50._EB*TWO_EPSILON_EB) XYZ(3) = XYZ(3) - 0.01_EB*M%DZETA
1289512895
EXIT MESH_LOOP
1289612896
ENDIF
1289712897
ENDDO MESH_LOOP

0 commit comments

Comments
 (0)