Plot3D files

Collection of Plot3D objects. Offers extensive functionality for filtering and using plot3Ds as well as its subclasses such as SubPlot3D.

Classes:

Plot3D(root_path)

Plot3d file data container including metadata. Consists of multiple subplots, one for each

SubPlot3D(mesh, quantity_idx)

Subplot of a pl3d output for a single mesh.

Functions:

implements(np_function)

Decorator to register an __array_function__ implementation for Plot3Ds.

class fdsreader.pl3d.pl3d.Plot3D(root_path: str)[source]
Plot3d file data container including metadata. Consists of multiple subplots, one for each

mesh.

Variables:
  • times – All times for which data has been recorded.

  • quantities – List with quantity objects containing information about recorded quantities calculated for this Plot3D with the corresponding short_name and unit.

Methods:

clear_cache()

Remove all data from the internal cache that has been loaded so far to free memory.

mean()

Calculates the mean value of the whole Plot3D.

std()

Calculates the standard deviation for each quantity individually of the whole Plot3D.

to_global([masked, fill, return_coordinates])

Creates a global numpy ndarray from all subplots.

Attributes:

n_t

Get the number of timesteps for which data was output.

subplots

Returns a list with one SubPlot3D object per mesh.

clear_cache()[source]

Remove all data from the internal cache that has been loaded so far to free memory.

mean() float[source]

Calculates the mean value of the whole Plot3D.

Returns:

The calculated mean value.

property n_t: int

Get the number of timesteps for which data was output.

std() float[source]

Calculates the standard deviation for each quantity individually of the whole Plot3D.

Returns:

The calculated standard deviation.

property subplots

Returns a list with one SubPlot3D object per mesh.

to_global(masked: bool = False, fill: float = 0, return_coordinates: bool = False) ndarray | Tuple[ndarray, Dict[Literal['x', 'y', 'z'], ndarray]][source]

Creates a global numpy ndarray from all subplots.

Parameters:
  • masked – Whether to apply the obstruction mask to the data or not.

  • fill – The fill value to use for masked entries. Only used when masked=True.

  • return_coordinates – If true, return the matching coordinate for each value on the generated grid.

class fdsreader.pl3d.pl3d.SubPlot3D(mesh: Mesh, quantity_idx: int)[source]

Subplot of a pl3d output for a single mesh.

Variables:

mesh – The mesh containing the data.

Methods:

clear_cache()

Remove all data from the internal cache that has been loaded so far to free memory.

Attributes:

data

Method to lazy load the 3D data for each quantity of a single mesh.

clear_cache()[source]

Remove all data from the internal cache that has been loaded so far to free memory.

property data: ndarray

Method to lazy load the 3D data for each quantity of a single mesh.

Returns:

4D numpy array with (t,x,y,z) as dimensions.

fdsreader.pl3d.pl3d.implements(np_function)[source]

Decorator to register an __array_function__ implementation for Plot3Ds.