Basic Data Output

Reading Time: 16 minutes

1. Overview

This is the second tutorial in our PyroSim Fundamentals tutorial series, intended for new PyroSim users. In this tutorial, we will demonstrate how to add basic data outputs to your fire models and explain the basics of the underlying FDS concepts.

2. Before Starting

Before beginning this tutorial:

Once you have the Basic Data Output zip file downloaded and unzipped:

  1. Open the my_first_model.psm PyroSim model
  2. Click File > Save As
  3. Give the model the name basic_data_output.psm
  4. Click Save

3. Introduction

In the Your First Fire tutorial, you created your first functional fire model. This model included Obstruction geometry and a basic fire. When run, it generated the standard simulation outputs created by every FDS simulation. However, in most modeling cases this is not enough data to answer the questions you may have. To create more data with your model, you will need to define some additional outputs in PyroSim.

There are many output types available in PyroSim and FDS, however this tutorial will cover two of the most commonly used: Devices and 2D Slices. For each of these, you will learn underlying FDS concepts, how to create the output in PyroSim, and how to view the results of the output in the Results viewer.

4. Devices

4.1. What are Devices?

Devices are very generalized tools in FDS, as defined in Chapter 20: Devices and Control Logic of the FDS User Guide (McGrattan et al. 2021). They can be used for a wide number of applications in your model. Some of these include recording quantities in the simulation and generating an output, modeling real-life sensors to track their activation state, and triggering other events in the model.

This tutorial will cover the first two of these applications, and a later tutorial in the Fundamentals series will cover the third. However, keep in mind that these are just the basic concepts necessary to get you acquainted with PyroSim and FDS.

4.2. Types of Devices

As can be seen from the Devices menu in PyroSim, there are many categories of Devices. PyroSim divides Devices into these categories to make defining Devices easier. For this tutorial, we will cover the following 3 categories of Devices:

Gas-Phase Devices
This device type allows you to measure and record a quantity (more on what those are in Section 4.3) in a gaseous cell, measured at the cell center. You can think of these devices as being used to measure while floating in the middle of the air in your model. They measure the quantity at the center of the cell that they are placed in, regardless of where in the cell they are placed.
Solid-Phase Devices
This device types allows you to measure and record a quantity in a solid cell, measured at a cell face. You can think of these devices as being used to measure on top of a solid surface. They measure the quantity at the center of the closest face of the cell that they are placed in.
Smoke Detectors
This specific Device type models a smoke detector. It has a number of parameters that allow you to control where the detector is placed, as well as how and when it activates.

4.3. Defining Devices

With background definitions out of the way, let’s get to actually making some Devices to generate outputs in this model. You will create 3 different Devices to answer the following questions:

  1. What is the temperature at head-height in the doorway?
  2. What is the ceiling temperature above the fire?
  3. When will a smoke detector in the corner of the room activate?

4.3.1. Defining a Gas-Phase Temperature Device

To figure out the temperature in the doorway, we will need to know the temperature of the air in one of the cells that make up the opening of the doorway. Because this doorway is a Hole, and the cells there are gaseous, we will use a Gas-Phase Device. To create this device:

  1. In the 3D View, select the Device tool.
  2. Right-click, then select Lock Z to snap location.
  3. Press the TAB key.
  4. Enter the XYZ location 0.08,2.5,1.75, then press ENTER.
pyro tutorial fundamentals add device
Figure 1. Adding the Gas-Phase Device
  1. Double-click the new Device in the Navigation View to open the Gas-Phase Device dialog.
  2. Rename the Device to Doorway Temperature.
  3. Leave the Quantity set to the default Temperature.
pyro tutorial fundamentals edit device
Figure 2. Editing the Gas-Phase Temperature Device

The Doorway Temperature Device is now fully configured.

4.3.2. Defining a Solid-Phase Wall Temperature Device

To figure out the ceiling temperature above the fire, we need to know the temperature at the bottom surface of one of the cells that make up the Ceiling obstruction. Because we want to know the properties of a solid cell, we will need to use a Solid-Phase Device. To create this device:

  1. In the 3D view, select the Device tool.
  2. Right-click, then select Tool Properties.
  3. In the Device Type dropdown, select Solid-Phase Device.
  4. Change the Name to Ceiling Temperature.
  5. In the Quantity dropdown, select Wall Temperature.
  1. Click OK to close the Tool Properties dialog.
  2. Press TAB to begin entering the device location.
  3. Enter the location 2.6,2.6,2.75.
  4. Press ENTER to create the Device.
pyro tutorial fundamentals add solid device 2024 2
Figure 3. Adding the Solid-Phase Wall Temperature Device

This Device you just created has an X and Y position that places it fully inside of a mesh cell on the ceiling above the Fire obstruction, shown in Figure 4. This is done to avoid ambiguity in the final Device location. We are telling FDS exactly which Mesh cell we want the Device in. In Figure 4, you can see that if we positioned this device directly over the center of the Fire obstruction, it would be placed at the corner boundary of 4 different cells. While FDS can handle this in most situations, it will essentially select a cell at random out of those 4 to place the Device in to. Placing the device squarely inside of a cell lets us, as the maker of the model, know and control which cell is chosen.

pyro tutorial fundamentals solid device placement
Figure 4. The X and Y placement of the Ceiling Temperature Device, shown with all other model objects hidden except the Mesh, and Fire and Ceiling obstructions. Rendered in wireframe mode.

Like the X and Y coordinates, the Z coordinate is chosen to avoid ambiguity in the Device location. The Z coordinate coincides directly with the bottom face of the Ceiling obstruction, shown in Figure 5.

pyro tutorial fundamentals solid device placement z
Figure 5. The Z placement of the Ceiling Temperature Device, shown with all other model objects hidden except the Mesh and the Ceiling Obstruction. Rendered in wireframe mode.

The Ceiling Temperature Device is now fully configured.

4.3.3. Defining a Smoke Detector

To figure out when a smoke detector would activate in this fire scenario, we will need to add a device to our model to represent a smoke detector. Thankfully PyroSim has a built in Device Type for this. We will create a simple smoke detector in the model, using one of the built in smoke detector models provided in Table 20.1 of the FDS User Guide (McGrattan et al. 2021, 265). To add this smoke detector to the model:

  1. In the 3D view, select the Device tool.
  2. Right-click, then select Tool Properties.
  3. Change the Name to Smoke Detector.
  4. In the Device Type dropdown, select Smoke Detector.
  5. Leave the Model field set to Cleary Photoelectric P1.
  6. Click OK to close the Tool Properties dialog.
  7. Press TAB to begin entering the device location.
  8. Enter the location 4.37,0.63,2.635.
  9. Press ENTER to create the Device.
pyro tutorial fundamentals add smoke detector
Figure 6. Adding the Smoke Detector

The smoke detector you just created is located at the center of one of the cells at the corner of the room. Smoke detectors are technically a type of Gas-Phase Device in FDS, so they need to be placed inside of a gaseous cell, just like the Doorway Temperature device created in Section 4.3.1.

The Smoke Detector Device is now fully configured.

5. 2D Slices

5.1. What are 2D Slices?

Think back to the questions we were looking to answer by adding Devices and think of what they all had in common. Whether it’s the temperature at head-height in the doorway, the temperature of the ceiling above the fire, or a smoke detector in the corner of the room, these questions are all looking for data at a single point. What if we want data for a broader area, and not just for a point?

That is where 2D Slices, also known as Planar Slices, come in to play. 2D Slices allow you to record the value of a Gas-Phase Quantity at more than just a single point by recording the value across an entire plane in your model.

Creating 2D Slices in PyroSim is fairly easy. You will create 3 different Slices to answer the following questions:

  1. What is the temperature across the entire doorway?
  2. What is the air temperature just below the ceiling?
  3. What is the visibility level in the room?

5.2. Defining 2D Slices

Defining 2D Slices in PyroSim is very easy. To create the Slices:

  1. Open the Animated Planar Slices dialog by using the Output > 2D Slices action.

This dialog shows a table. Each row in the table defines a separate 2D Slice. You define a 2D Slice by filling out a row in the table.

  1. Click the Insert Row button.
  2. In the new row, in the XYZ Plane dropdown, select X.
  3. In the Plane Value cell, enter 0.08m.
  4. In the Gas Phase Quantity dropdown, select Temperature.
  5. In both the Use Vector? and Cell Centered? dropdowns, select NO.
pyro tutorial fundamentals add slice
Figure 7. Adding the Slice

The Slice you just defined will measure the Temperature in the plane of the doorway opening - the same plane that the Doorway Temperature Device is in. Create the other two Slices:

  1. Insert 2 more rows into the table with the following information:
    • Z, 2.53m, TEMPERATURE, YES, NO
    • Z, 1.75m, VISIBILITY, NO, YES

These Slices measure the temperature below the ceiling, and the visibility at head height, respectively.

The 2D Slices are now fully configured.

6. Viewing the Results

Run the simulation again, as in the Your First Fire tutorial, to re-calculate the results including the new Device and 2D Slice outputs.

6.1. Viewing Device Data

PyroSim provides a handy way to view the output data from Devices in your model. By default, FDS writes the Device data out to a _model_name__devc.csv file. PyroSim parses this, and other csv files, to provide pyro ui icon plots Time History plots.

To view the Time History plots for your Devices:

  1. Click the arrow next to the pyro ui icon plots Time History plots icon, and select Plot Device Results.
pyro tutorial fundamentals gas device results 2024 2
Figure 8. The Time History Plot of the Doorway Temperature Device.

The column on the left-hand side of the window is a list of all the devices in your model. The plot on the right is a plot of the value of the selected device over time. You can save a screenshot of your plot at any time by using the File > Image Capture action, which will save an image of the plot at its current size.

Viewing the Doorway Temperature plot in Figure 8, you can see that the maximum temperature achieved in the doorway is roughly 270°C, and this occurs around 48s.

pyro tutorial fundamentals solid device results
Figure 9. The Time History Plot of the Ceiling Temperature Device.

Figure 9 shows the plot of the Ceiling Temperature Device. As you can see from the plot, the ceiling stayed at a constant temperature of 22°C throughout the entire simulation. This is obviously not what would happen in real life, with an entire raging fire burning under it, so why does it read 22°C?

The ceiling obstruction in this model had the default INERT surface applied to it. If you remember back to the Your First Fire tutorial, we described the INERT surface.

The `INERT` surface is a surface with a fixed temperature equal to the ambient temperature in the model.

Because our model’s ambient temperature is a constant 22°C, the surface and the device recording it are as well. Try changing the ceiling surface to the ADIABATIC surface and running the model again to see the difference in the results.

6.2. Viewing Smoke Detector Activation Time

Select the Smoke Detector in the Time History Plots dialog to view its output over time.

pyro tutorial fundamentals smoke device results 2024 2
Figure 10. The Time History Plot of the Smoke Detector Device.

Figure 10 shows the plot of the Smoke Detector’s Obscuration over time. This value is in units of %/m, which is an industry standard.

By default, smoke detectors will activate at a value of 3.24%/m obscuration. Based on the plot, we would expect the smoke detector to activate around the 4s mark.

To view the exact activation time of our smoke detector, or any device with a Setpoint (covered in later tutorials), you will need to open the model_name.out file, created by FDS when you run your simulation, in a text editor. At the bottom of this file, you will find a DEVICE Activation Times section. In this section, you can see that the Smoke Detector activates at 4.303s.

pyro tutorial fundamentals smoke detector activation out file 2024 2
Figure 11. The model_name.out file showing the activation time of the Smoke Detector

We can also verify this in the PyroSim Results Viewer. Top open the Results Viewer:

  1. Click the pyro ui icon results View Results button.

With the Results viewer open, look through the doorway of the room to find the smoke detector.

pyro tutorial fundamentals smoke detector 3d
Figure 12. The smoke detector in the Results Viewer

Figure 12 shows the 3D representation of the smoke detector in Results Viewer. The green light on the detector indicates that it has not yet activated. Press the results ui icon play Play button to advance time until 4.2s, and notice that the detector’s light changes color to red. This indicates that the detector is activated, like we expected it to be.

pyro tutorial fundamentals smoke detector activation 3d
Figure 13. The smoke detector activating at 4.2s.

6.3. Viewing 2D Slice Data

6.4. Doorway Temperature Slice

2D Slice data is also viewed in the Results Viewer. To view the slice, we set up for the doorway temperature:

  1. In the Results Viewer Navigation View, expand the 2D Slices section.
  2. Under 2D Slices expand Temperature.
  3. Double click the X = 0.080 entry to show the doorway temperature slice.
pyro tutorial fundamentals slice colorbar
Figure 14. The activated 2D Slice, with colorbar.

You should now see the 2D Slice plane, with a colorbar on the right side of the screen. However, if you compare the colorbar to the Doorway Temperature device result plot in Figure 8, the range of the colorbar is quite different. This is because the colorbar uses the default Percentile (rounded) setting, found in the Results User Manual. To change this:

  1. Use the Analysis > FDS Preferences action to open the FDS Preferences dialog.
  2. Change the Data Range from Percentile (rounded) to Global.

The colorbar should now be a similar range to that in Figure 8. You can click on the colorbar to highlight a specific value. To do this:

  1. Left-click on the colorbar to set the highlight value to 200°C.
  1. Press the results ui icon play Play button to view the slice results over time.
pyro tutorial fundamentals slice results played
Figure 15. The playback results of the doorway temperature slice.

As you can see in Figure 15, the 200°C value is highlighted black in the playback results.

6.5. Ceiling Temperature Slice

Viewing the other slices is mostly the same as Section 6.4, however the useful information in those slices is hidden by the geometry of our model. To view the results of the Ceiling Temperature Slice:

  1. Hide the model geometry by double-clicking on PyroSim Geometry.
  2. Enable the Z = 2.530 Temperature Slice

You should now see both the doorway temperature and the ceiling temperature slices in the 3D window.

pyro tutorial fundamentals multiple slices
Figure 16. The Doorway Temperature and Ceiling Temperature slices shown in the same window.

Because you selected Yes in the Use Vector? column for the ceiling temperature slice, there is also an additional 2D Slice Vectors object created for the slice. These can be overlaid on top of the existing 2D slices; however, it might be clearer to show them separately. To show these vectors:

  1. Hide the enabled Temperature slices.
  2. Under 2D Slices > Temperature, double-click the Z=2.530 object.

You should now see the vector plot for Temperature. Because Temperature is a scalar quantity, the length and direction of the vector show the direction and relative speed of the flow of the fluid in that cell. The color of the vector shows the value of the quantity, shown in the color bar. (McGrattan et al. 2021, 294-295)

pyro tutorial fundamentals vector playback
Figure 17. Playback of the ceiling temperature vectors.

6.6. Visibility Slice Results

Showing the visibility slice results is much the same as the ceiling temperature slice in Section 6.5. The only thing to note here is that because you selected Yes in the Cell Centered? column when defining the slice, the results will look blocky. This is because by default, slices are interpolated at cell corners in order to smooth out the results plot. Defining slices as cell-centered disables this interpolation, so the values will change sharply from cell to cell. To show the visibility slice:

  1. Double-click the Z = 1.795 [cell centered] object under 2D Slices > SOOT VISIBILITY.
  2. Right-click the colorbar to disable the highlighting set up for the previous slices.
pyro tutorial fundamentals visibility playback
Figure 18. Playback of the visibility slice.

7. Conclusion

That’s it! You should now be familiar with how to create additional basic data outputs for your simulations, as well as how to view those outputs in the Results viewer. There are many other types of data outputs available in PyroSim and FDS, however those will be covered in more advanced tutorials.

You can download the complete model files for this tutorial here: Basic Data Output

To continue building your skillset, check out the related tutorials linked below.

Please contact support@thunderheadeng.com with any questions or feedback regarding our products or documentation.

8. Bibliography

McGrattan, Kevin, Simo Hostikka, Randall McDermott, Jason Floyd, and Marcos Vanella. 2021. Fire Dynamics Simulator User’s Guide, NIST Special Publication 1019. Sixth Edition. National Institute of Standards and Technology, Gaithersburg, Maryland, USA: NIST.