Skip to content

Commit

Permalink
Merge pull request #12669 from drjfloyd/master
Browse files Browse the repository at this point in the history
FDS Source: Add VIEW_ANGLE for particle based flux gauges.
  • Loading branch information
drjfloyd authored Mar 22, 2024
2 parents 6339569 + 107417c commit fdb4c5d
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 48 deletions.
10 changes: 10 additions & 0 deletions Manuals/FDS_User_Guide/FDS_User_Guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10219,6 +10219,13 @@ \subsection{Heat Flux}

The quantity {\ct RADIOMETER} is based on the {\em ellipsoidal radiometer} concept first proposed by Nils-Erik Gunners and described in the Ref.~\cite{Murthy:JResNIST2003}. The intent of such a device is to eliminate the contribution of convection from the measurement.

\item[\ct 'RADIOMETER GAS']
\hspace{1in} \newline This output quantity is the same as {\ct 'RADIOMETER'} described above, except it can located anywhere within the computational domain and not just at a solid surface. It also has an arbitrary {\ct ORIENTATION} vector that points in any desired direction, much like a heat flux gauge. The {\ct ORIENTATION} vector need not be normalized, as in the following:
\begin{lstlisting}
&DEVC ID='hf', QUANTITY='RADIOMETER GAS', XYZ=..., ORIENTATION=-1,1,0/
\end{lstlisting}
Note that the parameter {\ct SPATIAL\_STATISTIC} is not appropriate for this quantity, meaning that you cannot integrate this quantity over a plane or volume. However, you can use the parameter {\ct POINTS} to create a one-dimensional array of these devices (see Sec.~\ref{info:line_file}).

\item[\ct 'RADIATIVE HEAT FLUX GAS']
\hspace{1in} \newline This output quantity is the same as {\ct 'RADIATIVE HEAT FLUX'} described above, except it can located anywhere within the computational domain and not just at a solid surface. It also has an arbitrary {\ct ORIENTATION} vector that points in any desired direction, much like a heat flux gauge. The {\ct ORIENTATION} vector need not be normalized, as in the following:
\begin{lstlisting}
Expand All @@ -10239,6 +10246,8 @@ \subsection{Heat Flux}

\end{labeling}

For {\ct QUANTITY} types ending in {\ct GAS}, a view angle for the radiation component of the device can be set using {\ct VIEW\_ANGLE} on {\PROP}. Wall devices can only have a 180$^\circ$ view angle.


\subsection{Adiabatic Surface Temperature}
\label{info:AST}
Expand Down Expand Up @@ -12622,6 +12631,7 @@ \section{\texorpdfstring{{\tt PROP}}{PROP} (Device Properties)}
{\ct SPRAY\_PATTERN\_TABLE} & Character & Section~\ref{info:sprinklers} & & \\ \hline
{\ct TIME\_CONSTANT} & Real & Section~\ref{info:THERMOCOUPLE} & s & \\ \hline
{\ct VELOCITY\_COMPONENT} & Integer & Section~\ref{info:velocity_patch} & & \\ \hline
{\ct VIEW\_ANGLE} & Real & Section~\ref{info:heat_flux} & degrees & 180. \\ \hline
\end{longtable}


Expand Down
5 changes: 4 additions & 1 deletion Source/cons.f90
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,9 @@ MODULE GLOBAL_CONSTANTS

REAL(EB), POINTER, DIMENSION(:,:) :: ORIENTATION_VECTOR !< Global array of orientation vectors
INTEGER, ALLOCATABLE, DIMENSION(:) :: NEAREST_RADIATION_ANGLE !< Index of the rad angle most opposite the given ORIENTATION_VECTOR
INTEGER :: N_ORIENTATION_VECTOR !< Number of ORIENTATION_VECTORs
REAL(EB), POINTER, DIMENSION(:) :: ORIENTATION_VIEW_ANGLE !< View angle of the given ORIENTATION_VECTOR
REAL(EB), ALLOCATABLE, DIMENSION(:) :: VIEW_ANGLE_AREA !< View angle area ORIENTATION_VECTOR
INTEGER :: N_ORIENTATION_VECTOR !< Number of ORIENTATION_VECTORs

INTEGER :: TGA_SURF_INDEX=-100 !< Surface properties to use for special TGA calculation
INTEGER :: TGA_WALL_INDEX=-100 !< Wall index to use for special TGA calculation
Expand Down Expand Up @@ -791,6 +793,7 @@ MODULE RADCONS
IMPLICIT NONE (TYPE,EXTERNAL)

REAL(EB), ALLOCATABLE, DIMENSION(:,:) :: DLN !< Wall-normal matrix
REAL(EB), ALLOCATABLE, DIMENSION(:,:) :: DLANG !< Angles
REAL(EB), ALLOCATABLE, DIMENSION(:,:) :: ORIENTATION_FACTOR !< Fraction of radiation angle corresponding to a particular direction
REAL(EB), ALLOCATABLE, DIMENSION(:) :: BBFRAC !< Fraction of blackbody radiation
REAL(EB), ALLOCATABLE, DIMENSION(:) :: WL_LOW !< Lower wavelength limit of the spectral band
Expand Down
1 change: 1 addition & 0 deletions Source/data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,7 @@ SUBROUTINE DEFINE_OUTPUT_QUANTITIES
OUTPUT_QUANTITY(-21)%SHORT_NAME= 'h'

OUTPUT_QUANTITY(-22)%NAME= 'RADIOMETER'
OUTPUT_QUANTITY(-22)%OLD_NAME= 'RADIOMETER GAS'
OUTPUT_QUANTITY(-22)%UNITS= 'kW/m2'
OUTPUT_QUANTITY(-22)%SHORT_NAME= 'radio'

Expand Down
2 changes: 1 addition & 1 deletion Source/devc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MODULE DEVICE_VARIABLES
ACTIVATION_TEMPERATURE,ACTIVATION_OBSCURATION, &
ALPHA_E,ALPHA_C,BETA_E,BETA_C,CHARACTERISTIC_VELOCITY,PARTICLE_VELOCITY,MASS_FLOW_RATE,FLOW_RATE,FLOW_TAU, &
GAUGE_EMISSIVITY,GAUGE_TEMPERATURE,INITIAL_TEMPERATURE,K_FACTOR,C_FACTOR,OPERATING_PRESSURE,OFFSET,&
SPRAY_ANGLE(2,2),P0=0._EB,PX(3)=0._EB,PXX(3,3)=0._EB
SPRAY_ANGLE(2,2),P0=0._EB,PX(3)=0._EB,PXX(3,3)=0._EB,VIEW_ANGLE
INTEGER :: PDPA_M=0,PDPA_N=0,N_SMOKEVIEW_PARAMETERS=0,N_SMOKEVIEW_IDS=0,N_INSERT,I_VEL=0,PARTICLES_PER_SECOND
LOGICAL :: PDPA_INTEGRATE=.TRUE.,PDPA_NORMALIZE=.TRUE.,HISTOGRAM_NORMALIZE=.TRUE.,HISTOGRAM=.FALSE., &
HISTOGRAM_CUMULATIVE=.FALSE.,SPARK=.FALSE.
Expand Down
44 changes: 22 additions & 22 deletions Source/dump.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3660,38 +3660,38 @@ SUBROUTINE WRITE_DIAGNOSTICS(T,DT)
CALL GET_DATE_ISO_8601(DATE)
CALL CPU_TIME(CPUTIME)
IF (ABS(T)<=999.99999_EB) THEN
WRITE(LU_STEPS,'(I7,",",A,",",E10.3,",",F10.5,",",E12.5)') ICYC,TRIM(DATE),DT,T,CPUTIME - CPU_TIME_START
WRITE(LU_STEPS,'(I8,",",A,",",E10.3,",",F10.5,",",E12.5)') ICYC,TRIM(DATE),DT,T,CPUTIME - CPU_TIME_START
ELSEIF (ABS(T)>999.99999_EB .AND. ABS(T)<=99999.999_EB) THEN
WRITE(LU_STEPS,'(I7,",",A,",",E10.3,",",F10.3,",",E12.5)') ICYC,TRIM(DATE),DT,T,CPUTIME - CPU_TIME_START
WRITE(LU_STEPS,'(I8,",",A,",",E10.3,",",F10.3,",",E12.5)') ICYC,TRIM(DATE),DT,T,CPUTIME - CPU_TIME_START
ELSE
WRITE(LU_STEPS,'(I7,",",A,",",E10.3,",",F10.1,",",E12.5)') ICYC,TRIM(DATE),DT,T,CPUTIME - CPU_TIME_START
WRITE(LU_STEPS,'(I8,",",A,",",E10.3,",",F10.1,",",E12.5)') ICYC,TRIM(DATE),DT,T,CPUTIME - CPU_TIME_START
ENDIF

! Write abridged output to the .err file

IF (ABS(TIME_SHRINK_FACTOR-1._EB) < TWO_EPSILON_EB) THEN

IF (ABS(T)<=0.0001) THEN
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.5,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.5,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
ELSEIF (ABS(T)>0.0001 .AND. ABS(T) <=0.001) THEN
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.4,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.4,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
ELSEIF (ABS(T)>0.001 .AND. ABS(T)<=0.01) THEN
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.3,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.3,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
ELSE
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.2,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.2,A)') 'Time Step:',ICYC,', Simulation Time:',T,' s'
ENDIF
ELSE

STIME = T_BEGIN + (T-T_BEGIN) * TIME_SHRINK_FACTOR
DTS = DT * TIME_SHRINK_FACTOR
IF (ABS(STIME)<=0.0001) THEN
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.5,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.5,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
ELSEIF (ABS(STIME)>0.0001 .AND. ABS(STIME) <=0.001) THEN
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.4,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.4,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
ELSEIF (ABS(STIME)>0.001 .AND. ABS(STIME)<=0.01) THEN
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.3,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.3,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
ELSE
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I7,A,F10.2,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
WRITE(SIMPLE_OUTPUT_ERR,'(1X,A,I8,A,F10.2,A)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,' s'
ENDIF

ENDIF
Expand All @@ -3711,19 +3711,19 @@ SUBROUTINE WRITE_DIAGNOSTICS(T,DT)
IF (ABS(TIME_SHRINK_FACTOR-1._EB) < TWO_EPSILON_EB) THEN

IF (ABS(T)<=0.0001) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.6,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.6,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSEIF (ABS(T)>0.0001 .AND. ABS(T) <=0.001) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.5,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.5,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSEIF (ABS(T)>0.001 .AND. ABS(T)<=0.01) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.4,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.4,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSEIF (ABS(T)>0.01 .AND. ABS(T)<=0.1) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.3,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.3,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSE
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.2,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.2,A,F8.5,A,I0)') 'Time Step:',ICYC,', Simulation Time:',T,' s, Step Size:',DT,&
' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ENDIF

Expand All @@ -3732,19 +3732,19 @@ SUBROUTINE WRITE_DIAGNOSTICS(T,DT)
ELSE

IF (ABS(STIME)<=0.0001) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.6,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.6,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
' s, Scaled Step Size:',DTS,' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSEIF (ABS(STIME)>0.0001 .AND. ABS(STIME) <=0.001) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.5,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.5,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
' s, Scaled Step Size:',DTS,' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSEIF (ABS(STIME)>0.001 .AND. ABS(STIME)<=0.01) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.4,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.4,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
' s, Scaled Step Size:',DTS,' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSEIF (ABS(STIME)>0.01 .AND. ABS(STIME)<=0.1) THEN
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.3,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.3,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
' s, Scaled Step Size:',DTS,' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ELSE
WRITE(SIMPLE_OUTPUT,'(1X,A,I7,A,F10.2,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
WRITE(SIMPLE_OUTPUT,'(1X,A,I8,A,F10.2,A,F8.5,A,I0)') 'Time Step:',ICYC,', Scaled Simulation Time:',STIME,&
' s, Scaled Step Size:',DTS,' s, Pressure Iterations: ',PRESSURE_ITERATIONS
ENDIF
ENDIF
Expand All @@ -3754,7 +3754,7 @@ SUBROUTINE WRITE_DIAGNOSTICS(T,DT)
! Detailed diagnostics to the .out file

CALL GET_DATE(DATE)
WRITE(LU_OUTPUT,'(7X,A,I7,3X,A)') 'Time Step ',ICYC,TRIM(DATE)
WRITE(LU_OUTPUT,'(7X,A,I8,3X,A)') 'Time Step ',ICYC,TRIM(DATE)
IF (ABS(TIME_SHRINK_FACTOR-1._EB) < TWO_EPSILON_EB) THEN
IF (ABS(T)<=0.0001) THEN
WRITE(LU_OUTPUT,150) DT,T
Expand Down
1 change: 1 addition & 0 deletions Source/part.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,7 @@ SUBROUTINE VOLUME_INIT_PARTICLE
IF (DV%QUANTITY(1)=='RADIATIVE HEAT FLUX' .OR. &
DV%QUANTITY(1)=='GAUGE HEAT FLUX' .OR. &
DV%QUANTITY(1)=='RADIANCE' .OR. &
DV%QUANTITY(1)=='RADIOMETER' .OR. &
DV%QUANTITY(1)=='ADIABATIC SURFACE TEMPERATURE') THEN
IF (LPC%ID=='RESERVED TARGET PARTICLE') THEN ! use the orientation of the DEVC
LP%ORIENTATION_INDEX = DV%ORIENTATION_INDEX
Expand Down
Loading

0 comments on commit fdb4c5d

Please sign in to comment.