Skip to content

Commit 8b8a308

Browse files
committed
FDS Source: Merge with firemodels/master
2 parents 4ce913f + b4fbf2e commit 8b8a308

File tree

27 files changed

+860
-814
lines changed

27 files changed

+860
-814
lines changed

Manuals/FDS_Technical_Reference_Guide/Appendices.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,11 @@ \chapter{Gas Phase Absorption Coefficients}
424424

425425
By default in FDS, the pathlength, $L$, is 10~cm. It can also be specified by the user. If $T=T_{\rm rad}$ the intensity does not depend on $\kappa_{n,i,{\rm e}}$, and the value $\kappa_{n,i,{\rm e}}(T_{\rm rad})$ is therefore interpolated from the neighboring temperatures.
426426

427-
In cases with only one band ($N$=1), the smaller of the two absorption coefficients is used:
427+
In cases of non-zero path length, the smaller of the two absorption coefficients is used:
428428
\be
429429
\kappa_{n,i}=\min \Big( \kappa_{n,i,{\rm P}}(Y_i,T),\kappa_{n,i,{\rm e}}(Y_i,T,L) \Big)
430430
\ee
431-
If $N>1$ or $L=0$, $\kappa_{n,i}=\kappa_{n,i,{\rm P}}$. Note that the spectral data within RADCAL are used whenever the gas mixture contains water vapor, fuel or combustion products, regardless of the number of radiation bands $N$.
431+
If $L=0$, $\kappa_{n,i}=\kappa_{n,i,{\rm P}}$. Note that the spectral data within RADCAL are used whenever the gas mixture contains water vapor, fuel or combustion products, regardless of the number of radiation bands $N$.
432432

433433
\textbf{Note on wavenumber, wavelength, and frequency}: some confusion might arise when dealing with the various quantities describing the wave nature of radiation. These quantities are wavenumber $\om$, wavelength $\la$, and frequency denoted here $\nu$. Most users may be familiar with the frequency $\nu$, in units of \textit{hertz}, ${\rm Hz}$, representing the number of cycles per second. While this unit is preferred for radiation waves of low energy such as radio waves, wavelength and wavenumber are preferred for waves of higher energy. Wavenumber and wavelength are related to frequency through \cite{Penner:1959}
434434
\be

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,10 @@ \subsubsection{Devices and Output}
306306
\chapter{Getting Started}
307307
\label{info:gettingstarted}
308308

309-
FDS is a computer program that solves equations that describe the evolution of fire. It is a Fortran program that reads input parameters from a text file, computes a numerical solution to the governing equations, and writes user-specified output data to files. Smokeview is a companion program that reads FDS output files and produces animations on the computer screen. Smokeview has a simple menu-driven interface. FDS does not. However, there are various third-party programs that have been developed to generate the text file containing the input parameters needed by FDS.
309+
FDS is a Fortran program that solves the equations governing fire or other thermally-driven, low Mach number flows. FDS reads input parameters from a text file, computes a numerical solution to the governing equations, and writes user-specified output data to files. Smokeview\footnote{A separate document~\cite{Smokeview_Users_Guide} describes how to use Smokeview.} is a companion program that reads FDS output files and produces animations on the computer screen. Smokeview has a simple menu-driven interface. FDS does not. However, there are various third-party programs that have been developed to generate the text file containing the input parameters needed by FDS.
310+
311+
Some third-party applications, like \href{https://www.thunderheadeng.com/pyrosim/}{PyroSim from Thunderhead Engineering}, have graphical interfaces for specifying input parameters and for viewing results. FDS is the core solver of such a package, but Smokeview would be replaced by a program that is compatible with the geometry engine used to build the model. If you are using a package like PyroSim, FDS would be installed as part of the larger package and you can skip the next section which is intended for those who want to download and install FDS and Smokeview only.
310312

311-
This guide describes how to obtain FDS and Smokeview and how to use FDS. A separate document~\cite{Smokeview_Users_Guide} describes how to use Smokeview.
312313

313314
\section{How to Acquire FDS and Smokeview}
314315
\label{info:acquire}
@@ -322,7 +323,6 @@ \section{How to Acquire FDS and Smokeview}
322323
\noindent
323324
The typical FDS/Smokeview distribution consists of an installation package or compressed archive, which is available for MS Windows, macOS, and Linux.
324325

325-
Old versions can be kept by copying the old version's installation directly to another location so that it is not overwritten when installing a new version.
326326

327327

328328
\section{Computer Hardware Requirements}
@@ -347,6 +347,8 @@ \section{Installation Testing}
347347

348348
If you are running FDS under a quality assurance plan that requires installation testing, a test procedure is provided in Appendix B of the FDS Verification Guide~\cite{FDS_Verification_Guide}. This guide can be obtained from the FDS-SMV website.
349349

350+
If you are a first-time user or you simply want to ensure that FDS and Smokeview have been installed properly on your computer, run\footnote{On a Windows computer, FDS is typically installed in a directory that is read-only for most users. Copy the sample input file and move it to a directory for which you have write-privilege.} the case called \ct{Examples/Fire/simple_test.fds} following the instructions in the next chapter. This case requires only a few tens of minutes to complete and allows you to visualize the results of a very simple fire scenario. As you learn about new features in the chapters to follow, this case can serve as a useful testbed. The text file \ct{simple_test.fds} contains parameters organized by {\em namelist} groups that are listed alphabetically in Chapter~\ref{info:namelists}. All FDS input parameters are listed in these tables, and each has a hyperlink to a section in this guide that explains its use.
351+
350352

351353

352354
\chapter{Running FDS}
@@ -10545,7 +10547,7 @@ \subsection{Thermocouples}
1054510547
\frac{D_{\rm TC}}{6} \, \rho_{\rm TC} \, c_{\rm TC} \, \frac{\d T_{\rm TC}}{\d t} = \epsilon_{\rm TC} \, (U/4 - \sigma T_{\rm TC}^4) + h(T_{\rm g} - T_{\rm TC})
1054610548
\label{TC}
1054710549
\ee
10548-
where $\epsilon_{\rm TC}$ is the emissivity of the thermocouple, $U$ is the integrated radiative intensity, $T_{\rm g}$ is the true gas temperature, and $h$ is the heat transfer coefficient to a small sphere, $h=k \, \NU / D_{\rm TC}$. The bead \ct{DIAMETER}, \ct{EMISSIVITY}, \ct{DENSITY}, and \ct{SPECIFIC_HEAT} are given on the associated \ct{PROP} line. To over-ride the calculated value of the heat transfer coefficient, set \ct{HEAT_TRANSFER_COEFFICIENT} on the \ct{PROP} line (\si{W/(m.K)}). The default value for the bead diameter is 0.001~m. The default emissivity is 0.85. The default values for the bead density and specific heat are that of nickel; 8908~kg/m$^3$ and 0.44~kJ/kg/K, respectively. See the discussion on heat transfer to a water droplet in the Technical Reference Guide for details of the convective heat transfer to a small sphere.
10550+
where $\epsilon_{\rm TC}$ is the emissivity of the thermocouple, $U$ is the integrated radiative intensity, $T_{\rm g}$ is the true gas temperature, and $h$ is the heat transfer coefficient to a small sphere, $h=k \, \NU / D_{\rm TC}$. The bead \ct{DIAMETER}, \ct{EMISSIVITY}, \ct{DENSITY}, and \ct{SPECIFIC_HEAT} or \ct{SPECIFIC_HEAT_RAMP} are given on the associated \ct{PROP} line. To over-ride the calculated value of the heat transfer coefficient, set \ct{HEAT_TRANSFER_COEFFICIENT} on the \ct{PROP} line (\si{W/(m.K)}). The default value for the bead diameter is 0.001~m. The default emissivity is 0.85. The default values for the bead density and specific heat are that for a Type-K thermocouple; 8700~kg/m$^3$ and a linear ramp from 0.4515~kJ/kg/K at 20\,$^\circ$C to 0.6010~kJ/kg/K at 1200\,$^\circ$C, respectively. See the discussion on heat transfer to a water droplet in the Technical Reference Guide for details of the convective heat transfer to a small sphere.
1054910551

1055010552
The above discussion is appropriate for a so-called ``bare bead'' thermocouple, but often thermocouples are shielded or sheathed in various ways to mitigate the effect of thermal radiation. In such cases, there is no obvious bead diameter and there may be multiple metals and air gaps in the construction. Usually, the manufacturer provides a time constant, which is defined as the time required for the sensor to respond to 63.2~\% of its total output signal when suddenly plunged into a warm air stream flowing at 20~m/s. The analysis and testing is typically done at relatively low temperature, in which case the radiation term in Eq.~(\ref{TC}) can be neglected and the time constant, $\tau$, can be defined in terms of effective thermal properties and an effective diameter:
1055110553
\be
@@ -13188,7 +13190,7 @@ \section{\texorpdfstring{{\tt PROP}}{PROP} (Device Properties)}
1318813190
\ct{CALIBRATION_CONSTANT} & Real & Section~\ref{info:bidir_probe} & & 0.93 \\ \hline
1318913191
\ct{CHARACTERISTIC_VELOCITY} & Real & Section~\ref{info:pressure_coefficient} & m/s & 1. \\ \hline
1319013192
\ct{C_FACTOR} & Real & Section~\ref{info:sprinklers} & (m/s)$^{1/2}$ & 0. \\ \hline
13191-
\ct{DENSITY} & Real & Section~\ref{info:THERMOCOUPLE} & kg/m$^3$ & 8908. \\ \hline
13193+
\ct{DENSITY} & Real & Section~\ref{info:THERMOCOUPLE} & kg/m$^3$ & 8700. \\ \hline
1319213194
\ct{DIAMETER} & Real & Section~\ref{info:THERMOCOUPLE} & m & 0.001 \\ \hline
1319313195
\ct{EMISSIVITY} & Real & Section~\ref{info:THERMOCOUPLE} & & 0.85 \\ \hline
1319413196
\ct{FED_ACTIVITY} & Integer & Section~\ref{info:FED} & & 2 \\ \hline
@@ -13232,7 +13234,8 @@ \section{\texorpdfstring{{\tt PROP}}{PROP} (Device Properties)}
1323213234
\ct{SMOKEVIEW_PARAMETERS(:)} & Char.~Array & Section~\ref{info:SMOKEVIEW_PARAMETERS} & & \\ \hline
1323313235
\ct{SPARK} & Logical & Section~\ref{info:ignition} & & \ct{F} \\ \hline
1323413236
\ct{SPEC_ID} & Character & Section~\ref{info:alternative_smoke} & & \\ \hline
13235-
\ct{SPECIFIC_HEAT} & Real & Section~\ref{info:THERMOCOUPLE} & $\si{kJ/(kg.K)}$ & 0.44 \\ \hline
13237+
\ct{SPECIFIC_HEAT} & Real & Section~\ref{info:THERMOCOUPLE} & $\si{kJ/(kg.K)}$ & \\ \hline
13238+
\ct{SPECIFIC_HEAT_RAMP} & Character & Section~\ref{info:THERMOCOUPLE} & & \\ \hline
1323613239
\ct{SPRAY_ANGLE(2,2)} & Real & Section~\ref{info:sprinklers} & degrees & 60.,75. \\ \hline
1323713240
\ct{SPRAY_PATTERN_BETA} & Real & Section~\ref{info:sprinklers} & degrees & 5. \\ \hline
1323813241
\ct{SPRAY_PATTERN_MU} & Real & Section~\ref{info:sprinklers} & degrees & 0. \\ \hline

Manuals/FDS_Verification_Guide/FDS_Verification_Guide.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4423,6 +4423,15 @@ \subsection{Thermophoretic Settling and Deposition of Aerosols\\(\texorpdfstring
44234423

44244424
This verification test consists of two test cases. The second case, \ct{aerosol\_thermophoretic\_deposition\_2}, reverses the temperature gradient. The case consists of a box 1~cm on a side with adiabatic, free-slip side walls and a 100 K temperature gradient over the height of the box. The box is filled with two gas species each having a molecular weight of 28.8~g/mol, a viscosity of $2\times10^{-5}$~\si{kg/(m.s)}, a thermal conductivity of 0.025~\si{W/(m.K)}, and specific heat of 1~\si{kJ/(kg.K)}, and zero diffusivity. One of the gas species is defined as an aerosol with a diameter of 1~$\mu$m, a solid phase density of 2000~\si{kg/m^3}, and a solid phase conductivity of 1~\si{W/(m.K)}. The initial mass fraction of the aerosol is $1\times10^{-5}$. The gas temperature is initialized to its steady-state temperature gradient. \ct{STRATIFICATION}, \ct{NOISE}, and all aerosol behaviors except for \ct{THERMOPHORETIC\_SETTLING} and \ct{THERMOPHORETIC\_DEPOSITION} are turned off. Thermophoretic settling rates are weakly dependent on the gas density. Since there is a temperature gradient, the settling rates are not uniform over the height of the box. Unlike the gravitational settling case, this means over long enough time periods the overall settling rate is not linear in time; however, for a short time period a near linear settling rate is expected and can be determined analytically.
44254425

4426+
Using the equation for the thermophoretic velocity, $u_{\rm th}$, the thermophoretic velocities for the gas cells adjacent to the hot and cold walls are respectively 2.25E-4~\si{m/s} and 2.15E-4~\si{m/s}. Adjacent to the cold wall, $u_{\rm th}$ is the rate at which the aerosol deposits onto the wall. Over the simulation time of 2~s, the soot will move 4.29E-4~m which is 42.9~\% of the cell size. That fraction of the aerosol in the cell will deposit which is 5.05E-9~\si{kg/m^2}. Adjacent to the hot wall, $u_{\rm th}$ is the rate at which the aerosol leaves the cell. Over the simulation time of 2~s, the soot will move 4.49E-4~m which is 44.9~\% of the cell size. One minus that fraction of the original aerosol density in the cell will remain which is 4.98E-6~\si{kg/m^3}.
4427+
4428+
The thermophorertic velocity is given by
4429+
\be
4430+
u_{\rm th} = \frac{K_{\rm th} \nu}{T_{\rm g}} \; \frac{\d T}{\d x}
4431+
\ee
4432+
where $K_{\rm th}$ is a coefficient dependent on the particle size and solid conductivity, $\nu$ is the kinematic viscosity, $T_{\rm g}$ is the cell gas temperature, and $\frac{\d T}{\d x}$ is the temperature gradient.
4433+
4434+
44264435
\begin{figure}[ht]
44274436
\noindent
44284437
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}

Source/chem.f90

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,8 @@ END FUNCTION DDTMP_TROE
783783
!> \brief cvode interface for ODE integrator. Call sundials cvode in serial mode.
784784
!> \param CC species concentration (kmol/m3) array
785785
!> \param ZZ_0 initial species mass fraction array (of the unbuned zone),needed for mixing+chem
786-
!> \param TMP_IN is the temperature of the cell (unburned zone)
786+
!> \param TMP_IN is the temperature of the mixed zone (For DNS it is cell temp)
787+
!> \param TMP_UNMIX is the unmix zone temperature
787788
!> \param PR_IN is the pressure
788789
!> \param ZETA0 is the initial unmixed fraction
789790
!> \param TAU_MIX is Mixing timescale
@@ -792,13 +793,13 @@ END FUNCTION DDTMP_TROE
792793
!> \param TEND is the end time in seconds
793794
!> \param RTOL is the relative error for all the species (REAL_EB)
794795
!> \param ATOL is the absolute error tolerance array for the species (REAL_EB)
795-
!> \param TMP_OUT reactor calculated temperature at the end
796+
!> \param TMP_OUT reactor calculated mixing zone temperature at the end
796797
!> \param CHEM_TIME Chemical time scale
797798
!> \param WRITE_SUBSTEPS Whether to write cvode substeps. Only write for first cfd step.
798799
!> \param CVODE_CALL_OPTION 1:CV_NORMAL, 2=CV_ONE_STEP
799800
!> \details This is the interface subroutine to the other modules.
800801

801-
SUBROUTINE CVODE_SERIAL(CC,ZZ_0, TMP_IN, PR_IN, ZETA0, TAU_MIX, CELL_MASS, TCUR,TEND, RTOL, ATOL, &
802+
SUBROUTINE CVODE_SERIAL(CC,ZZ_0, TMP_IN, TMP_UNMIX, PR_IN, ZETA0, TAU_MIX, CELL_MASS, TCUR,TEND, RTOL, ATOL, &
802803
TMP_OUT, CHEM_TIME, WRITE_SUBSTEPS, CVODE_CALL_OPTION)
803804
USE PHYSICAL_FUNCTIONS, ONLY : MOLAR_CONC_TO_MASS_FRAC, CALC_EQUIV_RATIO, GET_ENTHALPY, GET_MOLECULAR_WEIGHT
804805
USE COMP_FUNCTIONS, ONLY: GET_FILE_NUMBER
@@ -813,7 +814,7 @@ SUBROUTINE CVODE_SERIAL(CC,ZZ_0, TMP_IN, PR_IN, ZETA0, TAU_MIX, CELL_MASS, TCUR,
813814
USE FSUNDIALS_NVECTOR_MOD ! FORTRAN INTERFACE TO GENERIC N_VECTOR
814815

815816
REAL(EB), INTENT(INOUT) :: CC(N_TRACKED_SPECIES)
816-
REAL(EB), INTENT(IN) :: ZZ_0(N_TRACKED_SPECIES),TMP_IN,PR_IN,ZETA0,TAU_MIX,CELL_MASS,TCUR,TEND
817+
REAL(EB), INTENT(IN) :: ZZ_0(N_TRACKED_SPECIES),TMP_IN,TMP_UNMIX,PR_IN,ZETA0,TAU_MIX,CELL_MASS,TCUR,TEND
817818
REAL(EB), INTENT(IN) :: ATOL(N_TRACKED_SPECIES)
818819
REAL(EB), INTENT(IN) :: RTOL
819820
REAL(EB), INTENT(OUT) :: TMP_OUT,CHEM_TIME
@@ -841,7 +842,7 @@ SUBROUTINE CVODE_SERIAL(CC,ZZ_0, TMP_IN, PR_IN, ZETA0, TAU_MIX, CELL_MASS, TCUR,
841842
TYPE(C_PTR) :: USERDATAPTR ! USER DATA CONTAINS MIXING INFORMATION
842843

843844
REAL(EB) :: ZZ(N_TRACKED_SPECIES), EQUIV, H_IN
844-
INTEGER :: CVODE_TASK, NS, NTRY, MAXTRY, SUBSTEP_COUNT
845+
INTEGER :: CVODE_TASK, NS, NTRY, MAXTRY, SUBSTEP_COUNT, MAXTRY_FAC
845846
REAL(EB) :: H_G
846847
TYPE(USERDATA), TARGET :: USER_DATA
847848
LOGICAL :: ONLY_FIRST_STEP=.TRUE. ! Needed in CV_ONE_STEP
@@ -948,7 +949,7 @@ SUBROUTINE CVODE_SERIAL(CC,ZZ_0, TMP_IN, PR_IN, ZETA0, TAU_MIX, CELL_MASS, TCUR,
948949
USER_DATA%CELL_MASS = CELL_MASS
949950
ALLOCATE(USER_DATA%ZZ_0(N_TRACKED_SPECIES))
950951
USER_DATA%ZZ_0 = ZZ_0
951-
CALL GET_ENTHALPY(ZZ_0,H_IN,TMP_IN)
952+
CALL GET_ENTHALPY(ZZ_0,H_IN,TMP_UNMIX)
952953
USER_DATA%H_IN = H_IN
953954
USERDATAPTR = C_LOC(USER_DATA)
954955
IERR_C = FCVODESETUSERDATA(CVODE_MEM, USERDATAPTR)
@@ -987,12 +988,14 @@ SUBROUTINE CVODE_SERIAL(CC,ZZ_0, TMP_IN, PR_IN, ZETA0, TAU_MIX, CELL_MASS, TCUR,
987988
ENDIF
988989
END DO
989990

990-
991991
ENDIF
992992

993993
IF (IERR_C /= 0) THEN
994-
MAXTRY = CVODE_MAX_TRY
995994
! If all internal substeps are taken try two more times. This will allow larger CFD timestep.
995+
! Make MAXTRY at least CVODE_MAX_TRY or for larger timestep (>1E-3) scale it proportionaly.
996+
MAXTRY_FAC = CEILING((TEND-TCUR)/1.0E-3_EB)
997+
MAXTRY_FAC = MIN(MAX(MAXTRY_FAC,1),50)
998+
MAXTRY = CVODE_MAX_TRY*MAXTRY_FAC
996999
IF (IERR_C == CV_TOO_MUCH_WORK) THEN !CV_TOO_MUCH_WORK == all internal substeps are taken
9971000
NTRY = 0
9981001
DO WHILE (NTRY < MAXTRY)
@@ -1008,8 +1011,8 @@ SUBROUTINE CVODE_SERIAL(CC,ZZ_0, TMP_IN, PR_IN, ZETA0, TAU_MIX, CELL_MASS, TCUR,
10081011

10091012
IF (IERR_C .NE. CV_SUCCESS) THEN
10101013
IF (IERR_C == CV_TOO_MUCH_WORK) THEN
1011-
WRITE(LU_ERR,'(A, 2E18.8, A)')" WARN: CVODE took all internal substeps. CUR_CFD_TIME, DT=", CUR_CFD_TIME, (TEND-TCUR), &
1012-
". If the warning persists, reduce the timestep."
1014+
WRITE(LU_ERR,'(A, 2E18.8, I8, A)')" WARN: CVODE took all internal substeps. CUR_CFD_TIME, DT, MAXTRY=", CUR_CFD_TIME, &
1015+
(TEND-TCUR), MAXTRY, ". If the warning persists, reduce the timestep."
10131016
ELSE
10141017
WRITE(LU_ERR,'(A, I4, A, 2E18.8, A)')" WARN: CVODE didn't finish ODE solution with message code:", IERR_C, &
10151018
" and CUR_CFD_TIME, DT=", CUR_CFD_TIME, (TEND-TCUR), ". If the warning persists, reduce the timestep."

0 commit comments

Comments
 (0)