Skip to content

Commit a8bd42b

Browse files
committed
Merge remote-tracking branch 'firemodels/master' into FireX
2 parents 881534a + 3b7dcd3 commit a8bd42b

File tree

4 files changed

+121
-55
lines changed

4 files changed

+121
-55
lines changed

Manuals/FDS_Verification_Guide/FDS_Verification_Guide.tex

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,7 @@ \subsection{1-D Flow in a Tunnel (\texorpdfstring{\ct{tunnel_const_gamma}}{tunne
15221522
\end{eqnarray}
15231523
Note that $\R=8314.5$~J/kmol/K and the sensible enthalpy, $h_{\rm s}=\int_{T_\infty}^T c_p(T') \, \d T'$. The tube is 10~cm long, 1~mm wide and 4~mm tall, and discretized with 1~mm grid cells. A vertical column of cells contains a volumetric heat source that introduces heat at a rate of $\dq'''=2.5133 \times 10^8$~W/m$^3$ within each 1~mm cell. The velocity, density, pressure and temperature are constant starting at the inlet, and at the heat source, the velocity and temperature jump up, and the density and pressure drop down over the span of a single cell and remain steady until the outlet is reached, where the perturbation pressure is set to zero.
15241524

1525-
For the case where the ratio of specific heats are constant with $\gamma=1.4$ and $W=28.85$ kg/kmol for air, $c_p=\gamma \, (\R/W) /(\gamma-1)=1008.7$~J/kg/K and $\rho c_p T=\gamma \, p_\infty / (\gamma-1)$. In the second equation of (\ref{div1d}), the second two terms on the right hand side are identically zero; thus, the jump in velocity can be computed
1525+
For the case where the ratio of specific heats are constant with $\gamma=1.4$ and $W=28.85$~kg/kmol for air, $c_p=\gamma \, (\R/W) /(\gamma-1)=1008.7$~J/kg/K and $\rho c_p T=\gamma \, p_\infty / (\gamma-1)$. In the second equation of (\ref{div1d}), the second two terms on the right hand side are identically zero; thus, the jump in velocity can be computed
15261526
\be
15271527
\Delta u = \frac{\gamma-1}{\gamma \, p_\infty} \, \dq''' \, \Delta x \approx 0.7087 \; \hbox{m/s}
15281528
\ee
@@ -1554,23 +1554,20 @@ \subsection{1-D Flow in a Tunnel (\texorpdfstring{\ct{tunnel_const_gamma}}{tunne
15541554
\subsection{1-D Flow in a Tunnel (\texorpdfstring{\ct{tunnel_linear_cp}}{tunnel\_linear\_cp})}
15551555
\label{tunnel_linear_cp}
15561556

1557-
Considering the same layout and the same environmental conditions of the previous case. Air is blown at a constant rate, $u_\infty=1$~m/s, through a 10~cm long, 1~mm wide and 4~mm tall tube. A steady heat source is located in the middle of the tube, composed of a vertical column of cells containing a volumetric heat source that introduces heat at a rate of $\dq'''=2.5133 \times 10^8$~W/m$^3$ within each 1~mm cell . Ignoring wall friction, gravity, radiation transport, thermal conductivity, viscosity, and assuming that the heat source uniformly spans the cross section of the tube, a set of 1-D equations can be derived for the steady-state velocity, $u(x)$, density, $\rho(x)$, perturbation pressure, $\tp(x)$, and temperature, $T(x)$. This equations are the same used in the previous example in (\ref{mom1d}) and (\ref{div1d}).
1557+
Consider the same layout and conditions of the previous case. Air is blown at a constant rate, $u_\infty=1$~m/s, through a 10~cm long, 1~mm wide and 4~mm tall tube. A steady heat source is located in the middle of the tube, composed of a vertical column of cells containing a volumetric heat source that introduces heat at a rate of $\dq'''=2.5133 \times 10^8$~W/m$^3$ within each 1~mm cell. Ignoring wall friction, gravity, radiation transport, thermal conductivity, viscosity, and assuming that the heat source uniformly spans the cross section of the tube, a set of 1-D equations can be derived for the steady-state velocity, $u(x)$, density, $\rho(x)$, perturbation pressure, $\tp(x)$, and temperature, $T(x)$. These equations are the same used in the previous example in (\ref{mom1d}) and (\ref{div1d}).
15581558

1559-
Remembering that $\R=8314.5$~J/kmol/K and the sensible enthalpy, $h_{\rm s}=\int_{T_\infty}^T c_p(T') \, \d T'$. The velocity, density, pressure and temperature are constant starting at the inlet, until the heat source, where the velocity and temperature jump up, and the density and pressure drop down over the span of a single cell and remain steady until the outlet is reached, where the perturbation pressure is set to zero.
1560-
1561-
For the case where the specific heat varies as a function of the temperature. In the second equation of (\ref{div1d}), using the first equation of (\ref{mom1d}) and (\ref{div1d}), and some relationships among the variables is possible to arrive to a simpler expression.
1559+
The velocity, density, pressure and temperature are constant starting at the inlet, and at the heat source the velocity and temperature jump up and the density and pressure drop down over the span of a single cell and remain steady until the outlet is reached, where the perturbation pressure is set to zero. In the second equation of (\ref{div1d}), using the first equation of (\ref{mom1d}) and (\ref{div1d}), and some relationships among the variables it is possible to arrive at a simpler expression.
15621560
\begin{eqnarray}
15631561
\rho c_p T \frac{\d u}{\d x} &=& \dq''' - u \rho \, \frac{\d}{\d x} (h_{\rm s}) - u h_{\rm s} \, \frac{\d}{\d x} (\rho) - c_p T u \frac{\d \rho}{\d x} + h_{\rm s} u \frac{\d \rho}{\d x} \\
15641562
c_p \rho_\infty u_\infty \frac{\d T}{\d x} &=& \dq''' - u \rho \, \frac{\d}{\d x} (h_{\rm s}) + c_p u \rho \frac{\d T}{\d x} \\
15651563
\dq''' &=& u \rho \, \frac{\d}{\d x} (h_{\rm s}) \\
15661564
\frac{ \dq'''}{\rho_\infty u_\infty} &=& \frac{\d}{\d x} (h_{\rm s}) \label{1stLaw}
15671565
\end{eqnarray}
1568-
1569-
Through the steps, the continuity, in (\ref{mom1d}), and state equation, in (\ref{div1d}), are used to make the temperature the only variable and simplifying equivalent terms until the equation (\ref{1stLaw}) is obtained. Equation (\ref{1stLaw}) corresponds to a 1-D form of the first law of thermodynamics, proving the divergence equation as a consistent energy balance. Then, for the case where the $c_p$ is a linear function of the temperature, $c_p=aT +b$, we have
1566+
The continuity, (\ref{mom1d}), and state equation, (\ref{div1d}), render the temperature the only variable and after simplifying, Eq.~(\ref{1stLaw}) is obtained. Equation (\ref{1stLaw}) corresponds to a 1-D form of the first law of thermodynamics, proving the divergence equation as a consistent energy balance. Then, for the case where the $c_p$ is a linear function of the temperature, $c_p=aT +b$, we have
15701567
\begin{eqnarray}
15711568
\frac{ \dq'''}{\rho_\infty u_\infty} \Delta x &=& T^2 \frac{a}{2} +bT - (T_\infty^2 \frac{a}{2} +bT_\infty) \label{LinearCP}
15721569
\end{eqnarray}
1573-
Substituting in Eq.~(\ref{LinearCP}) for $a=0.1584$ J/kg/K$^2$ and $b=953.5650$ J/kg/K (these coefficients give $c_p(T_\infty)=1000$ J/kg/K) the temperature downstream of the heat source is computed to be 499.2~K. Correspondingly, the density and velocity are, $\rho_1$= 0.7046~\si{kg/m^3} and $u_1= 1.7030$~m/s. To determine the drop in pressure, Eq.~(\ref{mom1d}) is written in discretized form as in the previous verification. Then assuming that the subscript 0 refers to the cell containing the heat source, 1 to the first cell downstream, and -1 to the first cell upstream. The velocity in cell 0 is the approximated as the average of the velocity upstream and downstream, $u_0=1.3515$~m/s.
1570+
Substituting in Eq.~(\ref{LinearCP}) for $a=0.1584$~J/kg/K$^2$ and $b=953.5650$~J/kg/K (these coefficients give $c_p(T_\infty)=1000$~J/kg/K) the temperature downstream of the heat source is computed to be 499.2~K. Correspondingly, the density and velocity are, $\rho_1=0.7046$~\si{kg/m^3} and $u_1= 1.7030$~m/s. To determine the drop in pressure, Eq.~(\ref{mom1d}) is written in discretized form as in the previous verification. Then assuming that the subscript 0 refers to the cell containing the heat source, 1 to the first cell downstream, and -1 to the first cell upstream. The velocity in cell 0 is the approximated as the average of the velocity upstream and downstream, $u_0=1.3515$~m/s.
15741571
\begin{eqnarray}
15751572
\tp_1 - \tp_0 &=& - \frac{u_1^2 - u_0^2}{2} \rho_1 \approx -0.3783 \; \hbox{Pa} \\
15761573
\tp_0 - \tp_{-1} &=& - \frac{u_0^2 - u_{-1}^2}{2} \rho_0 \approx -0.3936 \; \hbox{Pa}
@@ -1669,7 +1666,7 @@ \subsection{Dynamic Smagorinsky (\texorpdfstring{\ct{dsmag}}{dsmag})}
16691666

16701667
In the previous section, all calculations were performed with a constant and uniform Smagorinsky coefficient, $C_{\rm s} = 0.2$. For the canonical case of homogeneous decaying isotropic turbulence -- \emph{at sufficiently high Reynolds number} -- this model is sufficient. However, we noticed that even for the isotropic turbulence problem when the grid Reynolds number is low (i.e., the flow is well-resolved) the constant coefficient model tends to over predict the dissipation of kinetic energy (see Fig.~\ref{fig_cbc_energy}). This is because the eddy viscosity does not converge to zero at the proper rate; so long as strain is present in the flow (the magnitude of the strain rate tensor is nonzero), the eddy viscosity will be nonzero. This violates a guiding principle in LES development: that the method should converge to a DNS if the flow field is sufficiently resolved.
16711668

1672-
The dynamic procedure for calculating the model coefficient (set \ct{TURBULENCE_MODEL=`DYNAMIC SMAGORINSKY'} on \ct{MISC}) alleviates this problem. The basis of the model is that the coefficient should be the same for two different filter scales within the inertial subrange. Details of the procedure are explained in the following references \cite{Germano:1991,PinoMartin:2000,Moin:1991,Lund:1997,FDS_Math_Guide}. Here we present results for the implementation of the dynamic model in FDS. In Fig.~\ref{fig_c_smag} we show contours of the Smagorinsky coefficient $C_{\rm s}(\mathbf{x},t)$ at a time midway through a $64^3$ simulation of the CBC experiment. Notice that the coefficient ranges from 0.00 to roughly 0.30 within the domain with the average value falling around 0.17.
1669+
The dynamic procedure for calculating the model coefficient (set \ct{TURBULENCE_MODEL='DYNAMIC SMAGORINSKY'} on \ct{MISC}) alleviates this problem. The basis of the model is that the coefficient should be the same for two different filter scales within the inertial subrange. Details of the procedure are explained in the following references \cite{Germano:1991,PinoMartin:2000,Moin:1991,Lund:1997,FDS_Math_Guide}. Here we present results for the implementation of the dynamic model in FDS. In Fig.~\ref{fig_c_smag} we show contours of the Smagorinsky coefficient $C_{\rm s}(\mathbf{x},t)$ at a time midway through a $64^3$ simulation of the CBC experiment. Notice that the coefficient ranges from 0.00 to roughly 0.30 within the domain with the average value falling around 0.17.
16731670

16741671
\begin{figure}[t]
16751672
\centering
@@ -2392,7 +2389,7 @@ \subsubsection{Case 4: Gases Released by Solid Phase Reactions at the Boundary o
23922389
\subsection{Mass Flux through Domain Boundaries (\texorpdfstring{\ct{mass_flux_wall}}{mass\_flux\_wall})}
23932390
\label{mass_flux_wall}
23942391

2395-
This set of tests considers a specified mass injection of water vapor from a \ct{VENT} on the floor of a compartment. The entire top of the compartment is \ct{OPEN} to the ambient. The lighter water vapors are buoyant, so they rise creating a turbulent flow into and out of the domain. Therefore, the input is steady, while the outflow of water vapor is quite chaotic. To judge whether a proper mass balance is achieved by FDS we must monitor not only the inflow and outflow, but also the total mass of water vapor in the domain at a given time. Therefore, we add \ct{DEVC} of quantity \ct{MASS_FLUX_WALL} and \ct{STATISTICS=`SURFACE INTEGRAL`} for inflow and outflow, and we also add \ct{MASS_FILE=.TRUE.} to the \ct{DUMP} line to monitor the total water vapor at any point in time in the domain. With $\rho$ and $Y_{\mbox{\tiny H2O}}$ denoting the local mass density and mass fraction of water vapor in a cell, and with $\dot{m}_{\mbox{\tiny H2O}}^{\prime\prime}$ denoting the flux of water vapor at a cell face on the domain boundary, the mass balance may be written as,
2392+
This set of tests considers a specified mass injection of water vapor from a \ct{VENT} on the floor of a compartment. The entire top of the compartment is \ct{OPEN} to the ambient. The lighter water vapors are buoyant, so they rise creating a turbulent flow into and out of the domain. Therefore, the input is steady, while the outflow of water vapor is quite chaotic. To judge whether a proper mass balance is achieved by FDS we must monitor not only the inflow and outflow, but also the total mass of water vapor in the domain at a given time. Therefore, we add \ct{DEVC} of quantity \ct{MASS_FLUX_WALL} and \ct{STATISTICS='SURFACE INTEGRAL'} for inflow and outflow, and we also add \ct{MASS_FILE=.TRUE.} to the \ct{DUMP} line to monitor the total water vapor at any point in time in the domain. With $\rho$ and $Y_{\mbox{\tiny H2O}}$ denoting the local mass density and mass fraction of water vapor in a cell, and with $\dot{m}_{\mbox{\tiny H2O}}^{\prime\prime}$ denoting the flux of water vapor at a cell face on the domain boundary, the mass balance may be written as,
23962393
\begin{equation}
23972394
\label{eq:H2O_mass_balance}
23982395
\frac{\mbox{d}}{\mbox{d}t} \left( \int_{V} \rho Y_{\mbox{\tiny H2O}} \,\mbox{d}V \right) + \int_{S_{out}} \dot{m}_{\mbox{\tiny H2O}}^{\prime\prime} \,\mbox{d}S - \int_{S_{in}} \dot{m}_{\mbox{\tiny H2O}}^{\prime\prime} \,\mbox{d}S = 0
@@ -2412,7 +2409,7 @@ \subsection{Mass Flux through Domain Boundaries (\texorpdfstring{\ct{mass_flux_w
24122409
\subsection{Mass Balance on a Gas Control Volume (\texorpdfstring{\ct{mass_balance_gas_volume}}{mass\_balance\_gas\_volume})}
24132410
\label{mass_balance_gas_volume}
24142411

2415-
Using the same computational setup as the \ct{mass_flux_wall} series above, the \ct{mass_balance_gas_volume} test case defines a control volume (CV) internal to the computational domain, 6 m on a side (from 2 m to 8 m in each direction). The mass of water in the CV is output using a \ct{SPATIAL_STATISTIC=`VOLUME INTEGRAL`} with \ct{QUANTITY=`DENSITY`} of the lumped species for water and the flows into and out of the CV are obtained using \ct{QUANTITY=`TOTAL MASS FLUX X`}, etc., with \ct{SPATIAL_STATISTIC=`AREA INTEGRAL`}. Figure \ref{fig:mass_balance_gas_volume} shows the resulting balance of accumulation (dm/dt) and the inflow and outflow of the control volume.
2412+
Using the same computational setup as the \ct{mass_flux_wall} series above, the \ct{mass_balance_gas_volume} test case defines a control volume (CV) internal to the computational domain, 6 m on a side (from 2 m to 8 m in each direction). The mass of water in the CV is output using a \ct{SPATIAL_STATISTIC='VOLUME INTEGRAL'} with \ct{QUANTITY='DENSITY'} of the lumped species for water and the flows into and out of the CV are obtained using \ct{QUANTITY='TOTAL MASS FLUX X'}, etc., with \ct{SPATIAL_STATISTIC='AREA INTEGRAL'}. Figure \ref{fig:mass_balance_gas_volume} shows the resulting balance of accumulation (dm/dt) and the inflow and outflow of the control volume.
24162413

24172414
\begin{figure}[ht]
24182415
\centering
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# Make Smokeview images for the FDS Manuals.
3+
# The script uses the command "smokeview" unless you provide an optional name.
4+
5+
import pandas as pd
6+
import os
7+
import subprocess
8+
import shutil
9+
import platform
10+
import argparse
11+
12+
parser = argparse.ArgumentParser(description="A script to generate Smokeview images")
13+
parser.add_argument("message", nargs="?", default="smokeview", help="Optional smokeview name")
14+
args = parser.parse_args()
15+
shell_command = args.message
16+
17+
os_name = platform.system()
18+
19+
if os_name == "Linux":
20+
if shutil.which("xvfb-run") is None:
21+
raise FileNotFoundError("xvfb-run is not installed. Please install xvfb package.")
22+
23+
outdir = '../../Verification/'
24+
original_dir = os.getcwd()
25+
26+
df = pd.read_csv(outdir + 'scripts/FDS_Pictures.csv', header=None)
27+
28+
folder = df[0].values
29+
case = df[1].values
30+
31+
if os_name == "Linux":
32+
result = subprocess.run(["bash", "-i", "-c", f"alias {shell_command} 2>/dev/null | sed -E \"s/alias {shell_command}='(.*)'/\\1/\""],
33+
capture_output=True, text=True)
34+
smokeview_path=result.stdout.strip()
35+
else:
36+
smokeview_path = shutil.which(shell_command)
37+
38+
for i in range(len(folder)):
39+
print(case[i])
40+
os.chdir(outdir + folder[i])
41+
if os_name == "Linux":
42+
subprocess.run(['xvfb-run','-a',smokeview_path,'-runscript',case[i]], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
43+
else:
44+
subprocess.run([smokeview_path,'-runscript',case[i]], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
45+
os.chdir(original_dir)
46+

Utilities/Scripts/startXserver2.sh

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Adaptive_Mesh_Refinement,random_meshes
2+
Aerosols,propane_flame_deposition
3+
Complex_Geometry,geom_simple
4+
Complex_Geometry,geom_obst
5+
Complex_Geometry,geom_sphere1a
6+
Complex_Geometry,geom_sphere1c
7+
Complex_Geometry,geom_sphere1e
8+
Complex_Geometry,geom_sphere3b
9+
Complex_Geometry,geom_sphere3d
10+
Complex_Geometry,geom_sphere3f
11+
Complex_Geometry,geom_sphere1b
12+
Complex_Geometry,geom_sphere1d
13+
Complex_Geometry,geom_sphere1f
14+
Complex_Geometry,geom_sphere3a
15+
Complex_Geometry,geom_sphere3c
16+
Complex_Geometry,geom_sphere3e
17+
Complex_Geometry,geom_terrain
18+
Complex_Geometry,geom_texture
19+
Complex_Geometry,geom_texture2
20+
Complex_Geometry,geom_texture3a
21+
Complex_Geometry,geom_texture3b
22+
Complex_Geometry,geom_texture4a
23+
Complex_Geometry,geom_texture4b
24+
Complex_Geometry,sphere_radiate
25+
Complex_Geometry,sphere_helium_conserve_3meshes
26+
Complex_Geometry,cone_1mesh
27+
Complex_Geometry,t34_scaling
28+
Controls,activate_vents
29+
Detectors,beam_detector
30+
Detectors,objects_static
31+
Detectors,objects_dynamic
32+
Fires,couch
33+
Flowfields,helium_2d_isothermal
34+
Flowfields,symmetry_test
35+
Flowfields,symmetry_test_2
36+
Flowfields,symmetry_test_mpi
37+
Flowfields,jet_fan
38+
Flowfields,velocity_bc_test
39+
Heat_Transfer,checkerboard
40+
Heat_Transfer,ht3d_demo
41+
Heat_Transfer,ht3d_ibeam
42+
Heat_Transfer,ht3d_network
43+
HVAC,HVAC_mass_conservation
44+
HVAC,HVAC_energy_pressure
45+
HVAC,leak_test_2
46+
Miscellaneous,pyramid
47+
Miscellaneous,obst_multi
48+
Miscellaneous,obst_sphere
49+
Miscellaneous,obst_cylinder
50+
Miscellaneous,obst_cone
51+
Miscellaneous,obst_rotbox
52+
NS_Analytical_Solution,ns2d_64
53+
Pressure_Effects,pressure_boundary
54+
Pressure_Solver,dancing_eddies_embed
55+
Pressure_Solver,dancing_eddies_tight
56+
Scalar_Analytical_Solution,move_slug
57+
Scalar_Analytical_Solution,move_slug_fl1
58+
Scalar_Analytical_Solution,shunn3_256
59+
Scalar_Analytical_Solution,soborot_charm_square_wave_64
60+
Sprinklers_and_Sprays,cascade
61+
Turbulence,csmag_64
62+
Turbulence,dsmag_64
63+
WUI,Bova_1a
64+
WUI,Bova_1b
65+
WUI,Bova_4a
66+
WUI,level_set_fuel_model_1
67+

0 commit comments

Comments
 (0)