Skip to content

Commit 457e0d4

Browse files
authored
Merge pull request #15712 from mcgratta/master
FDS Validation: Add puffing frequency
2 parents 921d693 + 3efed5b commit 457e0d4

File tree

4 files changed

+106
-0
lines changed

4 files changed

+106
-0
lines changed

Manuals/Bibliography/FDS_general.bib

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7211,6 +7211,15 @@ @INPROCEEDINGS{Zukoski:IAFSS2
72117211
publisher = "Hemisphere Publishing Company",
72127212
}
72137213

7214+
@INBOOK{Zukoski:1995,
7215+
author = {E.E. Zukoski},
7216+
editor = {G. Cox},
7217+
title = {{Combustion Fundamentals of Fire}},
7218+
chapter = {{Properties of Fire Plumes}},
7219+
year = {1995},
7220+
publisher = {Academic Press, London}
7221+
}
7222+
72147223
@MISC{Colt:1,
72157224
title = {{Portsmouth Fire Test}},
72167225
howpublished = {Colt Heating and Ventilation. Internal Report},

Manuals/FDS_Validation_Guide/Plume_Chapter.tex

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,40 @@ \subsection{Flame Height Summary}
984984
\end{figure}
985985

986986

987+
\clearpage
988+
989+
\section{Puffing Frequency}
990+
\label{Puffing Frequency}
991+
992+
This section examines the ``puffing frequency'' of pool fires. Zukoski~\cite{Zukoski:1995} showed that the mean puffing frequency is inversely proportional to the square root of the burner diameter, $D$
993+
\be
994+
f = 0.50 \sqrt{g/D}
995+
\ee
996+
where $g$ is the gravitational acceleration.
997+
998+
\subsection{NIST Pool Fires}
999+
1000+
Figure~\ref{NIST_Pool_Fires_spectra} displays the predicted frequency spectra of the 30~cm and 37~cm NIST Pool Fires. The spectra are based on the simulated vertical velocity component, $w$, at a single point above the burner, recorded every time step. The vertical dashed line indicates the measured puffing frequency. The puffing frequency for the heptane was not measured.
1001+
1002+
\begin{figure}[p]
1003+
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
1004+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Acetone_frequency_spectrum} &
1005+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Ethanol_frequency_spectrum} \\
1006+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Heptane_frequency_spectrum} &
1007+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Methane_frequency_spectrum} \\
1008+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Methanol_frequency_spectrum} &
1009+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Propane_20_frequency_spectrum} \\
1010+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Propane_34_frequency_spectrum} &
1011+
\includegraphics[height=2.15in]{SCRIPT_FIGURES/NIST_Pool_Fires/Propane_50_frequency_spectrum}
1012+
\end{tabular*}
1013+
\caption[Frequency spectra of the NIST Pool Fires]
1014+
{Frequency spectra of the NIST Pool Fires with a vertical dashed line indicating the measured puffing frquency.}
1015+
\label{NIST_Pool_Fires_spectra}
1016+
\end{figure}
1017+
1018+
1019+
1020+
9871021

9881022
\clearpage
9891023

Utilities/Python/FDS_validation_script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def safe_run(script_path):
9595
print("Memorial_Tunnel..."); safe_run("./scripts/Memorial_Tunnel.py")
9696
print("Memorial_Tunnel_2..."); safe_run("./scripts/Memorial_Tunnel_2.py")
9797
print("NIST_NRC_Parallel_Panels..."); safe_run("./scripts/NIST_NRC_Parallel_Panels.py")
98+
print("NIST_Pool_Fires..."); safe_run("./scripts/NIST_Pool_Fires.py")
9899
print("Sandia_Plumes..."); safe_run("./scripts/Sandia_Plumes.py")
99100
print("Sandia_Pools..."); safe_run("./scripts/Sandia_Pools.py")
100101
print("Theobald_Hose_Stream..."); safe_run("./scripts/Theobald_Hose_Stream.py")
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
import pandas as pd
3+
import numpy as np
4+
import matplotlib.pyplot as plt
5+
import fdsplotlib
6+
7+
plot_style = fdsplotlib.get_plot_style('fds')
8+
9+
outdir = '../../../out/NIST_Pool_Fires/'
10+
pltdir = '../../Manuals/FDS_Validation_Guide/SCRIPT_FIGURES/NIST_Pool_Fires/'
11+
12+
chids = ['NIST_Acetone_Prescribed_0p5cm',
13+
'NIST_Ethanol_Prescribed_0p5cm',
14+
'NIST_Heptane_Prescribed_0p5cm',
15+
'NIST_Methane_Prescribed_0p5cm',
16+
'NIST_Methanol_Prescribed_0p5cm',
17+
'NIST_Propane_20kW_Prescribed_0p5cm',
18+
'NIST_Propane_34kW_Prescribed_0p5cm',
19+
'NIST_Propane_50kW_Prescribed_0p5cm']
20+
21+
fuel = ['Acetone','Ethanol','Heptane','Methane','Methanol','Propane 20 kW','Propane 34 kW','Propane 50 kW']
22+
label = ['Acetone','Ethanol','Heptane','Methane','Methanol','Propane_20','Propane_34','Propane_50']
23+
ideal = [2.45,2.41,-1,2.48,2.49,2.22,2.39,2.39]
24+
i = -1
25+
26+
for chid in chids:
27+
28+
i = i + 1
29+
git_file = outdir + chid + '_git.txt'
30+
version_string = fdsplotlib.get_version_string(git_file)
31+
32+
# Read CSV file, skipping the first two rows
33+
df = pd.read_csv(outdir + chid + '_devc.csv', skiprows=20000, header=None)
34+
35+
# Extract time and data columns
36+
time = df.iloc[:, 0].values
37+
data = df.iloc[:, 1].values
38+
39+
# Calculate the sampling rate
40+
dt = np.mean(np.diff(time)) # Average time step
41+
sampling_rate = 1.0 / dt
42+
43+
# Compute FFT
44+
n = len(data)
45+
fft_values = np.fft.fft(data)
46+
fft_freq = np.fft.fftfreq(n, dt)
47+
48+
# Get positive frequencies only
49+
positive_freq_idx = fft_freq > 0
50+
frequencies = fft_freq[positive_freq_idx]
51+
magnitude = np.abs(fft_values[positive_freq_idx])
52+
53+
# Create the frequency spectrum plot using plot_to_fig
54+
fig = fdsplotlib.plot_to_fig(frequencies, magnitude, marker_style='k-',
55+
x_label='Frequency (Hz)', y_label='Magnitude',
56+
x_min=0, x_max=6, y_min=0,
57+
revision_label=version_string,
58+
plot_title=fuel[i])
59+
fdsplotlib.plot_to_fig([ideal[i],ideal[i]],[0,100000], marker_style='k--', figure_handle=fig)
60+
61+
fig.savefig(pltdir + label[i] + '_frequency_spectrum.pdf', format='pdf')
62+

0 commit comments

Comments
 (0)