Skip to content

Commit

Permalink
Improved paper
Browse files Browse the repository at this point in the history
  • Loading branch information
JanVogelsang committed Mar 15, 2024
1 parent 4c5c467 commit 80db526
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 29 deletions.
3 changes: 1 addition & 2 deletions fdsreader/part/particle_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ def _load_data(self):

# Read tags
dtype_tags = fdtype.new((('i', n_particles),))
particle._tags[t][offset: offset + n_particles] = \
fdtype.read(infile, dtype_tags, 1)[0][0]
particle._tags[t][offset: offset + n_particles] = fdtype.read(infile, dtype_tags, 1)[0][0]

# Read actual quantity values
if len(particle.quantities) > 0:
Expand Down
19 changes: 18 additions & 1 deletion paper.bib
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
TODO
@misc{FDS,
author = {Kevin McGrattan and Randall McDermott and Craig Weinschenk and Glenn Forney},
title = {Fire Dynamics Simulator Users Guide, Sixth Edition},
year = {2013},
month = {2013-11-04},
publisher = {Special Publication (NIST SP), National Institute of Standards and Technology, Gaithersburg, MD},
doi = {https://doi.org/10.6028/NIST.sp.1019},
language = {en},
}

@misc{SMV,
author = {Glenn Forney},
title = {Smokeview (Version 5) - A Tool for Visualizing Fire Dynamics Simulation Data, Volume I: User's Guide},
year = {2017},
month = {2017-02-19 20:02:57},
publisher = {Special Publication (NIST SP), National Institute of Standards and Technology, Gaithersburg, MD},
language = {en},
}
54 changes: 28 additions & 26 deletions paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,42 @@ authors:
orcid: TODO
affiliation: 2
affiliations:
- name: PGI-15, Forschungszentrum Juelich, Germany
- name: PGI-15, Forschungszentrum Jülich, Germany
index: 1
- name: IAS-7, Forschungszentrum Juelich, Germany
- name: IAS-7, Forschungszentrum Jülich, Germany
index: 2
date: 15 March 2024
bibliography: paper.bib
---

# Summary

Over the past few years, Python has become the most popular programming language in the scientific community. It offers
extensive functionality for the preparation, post-processing and visualization of data of any type and origin. By
conveniently importing a variety of freely available packages, the programming environment can be flexibly adapted to
one’s own needs. Until now, however, it was not possible to automatically import and process fire simulation data as
produced by the fire dynamics simulator FDS (Mcdermott10?) for example. Using SmokeView (Forney00?), it was already
possible to visualize generated data, but it was not possible to process it directly or analyze it exactly. With the
introduction of the fdsreader (FDSReader:2022?), this is now possible in an uncomplicated and efficient way.
In recent years, Python has become the most popular programming language in the scientific community. It offers
extensive functionality for preparing, post-processing and visualising data of all types and origins. By
a large number of freely available packages, the programming environment can be flexibly adapted to your own
needs. However, until now it was not possible to automatically import and process fire simulation data as
produced by the fire dynamics simulator (FDS) [@FDS] for example. Using SmokeView [@SMV], it was
already possible to visualize generated data, but it was not possible to process it directly or perform detailed
analysis on the data itself. The introduction of the fdsreader made this possible in an uncomplicated and efficient way.

# Statement of need

Up until now, most working groups did not have any solution to efficiently and automatically read in the binary data
output by FDS to process it further. One would have to either use Fds2Ascii, a Fortran program to manually convert the
binary output into a text file, and read in the text file with their preferred language or write their own scripts to
read the binary data output of FDS and further process the data. Many groups did end up with their own set of, typically
python-based, scripts to read the various types of data an FDS simulation can produce, e.g. slices, boundary data, etc.
As the FDS internal data structures are non-trivial and the source code uneasy to understand as an outsider, the scripts
usually took large amounts of time to write, ended up having strict limitations to the simulation parameters, e.g. only
single mesh based simulations, and could not process all types of data. Furthermore, new versions of FDS often led to
some scripts not working as expected anymore, so maintaining these scripts cost even more additional time.
The fdsreader python package provides functionality to automatically import everything FDS outputs in a simulation run.
When first loading a simulation, all metadata is collected and cached to reduce subsequent loading times. The actual
data produced during the simulation, e.g. slice data for each timestep, is not loaded until the data is accessed by the
user via python, which then triggers loading the data into memory in the background and converting it to equivalent
python datastructures. This method minimizes initial loading time without sacrificing the ability to easily filter and
Up until now, most working groups in both industry and research have had no solution for efficiently and
automatically reading the binary data output by FDS to process it further. One would either have to use Fds2Ascii, a
Fortran program to manually convert the binary output of FDS into a text file and read in the text file with their
preferred language or write their own scripts to read the binary data output of FDS and further process the data. Many
groups did end up with their own set of, typically Python-based, scripts to read the various types of data an FDS
simulation can produce, e.g. slices, boundary data, etc.
As the internal data structures of FDS are non-trivial and the source code is not trivial to understand for an outsider,
the scripts usually require lots of time to write, ended up having strict limitations to the simulation parameters,
e.g. only single mesh based simulations, and could not process all types of data. In addition, new versions of FDS
often meant that some scripts no longer worked as expected, requiring even more time investment to maintain these scripts.
The fdsreader Python package provides functionality to automatically import the full set of FDS outputs for both old and
new versions of FDS.
When first loading a simulation, all metadata is collected and cached to reduce subsequent load times. The actual
data produced during the simulation such as the slice data for each time step, is not loaded until the data is accessed by the
user via Python, which then triggers loading the data into memory in the background and converting it to equivalent
Python datastructures. This method minimizes initial loading time without sacrificing the ability to easily filter and
select the desired data. The fdsreader collects all data of the same type into one collection and offers its own set
functions for each type to easily select the data which should be further processed. These functions can even be called
in an automated fashion, to run some predefined postprocessing routines on simulation data without having to manually
Expand All @@ -53,10 +55,10 @@ The fdsreader is able to read all data types available in FDS including most of
the package contains modules for slices (slcf), boundary data (bndf), volumes (plot3d, smoke3d) particles (part),
isosurfaces (isof), evacuations (evac), complex geometry boundary data (geom), devices (devc) and meshes. Slices,
boundary data, isosurfaces and volumes are each respectively seperated into multiple parts, one for each mesh. While FDS
outputs the data separately for each mesh, the fdsreader provides methods to combine all these parts automatically.
outputs the data separately for each mesh, the fdsreader provides methods to combine all these parts automatically and
operate on data across meshes.

# Acknowledgements

We acknowledge contributions from TODO
TODO

# References

0 comments on commit 80db526

Please sign in to comment.