Skip to content

Monte Carlo Simulation Method 0 (MCS0)

fuyans edited this page Mar 21, 2022 · 1 revision

Introduction

To produce an example input file:

>>> import sfeprapy.mcs0
>>> with open('example_input.csv', 'w') as f:
>>> 	f.write(sfeprapy.mcs0.EXAMPLE_INPUT_CSV)

demo_save_example_input_file

To produce an example configuration file:

>>> import json
>>> import sfeprapy.mcs0
>>> with open('config.json', 'w') as f:
>>> 	json.dump(sfeprapy.mcs0.EXAMPLE_CONFIG_DICT, f)

demo_save_example_input_file

To run sfeprapy.mcs0 simulation:

python -m sfeprapy.mcs0

demo_running_sfeprapy.mcs0

A window will be popped up asking for input a input / problem definition file if the problem definition file path is not defined in the command line prompt. The input file should be in '.csv' or '.xlsx' format. Structure of the input file is addressed in the following paragraphs.

When a configuration file with the name 'config.json' is provided in the same directory, the program will attempt to read it and use parameters contained therein. Number of threads (multi-processing) along with few other parameters can be defined in this file.

Once the input file is selected, the program will take the lead and run calculations until all simulations are complete. Results will be saved in the same folder. Conveniently, the software has the feature of displaying the progress and some statistics as per below.

CASE                    : Standard Case 1
NO. OF THREADS          : 4
NO. OF SIMULATIONS      : 1000
100%|███████████████████| 1000/1000 [00:09<00:00, 86.15it/s]
fire_type               : {0: 23, 1: 977}
beam_position_horizontal: -1.000    27.534    28.646
fire_combustion_efficien: 0.800     0.900     1.000
fire_hrr_density        : 0.240     0.250     0.260
fire_load_density       : 10.000    420.399   1500.000
fire_nft_limit          : 623.150   1323.150  2023.152
fire_spread_speed       : 0.004     0.011     0.019

CASE                    : Standard Case 2
NO. OF THREADS          : 4
NO. OF SIMULATIONS      : 1000
100%|███████████████████| 1000/1000 [00:10<00:00, 77.85it/s]
fire_type               : {0: 10, 1: 990}
beam_position_horizontal: -1.000    27.943    28.646
fire_combustion_efficien: 0.800     0.900     1.000
fire_hrr_density        : 0.240     0.250     0.260
fire_load_density       : 10.000    420.399   1500.000
fire_nft_limit          : 623.150   1323.150  2023.152
fire_spread_speed       : 0.004     0.011     0.019

Problem Definition

Non-Optional Miscellaneous Parameters

case_name: str

A name for the case/compartment. Should be unique among all cases. This may be used in post-processing when combining time equivalence results. Case naming guidelines are:

  • A case name can be up to 255 characters long and can contain spaces, letters, numbers, and underscores;
  • File names should be as descriptive and meaningful as possible;
  • Avoid using these characters when you are naming cases: / \ " ' * ; - ? [ ] ( ) ~ ! $ { } &lt > # @ & |

fire_mode: int

Should be an integer from 0 to 4, inclusive. To define what design fires to use:
0 - EC parametric fire only (BS EN 1991-1-2 Parametric Fire);
1 - Travelling fire only;
2 - EC parametric fire, German Annex (BS DIN 1991-1-2 Parametric Fire);
3 - Option 0 and 1 as above; or
4 - Option 2 and 1 as above.

n_simulations: int

Should be an integer greater or equal to1. The number of simulations that will be running. A sensitivity analysis should be carried out to determine the appropriate number of simulations.

probability_weight: float

Should be a real number between 0 and 1, inclusive. The fire occurrence probability weight of this specific case (i.e. compartment) among all cases (i.e. entire building). This parameter is not used in any calculation. sfeprapy.mcs0 reference this parameter in its output for each single iteration and can be used during post-processing to combine time equivalence curves based on their probability weight to the entire building.

Compartment Parameters

room_breadth: float

[m]
Breadth of room (the shorter dimension).

room_depth: float

[m]
Depth of room (the greater dimension).

room_height: float

[m]
Height of room (floor slab to ceiling slab).

room_wall_thermal_inertia: float

[J/m²K√s]
Compartment lining thermal inertia. Thermal inertia is the tendency of a material to resist changes in temperature, i.e. to differentiate between thermal conductivity and heat capacity.

window_width: float

[m]
Total width of all opening areas for a compartment.

window_height: float

[m]
Weighted height of all opening areas.

beam_position_vertical : float

[m]
Height of test structure element within the compartment for TFM. This can be altered to assess the influence of height in tall compartments. Need to assess worst case height for columns.

beam_position_horizontal: float

[m]
Minimum beam location relative to compartment length for TFM - Linear distribution.

Windows/Natural Vent

window_open_fraction: float

Dimensionless.
Glazing fall-out fraction.

window_open_fraction_permanent: float

Dimensionless.
Use this to force a ratio of open windows. If there is a vent to the outside this can be included here.

Design Fire Parameters

fire_tlim: float

[hour]
Time for maximum gas temperature in case of fuel-controlled fire, value options can be found in Annex A EN 1991-1-2 and the slow, medium and fast can be decided using BS 9999/BS 9991. Slow: 25/60 Medium: 20/60 Fast: 15/60

fire_time_step: float

[s]
Time step used for the model, all fire time-temperature curves and heat transfer calculation. This is recommended to be less than 30 s.

fire_time_duration: float

[s]
End of simulation. This should be set so that output data is produced allowing the target reliability to be determined. Normally set it to 4 hours and longer period of time for greater room length in order for travelling fire to propagate the entire room.

fire_load_density: float

[MJ/m²]
Fire load density. This should be selected based on occupancy characteristics. See literature for typical values for different occupancies (e.g. PD 6688-1 / BS EN 1991-1-2).

fire_hrr_density: float

[MW/m²]
Heat release rate. This should be selected based on the fuel. See literature for typical values for different occupancies (e.g. PD 6688-1 / BS EN 1991-1-2).

fire_spread_speed: float

[m/s]
Min spread rate for travelling fire.

fire_nft_limit: float

[K]
TFM near field temperature.

fire_combustion_efficiency: float

Dimensionless.
Combustion efficiency (0.8 as per BS EN 1991-1-2 or 1.0 as per PD 6688-1).

fire_gamma_fi_q: float

Dimensionless.
The partial factor for EC fire (German Annex).

fire_t_alpha: float

[s]
The fire growth factor.

Structural Element Section Properties

beam_cross_section_area: float,

[m²]
Cross sectional area of the section.

beam_rho: float

[kg/m³]
Density of the structural member.

beam_temperature_goal: float

[K]
Structural element (steel) failure temperature in Kelvin for goal seek.

protection_protected_perimeter: float

[m]
Heated perimeter.

beam_protection_thickness: float

[m]
Thickness of protection.

protection_k: float

[W/m/K]
Protection conductivity.

protection_rho: float

[kg/m³]
Density of protection to beam.

protection_c: float

[J/kg/K]
Specific heat of protection

Solver Settings (for Time Equivalence)

solver_temperature_goal: float

[K]
The temperature to be solved for. This is critical temperature of the beam structural element, i.e. 550 or 620 °C.

solver_max_iter: float

Dimensionless.
The maximum iteration for the solver to find convergence. Suggest 20 as most (if not all) cases converge in less than 20 iterations.

solver_thickness_lbound: float

[m]
The smallest value that the protection thickness can be. This is used to solve the maximum steel temperature at solver_temperature_goal.

solver_thickness_ubound: float

[m]
The greatest value that the protection thickness can be. This is used to solve the maximum steel temperature at solver_temperature_goal.

solver_tol: float

[K]
Tolerance of the temperature (in Kelvin) to be solved for. Set to 1 means convergence will be satisfied when the solved value is greater than solver_temperature_goal-1 and less than solver_temperature_goal+1.

phi_teq: float

Dimensionless.
Model uncertainty factor multiplied with the evaluated characteristic time equivalence value to get the design time equivalence value.

Timber Properties

timber_exposed_area: float

[m²]
Exposed timber surface within the compartment, includes CLT slab, glulam columns and glulam beams. Set timber_exposed_area to '0' to omitt timber involvement.

timber_charring_rate: float

[mm/min]
Timber constant charring rate. This is currently independent of temperature or heat flux.

timber_hc: float

[MJ/kg]
Heat of combustion of timber.

timber_density: float

[kg/m³]
Density of timber.

timber_solver_ilim: float

Dimensionless.
The maximum number of iterations that the solver can run. timber_solver_iter in the output file should be inspected to determine appropriate value for timber_solver_ilim. Consider to increase timber_solver_ilim (or increase timber_solver_tol) if many solved values have timber_solver_iter == timber_solver_ilim.

timber_solver_tol: float

[s]
Tolerance of the solver. Convergence is sought if change in time equivalence is less than timber_solver_tol.