pycfast.Compartments#

class pycfast.Compartments(id='Comp 1', width=3.6, depth=2.4, height=2.4, ceiling_mat_id=None, ceiling_thickness=None, wall_mat_id=None, wall_thickness=None, floor_mat_id=None, floor_thickness=None, origin_x=0, origin_y=0, origin_z=0, shaft=None, hall=None, leak_area_ratio=None, cross_sect_areas=None, cross_sect_heights=None)[source]#

Defines the size, position, materials of construction, and flow characteristics for compartments.

The Compartments page defines the size, position, materials of construction, and flow characteristics for the compartments in the simulation. In order to model a fire scenario, the size and position of each compartment relevant to the scenario must be specified. For a compartment, the width, depth, compartment height and height of the floor of the compartment provide this specification. The maximum number of compartments for version 7 is 100. The usual assumption is that compartments are rectangular parallelepipeds. However, the CFAST model can accommodate odd shapes as equivalent floor area parallelepipeds or with a cross-sectional area that varies with height.

Parameters:
  • id (str) – Compartments are identified by a unique alphanumeric name. This may be as simple as a single character or number, or a description of the compartment.

  • width (float, optional) – Specifies the width of the compartment as measured on the X axis from the origin (0,0,0) of the compartment. Default units: m, default value: 3.6 m.

  • depth (float, optional) – Specifies the depth of the compartment as measured on the Y axis from the origin (0,0,0) of the compartment. Default units: m, default value: 2.4 m.

  • height (float, optional) – Specifies the height of the compartment as measured on the Z axis from the origin (0,0,0) of the compartment. Default units: m, default value: 2.4 m.

  • origin_x (float, optional) – Specifies the absolute x coordinate of the lower, left, front corner of the room. All absolute positions for all compartments must be greater than or equal to zero, i.e., negative numbers are not allowed for these inputs. Important in positioning the compartments for visualization in Smokeview. Default units: m, default value: 0.0 m.

  • origin_y (float, optional) – Specifies the absolute y coordinate of the lower, left, front corner of the room. All absolute positions for all compartments must be greater than or equal to zero, i.e., negative numbers are not allowed for these inputs. Important in positioning the compartments for visualization in Smokeview. Default units: m, default value: 0.0 m.

  • origin_z (float, optional) – Specifies the height of the floor of each compartment with respect to station elevation specified by the internal ambient conditions reference height parameter. The reference point must be the same for all elevations in the input data. All absolute positions for all compartments must be greater than or equal to zero, i.e., negative numbers are not allowed for these inputs. Default units: m, default value: 0.0 m.

  • ceiling_mat_id (str, optional) – Material ID from the thermal properties from the Materials tab to define the ceiling surface of the compartment. Up to three materials can be used to define the layer(s) of the ceiling surface. The innermost layer is specified first. Default value: Off.

  • ceiling_thickness (float, optional) – Thickness of each of the layers of the ceiling surface. Default units: m, default value: thickness of material specified on the Materials tab.

  • wall_mat_id (str, optional) – Material ID from the thermal properties from the Materials tab to define the wall surface of the compartment. Up to three materials can be used to define the layer(s) of the wall surface. The innermost layer is specified first. Default value: Off.

  • wall_thickness (float, optional) – Thickness of each of the layers of the wall surface. Default units: m, default value: thickness of material specified on the Materials tab.

  • floor_mat_id (str, optional) – Material ID from the thermal properties from the Materials tab to define the floor surface of the compartment. Up to three materials can be used to define the layer(s) of the floor surface. The innermost layer is specified first. Default value: Off.

  • floor_thickness (float, optional) – Thickness of each of the layers of the floor surface. Default units: m, default value: thickness of material specified on the Materials tab.

  • shaft (bool, optional) – For tall compartments or those removed from the room of fire origin, the compartment may be modeled as a single, well-mixed zone rather than the default two-zone assumption. A single zone approximation is appropriate for smoke flow far from a fire source. Examples are elevators, shafts, complex stairwells, or compartments far from the fire.

  • hall (bool, optional) – By specifying the compartment as a corridor, the ceiling jet temperature is calculated with a different empirical correlation that results in a somewhat higher temperature near the ceiling. This will impact, for example, detectors, sprinkler, and targets near the ceiling in corridors.

  • leak_area_ratio (list[float], optional) – CFAST can automatically calculate leakage between one or more compartments and the outdoors. Leakage is specified as a leakage area per unit wall area and/or per unit floor area. Format: [Wall Leakage, Floor Leakage]. Default units: m²/m².

  • cross_sect_areas (list[float], optional) – Cross-sectional area at the corresponding height for variable cross-sectional area compartments. Used for defining compartment properties for spaces which are not rectangular in area. Default units: m².

  • cross_sect_heights (list[float], optional) – Height off the floor of the compartment for variable cross-sectional area definition. Cross-sectional area values should be input in order by ascending height. Default units: m.

Notes

If the thermophysical properties of the enclosing surfaces are not included, CFAST will treat them as adiabatic (no heat transfer). If a name is used which is not in the input file, the model should stop with an error message. The back surfaces of compartments are assumed to be exposed to ambient conditions unless specifically specified.

All surfaces (ceiling, walls and floor) are turned off by default. The fully mixed (single zone) and corridor models are turned off by default.

Examples

Create a compartment following CFAST conventions:

>>> room = Compartments(
...     id="BEDROOM",
...     width=3.5, depth=4.0, height=2.4,  # Size specification
...     ceiling_mat_id="GYPSUM", ceiling_thickness=0.016,
...     wall_mat_id="GYPSUM", wall_thickness=0.016,
...     floor_mat_id="CONCRETE", floor_thickness=0.10,
...     origin_x=0.0, origin_y=0.0, origin_z=0.0  # Position
... )
to_input_string()[source]#

Generate CFAST input file string for this compartment.

Returns:

Formatted string ready for inclusion in CFAST input file.

Return type:

str

Examples

>>> comp = Compartments("ROOM1", width=3.0, depth=4.0, height=2.4,
...                    ceiling_mat_id="GYPSUM", ceiling_thickness=0.016,
...                    wall_mat_id="GYPSUM", wall_thickness=0.016,
...                    floor_mat_id="CONCRETE", floor_thickness=0.10,
...                    origin_x=0.0, origin_y=0.0, origin_z=0.0)
>>> print(comp.to_input_string())
&COMP ID = 'ROOM1' DEPTH = 4.0 HEIGHT = 2.4 WIDTH = 3.0 ...