Skip to content

Commit eb078ea

Browse files
authored
Merge pull request #15227 from mcgratta/master
FDS Source: Do not allow overlapping OBSTs with DEVC or CTRL
2 parents b3c3aed + e713b09 commit eb078ea

File tree

3 files changed

+36
-17
lines changed

3 files changed

+36
-17
lines changed

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,18 +1274,7 @@ \subsection{Overlapping Obstructions}
12741274

12751275
When obstructions overlap, Smokeview renders both obstructions independently of each other, often leading to an unsightly cross-hatching of the two surface colors where there is an overlap. A simple remedy for this is to ``shrink'' the obstruction you do not wish to take precedence by slightly by adjusting its coordinates (\ct{XB}) accordingly. Then, in Smokeview, toggle the ``q'' key to show the obstructions as you specified them, rather than as FDS rendered them.
12761276

1277-
The simulation will be stopped with an error if all of the following occur: (1) surfaces of two obstructions overlap, (2) the surface properties are different, and (3) one or both of the obstructions can be removed or created during the simulation.
1278-
1279-
If you have two overlapping obstructions and one obstruction is to be added or removed during the simulation with a hole made in the region of overlap, then define a \ct{HOLE} for the obstruction being added or removed and set \ct{REMOVABLE=F} as discussed in the next two sections.
1280-
1281-
\subsection{Preventing Obstruction Removal}
1282-
1283-
Obstructions can be protected from the \ct{HOLE} punching feature. Sometimes creating create a door or window using a \ct{HOLE} is convenient. For example, suppose a \ct{HOLE} is punched in a wall to represent a door or window. An obstruction can be defined to fill this hole (presumably to be removed or colored differently or whatever) so long as the phrase \ct{PERMIT_HOLE=F} is included on the \ct{OBST} line. In general, any obstruction can be made impenetrable to a \ct{HOLE} using this phrase. By default, \ct{PERMIT_HOLE=T}, meaning that an obstruction is assumed to be penetrable unless otherwise directed. Note that if a penetrable obstruction and an impenetrable obstruction overlap, the obstruction with \ct{PERMIT_HOLE=F} should be listed first.
1284-
1285-
If the obstruction is not to be removed or rejected for any reason, set \ct{REMOVABLE=F} This is sometimes needed to stop
1286-
FDS from removing the obstruction if it is embedded within another, like a door within a wall.
1287-
1288-
In rare cases, you might not want to allow a \ct{VENT} to be attached to a particular obstruction, in which case set \ct{ALLOW_VENT=F}.
1277+
Two obstructions should not overlap; that is, they should not have a common grid cell, if one or both of the obstructions is to be removed or created during the simulation. This will prompt an error message and the simulation will be shut down. However, you can punch a \ct{HOLE} through one obstruction and then fill that \ct{HOLE} with another obstruction which has the attribute \ct{REMOVABLE=F} or \ct{PERMIT_HOLE=F} as discussed in Sec.~\ref{info:REMOVABLE}. In this way, the first obstruction shall be broken up into multiple obstructions, none of which overlap the second obstrction which will not be punched by the \ct{HOLE}.
12891278

12901279
\subsection{Transparent or Outlined Obstructions}
12911280

@@ -1343,6 +1332,17 @@ \subsection{Creating Holes in Obstructions}
13431332
It is a good idea to inspect the geometry by running either a setup job
13441333
(\ct{T_END=0} on the \ct{TIME} line) or a short-time job to test the operation of devices and control functions.
13451334

1335+
\subsection{Preventing Obstruction Removal or Hole Punching}
1336+
\label{info:REMOVABLE}
1337+
1338+
Obstructions can be protected from the \ct{HOLE} punching feature. Sometimes creating create a door or window using a \ct{HOLE} is convenient. For example, suppose a \ct{HOLE} is punched in a wall to represent a door or window. An obstruction can be defined to fill this hole (presumably to be removed or colored differently or whatever) so long as the phrase \ct{PERMIT_HOLE=F} is included on the \ct{OBST} line. In general, any obstruction can be made impenetrable to a \ct{HOLE} using this phrase. By default, \ct{PERMIT_HOLE=T}, meaning that an obstruction is assumed to be penetrable unless otherwise directed. Note that if a penetrable obstruction and an impenetrable obstruction overlap, the obstruction with \ct{PERMIT_HOLE=F} should be listed first.
1339+
1340+
If the obstruction is not to be removed or rejected for any reason, set \ct{REMOVABLE=F} This is sometimes needed to stop
1341+
FDS from removing the obstruction if it is embedded within another, like a door within a wall.
1342+
1343+
In rare cases, you might not want to allow a \ct{VENT} to be attached to a particular obstruction, in which case set \ct{ALLOW_VENT=F}.
1344+
1345+
13461346
\ifcompgeom
13471347

13481348
\newpage
@@ -14419,8 +14419,9 @@ \chapter{Error Codes}
1441914419
610 \> \ct{HOLE ... Cannot overlap HOLEs with a DEVC or CTRL_ID.} \> Section~\ref{info:HOLE} \\
1442014420
611 \> \ct{OBST ... has a BULK_DENSITY but zero volume.} \> Section~\ref{info:BURN_AWAY} \\
1442114421
612 \> \ct{OBST ... must have a volume to be assigned HT3D.} \> Section~\ref{checkerboard} \\
14422-
613 \> \ct{OBST ... and OBST ... cannot overlap in Mesh ...} \> Section~\ref{info:OVERLAY} \\
14423-
614 \> \ct{OBST_ID ... cannot have a SURF with NODE_ID} \> Section~\ref{info:hvac_geom} \\ \> \> \\
14422+
614 \> \ct{OBST_ID ... cannot have a SURF with NODE_ID} \> Section~\ref{info:hvac_geom} \\
14423+
615 \> \ct{OBST ... cannot overlap OBST ...} \> Section~\ref{info:OVERLAY} \\
14424+
\> \> \\
1442414425
701 \> \ct{problem with GEOM, local SURF_ID index ... out of bounds.} \> Section~\ref{info:GEOM_Basics} \\
1442514426
702 \> \ct{problem with GEOM, SURF_IDS not defined properly.} \> Section~\ref{info:first_geom} \\
1442614427
703 \> \ct{missing SURF_ID in \&GEOM line ...} \> Section~\ref{subsec:readbin} \\

Source/read.f90

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14839,7 +14839,8 @@ END SUBROUTINE PROC_CTRL
1483914839
SUBROUTINE PROC_OBST
1484014840

1484114841
USE GEOMETRY_FUNCTIONS, ONLY: BLOCK_CELL
14842-
INTEGER :: NM,I,J,K,IS,JS,KS,IC1,IC2
14842+
INTEGER :: NM,I,J,K,IS,JS,KS,IC1,IC2,OBST_INDEX,OBST_INDEX_2
14843+
TYPE(OBSTRUCTION_TYPE), POINTER :: OB2
1484314844

1484414845
MESH_LOOP: DO NM=1,NMESHES
1484514846

@@ -14886,6 +14887,23 @@ SUBROUTINE PROC_OBST
1488614887
ENDDO
1488714888
ENDDO
1488814889

14890+
! Throw an error if there is an OBSTstruction that can be created or removed and that intersects another OBSTstruction
14891+
14892+
OBST_LOOP: DO OBST_INDEX=1,N_OBST
14893+
OB => OBSTRUCTION(OBST_INDEX)
14894+
IF (OB%CTRL_ID/='null' .OR. OB%DEVC_ID/='null') THEN
14895+
OBST_LOOP_2: DO OBST_INDEX_2=1,N_OBST
14896+
IF (OBST_INDEX==OBST_INDEX_2) CYCLE OBST_LOOP_2
14897+
OB2 => OBSTRUCTION(OBST_INDEX_2)
14898+
IF (OB%I2<=OB2%I1 .OR. OB%I1>=OB2%I2 .OR. &
14899+
OB%J2<=OB2%J1 .OR. OB%J1>=OB2%J2 .OR. &
14900+
OB%K2<=OB2%K1 .OR. OB%K1>=OB2%K2) CYCLE OBST_LOOP_2
14901+
WRITE(MESSAGE,'(4A)') 'ERROR(615): OBST ',TRIM(OB%ID),' cannot overlap OBST ',TRIM(OB2%ID)
14902+
CALL SHUTDOWN(MESSAGE) ; RETURN
14903+
ENDDO OBST_LOOP_2
14904+
ENDIF
14905+
ENDDO OBST_LOOP
14906+
1488914907
ENDDO MESH_LOOP
1489014908

1489114909

Verification/Flowfields/divergence_test_1.fds

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
&VENT XB=0.0,0.0,0.3,0.7,0.3,0.7, SURF_ID='BLOW' /
1616
&VENT XB=1.0,1.0,0.3,0.7,0.3,0.7, SURF_ID='SUCK' /
1717

18-
&OBST XB=0.3,0.7,0.3,0.7,0.3,0.7, COLOR='TEAL', DEVC_ID='timer1' /
19-
&OBST XB=0.4,0.8,0.4,0.8,0.4,0.8, COLOR='GREEN', DEVC_ID='timer2' /
18+
&OBST XB=0.3,0.6,0.3,0.7,0.3,0.7, COLOR='TEAL', DEVC_ID='timer1' /
19+
&OBST XB=0.6,0.8,0.4,0.8,0.4,0.8, COLOR='GREEN', DEVC_ID='timer2' /
2020
&DEVC ID='timer1', XYZ=0.,0.,0., QUANTITY='TIME', SETPOINT=3., INITIAL_STATE=.TRUE. /
2121
&DEVC ID='timer2', XYZ=0.,0.,0., QUANTITY='TIME', SETPOINT=6., INITIAL_STATE=.FALSE. /
2222

0 commit comments

Comments
 (0)