Skip to content

Commit edd6872

Browse files
authored
Merge pull request #47 from FireDynamics/release-v0.13.0
Release v0.13.0
2 parents 377acb0 + 49dedfe commit edd6872

14 files changed

Lines changed: 12926 additions & 12 deletions

book/_toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ parts:
3434
- file: content/modelling/04_thermodynamics/00_overview
3535
sections:
3636
- file: content/modelling/04_thermodynamics/01_fundamentals
37-
- file: content/modelling/04_thermodynamics/02_example_compartment
37+
- file: content/modelling/04_thermodynamics/02_example_energy_mass_transfer
3838

3939
####################
4040
# TOOLS

book/content/modelling/03_compartments/04_steckler_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9359,7 +9359,7 @@
93599359
"name": "python",
93609360
"nbconvert_exporter": "python",
93619361
"pygments_lexer": "ipython3",
9362-
"version": "3.8.9"
9362+
"version": "3.6.9"
93639363
}
93649364
},
93659365
"nbformat": 4,

book/content/modelling/04_thermodynamics/01_fundamentals.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"At finite temperatre, the particles in a gas have not a single velocity, but a distributed over a broad range. This is an important aspect, as many chemical reactions require the involved particles to overcome the activation energy. Thus, there is always a probability that a particle has the needed kinetic energy. This velocitiy distribution, the Maxwell distribution, depends only on the temperature and the gas properties:\n",
109109
"\n",
110110
"$$\n",
111-
"\\mf f(v) = 4\\pi v^2 \\left(\\frac{m_M}{2\\pi k_B T}\\right)^{\\frac{3}{2}} \\cdot e^{\\left(\\frac{m_M v^2}{2 k_B T}\\right)}\\quad ,\n",
111+
"\\mf f(v) = 4\\pi v^2 \\left(\\frac{m_M}{2\\pi k_B T}\\right)^{\\frac{3}{2}} \\cdot e^{\\left(-\\frac{m_M v^2}{2 k_B T}\\right)}\\quad ,\n",
112112
"$$\n",
113113
"\n",
114114
"with $\\mf m_M$ the mass of a single particle and the Boltzmann constant $\\mf k_B \\approx 1.38\\cdot 10^{-23}~ J/K$. \n",
@@ -1643,7 +1643,7 @@
16431643
"\\mf pV = n R T\n",
16441644
"$$\n",
16451645
"\n",
1646-
"where $\\mf n$ respresents the number of moles in the system and $\\mf R \\approx 8.314~J/(mol~K)$ is the universal gas constant. A mole is defined by the [Agogado constant](https://en.wikipedia.org/wiki/Avogadro_constant), as $\\sf N_A \\approx 6.02\\cdot 10^{23}$ being the number of particles in a mole."
1646+
"where $\\mf n$ respresents the number of moles in the system and $\\mf R \\approx 8.314~J/(mol~K)$ is the universal gas constant. A mole is defined by the [Agogadro constant](https://en.wikipedia.org/wiki/Avogadro_constant), as $\\sf N_A \\approx 6.02\\cdot 10^{23}~1/mol$ being the number of particles in a mole."
16471647
]
16481648
},
16491649
{
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "d584ac00-886e-47a2-941c-b62596953585",
7+
"metadata": {
8+
"tags": [
9+
"remove_cell"
10+
]
11+
},
12+
"outputs": [],
13+
"source": [
14+
"import numpy as np\n",
15+
"import matplotlib.pyplot as plt\n",
16+
"import fdsreader\n",
17+
"\n",
18+
"# Set the matplotlib output to svg\n",
19+
"from IPython.display import set_matplotlib_formats\n",
20+
"set_matplotlib_formats('svg')\n",
21+
"\n",
22+
"import os\n",
23+
"# check for set environment variable JB_NOSHOW\n",
24+
"show = True\n",
25+
"if 'JB_NOSHOW' in os.environ:\n",
26+
" show = False"
27+
]
28+
},
29+
{
30+
"cell_type": "markdown",
31+
"id": "e371ebc7-ab24-42a9-a7fb-9b0c44036ba6",
32+
"metadata": {},
33+
"source": [
34+
"# Energy and Mass Transfer\n",
35+
"\n",
36+
"This example builds on the \"Steckler compartment\" {cite}`Steckler.1982` and the `energy_budget` discussion in the (FDS Verification Guide, 7.2.1 The Heat from a Fire). It provides a brief overview over energy and mass transfer in terms of a simulation of a room fire experiment. As an example, the room setup with a door was chosen. The door is located at the centre of the front wall. It is 1.80 m high and 0.60 m wide.\n",
37+
"\n",
38+
"You are provided with a pre-built FDS input file ({download}`EnergyMassTransfer.fds`), which needs to be completed and adjusted through the course of this exercise. The geometry of the compartment is based on the Steckler compartment. The fluid cells are cube-shaped with an edge length of 10 cm. Thus, the ceiling height is slightly larger to align with the mesh resolution, i.e. 2.20 m instead of 2.18 m. The top surface of the burner is raised to a height of 0.30 m. It has a squared cross section with an edge length of 0.40 m. In this exercise the burner shall be supplied with propane as fuel (heat of combustion: 46420.0 kJ/kg, soot yield: 20 g/g, CO yield: 10 g/g). "
39+
]
40+
},
41+
{
42+
"cell_type": "markdown",
43+
"id": "72190f44-fc19-4843-85cc-8858908b81c5",
44+
"metadata": {},
45+
"source": [
46+
"## Tasks\n",
47+
"\n",
48+
"The tasks are designed with FDS 6.7.5 in mind. For more information of specific functions please consult the respective Users Guide {cite}`FDS-UG-6.7.5`. \n",
49+
"\n",
50+
"### Step 0 - Set Up the Simulation \n",
51+
"\n",
52+
"- Set up the FDS input such that the gas burner provides an energy release rate of about 63 kW. \n",
53+
"\n",
54+
"- Implement slice files for density, temperature and pressure. All should show the cell-centered values.\n",
55+
"\n",
56+
"- What options do you have to implement the fuel in FDS?\n",
57+
"\n",
58+
"- Compare your desired input with the FDS response, by means of a plot. "
59+
]
60+
},
61+
{
62+
"cell_type": "markdown",
63+
"id": "f5503b68-b7e7-4ad1-b473-3da286f7f2ad",
64+
"metadata": {},
65+
"source": [
66+
":::{figure-md} fig-CheckERR\n",
67+
"\n",
68+
"<img src=\"./figs/CheckERR.svg\" width=\"80%\">\n",
69+
"\n",
70+
"Check the energy release rate of the gas burner.\n",
71+
":::"
72+
]
73+
},
74+
{
75+
"cell_type": "markdown",
76+
"id": "661a01b0-38f7-4737-916e-82231b1a786d",
77+
"metadata": {},
78+
"source": [
79+
":::{figure-md} fig-ExampleSLCF\n",
80+
"\n",
81+
"<img src=\"./figs/ExampleSLCF.png\" width=\"80%\">\n",
82+
"\n",
83+
"Example for slice location.\n",
84+
":::"
85+
]
86+
},
87+
{
88+
"cell_type": "code",
89+
"execution_count": null,
90+
"id": "d77750da-8faa-4bd6-b13d-781bb9608fa5",
91+
"metadata": {},
92+
"outputs": [],
93+
"source": []
94+
},
95+
{
96+
"cell_type": "markdown",
97+
"id": "18d78398-f4a5-4898-9674-1168eb042d6c",
98+
"metadata": {},
99+
"source": [
100+
"### Step 1 - Energy Transfer\n",
101+
"\n",
102+
"- Determine the radiative fraction of the flame (Users Guide, Chapter 16 Radiation).\n",
103+
"\n",
104+
"- Determine energy conservation (Users Guide, Chapter 21.10.1 Heat Release Rate)."
105+
]
106+
},
107+
{
108+
"cell_type": "markdown",
109+
"id": "963d5e1d-0e12-4429-881c-44b8832b2c36",
110+
"metadata": {},
111+
"source": [
112+
":::{figure-md} fig-CheckEnergyConservation\n",
113+
"\n",
114+
"<img src=\"./figs/CheckEnergyConservation.svg\" width=\"80%\">\n",
115+
"\n",
116+
"Check the energy conservation.\n",
117+
":::"
118+
]
119+
},
120+
{
121+
"cell_type": "markdown",
122+
"id": "60b96adf-8f98-4a75-a0c7-495402f9fb2f",
123+
"metadata": {},
124+
"source": [
125+
"### Step 2 - Mass Transfer\n",
126+
"\n",
127+
"- Calculate the mass flux of fuel needed to achieve the desired energy release rate.\n",
128+
"\n",
129+
"- Record the gas temperatures in a vertical line across the centre of the doorway, within the cell centres. Also, record the gas velocities at the same locations. The results should be data-time series. Furthermore, set up devices across the door area to record the mass flow in and out of the compartment. (Chapter 21.2 Device Output: The DEVC Namelist Group, Chapter 21.10.20 Gas Velocity, Chapter 21.10.13 Spatially-Integrated Outputs)\n",
130+
"\n",
131+
"- Plot the response of some of the gas temperature devices to determine when a quasi-steady state is reached. \n",
132+
"\n",
133+
"- Create a plot that shows averaged gas temperature over the height. The data should be averaged over an interval of about 100 s. Create a similar plot for the velocities. \n",
134+
"\n",
135+
"- Based on the above plots, estimate the mass flow out of the comparment.\n",
136+
"\n",
137+
"- Compare your findings with the FDS response. Also have a look at the fuel mass flux.\n",
138+
"\n",
139+
"- On a somewhat meta-level: What do you expect, or maybe even know, is the necessary [heating power for modern homes in Germany](https://www.effizienzhaus-online.de/heizleistung-haus/), broadly speaking?"
140+
]
141+
},
142+
{
143+
"cell_type": "markdown",
144+
"id": "b2020c4b-3f5b-4c5c-8226-1176202725f6",
145+
"metadata": {},
146+
"source": [
147+
":::{figure-md} fig-CheckDoorwayTemperatures\n",
148+
"\n",
149+
"<img src=\"./figs/CheckDoorwayTemperatures.svg\" width=\"80%\">\n",
150+
"\n",
151+
"Temperatures in the doorway for a selected number of sensors to determine when a quasi-steady state is reached.\n",
152+
":::"
153+
]
154+
},
155+
{
156+
"cell_type": "markdown",
157+
"id": "d71a8f10-c62c-49f4-95cc-fd5196fd412b",
158+
"metadata": {},
159+
"source": [
160+
":::{figure-md} fig-DoorwayTemperatureAvrg\n",
161+
"\n",
162+
"<img src=\"./figs/DoorwayTemperatureAvrg.svg\" width=\"80%\">\n",
163+
"\n",
164+
"Temperatures in the centre of the doorway over the hight, averaged from 400 s to 500 s.\n",
165+
":::"
166+
]
167+
},
168+
{
169+
"cell_type": "markdown",
170+
"id": "f7e9952b-3c35-47a2-ae20-5bbd27f59aad",
171+
"metadata": {},
172+
"source": [
173+
":::{figure-md} fig-DoorwayVelocityAvrg\n",
174+
"\n",
175+
"<img src=\"./figs/DoorwayVelocityAvrg.svg\" width=\"80%\">\n",
176+
"\n",
177+
"Velocities in the centre of the doorway over the hight, averaged from 400 s to 500 s.\n",
178+
":::"
179+
]
180+
},
181+
{
182+
"cell_type": "markdown",
183+
"id": "153c0c2f-c1ab-4f75-9f27-ae4aee300943",
184+
"metadata": {},
185+
"source": [
186+
":::{figure-md} fig-CheckMassFlowCompartment\n",
187+
"\n",
188+
"<img src=\"./figs/CheckMassFlowCompartment.svg\" width=\"80%\">\n",
189+
"\n",
190+
"Mass flow through the doorway in and out of the compartment.\n",
191+
":::"
192+
]
193+
},
194+
{
195+
"cell_type": "markdown",
196+
"id": "16dd6956-1a59-4b53-8d5e-aaf6608d9117",
197+
"metadata": {},
198+
"source": [
199+
"### Step 3 - Pressure Build Up \n",
200+
"\n",
201+
"- Close the door in the simulation and record the pressure change in the compartment (DEVC). Assuming the door would open towards the inside of the compartment. How large would be the force a fire fighter needs to exert to open it after 25 s of simulation time?\n",
202+
"\n",
203+
"\n"
204+
]
205+
},
206+
{
207+
"cell_type": "code",
208+
"execution_count": null,
209+
"id": "1e64883a-cded-483d-a0ee-8acf2d922551",
210+
"metadata": {},
211+
"outputs": [],
212+
"source": []
213+
}
214+
],
215+
"metadata": {
216+
"kernelspec": {
217+
"display_name": "Python 3",
218+
"language": "python",
219+
"name": "python3"
220+
},
221+
"language_info": {
222+
"codemirror_mode": {
223+
"name": "ipython",
224+
"version": 3
225+
},
226+
"file_extension": ".py",
227+
"mimetype": "text/x-python",
228+
"name": "python",
229+
"nbconvert_exporter": "python",
230+
"pygments_lexer": "ipython3",
231+
"version": "3.8.9"
232+
}
233+
},
234+
"nbformat": 4,
235+
"nbformat_minor": 5
236+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
&HEAD CHID='EnergyMassTransfer',
2+
TITLE='Example for energy and mass transfer.' /
3+
4+
5+
&TIME T_END=600. /
6+
&DUMP NFRAMES=600 /
7+
8+
9+
10+
***** Domain ********************
11+
12+
&VENT MB='XMIN', SURF_ID='OPEN' /
13+
&VENT MB='XMAX', SURF_ID='OPEN' /
14+
&VENT MB='YMIN', SURF_ID='OPEN' /
15+
&VENT MB='YMAX', SURF_ID='OPEN' /
16+
&VENT MB='ZMAX', SURF_ID='OPEN' /
17+
18+
&VENT MB='ZMIN', SURF_ID='INERT' /
19+
20+
! --- Geometric namelists from Blender Collection <Domain>
21+
! MESH Cell Size: 0.10 m, 0.10 m, 0.10 m
22+
&MESH ID='Domain' IJK=28,38,22
23+
XB=-1.400,1.400,-2.400,1.400,0.000,2.200 /
24+
25+
26+
27+
***** REAC Parameter and Burner ******************
28+
29+
&REAC ID='CombustionReaction',
30+
31+
32+
&SURF ID='FireSURF',
33+
34+
COLOR='RASPBERRY',
35+
36+
37+
! --- Geometric namelists from Blender Collection <Burner>
38+
&OBST ID='Burner'
39+
XB=-0.200010,0.200010,-0.200010,0.200010,-0.000010,0.300010 /
40+
&VENT ID='BurnerVENT' SURF_ID='FireSURF'
41+
XB=-0.200000,0.200000,-0.200000,0.200000,0.300000,0.300000 /
42+
43+
44+
45+
***** Materials and Surfaces ********************
46+
47+
&SURF ID = 'Adiabatic Wall',
48+
ADIABATIC = .TRUE.,
49+
DEFAULT = .TRUE./
50+
51+
52+
&SURF ID = 'FIBER BOARD',
53+
MATL_ID = 'INSULATION',
54+
COLOR='ANTIQUE WHITE',
55+
THICKNESS = 0.013 /
56+
57+
&MATL ID = 'INSULATION'
58+
DENSITY = 200.
59+
CONDUCTIVITY = 0.1
60+
SPECIFIC_HEAT = 1. /
61+
62+
63+
64+
***** Geometry ********************
65+
66+
! --- Geometric namelists from Blender Collection <Walls>
67+
&OBST ID='Ceiling',
68+
SURF_ID='FIBER BOARD'
69+
XB=-1.500010,1.500010,-1.500010,1.500010,2.199990,2.300010 /
70+
&OBST ID='WallBack',
71+
SURF_ID='FIBER BOARD'
72+
XB=-1.400010,1.400010,1.399990,1.500010,-0.000010,2.200010 /
73+
&OBST ID='WallDoorLeft',
74+
SURF_ID='FIBER BOARD'
75+
XB=-1.400010,-0.299990,-1.500010,-1.399990,-0.000010,1.800010 /
76+
&OBST ID='WallDoorRight',
77+
SURF_ID='FIBER BOARD'
78+
XB=0.299990,1.400010,-1.500010,-1.399990,-0.000010,1.800010 /
79+
&OBST ID='WallDoorTop',
80+
SURF_ID='FIBER BOARD'
81+
XB=-1.400010,1.400010,-1.500010,-1.399990,1.799990,2.200010 /
82+
&OBST ID='WallLeft',
83+
SURF_ID='FIBER BOARD'
84+
XB=-1.500010,-1.399990,-1.500010,1.500010,-0.000010,2.200010 /
85+
&OBST ID='WallRight',
86+
SURF_ID='FIBER BOARD'
87+
XB=1.399990,1.500010,-1.500010,1.500010,-0.000010,2.200010 /
88+
89+
90+
91+
***** Analysis *******************
92+
93+
94+
95+
&TAIL /

0 commit comments

Comments
 (0)