FDS classes

class fdsreader.fds_classes.mesh.Mesh(coordinates: Dict[Literal['x', 'y', 'z'], ndarray], extents: Dict[Literal['x', 'y', 'z'], Tuple[float, float]], mesh_id: str)[source]

3-dimensional Mesh of fixed, defined size.

Variables:
  • coordinates – Coordinate values for each of the 3 dimension.

  • dimensionsDimension describing the size of the 3 dimensions regarding indices.

  • extentExtent object containing 3-dimensional extent information.

  • n – Number of elements for each of the 3 dimensions.

  • n_size – Total number of blocks in this mesh.

  • id – Mesh id/short_name assigned to this mesh.

Parameters:
  • coordinates – Coordinate values of the three axes.

  • extents – Extent of the mesh in each dimension.

  • mesh_id – ID of this mesh.

coordinate_to_index(coordinate: Tuple[float, ...], dimension: Tuple[Literal[1, 2, 3, 'x', 'y', 'z'], ...] = ('x', 'y', 'z'), cell_centered=False) Tuple[int, ...][source]

Finds the nearest point in the mesh’s grid and returns its indices.

Parameters:
  • coordinate – Tuple of 3 floats. If the dimension parameter is supplied, up to 2 dimensions can be left out from the tuple.

  • dimension – The dimensions in which to return the indices (1=x, 2=y, 3=z).

  • cell_centered – Instead of finding the nearest point on the mesh, find the center of the nearest cell.

get_boundary_data(quantity: str | Quantity)[source]
get_nearest_coordinate(coordinate: Tuple[float, ...], dimension: Tuple[Literal[1, 2, 3, 'x', 'y', 'z'], ...] = ('x', 'y', 'z'), cell_centered=False) Tuple[float, ...][source]

Finds the nearest point in the mesh’s grid.

Parameters:
  • coordinate – Tuple of 3 floats. If the dimension parameter is supplied, up to 2 dimensions can be left out from the tuple.

  • dimension – The dimensions in which to return the indices (1=x, 2=y, 3=z).

  • cell_centered – Instead of finding the nearest point on the mesh, find the center of the nearest cell.

get_obstruction_mask(times: Sequence[float], cell_centered=False) ndarray[source]

Marks all cells which are blocked by an obstruction.

Parameters:

times – All timesteps of the simulation.

Returns:

A 4-dimensional array with time as first and x,y,z as last dimensions. The array depends on time as obstructions may be hidden as specific points in time.

get_obstruction_mask_slice(subslice)[source]

Marks all cells of a single subslice which are blocked by an obstruction.

Returns:

A 4-dimensional array with time as first and x,y,z as last dimensions. The array depends on time as obstructions may be hidden at specific points in time.

class fdsreader.fds_classes.surface.Surface(name: str, tmpm: float, material_emissivity: float, surface_type: int, texture_width: float, texture_height: float, texture_map: str | None, rgb: Tuple[float, float, float], transparency: float)[source]
Surface objects describe what bounding surfaces consist of. Boundary conditions for obstructions and vents are

prescribed by referencing the appropriate surface.

Variables:
  • name – Name of the surface.

  • material_emissivity – Emissivity of the material.

  • surface_type – Type of the surface.

:ivar texture_width:Width of the texture of the surface. :ivar texture_height: Height of the texture of the surface. :ivar texture_map: Path to the texture map used for the surface. :ivar rgb: Color of the surface in form of a 3-element tuple. :ivar transparency: Transparency of the color (alpha channel).

id()[source]
class fdsreader.fds_classes.ventilation.SubVentilation(mesh: Mesh, extent: Extent)[source]

Part of a Ventilation.

Variables:
  • extentExtent object containing 3-dimensional extent information.

  • mesh – The mesh that contains this part of the ventilation.

class fdsreader.fds_classes.ventilation.Ventilation(surface: Surface, bound_indices: Tuple[int, int, int, int, int, int], color_index: int, draw_type: int, rgba: Tuple | Tuple[float, float, float, float] = (), texture_origin: Tuple | Tuple[float, float, float] = (), circular_vent_origin: Tuple | Tuple[float, float, float] = (), radius: float = -1)[source]
A ventilation can be used to model components of the ventilation system in a building, like a

diffuser or a return. A ventilation can also be used as a means of applying a particular boundary condition to a rectangular patch on a solid surface.

Variables:
  • id – ID of the ventilation.

  • extentExtent object containing 3-dimensional extent information.

  • surface – Surface object used for the ventilation.

  • bound_indices – Indices used to define ventilation bounds in terms of mesh locations.

  • color_index – Type of coloring used to color ventilation. -99 or +99 - use default color -n or +n - use n’th palette color < 0 - do not draw boundary file over vent > 0 - draw boundary file over vent

  • draw_type – Defines how the ventilation is drawn. 0 - solid surface 2 - outline -2 - hidden

  • open_time – Point in time the ventilation should open.

  • close_time – Point in time the ventilation should close.

  • rgba – Color of the ventilation in form of a 4-element tuple (ranging from 0.0 to 1.0).

  • texture_origin – Origin position of the texture provided by the surface. When the texture does have a pattern, for example windows or bricks, the texture_origin specifies where the pattern should begin.

  • circular_vent_origin – Origin of the ventilation relative to bounding box.

  • radius – Radius of the ventilation circle.