pycfast.WallVents#
- class pycfast.WallVents(id, comps_ids, bottom=0, height=0, width=0, face='', offset=0, open_close_criterion=None, time=None, fraction=None, set_point=None, device_id=None, pre_fraction=1, post_fraction=1)[source]#
Represents wall openings connecting two compartments that physically overlap in elevation.
Wall vents are doors or windows that connect compartments that physically overlap in elevation, or that connect to the outside. Horizontal flow connections may also be used to account for leakage between compartments or to the outdoors. Natural ventilation can occur when two compartments are connected via open doorways or windows (Wall Vents). If no vents are specified between two compartments, they are assumed to be isolated from each other.
- 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 of two compartment IDs connected by this vent. The first compartment is the reference for all vent specifications. All specifications of the vent are made relative to the floor of the first compartment.
bottom (float, optional) – Position of the bottom of the opening relative to the floor of the first compartment. Default units: m, default value: 0 m.
height (float, optional) – Height of the opening relative to the bottom of the opening. Default units: m, default value: 0 m.
width (float, optional) – The width of the opening. Default units: m, default value: 0 m.
face (str) – The wall on which the vent is positioned. Choices are Front, Rear, Right, Left and are relative to the X-Z plane (Front and Rear faces are parallel to the X-axis; left and right are parallel to the Y-axis).
offset (float, optional) – For visualization only, the horizontal distance between the near edge of the vent and the origin of the axis defined by the selected face in the first compartment. 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 value 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. If the final value of the opening fraction is less than the total simulation time, the vent is assumed to be open at the final value of the opening fraction from and including the time associated with the final value of the opening fraction until the end of the simulation.
Examples
Create a door between two rooms following CFAST conventions:
>>> door = WallVents( ... id="DOOR_1_2", ... comps_ids=["ROOM1", "ROOM2"], ... bottom=0, # Bottom at floor level (relative to first) ... height=2.0, # Height of opening relative to bottom ... width=0.9, # Width of the opening ... face="RIGHT", # Wall on which vent is positioned ... offset=1.0 # Distance from origin for visualization ... )
- to_input_string()[source]#
Generate CFAST input file string for this wall vent.
- Returns:
Formatted string ready for inclusion in CFAST input file.
- Return type:
Examples
>>> vent = WallVents("DOOR1", ["RM1", "RM2"], 0.0, 2.0, 0.9, "RIGHT", 1.0) >>> print(vent.to_input_string()) &VENT TYPE = 'WALL' ID = 'DOOR1' COMP_IDS = 'RM1', 'RM2' BOTTOM = 0.0 ...