Skip to main content

Utility for managing FDS models

Project description

Last Commit Tests Codecov

Python Implementation License

PyPI Development Status Wheel PyPI - Downloads

Source Code: github.com/pbdtools/xfds

Documentation: xfds.pbd.tools

xFDS Logo

Do you have FDS installed on your machine? Do you know where the FDS executable is located? Do you know what version it is? If you installed FDS and Pathfinder, you might have multiple versions of FDS on your machine, but which one do you use?

xFDS leverages the power of Docker to give you acess to all the versions of FDS without having to manage the different versions of FDS yourself. Best of all, you don't have to change or install anything when FDS has a new release!

Once xFDS is installed, all you have to do is navigate to your file and type xfds run. It will locate the first FDS file in the directory and run it with the latest version of FDS!

~/tests/data/fds$ ls
test.fds
~/tests/data/fds$ xfds run
docker run --rm --name test -v /tests/data/fds:/workdir openbcl/fds fds test.fds

Features

Generate Parametric Analyses

Fire models can often require mesh sensitivity studies, different fire sizes, multiple exhaust rates, and a number of differnt parameters. With the power of the Jinja templating system, xFDS can help generate a variety of models from a single .fds file!

Specify Resolution, not IJK

Let xFDS calculate the number of cells so you don't have to. By setting variables at the top of your FDS file, you can use them to perform calculations. Variables are defined using the MultiMarkdown Specification for file metadata. Expressions between curly braces { and } are evaluated as Python code.

xmax: 5
ymax: 4
zmax: 3
res: 0.1

&MESH XB=0, {xmax}, 0, {ymax}, 0, {zmax}, IJK={xmax // res}, {ymax // res}, {zmax // res}/

Will translate to:

&MESH XB= 0, 5, 0, 4, 0, 3, IJK= 50, 40, 30/

Want to run a coarser mesh? Just change res to 0.2 and get

&MESH XB= 0, 5, 0, 4, 0, 3, IJK= 25, 20, 15/

Use loops to create an array of devices

Create for loops by typing {% for item in list %} ... {% endfor %}.

{% for x in range(1, 5) %}
{% for y in range(1, 3) %}
&DEVC QUANTITY='TEMPERATURE', IJK={x}, {y}, 1.8/
{% endfor %}
{% endfor %}

Will render to the following code. Note, Python's range() function will exclude the upper bound.

&DEVC QUANTITY='TEMPERATURE', IJK=1, 1, 1.8/
&DEVC QUANTITY='TEMPERATURE', IJK=1, 2, 1.8/
&DEVC QUANTITY='TEMPERATURE', IJK=2, 1, 1.8/
&DEVC QUANTITY='TEMPERATURE', IJK=2, 2, 1.8/
&DEVC QUANTITY='TEMPERATURE', IJK=3, 1, 1.8/
&DEVC QUANTITY='TEMPERATURE', IJK=3, 2, 1.8/
&DEVC QUANTITY='TEMPERATURE', IJK=4, 1, 1.8/
&DEVC QUANTITY='TEMPERATURE', IJK=4, 2, 1.8/

Manage FDS Runs

Auto-detect FDS file in directory

If you're in a directory containing an FDS file, xFDS will find the FDS file without you specifying it. This is best when each FDS model has its own directory. If multiple FDS files are in the directory, only the first file found will be executed.

If no FDS file is found, xFDS will put you into an interactive session with the directory mounted inside the Docker container. If no directory is specified, the current working directory will be used.

Latest version of FDS always available.

xFDS will always default to the latest version thanks to how the Docker images are created, but you're always welcome to use an older version of FDS if needed. See fds-dockerfiles for supported versions.

Always know what FDS version you're using.

xFDS will inject the FDS version into the container name so there's no question what version of FDS is running. xFDS will also append a globally unique ID so there's no conflicts in having multipe containers running.

Runs in Background

Fire and forget. Unless you use the interactive mode, xFDS will run your model in a container and free up the terminal for you to keep working.

Installation

Prerequisites

xFDS depends on the following softwares:

  • Docker: Needed to run fds-dockerfiles images
  • Python: Needed to run pipx
  • pipx: Needed to install xFDS

Once Docker, Python, and pipx are installed, install xFDS with the following command:

pipx install xfds

For more information about installing xFDS, see https://xfds.pbd.tools/installation

Learn more at xfds.pbd.tools

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xfds-0.3.0.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distribution

xfds-0.3.0-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page