Skip to content

Commit b169d7d

Browse files
committed
FDS Source: Trap commas in DEVC IDs
1 parent 39eddf1 commit b169d7d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7950,7 +7950,7 @@ \section{Device Location and Orientation}
79507950
\begin{lstlisting}
79517951
&DEVC XYZ=3.0,5.6,2.3, PROP_ID='Acme Sprinkler 123', ID='Spk_39' /
79527952
\end{lstlisting}
7953-
The physical coordinates of the device are given by a triplet of real numbers, \ct{XYZ}. FDS uses these coordinates to determine in which gas or wall cell the device is located. Devices are evaluated using cell centered or face centered values of the cell the device is located in; no interpolation is done. The properties of the device are contained on the \ct{PROP} line designated by \ct{PROP_ID}, which will be explained below for each of the special devices included in FDS. The character string \ct{ID} is merely a descriptor to identify the device in the output files, and if any action is tied to its activation.
7953+
The physical coordinates of the device are given by a triplet of real numbers, \ct{XYZ}. FDS uses these coordinates to determine in which gas or wall cell the device is located. Devices are evaluated using cell centered or face centered values of the cell the device is located in; no interpolation is done. The properties of the device are contained on the \ct{PROP} line designated by \ct{PROP_ID}, which will be explained below for each of the special devices included in FDS. The character string \ct{ID} is merely a descriptor to identify the device in the output files, and if any action is tied to its activation. There should be no commas in \ct{ID} because commas are used as column separators in the output file.
79547954

79557955
Not all devices need to be associated with a particular set of properties via the \ct{PROP_ID}. For example, pointwise output quantities are specified with a single \ct{DEVC} line, like
79567956
\begin{lstlisting}
@@ -12269,7 +12269,7 @@ \section{\texorpdfstring{{\tt DUMP}}{DUMP} (Output Parameters)}
1226912269
\ct{CLIP_RESTART_FILES} & Logical & Section~\ref{info:restart} & & \ct{T} \\ \hline
1227012270
\ct{COLUMN_DUMP_LIMIT} & Logical & Section~\ref{info:out:DEVC} & & \ct{F} \\ \hline
1227112271
\ct{CTRL_COLUMN_LIMIT} & Integer & Section~\ref{info:out:DEVC} & & 254 \\ \hline
12272-
\ct{DECIMAL_SPECIFIER} & Character & Section~\ref{chapter:output_formats} & & \ct{'PERIOD'} \\ \hline
12272+
\ct{DECIMAL_SPECIFIER} & Character & Chapter~\ref{chapter:output_formats} & & \ct{'PERIOD'} \\ \hline
1227312273
\ct{DEVC_COLUMN_LIMIT} & Integer & Section~\ref{info:out:DEVC} & & 254 \\ \hline
1227412274
\ct{DIAGNOSTICS_INTERVAL} & Integer & Section~\ref{info:monitoring_progress} & & 100 \\ \hline
1227512275
\ct{DT_BNDF} & Real & Section~\ref{info:DT_DUMP} & s & $\Delta t$\ct{/NFRAMES} \\ \hline
@@ -14483,6 +14483,7 @@ \chapter{Error Codes}
1448314483
896 \> \ct{DEVC ... requires XB for SPATIAL_STATISTIC.} \> Section~\ref{info:statistics} \\
1448414484
897 \> \ct{DEVC ... NODE 1 = NODE 2.} \> Section~\ref{info:hvacoutputquantities} \\
1448514485
898 \> \ct{DEVC ... should not use XYZ or XB for an HVAC output QUANTITY.} \> Section~\ref{info:hvacoutputquantities} \\
14486+
899 \> \ct{DEVC ... ID should not contain a comma.} \> Section~\ref{info:DEVC} \\
1448614487
\> \> \\
1448714488
901 \> \ct{CTRL ... must have a FUNCTION_TYPE.} \> Section~\ref{info:basic_control} \\
1448814489
902 \> \ct{CTRL ... PID controller must be given a TARGET_VALUE.} \> Section~\ref{info:CONTROL_PID} \\
@@ -14677,7 +14678,7 @@ \chapter{Output File Formats}
1467714678

1467814679
The output from the code consists of the file \ct{CHID.out}, plus various data files that are described below. Most of these output files are written out by the subroutines within \ct{dump.f90}, and can easily be modified to accommodate various plotting packages.
1467914680

14680-
Some FDS results are written to ``comma-separated value'' (\ct{.csv}) files. By default, the decimal point is represented by a period and the column separator by a comma. You can change this so that the decimal point is represented by a comma and the column separator by a semi-colon by setting \ct{DECIMAL_SPPECIFIER='COMMA'} on the \ct{DUMP} line.
14681+
Some FDS results are written to ``comma-separated value'' (\ct{.csv}) files. By default, the decimal point is represented by a period and the column separator by a comma. You can change this so that the decimal point is represented by a comma and the column separator by a semi-colon by setting \ct{DECIMAL_SPECIFIER='COMMA'} on the \ct{DUMP} line.
1468114682

1468214683
\section{Diagnostic Output ({\tt .out})}
1468314684
\label{out:file}

Source/read.f90

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14898,7 +14898,7 @@ SUBROUTINE PROC_DEVC
1489814898
USE DEVICE_VARIABLES, ONLY: DEVICE_TYPE,SUBDEVICE_TYPE,DEVICE,N_DEVC,PROPERTY,PROPERTY_TYPE,MAX_HISTOGRAM_NBINS,&
1489914899
N_HISTOGRAM
1490014900

14901-
INTEGER :: N,NN,NNN,NS,MAXCELLS,I,J,K,NOM,NR,II,JJ,KK
14901+
INTEGER :: N,NN,NNN,NS,MAXCELLS,I,J,K,NOM,NR,II,JJ,KK,COMMA_POSITION
1490214902
REAL(EB) :: XX,YY,ZZ,DISTANCE,SCANDISTANCE,DX,DY,DZ,XI,YJ,ZK,F,DFDD,NU,UU,TOL,RE,ZZ_G(1:N_TRACKED_SPECIES),MU_G,K_G
1490314903
TYPE (DEVICE_TYPE), POINTER :: DV
1490414904
TYPE (SUBDEVICE_TYPE), POINTER :: SDV
@@ -14912,6 +14912,14 @@ SUBROUTINE PROC_DEVC
1491214912

1491314913
DV => DEVICE(N)
1491414914

14915+
! Check if the ID has a comma (or semi-colon)
14916+
14917+
COMMA_POSITION = INDEX(DV%ID,SEPARATOR)
14918+
IF (COMMA_POSITION>0) THEN
14919+
WRITE(MESSAGE,'(4A)') 'ERROR(899): DEVC ',TRIM(DV%ID),' should not contain a ',SEPARATOR
14920+
CALL SHUTDOWN(MESSAGE) ; RETURN
14921+
ENDIF
14922+
1491514923
! Check for HVAC outputs with no HVAC inputs
1491614924

1491714925
IF ((DV%DUCT_ID/='null' .OR. DV%NODE_ID(1)/='null') .AND. .NOT. HVAC_SOLVE) THEN

0 commit comments

Comments
 (0)