add_device
Add a target or detector to a compartment in a CFAST model. Configure material, orientation, and activation parameters for fire simulation.
Instructions
Add a device (target or detector) to a compartment of a model.
Devices are either targets (PLATE, CYLINDER), which heat up and report temperature, or detectors (HEAT_DETECTOR, SMOKE_DETECTOR, SPRINKLER). The compartment comp_id must already exist. Required fields depend on the type: targets need material_id (already added with add_material) and exactly one of normal or surface_orientation; HEAT_DETECTOR and SPRINKLER need setpoint and rti (SPRINKLER also spray_density).
Parameters
model_id : str Id of the model to modify. id : str Unique name of the target or detector. comp_id : str Compartment in which the device is located. location : list[float] Position [x, y, z] as distances from the left wall, the front wall, and the floor. Default units: m. type : str One of PLATE, CYLINDER (targets), HEAT_DETECTOR, SMOKE_DETECTOR, SPRINKLER (detectors). material_id : str or None, optional What the target is made of; must already exist in the model. Required for target types (PLATE, CYLINDER). surface_orientation : str or None, optional Predefined surface orientation for targets: CEILING, FRONT WALL, BACK WALL, LEFT WALL, RIGHT WALL or FLOOR. Provide exactly one of surface_orientation or normal for a target. normal : list[float] or None, optional Unit vector [nx, ny, nz] perpendicular to the exposed target surface (e.g. [0, 0, 1] faces the ceiling). Provide exactly one of normal or surface_orientation for a target. thickness : float or None, optional Thickness of the target material; if None, the material's value is used. Default units: m. temperature_depth : float, optional Depth at which the internal target temperature is reported. With depth_units="M" (default) an absolute depth in meters from the front surface, which must be > 0 and less than the material thickness; otherwise a fraction of the thickness in [0, 1]. Default value: 0.5. depth_units : str, optional Units for temperature_depth: "M" for meters. Default value: M. setpoint : float or None, optional Temperature at or above which the link activates. Default units: °C. Required for HEAT_DETECTOR and SPRINKLER. rti : float or None, optional Response Time Index for the sprinkler or detector. Default units: (m·s)^(1/2). Required for HEAT_DETECTOR and SPRINKLER. obscuration : float, optional Obscuration at or above which a SMOKE_DETECTOR activates. Default units: %/m, default value: 23.93 %/m. spray_density : float or None, optional Amount of water dispersed by a sprinkler. Default units: m/s. Required for SPRINKLER.
Returns
str Confirmation, the updated model summary, and any warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| rti | No | ||
| type | Yes | ||
| normal | No | ||
| comp_id | Yes | ||
| location | Yes | ||
| model_id | Yes | ||
| setpoint | No | ||
| thickness | No | ||
| depth_units | No | M | |
| material_id | No | ||
| obscuration | No | ||
| spray_density | No | ||
| temperature_depth | No | ||
| surface_orientation | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |