Skip to content

Commit e2246e6

Browse files
authored
Merge pull request #15297 from mcgratta/master
FDS Source: Distinguish INIT particles and regions
2 parents 34b29e4 + e8f7384 commit e2246e6

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

Source/part.f90

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,15 +1012,14 @@ SUBROUTINE INSERT_VOLUMETRIC_PARTICLES
10121012

10131013
! If the INIT volume is outside the current mesh, return
10141014

1015-
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
1019-
ELSEIF (IN%SHAPE=='RING') THEN
1020-
IF (RING_MESH_INTERSECTION_ARC(NM,IN%X0,IN%Y0,IN%RADIUS)<TWO_EPSILON_EB) RETURN
1021-
ELSE
1022-
IF (IN_X1>XF .OR. IN_X2<XS .OR. IN_Y1>YF .OR. IN_Y2<YS .OR. IN_Z1>ZF .OR. IN_Z2<ZS) RETURN
1023-
ENDIF
1015+
SELECT CASE(IN%SHAPE)
1016+
CASE ('BLOCK')
1017+
IF (IN_X1>=XF .OR. IN_X2<=XS .OR. IN_Y1>=YF .OR. IN_Y2<=YS .OR. IN_Z1>=ZF .OR. IN_Z2<=ZS) RETURN
1018+
CASE ('RING')
1019+
IF (RING_MESH_INTERSECTION_ARC(NM,IN%X0,IN%Y0,IN%RADIUS)<TWO_EPSILON_EB) RETURN
1020+
CASE DEFAULT
1021+
IF (IN_X1>XF .OR. IN_X2<XS .OR. IN_Y1>YF .OR. IN_Y2<YS .OR. IN_Z1>ZF .OR. IN_Z2<ZS) RETURN
1022+
END SELECT
10241023

10251024
! Skip mesh that is contained completely within a ring
10261025

Source/read.f90

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12899,6 +12899,7 @@ SUBROUTINE READ_INIT
1289912899
XB(1:2) = XYZ(1)
1290012900
XB(3:4) = XYZ(2)
1290112901
XB(5:6) = XYZ(3)
12902+
IF (SHAPE=='null') SHAPE = 'POINT'
1290212903
ENDIF
1290312904

1290412905
! If an offset has been specified, set the SHAPE to LINE.
@@ -12911,6 +12912,10 @@ SUBROUTINE READ_INIT
1291112912
XB(6) = XB(5) + DZ*(N_PARTICLES-1)
1291212913
ENDIF
1291312914

12915+
! If the INIT region is not a POINT or a LINE, assume it is a BLOCK unless user says otherwise
12916+
12917+
IF (SHAPE=='null') SHAPE = 'BLOCK'
12918+
1291412919
! Create a box around a CONE
1291512920

1291612921
IF (SHAPE=='CONE' .OR. SHAPE=='RING' .OR. SHAPE=='CYLINDER') THEN
@@ -13355,7 +13360,7 @@ SUBROUTINE SET_INIT_DEFAULTS
1335513360
RAMP_PART = 'null'
1335613361
RAMP_Q = 'null'
1335713362
RAMP_TMP_Z = 'null'
13358-
SHAPE = 'BLOCK'
13363+
SHAPE = 'null'
1335913364
SPEC_ID = 'null'
1336013365
TEMPERATURE = -1000._EB
1336113366
TREE_HEIGHT = -1._EB

0 commit comments

Comments
 (0)