Enumerations¶
enums
¶
Enumerations for FDS parameters.
This module contains all enumeration types used across PyFDS, organized by their FDS namelist or functional area.
Classes¶
Severity
¶
Bases: StrEnum
Validation issue severity levels.
SolidGeometry
¶
Bases: StrEnum
Solid phase geometry types for SURF.
BackingCondition
¶
Bases: StrEnum
Backing conditions for SURF.
HeatTransferModel
¶
Bases: StrEnum
Heat transfer models for SURF.
SprayPattern
¶
Bases: StrEnum
Spray patterns for particle generation.
TurbulenceModel
¶
Bases: StrEnum
LES turbulence models for MISC namelist.
SimulationMode
¶
Bases: StrEnum
Simulation mode for MISC namelist.
LESFilterType
¶
Bases: StrEnum
LES filter type for MISC namelist.
VentType
¶
Bases: StrEnum
Types of vents in FDS.
VentShape
¶
Bases: StrEnum
Vent geometry types.
ControlFunction
¶
Bases: StrEnum
Control function types for CTRL namelist.
ObstShape
¶
Bases: StrEnum
Geometric shape types for OBST.
TextureMapping
¶
Bases: StrEnum
Texture mapping types for GEOM.
CoordinateSystem
¶
Bases: StrEnum
Coordinate system types.
ExtinctionModel
¶
Bases: StrEnum
Combustion extinction models.
StatisticsType
¶
Bases: StrEnum
Device statistics types.
RampInterpolation
¶
Bases: StrEnum
RAMP interpolation types.
DragLaw
¶
Bases: StrEnum
Drag law for particles.
MeshBoundary
¶
Bases: StrEnum
Mesh boundary locations.
BuiltinSurface
¶
Bases: StrEnum
Built-in FDS surfaces that don't require explicit definition.
These surface IDs are predefined by FDS and can be referenced without creating a corresponding SURF namelist.
BuiltinSpecies
¶
Bases: StrEnum
Built-in FDS species that don't require explicit definition.
These species IDs are predefined by FDS and can be referenced without creating a corresponding SPEC namelist.
Overview¶
PyFDS provides enumeration types for FDS parameters to ensure type safety and valid values. All enums inherit from str and Enum, making them compatible with string comparisons while providing IDE autocomplete.
Importing Enums¶
from pyfds.core.enums import (
ControlFunction,
TurbulenceModel,
VentShape,
VentType,
BackingCondition,
HeatTransferModel,
SolidGeometry,
BuiltinSpecies,
BuiltinSurface,
)
Validation Enums¶
Severity¶
Validation issue severity levels.
from pyfds.validation import Severity
# Use in validation
if issue.severity == Severity.ERROR:
print("Critical error")
elif issue.severity == Severity.WARNING:
print("Warning")
elif issue.severity == Severity.INFO:
print("Information")
Values:
ERROR: Critical issues that prevent FDS from runningWARNING: Issues that may cause problemsINFO: Informational messages
Surface Enums¶
SolidGeometry¶
Solid phase geometry types for SURF namelist.
from pyfds import Surface
from pyfds.core.enums import SolidGeometry
surface = Surface(
id="WALL",
geometry=SolidGeometry.CARTESIAN,
thickness=0.2
)
Values:
CARTESIAN: Rectangular coordinatesCYLINDRICAL: Cylindrical coordinatesSPHERICAL: Spherical coordinatesINNER_CYLINDRICAL: Inner cylindrical surface
BackingCondition¶
Backing conditions for surfaces.
from pyfds import Surface
from pyfds.core.enums import BackingCondition
surface = Surface(
id="WALL",
backing=BackingCondition.INSULATED,
thickness=0.2
)
Values:
VOID: No backing (default)INSULATED: Insulated backingEXPOSED: Exposed to ambient
HeatTransferModel¶
Heat transfer models for surfaces.
from pyfds.core.enums import HeatTransferModel
surface = Surface(
id="WALL",
heat_transfer_model=HeatTransferModel.LOGLAW
)
Values:
LOGLAW: Log law wall modelIMPINGING_JET: Impinging jet model
SprayPattern¶
Spray patterns for particle generation.
from pyfds.core.enums import SprayPattern
prop = Property(
id="SPRINKLER",
spray_pattern=SprayPattern.GAUSSIAN
)
Values:
UNIFORM: Uniform distributionGAUSSIAN: Gaussian distribution
Global Settings Enums¶
TurbulenceModel¶
LES turbulence models for MISC namelist.
from pyfds import Misc
from pyfds.core.enums import TurbulenceModel
misc = Misc(
turbulence_model=TurbulenceModel.DEARDORFF
)
Values:
DEARDORFF: Deardorff model (default)DYNAMIC_SMAGORINSKY: Dynamic Smagorinsky modelVREMAN: Vreman modelWALE: WALE model
SimulationMode¶
Simulation mode for MISC namelist.
Values:
VLES: Very Large Eddy SimulationLES: Large Eddy Simulation (default)DNS: Direct Numerical SimulationSVLES: Simplified VLES
LESFilterType¶
LES filter type for subgrid quantities.
Values:
MEAN: Mean filterMAX: Maximum filter
Ventilation Enums¶
VentType¶
Types of vents in FDS.
from pyfds import Vent
from pyfds.core.enums import VentType
vent = Vent(
surf_id="OPEN",
vent_type=VentType.OPEN,
xb=(0, 0, 0, 2, 0, 2)
)
Values:
OPEN: Open boundaryHVAC: HVAC ventSURFACE: Surface patchMIRROR: Mirror boundaryPERIODIC: Periodic boundary
VentShape¶
Vent geometry shapes.
from pyfds.core.enums import VentShape
vent = Vent(
surf_id="INLET",
shape=VentShape.CIRCULAR,
radius=0.5
)
Values:
RECTANGULAR: Rectangular vent (default)CIRCULAR: Circular vent
Control Enums¶
ControlFunction¶
Control function types for CTRL namelist.
from pyfds import Control
from pyfds.core.enums import ControlFunction
ctrl = Control(
id="ALARM",
function_type=ControlFunction.ANY,
input_id=["DET_1", "DET_2"]
)
Values:
ANY: True if any input is trueALL: True if all inputs are trueONLY: True if exactly one input is trueTIME_DELAY: Time-delayed activationCUSTOM: Custom functionKILL: Kill simulationRESTART: Restart simulation
Geometry Enums¶
ObstShape¶
Geometric shape types for obstructions.
from pyfds.core.enums import ObstShape
obst = Obstruction(
shape=ObstShape.SPHERE,
xb=(5, 5, 5, 5, 1, 1),
radius=0.5
)
Values:
SPHERE: Spherical shapeCYLINDER: Cylindrical shapeCONE: Conical shapeBOX: Box shape (default)
TextureMapping¶
Texture mapping types for GEOM.
from pyfds.core.enums import TextureMapping
geom = Geometry(
id="SURFACE",
texture_mapping=TextureMapping.SPHERICAL
)
Values:
RECTANGULAR: Rectangular mappingSPHERICAL: Spherical mapping
CoordinateSystem¶
Coordinate system types.
Values:
RECTANGULAR: Cartesian coordinatesSPHERICAL: Spherical coordinatesCYLINDRICAL: Cylindrical coordinates
Combustion Enums¶
ExtinctionModel¶
Combustion extinction models.
from pyfds import Combustion
from pyfds.core.enums import ExtinctionModel
comb = Combustion(
extinction_model=ExtinctionModel.EXTINCTION_2
)
Values:
EXTINCTION_1: Extinction model 1EXTINCTION_2: Extinction model 2
Device Enums¶
StatisticsType¶
Device statistics types.
from pyfds import Device
from pyfds.core.enums import StatisticsType
device = Device(
id="MAX_TEMP",
quantity="TEMPERATURE",
statistics=StatisticsType.MAX,
xyz=(5, 5, 2)
)
Values:
MIN: Minimum valueMAX: Maximum valueMEAN: Mean valueRMS: Root mean squareVARIANCE: VarianceRANGE: Range (max - min)TIME_MIN: Time of minimumTIME_MAX: Time of maximumCOV: CovarianceCORRCOEF: Correlation coefficient
Ramp Enums¶
RampInterpolation¶
RAMP interpolation types.
from pyfds import Ramp
from pyfds.core.enums import RampInterpolation
ramp = Ramp(
id="FIRE_GROWTH",
t=[0, 60, 120],
f=[0, 0.5, 1.0],
interpolation=RampInterpolation.LINEAR
)
Values:
LINEAR: Linear interpolation (default)STEP: Step function (constant between points)
Particle Enums¶
DragLaw¶
Drag law for particles.
from pyfds import Particle
from pyfds.core.enums import DragLaw
part = Particle(
id="DROPLET",
drag_law=DragLaw.SPHERE
)
Values:
SPHERE: Spherical dragCYLINDER: Cylindrical dragSCREEN: Screen drag
Mesh Enums¶
MeshBoundary¶
Mesh boundary locations.
from pyfds.core.enums import MeshBoundary
# Used for mesh boundary conditions
boundary = MeshBoundary.XMIN # Western boundary
Values:
XMIN: Western boundary (negative x)XMAX: Eastern boundary (positive x)YMIN: Southern boundary (negative y)YMAX: Northern boundary (positive y)ZMIN: Bottom boundary (negative z)ZMAX: Top boundary (positive z)
Built-in FDS Objects¶
BuiltinSurface¶
Built-in FDS surfaces that don't require explicit definition.
from pyfds import Obstruction
from pyfds.core.enums import BuiltinSurface
from pyfds.core.geometry import Bounds3D
# Can reference without creating SURF namelist
obst = Obstruction(
xb=Bounds3D.of(0, 1, 0, 1, 0, 1),
surf_id=BuiltinSurface.INERT
)
# Check if surface is built-in
if surface_id in BuiltinSurface.values():
print("No need to define this surface")
Values:
INERT: Inert surface (default wall)OPEN: Open boundaryMIRROR: Mirror boundaryPERIODIC: Periodic boundaryHVAC: HVAC surfaceMASSLESS_TRACER: Massless tracer particlesDROPLET: Water dropletsVEGETATION: Vegetation surfaceEVACUATION: Evacuation surface
BuiltinSpecies¶
Built-in FDS species that don't require explicit definition.
from pyfds import Reaction
from pyfds.core.enums import BuiltinSpecies
# Can reference without creating SPEC namelist
reaction = Reaction(
fuel="PROPANE",
spec_id_n2=BuiltinSpecies.NITROGEN
)
# Check if species is built-in
if species_id in BuiltinSpecies.values():
print("No need to define this species")
Values:
AIR: Air (mixture)PRODUCTS: Combustion productsSOOT: Soot particlesWATER_VAPOR: Water vaporCARBON_DIOXIDE: CO₂CARBON_MONOXIDE: CONITROGEN: N₂OXYGEN: O₂
Type Safety¶
Enums provide type safety and IDE autocomplete:
from pyfds import Control
from pyfds.core.enums import ControlFunction
# Type-safe: IDE suggests valid values
ctrl = Control(
id="ALARM",
function_type=ControlFunction.ANY, # IDE autocompletes: ANY, ALL, ONLY, ...
input_id=["DET_1", "DET_2"]
)
# String values also work (backward compatible)
ctrl = Control(
id="ALARM",
function_type="ANY",
input_id=["DET_1", "DET_2"]
)
See Also¶
- Namelists - Namelist classes using these enums
- Validation - Using Severity enum
- User Guide - Practical usage examples