Skip to content

Commit 525607c

Browse files
authored
Merge pull request #15694 from mcgratta/master
Python: Allow scripts to run if sub-scripts fail
2 parents c867fa9 + c76272e commit 525607c

18 files changed

+121
-200
lines changed

Manuals/FDS_Validation_Guide/Experiment_Chapter.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ \chapter{Description of Experiments}
1010
\section{Aalto Woods Experiments}
1111
\label{Aalto_Woods_Description}
1212

13-
Rinta-Paavola et al. developed a material model for Norway spruce and Scots pine woods to predict char front progress and heat release in burning timber~\cite{Rinta-Paavola:2023}. The material models are calibrated using temperature, mass loss rate and heat release rate measurements of wood specimens in a cone calorimeter. The model is intended for a number of different fire scenarios, such as fully developed fire with only little oxygen in the compartment, or the decay period after flaming with exposed char still smoldering. Cone calorimeter measurements were conducted under flaming, inert, and and smoldering conditions to replicate these scenarios. The estimated material models are able to predict the experiments in the scale of cone calorimeter.
13+
Rinta-Paavola et al.~developed a material model for Norway spruce and Scots pine woods to predict char front progress and heat release in burning timber~\cite{Rinta-Paavola:2023}. The material models are calibrated using temperature, mass loss rate and heat release rate measurements of wood specimens in a cone calorimeter. The model is intended for fully-developed compartment fires or the subsequent decay period with exposed, smoldering char. Cone calorimeter measurements were conducted under flaming, inert, and smoldering conditions to replicate these scenarios. The material models are able to predict the bench-scale experiments.
1414

15-
The material model for spruce developed using cone calorimeter measurements is tested in prediction of heat release rates in two previously existing experiments: an ISO 9705 room corner test~\cite{Sundstrom:1998} (test code M12 in the original source) and a modified room corner test originally reported in Finnish in~\cite{Hietaniemi:2001}. English description of the modified test is available in~\cite{Hietaniemi:1}.
15+
The material model for spruce developed using cone calorimeter measurements is evaluated for its prediction of heat release rates in two previous experiments: an ISO~9705 room corner test~\cite{Sundstrom:1998} (test code M12 in the original source) and a modified room corner test originally reported in Finnish in~\cite{Hietaniemi:2001}. An English description of the modified test is available in Ref.~\cite{Hietaniemi:1}.
1616

17-
In a room corner test, the walls and the ceiling of a 2.4~m by 3.6~m by 2.4~m (width, length, height) test compartment are lined with the tested material. The 2.4~m wide front wall has a 0.8~m wide, 2.0~m high door opening in the middle, and the back corner adjacent to the wall opposite to the door has a gas burner with an output of 100~kW for the first ten minutes of the test. If flashover does not occur during this time, the burner heat release is increased to 300~kW for another ten minutes. The test is terminated after 20 minutes or when flashover occurs.
17+
In a room corner test, the walls and ceiling of a 2.4~m by 3.6~m by 2.4~m tall compartment are lined with the sample material. The 2.4~m wide front wall has a 0.8~m wide, 2.0~m high door opening in the middle, and the back corner adjacent to the wall opposite to the door has a gas burner with an output of 100~kW for 10~min. If flashover does not occur during this time, the burner heat release is increased to 300~kW for another 10~min. The test is terminated after 20~min or when flashover occurs.
1818

19-
In the test M12~\cite{Sundstrom:1998} the walls and the ceiling are lined with 10~mm thick spruce timber, whereas in the modified test~\cite{Hietaniemi:2001} the walls and ceiling only in the proximity of the gas burner was lined with 22~mm thick spruce timber, elsewhere being exposed concrete. In both of the studied tests the flashover occurred within the first ten minutes, so the burner heat release was 100~kW over the entire duration of the test.
19+
In the test M12~\cite{Sundstrom:1998}, the walls and the ceiling are lined with 10~mm thick spruce timber, whereas in the modified test~\cite{Hietaniemi:2001} the walls and ceiling only in the proximity of the gas burner were lined with 22~mm thick spruce timber, elsewhere being exposed concrete. In both tests, flashover occurred within the first 10~min.
2020

2121
\subsubsection{Modeling Notes}
2222

23-
In the simulations of flaming cone calorimeter experiments, the computational domain is 20~cm in length and width and 30~cm in height, with a grid resolution of 1~cm. For the inert and smoldering experiments the domain is 30~cm by 30~cm by 30~cm with the resolution of 10~cm, as the gaseous phase was not directly modeled. In the simulations of room corner tests, the computational domain continued for 1.5~m outside after the 20~cm thick front wall. In the corner where the burner was located, the grid resolution was 2~cm over a volume that extends for 0.5~m from the corner at x-, and y directions, and spans the entire height from floor to the ceiling. Elsewhere, a resolution of 10~cm was used.
23+
In the simulations of flaming cone calorimeter experiments, the computational domain is 20~cm in length and width and 30~cm in height, with a grid resolution of 1~cm. For the inert and smoldering experiments, the domain is 30~cm by 30~cm by 30~cm with a resolution of 10~cm because the gaseous phase is not directly modeled. In the simulations of room corner tests, the computational domain is extended 1.5~m outside the 20~cm thick front wall. In the corner where the burner is located, the grid resolution is 2~cm over a volume that extends 0.5~m from the corner and spans the entire height from floor to ceiling. Elsewhere, a resolution of 10~cm is used.
2424

25-
Neither~\cite{Sundstrom:1998} nor~\cite{Hietaniemi:2001} reported the initial moisture content of the timbers, so a moisture mass fraction of 0.09 similar to the cone calorimeter specimens in~\cite{Rinta-Paavola:2023}, was assumed in the beginning of room corner tests. This is a relevant moisture content for timber in normal room air.
25+
Neither Ref.~\cite{Sundstrom:1998} nor Ref.~\cite{Hietaniemi:2001} reports the initial moisture content of the timbers; thus, a moisture mass fraction of 0.09 is assumed, similar to the cone calorimeter specimens in Ref.~\cite{Rinta-Paavola:2023}.
2626

27-
The parameters in the original research of Rinta-Paavola et al.~\cite{Rinta-Paavola:2023} were estimated for FDS 6.7.7, but in FDS 6.7.8 and later the reaction rate equation for solid pyrolysis is different, possibly requiring scaling of the pre-exponential factor when parameters are carried from a FDS version with the old reaction rate definition to a newer one. See~\cite{Rinta-Paavola:2023} for greater detail. Table~\ref{Aalto_Woods_Properties} presents appropriately scaled parameters that yield results consistent to the original simulations in~\cite{Rinta-Paavola:2023} when initial moisture mass fraction is 0.09. If a different initial moisture content is used, re-scaling of the frequency factor would be necessary to gain most accurate possible agreement with the model presented in~\cite{Rinta-Paavola:2023}.
27+
The parameters in the original research of Rinta-Paavola~et~al.~\cite{Rinta-Paavola:2023} were estimated for FDS 6.7.7, but in FDS 6.7.8 and later the reaction rate equation for solid pyrolysis is different, possibly requiring scaling of the pre-exponential factor when parameters are carried from a FDS version with the old reaction rate definition to a newer one. See Ref.~\cite{Rinta-Paavola:2023} for details. Table~\ref{Aalto_Woods_Properties} presents appropriately scaled parameters that yield results consistent with the original simulations in Ref.~\cite{Rinta-Paavola:2023} when the initial moisture mass fraction is 0.09. If a different initial moisture content is used, re-scaling of the frequency factor would be necessary to obtain the most accurate possible agreement with the model presented in Ref.~\cite{Rinta-Paavola:2023}.
2828

2929

3030
\section{ArupFire Tunnel Fire Experiments}

Utilities/Python/FDS_validation_script.py

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
11
#!$FIREMODELS/fds/.github/fds_python_env/bin/python
22

3+
import subprocess
34
import fdsplotlib
45
import importlib
56
import runpy
67
importlib.reload(fdsplotlib) # use for development (while making changes to fdsplotlib.py)
78

9+
# If there is an error in one of the sub-scripts, print the message but do not stop the main script.
10+
11+
def safe_run(script_path):
12+
try:
13+
runpy.run_path(script_path, run_name="__main__")
14+
except Exception as exc:
15+
print(f"Error in {script_path}: {exc}")
16+
817
# Scripts to run prior to dataplot
918

10-
print("NIST_deposition_gauge..."); runpy.run_path("./scripts/NIST_deposition_gauge.py", run_name="__main__")
11-
print("flame_height..."); runpy.run_path("./scripts/flame_height.py", run_name="__main__")
12-
print("NIST_RSE..."); runpy.run_path("./scripts/NIST_RSE.py", run_name="__main__")
13-
print("sippola_aerosol_deposition..."); runpy.run_path("./scripts/sippola_aerosol_deposition.py", run_name="__main__")
14-
print("layer_height..."); runpy.run_path("./scripts/layer_height.py", run_name="__main__")
15-
print("NIST_NRC_Corner_Effects..."); runpy.run_path("./scripts/NIST_NRC_Corner_Effects.py", run_name="__main__")
16-
print("LNG_Dispersion..."); runpy.run_path("./scripts/LNG_Dispersion.py", run_name="__main__")
17-
print("LNG_wind_profiles..."); runpy.run_path("./scripts/LNG_wind_profiles.py", run_name="__main__")
18-
print("FM_Vertical_Wall_Flames..."); runpy.run_path("./scripts/FM_Vertical_Wall_Flames.py", run_name="__main__")
19-
print("umd_line_burner_process..."); runpy.run_path("./scripts/umd_line_burner_process.py", run_name="__main__")
20-
# print("Askervein_Hill..."); runpy.run_path("./scripts/Askervein_Hill.py", run_name="__main__")
21-
print("UWO_Wind_Tunnel..."); runpy.run_path("./scripts/UWO_Wind_Tunnel.py", run_name="__main__")
22-
print("FM_Burner..."); runpy.run_path("./scripts/FM_Burner.py", run_name="__main__")
23-
print("Crown_Fires..."); runpy.run_path("./scripts/Crown_Fires.py", run_name="__main__")
24-
print("Ranz_Marshall..."); runpy.run_path("./scripts/Ranz_Marshall.py", run_name="__main__")
25-
print("Phoenix_LNG_Fires..."); runpy.run_path("./scripts/Phoenix_LNG_Fires.py", run_name="__main__")
26-
print("Sandia_Plumes_TKE..."); runpy.run_path("./scripts/Sandia_Plumes_TKE.py", run_name="__main__")
19+
print("NIST_deposition_gauge..."); safe_run("./scripts/NIST_deposition_gauge.py")
20+
print("flame_height..."); safe_run("./scripts/flame_height.py")
21+
print("NIST_RSE..."); safe_run("./scripts/NIST_RSE.py")
22+
print("sippola_aerosol_deposition..."); safe_run("./scripts/sippola_aerosol_deposition.py")
23+
print("layer_height..."); safe_run("./scripts/layer_height.py")
24+
print("NIST_NRC_Corner_Effects..."); safe_run("./scripts/NIST_NRC_Corner_Effects.py")
25+
print("LNG_Dispersion..."); safe_run("./scripts/LNG_Dispersion.py")
26+
print("LNG_wind_profiles..."); safe_run("./scripts/LNG_wind_profiles.py")
27+
print("FM_Vertical_Wall_Flames..."); safe_run("./scripts/FM_Vertical_Wall_Flames.py")
28+
print("umd_line_burner_process..."); safe_run("./scripts/umd_line_burner_process.py")
29+
# print("Askervein_Hill..."); safe_run("./scripts/Askervein_Hill.py")
30+
print("UWO_Wind_Tunnel..."); safe_run("./scripts/UWO_Wind_Tunnel.py")
31+
print("FM_Burner..."); safe_run("./scripts/FM_Burner.py")
32+
print("Crown_Fires..."); safe_run("./scripts/Crown_Fires.py")
33+
print("Ranz_Marshall..."); safe_run("./scripts/Ranz_Marshall.py")
34+
print("Phoenix_LNG_Fires..."); safe_run("./scripts/Phoenix_LNG_Fires.py")
35+
print("Sandia_Plumes_TKE..."); safe_run("./scripts/Sandia_Plumes_TKE.py")
2736

2837
# Dataplot and scatplot options
2938

@@ -71,27 +80,27 @@
7180

7281
# Create table of git statistics for FDS Validation Guide
7382

74-
print("validation_git_stats..."); runpy.run_path("./scripts/validation_git_stats.py", run_name="__main__")
83+
print("validation_git_stats..."); safe_run("./scripts/validation_git_stats.py")
7584

7685
# Special cases
7786

78-
print("Backward_Facing_Step..."); runpy.run_path("./scripts/Backward_Facing_Step.py", run_name="__main__")
79-
print("Beyler_Hood..."); runpy.run_path("./scripts/Beyler_Hood.py", run_name="__main__")
80-
print("BRE_LEMTA_Sprays..."); runpy.run_path("./scripts/BRE_LEMTA_Sprays.py", run_name="__main__")
81-
print("catchpole_spread_rates..."); runpy.run_path("./scripts/catchpole_spread_rates.py", run_name="__main__")
82-
print("FHWA_Tunnel..."); runpy.run_path("./scripts/FHWA_Tunnel.py", run_name="__main__")
83-
print("FM_FPRF_Datacenter..."); runpy.run_path("./scripts/FM_FPRF_Datacenter.py", run_name="__main__")
84-
print("Heskestad_Flame_Height_2..."); runpy.run_path("./scripts/Heskestad_Flame_Height_2.py", run_name="__main__")
85-
print("McCaffrey_Plume..."); runpy.run_path("./scripts/McCaffrey_Plume.py", run_name="__main__")
86-
print("Memorial_Tunnel..."); runpy.run_path("./scripts/Memorial_Tunnel.py", run_name="__main__")
87-
print("Memorial_Tunnel_2..."); runpy.run_path("./scripts/Memorial_Tunnel_2.py", run_name="__main__")
88-
print("NIST_NRC_Parallel_Panels..."); runpy.run_path("./scripts/NIST_NRC_Parallel_Panels.py", run_name="__main__")
89-
print("Sandia_Plumes..."); runpy.run_path("./scripts/Sandia_Plumes.py", run_name="__main__")
90-
print("Sandia_Pools..."); runpy.run_path("./scripts/Sandia_Pools.py", run_name="__main__")
91-
print("Theobald_Hose_Stream..."); runpy.run_path("./scripts/Theobald_Hose_Stream.py", run_name="__main__")
92-
print("TUS_Facade..."); runpy.run_path("./scripts/TUS_Facade_contours.py", run_name="__main__")
93-
print("USFS_Deep_Fuel_Beds..."); runpy.run_path("./scripts/USFS_Deep_Fuel_Beds.py", run_name="__main__")
94-
print("Wu_Bakar_Tunnels..."); runpy.run_path("./scripts/Wu_Bakar_Tunnels.py", run_name="__main__")
87+
print("Backward_Facing_Step..."); safe_run("./scripts/Backward_Facing_Step.py")
88+
print("Beyler_Hood..."); safe_run("./scripts/Beyler_Hood.py")
89+
print("BRE_LEMTA_Sprays..."); safe_run("./scripts/BRE_LEMTA_Sprays.py")
90+
print("catchpole_spread_rates..."); safe_run("./scripts/catchpole_spread_rates.py")
91+
print("FHWA_Tunnel..."); safe_run("./scripts/FHWA_Tunnel.py")
92+
print("FM_FPRF_Datacenter..."); safe_run("./scripts/FM_FPRF_Datacenter.py")
93+
print("Heskestad_Flame_Height_2..."); safe_run("./scripts/Heskestad_Flame_Height_2.py")
94+
print("McCaffrey_Plume..."); safe_run("./scripts/McCaffrey_Plume.py")
95+
print("Memorial_Tunnel..."); safe_run("./scripts/Memorial_Tunnel.py")
96+
print("Memorial_Tunnel_2..."); safe_run("./scripts/Memorial_Tunnel_2.py")
97+
print("NIST_NRC_Parallel_Panels..."); safe_run("./scripts/NIST_NRC_Parallel_Panels.py")
98+
print("Sandia_Plumes..."); safe_run("./scripts/Sandia_Plumes.py")
99+
print("Sandia_Pools..."); safe_run("./scripts/Sandia_Pools.py")
100+
print("Theobald_Hose_Stream..."); safe_run("./scripts/Theobald_Hose_Stream.py")
101+
print("TUS_Facade..."); safe_run("./scripts/TUS_Facade_contours.py")
102+
print("USFS_Deep_Fuel_Beds..."); safe_run("./scripts/USFS_Deep_Fuel_Beds.py")
103+
print("Wu_Bakar_Tunnels..."); safe_run("./scripts/Wu_Bakar_Tunnels.py")
95104

96105
print("Python validation scripts completed successfully!")
97106

0 commit comments

Comments
 (0)