pycfast.CeilingFloorVents#

class pycfast.CeilingFloorVents(id, comps_ids, area=0, type='FLOOR', shape='ROUND', width=None, offsets=None, open_close_criterion=None, time=None, fraction=None, set_point=None, device_id=None, pre_fraction=1, post_fraction=1)[source]#

Represents vertical flow vent connections between compartments.

Examples of these openings are scuttles in a ship, or a hole in the roof of a residence. Connections can exist between compartments or between a compartment and the outdoors. Combined buoyancy and pressure-driven flow through a vertical flow vent is possible when the connected spaces adjacent to the vent are filled with gases of different density in an unstable configuration, with the density of the top space greater than that of the bottom space. With a moderate cross-vent pressure difference, the instability leads to a bi-directional flow between the two spaces. For relatively large cross-vent pressure difference the flow through the vent is unidirectional.

Parameters:
  • id (str) – The selected name must be unique (i.e., not the same as another vent in the same simulation).

  • comps_ids (list[str]) – List containing [top_compartment, bottom_compartment] IDs. Top compartment is where the vent is in the floor, bottom compartment is the adjacent compartment where the vent is in the ceiling.

  • area (float) – Cross-sectional area of the vent opening. Default units: m², default value: 0 m².

  • type (str, optional) – Type of ceiling/floor vent. Options: “FLOOR” or “CEILING”.

  • shape (str, optional) – The shape factor changes the calculation of the effective diameter of the vent and flow coefficients for flow through the vent. Options: “ROUND” or “SQUARE”.

  • width (float, optional) – Characteristic dimension for visualization purposes.

  • offsets (list[float], optional) – For visualization only, the horizontal distances between the center of the vent and the origin of the X and Y axes in the upper compartment. Format: [x_offset, y_offset]. Default units: m, default value: 0 m.

  • open_close_criterion (str, optional) – The opening/closing can be controlled by a user-specified time, or by a user-specified target’s surface temperature or incident heat flux. Options: “TIME”, “TEMPERATURE”, “FLUX”.

  • time (list[float], optional) – Time during the simulation at which to begin or end a change in the open fraction. For time-based opening changes, this is a series of time points associated with opening fractions. Default units: s, default value: 0 s.

  • fraction (list[float], optional) – Fraction between 0 and 1 of the vent width to indicate the vent is closed, partially-open, or fully-open at the associated time point. Default value: 1 (fully open).

  • set_point (float, optional) – The critical value at which the vent opening change will occur. If it is less than or equal to zero, the default value of zero is taken. Can be temperature (°C) or flux (kW/m²) depending on criterion.

  • device_id (str, optional) – User-specified target ID used to calculate surface temperature or incident heat flux to trigger a vent opening change. Target placement is specified by the user as part of the associated target definition.

  • pre_fraction (float, optional) – Fraction between 0 and 1 of the vent width to indicate the vent is partially open at the start of the simulation. Default value: 1 (fully open).

  • post_fraction (float, optional) – Opening fraction at the end of the simulation. The transition from the pre-activation fraction to the post-activation fraction is assumed to occur over one second beginning when the specified set point value is reached. Default value: 1 (fully open).

Notes

CFAST assumes a linear transition between time points. If the initial time specified for a time-changing opening fraction is non-zero, the vent is assumed to be open at the initial value of the open fraction from the beginning of the simulation up to and including the time associated with the initial value of the opening fraction.

CFAST allows only a single ceiling/floor connection between any pair of compartments included in a simulation because the empirical correlation governing the flow was developed using only a single opening between connected compartments.

Vertical connections can only be created between compartments that could be physically stacked based on specified floor and ceiling elevations for the compartments. Some overlap between the absolute floor height of one compartment and the absolute ceiling height of another compartment is allowed. However, whether the compartments are stacked or overlap somewhat, the ceiling/floor absolute elevations must be within 0.01 m of each other. The check is not done when the connection is to the outside.

Examples

Create a ceiling/floor vent connection:

>>> vent = CeilingFloorVents(
...     id="HOLE1",
...     comps_ids=["UPPER_RM", "LOWER_RM"],  # top, bottom
...     area=1.0,           # 1.0 m² cross-sectional area
...     shape="ROUND",
...     width=1.13,         # characteristic dimension
...     offsets=[2.0, 3.0]   # 2m in X, 3m in Y from origin
... )
to_input_string()[source]#

Generate CFAST input file string for this ceiling/floor vent.

Returns:

Formatted string ready for inclusion in CFAST input file.

Return type:

str

Examples

>>> vent = CeilingFloorVents("HOLE1", ["RM_UP", "RM_LOW"], 1.0, "ROUND")
>>> print(vent.to_input_string())
&VENT TYPE = 'FLOOR' ID = 'HOLE1' COMP_IDS = 'RM_UP', 'RM_LOW' ...