WFDS¶
-
class
wfds.WFDS(x, y, z, xA, xO, res, n, fuels)[source]¶ Bases:
wfds.MeshThis class configures a WFDS simulation. It gathers and calculates WFDS paramters and writes them to a WFDS input file.
WFDS()is a subclass of theMesh()class and meshes are dealt with implicitly.Parameters: - x (integer) – scene size in the x dimension
- y (integer) – scene size in the y dimension
- z (integer) – scene size in the z dimension
- xA (integer) – x dimension of the Area Of Interest
- xO (integer) – x offset
- res (double) – simulation resolution
- n (integer) – number of WFDS meshes
- fuels (object) – fuels object (fuels.py, class: FVSfuels)
The following example assumes that a fuels object has been created using the fuels module.
Example: >>> fds = wfds.WFDS(160, 90, 50, 64, 83, 1, 1, fuels) >>> fds.create_mesh(stretch={"CC":[3, 33], "PC":[1, 31]}) >>> fds.create_ignition(30, 50, 24, 29, 13, 77) >>> fds.set_hrrpua(1000) >>> fds.set_wind_speed(9) >>> fds.set_init_temp(30) >>> fds.set_simulation_time(300) >>> fds.set_run_name("standard_run") >>> fds.save_input("C:/temp/standard_run.txt")
-
create_ignition(start_time, end_time, x_strt, x_end, y_strt, y_end)[source]¶ Places an ignition strip at the specified location and generates fire at the specified Heat Release Rate Per Unit Area (HRRPUA) for the specified duration.
Parameters: - start_time (integer) – start time of the igniter fire
- end_time (integer) – finish time of the igniter fire
- x_strt (float) – starting x position of the ignition strip
- x_end (float) – ending x position of the ignition strip
- y_strt (float) – starting y position of the ignition strip
- y_end (float) – ending y position of the ignition strip
Note
Ignition ramping is dealt with explicitly to avoid “explosions”
-
create_mesh(stretch=False)[source]¶ Collates and adds mesh parameters to the params dictionary. Conditionally calls the
stretch_mesh()method of the Mesh class depending on the state of the stretch argument. Calls theformat_mesh()method of the Mesh class.Parameters: stretch (False or dictionary of stretch parameters) – to stretch or not to stretch - Example dictionary of stretch parameters:
- {“CC”:[3, 33], “PC”:[1, 31]}
Note
See
Mesh.stretch_mesh()for setting the stretch arguments
-
save_input(file_name)[source]¶ Creates and saves the WFDS input file using a template file. Include the desired directory in the string.
Parameters: file_name (string) – path to and name of WFDS input file (.txt NOT .fds)
-
set_hrrpua(hrr)[source]¶ Set the heat release rate per unit area for the ignition strip
Parameters: hrr (integer) – heat release rate per unit area (kW/m^2)
-
set_init_temp(temp)[source]¶ Set the initial temperature of the simulation
Parameters: temp (float) – temperature (celcius)