## The What

This program is a university project I had worked on where I had created a two zone fire model that would explore the behaviour of fire in a closed environment.

The model calculates the behaviour of fire by separating a room to a hot and cool layer. The general behaviour of a compartmental fire is such that the heat rises to the top, forming the hot layer and the cooler air sinks to the bottom forming the cool layer. The program is capable of calculating the depth, height, mass, enthalpy and temperature of a hot layer. It also models carbon monoxide being produced by the fire. Using this information, it is able to estimate how long a person can survive in a fire.

## The Why

Computational fluid dynamic (CFD) models are used to research the behaviour of fire. They are ideal for their accuracy and flexibility in including a number of conditions. However, CFD models are complex and require large amounts of computational power to run. Often they take a long time to produce results, and so when a estimate or a faster output is required, CFDs are not ideal.

The model I have created is a two zone model produced on Microsoft Excel using VBA. It does not require large amounts of computational power. Where a two zone fire model made be considered to be limited in that it does not use complex shapes, it is able to provide a quick output to a reasonable degree of accuracy.

## The How

As my model would calculate the time until a person dies in a confined environment with a live fire, I researched human survivability in certain conditions. Using my research I was able to set an upper bound for how much heat a person can withstand and how much carbon monoxide a person can inhale before dying.

Following which I had researched the mechanics and behaviours fire. I investigated how a fire behaves learning how heat and energy transfer occurs. This allowed me to build some base equations to allow me to calculate mass, enthalpy, depth and temperature of the hot layer.

Using Euler's explicit function, I was able to create an iterative function where I could calculate how the mass and enthalpy in the hot layer would change over time.

Finally, coupling all the formulae, along with the research on human survivability, I built a program which allows a user to set certain parameters using which the program would be able to calculate the changes of state in the room over a set duration.

The program would display the results in a table as well as an interactive graph where the user can compare different values such as enthalpy over time and depth of the hot layer over time.