Skip to content

Commit f685991

Browse files
committed
Merge remote-tracking branch 'firemodels/master' into FireX
2 parents 36c7b77 + 4f7c9a1 commit f685991

File tree

63 files changed

+2207
-2859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2207
-2859
lines changed

Manuals/Copy_Firebot_FiguresGH.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/bash
2+
LATEST=$1
3+
if [ "$LATEST" != "" ]; then
4+
LATEST=_latest
5+
fi
6+
27
DOWNLOADFIGURES ()
38
{
4-
FILE=$1_figures
9+
FILE=$1_figures$LATEST
510
echo ***Downloading $FILE.tar.gz
611
gh release download FDS_TEST -p $FILE.tar.gz -R github.com/firemodels/test_bundles --clobber
712
if [ ! -e $FILE.tar.gz ]; then
@@ -31,25 +36,25 @@ FBVG=$BASEDIR/FIGS/FDS_VERG
3136
FBVAL=$BASEDIR/FIGS/FDS_VALG
3237

3338
# Copy Tech Guide Figures
34-
if [ -e $BASEDIR/FDS_TG_figures.tar.gz ]; then
39+
if [ -e $BASEDIR/FDS_TG_figures$LATEST.tar.gz ]; then
3540
cd $FBTG
36-
tar xf $BASEDIR/FDS_TG_figures.tar.gz
41+
tar xf $BASEDIR/FDS_TG_figures$LATEST.tar.gz
3742
cp * $BASEDIR/FDS_Technical_Reference_Guide/SCRIPT_FIGURES/
3843
echo FDS Technical Guide figures copied to FDS_Technical_Reference_Guide/SCRIPT_FIGURES
3944
fi
4045

4146
# Copy User's Guide Figures
42-
if [ -e $BASEDIR/FDS_UG_figures.tar.gz ]; then
47+
if [ -e $BASEDIR/FDS_UG_figures$LATEST.tar.gz ]; then
4348
cd $FBUG
44-
tar xf $BASEDIR/FDS_UG_figures.tar.gz
49+
tar xf $BASEDIR/FDS_UG_figures$LATEST.tar.gz
4550
cp * $BASEDIR/FDS_User_Guide/SCRIPT_FIGURES/
4651
echo FDS Users Guide figures copied to FDS_User_Reference_Guide/SCRIPT_FIGURES
4752
fi
4853

4954
# Copy Verification Guide Figures
50-
if [ -e $BASEDIR/FDS_VERG_figures.tar.gz ]; then
55+
if [ -e $BASEDIR/FDS_VERG_figures$LATEST.tar.gz ]; then
5156
cd $FBVG
52-
tar xf $BASEDIR/FDS_VERG_figures.tar.gz
57+
tar xf $BASEDIR/FDS_VERG_figures$LATEST.tar.gz
5358
cp *.pdf $BASEDIR/FDS_Verification_Guide/SCRIPT_FIGURES/.
5459
cp *.png $BASEDIR/FDS_Verification_Guide/SCRIPT_FIGURES/.
5560
cp *.tex $BASEDIR/FDS_Verification_Guide/SCRIPT_FIGURES/.
@@ -58,9 +63,9 @@ if [ -e $BASEDIR/FDS_VERG_figures.tar.gz ]; then
5863
fi
5964

6065
# Copy Validation Guide Figures
61-
if [ -e $BASEDIR/FDS_VALG_figures.tar.gz ]; then
66+
if [ -e $BASEDIR/FDS_VALG_figures$LATEST.tar.gz ]; then
6267
cd $FBVAL
63-
tar xf $BASEDIR/FDS_VALG_figures.tar.gz
68+
tar xf $BASEDIR/FDS_VALG_figures$LATEST.tar.gz
6469
cp -R * $BASEDIR/FDS_Validation_Guide/SCRIPT_FIGURES
6570
echo FDS Validation Guide Figures copied to FDS_Validation_Guide_Reference_Guide/SCRIPT_FIGURES
6671
fi

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4621,7 +4621,7 @@ \subsubsection{Enthalpy}
46214621
\be
46224622
c_{p,\alpha} = \frac{\gamma}{\gamma-1} \frac{\R}{W_\alpha}
46234623
\ee
4624-
The ratio of specific heats, \ct{GAMMA}, is 1.4 by default and can be changed on the \ct{MISC} line. If you want all the gas specific heats to follow this relation, set \ct{CONSTANT_SPECIFIC_HEAT_RATIO=T} on the \ct{MISC} line. For high molecular weight species, use of the default gamma will result in very low values of the specific heat which can cause issues with the default extinction model. In this case it is recommended that the specific heat be defined. If the FDS is determining the specific heat using this relation, then it is recommended that you check the \ct{CHID.out} and verify that reasonable specific heat values have been created.
4624+
The ratio of specific heats, \ct{GAMMA}, is 1.4 by default and can be changed on the \ct{MISC} line. If you want all the gas specific heats to follow this relation, set \ct{CONSTANT_SPECIFIC_HEAT_RATIO=T} on the \ct{MISC} line. For high molecular weight species, use of the default gamma will result in very low values of the specific heat. This can cause issues with temperature in regions with high fuel mass fractions and can cause issues with the \ct{EXTINCTION 2} extinction model. For high molecular weight species it is recommended that the specific heat be defined. If the FDS is determining the specific heat using \ct{GAMMA}, then it is recommended that you check the \ct{CHID.out} file and verify that reasonable specific heat values have been created.
46254625

46264626
Note that species used in chemical reactions must either be predefined or have an explicitly defined $h(T_{\rm ref})$. The exception is the species defined as \ct{FUEL} on the \ct{REAC} input as long as a \ct{HEAT_OF_COMBUSTION} is defined or the reaction is a simple chemistry reaction where \ct{EPUMO2} applies. Specifying either \ct{SPECIFIC_HEAT} or \ct{RAMP_CP} is considered to have explicitly defined $h(T_{\rm ref})$. If you still wish to use the default \ct{EPUMO2} or 13,100~kJ/kg, then you will need to explicitly define it on the \ct{REAC} input.
46274627

@@ -6888,12 +6888,12 @@ \subsection{Basic Equations}
68886888

68896889
\begin{figure}[p]
68906890
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
6891-
\includegraphics[width=3.2in]{FIGURES/vel_L=-100} &
6892-
\includegraphics[width=3.2in]{FIGURES/tmp_L=-100} \\
6893-
\includegraphics[width=3.2in]{FIGURES/vel_L=100} &
6894-
\includegraphics[width=3.2in]{FIGURES/tmp_L=100} \\
6895-
\includegraphics[width=3.2in]{FIGURES/vel_L=-350} &
6896-
\includegraphics[width=3.2in]{FIGURES/tmp_L=-350}
6891+
\includegraphics[width=3.2in]{FIGURES/Monin_Obukhov_vel_L_-100} &
6892+
\includegraphics[width=3.2in]{FIGURES/Monin_Obukhov_tmp_L_-100} \\
6893+
\includegraphics[width=3.2in]{FIGURES/Monin_Obukhov_vel_L_100} &
6894+
\includegraphics[width=3.2in]{FIGURES/Monin_Obukhov_tmp_L_100} \\
6895+
\includegraphics[width=3.2in]{FIGURES/Monin_Obukhov_vel_L_-350} &
6896+
\includegraphics[width=3.2in]{FIGURES/Monin_Obukhov_tmp_L_-350}
68976897
\end{tabular*}
68986898
\caption[Sample vertical wind and temperature profiles]{Sample vertical wind and temperature profiles.}
68996899
\label{wind_profiles}
@@ -12267,7 +12267,7 @@ \section{\texorpdfstring{{\tt DEVC}}{DEVC} (Device Parameters)}
1226712267
\ct{SMOOTHING_TIME} & Real & Section~\ref{info:basic_control} & s & \\ \hline
1226812268
\ct{SPATIAL_STATISTIC} & Character & Section~\ref{info:statistics} & & \\ \hline
1226912269
\ct{SPEC_ID} & Character & Section~\ref{info:gasoutputquantities} & & \\ \hline
12270-
\ct{STATISTICS_END} & Real & Section~\ref{info:rmscovcorr} & s & \ct{T_BEGIN}\\ \hline
12270+
\ct{STATISTICS_END} & Real & Section~\ref{info:rmscovcorr} & s & \ct{T_END}\\ \hline
1227112271
\ct{STATISTICS_START} & Real & Section~\ref{info:rmscovcorr} & s & \ct{T_BEGIN}\\ \hline
1227212272
\ct{SURF_ID} & Character & Section~\ref{info:statistics} & & \\ \hline
1227312273
\ct{TEMPORAL_STATISTIC} & Character & Section~\ref{info:statistics} & & \\ \hline
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
2+
# Atmospheric Boundary Layer profiles, based on M-O theory as described in
3+
# "Falcon Series Data Report", GRI-89/0138, June 1990.
4+
# These plots are used as illustrations in the FDS User's Guide.
5+
6+
import numpy as np
7+
import matplotlib.pyplot as plt
8+
import fdsplotlib
9+
10+
plot_style = fdsplotlib.get_plot_style('fds')
11+
12+
rho_0 = 1.2
13+
g = 9.81
14+
cp = 1005
15+
kappa = 0.41
16+
p_0 = 100000
17+
18+
L = np.array([-100,100,-350])
19+
Ls = np.array(['-100','100','-350'])
20+
z_0 = np.array([0.01,0.005,0.005])
21+
z_r = 2.0
22+
u_r = 5.0
23+
24+
for i in range(3):
25+
26+
p_r = p_0 - rho_0 * g * (z_r - z_0[i])
27+
T_r = 20 + 273.15
28+
theta_r = T_r * (p_0 / p_r) ** 0.285
29+
30+
if L[i] < 0:
31+
x_r = (1 - 16 * z_r / L[i]) ** 0.25
32+
psi_m_r = 2 * np.log((1 + x_r) / 2) + np.log((1 + x_r**2) / 2) - 2 * np.arctan(x_r) + np.pi / 2
33+
psi_h_r = 2 * np.log((1 + x_r**2) / 2)
34+
else:
35+
psi_m_r = -5 * z_r / L[i]
36+
psi_h_r = psi_m_r
37+
38+
u_star = kappa * u_r / (np.log(z_r / z_0[i]) - psi_m_r)
39+
theta_0 = theta_r / (1 + u_star**2 * (np.log(z_r / z_0[i]) - psi_h_r) / (g * kappa**2 * L[i]))
40+
theta_star = u_star**2 * theta_0 / (g * kappa * L[i])
41+
42+
z = np.array([z_0[i], 10*z_0[i], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 50, 100])
43+
44+
# Figure 1 - Velocity profile
45+
46+
if L[i] < 0:
47+
x = (1 - 16 * z / L[i]) ** 0.25
48+
psi_m = 2 * np.log((1 + x) / 2) + np.log((1 + x**2) / 2) - 2 * np.arctan(x) + np.pi / 2
49+
psi_h = 2 * np.log((1 + x**2) / 2)
50+
else:
51+
psi_m = -5 * z / L[i]
52+
psi_h = psi_m
53+
54+
u = (u_star / kappa) * (np.log(z / z_0[i]) - psi_m)
55+
theta = theta_0 + (theta_star / kappa) * (np.log(z / z_0[i]) - psi_h)
56+
T = theta * (p_0 / (p_0 - rho_0 * g * (z - z_0[i]))) ** -0.285
57+
58+
fig = fdsplotlib.plot_to_fig(x_data=u, y_data=z, marker_style='ko-',
59+
x_label='Velocity (m/s)', y_label='Height (m)',
60+
x_min=0, x_max=10, y_min=0, y_max=30)
61+
62+
ax1 = fig.axes[0]
63+
ax1.text(0.05, 0.90, r'$u(2 \; \mathrm{m})=5$ m/s', transform=ax1.transAxes, verticalalignment='top')
64+
ax1.text(0.05, 0.80, f'$L={L[i]:4.0f}$ m', transform=ax1.transAxes, verticalalignment='top')
65+
ax1.text(0.05, 0.70, f'$z_0={z_0[i]:5.3f}$ m', transform=ax1.transAxes, verticalalignment='top')
66+
67+
plt.savefig(f'Monin_Obukhov_vel_L_{Ls[i]}.pdf', format='pdf')
68+
plt.close()
69+
70+
# Figure 2 - Temperature profile
71+
72+
fig = fdsplotlib.plot_to_fig(x_data=T-273.15, y_data=z, marker_style='ko-',
73+
x_label='Temperature (°C)', y_label='Height (m)',
74+
x_min=15, x_max=25, y_min=0, y_max=30)
75+
76+
ax2 = fig.axes[0]
77+
ax2.text(0.05, 0.90, r'$T(2 \; \mathrm{m})=20\;^\circ$C', transform=ax2.transAxes, verticalalignment='top')
78+
ax2.text(0.05, 0.80, f'$L={L[i]:4.0f}$ m', transform=ax2.transAxes, verticalalignment='top')
79+
ax2.text(0.05, 0.70, f'$z_0={z_0[i]:5.3f}$ m', transform=ax2.transAxes, verticalalignment='top')
80+
81+
plt.savefig(f'Monin_Obukhov_tmp_L_{Ls[i]}.pdf', format='pdf')
82+
plt.close()
83+
12.7 KB
Binary file not shown.
13.3 KB
Binary file not shown.
12.8 KB
Binary file not shown.
13.1 KB
Binary file not shown.
13.3 KB
Binary file not shown.
12.8 KB
Binary file not shown.

Utilities/Python/scripts/spray_pattern.py renamed to Manuals/FDS_User_Guide/FIGURES/spray_pattern.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
plot_style = fdsplotlib.get_plot_style('fds')
99

10-
pltdir = '../../Manuals/FDS_User_Guide/FIGURES/'
11-
1210
b = [0, 5, 10, 100, 1000]
1311
mu = np.array([0, 10, 20]) * np.pi / 180
1412
mu_str = ['0', '10', '20']
@@ -34,6 +32,6 @@
3432
ax.invert_yaxis()
3533
ax.text(45, 0.1, r'$\mu=$' + str(mu[j]*180/np.pi) + r', $\phi_{\rm max}=$' + str(phi_max[k]*180/np.pi) + ' degrees', fontsize=plot_style['Key_Font_Size'])
3634

37-
plt.savefig(pltdir + 'spray_pattern_mu_' + mu_str[j] + '_phimax_' + phi_str[k] + '.pdf', format='pdf')
35+
plt.savefig('spray_pattern_mu_' + mu_str[j] + '_phimax_' + phi_str[k] + '.pdf', format='pdf')
3836
plt.close()
3937

0 commit comments

Comments
 (0)