Git Product home page Git Product logo

firedynamics / lecturefiresimulation Goto Github PK

View Code? Open in Web Editor NEW
18.0 6.0 8.0 71.28 MB

Lecture and exercise notes on fire simulations

Home Page: https://firedynamics.github.io/LectureFireSimulation

License: Creative Commons Attribution Share Alike 4.0 International

Shell 5.43% Jupyter Notebook 94.24% TeX 0.23% Python 0.09% CSS 0.02%
fire-modeling fire fire-simulations numerics simulation lecture-notes hpc fds python lecture

lecturefiresimulation's Introduction

CC BY-SA 4.0

Lecture Fire Simulation

Lecture and exercise notes on fire simulations

Webpage of the build script

https://firedynamics.github.io/LectureFireSimulation

Local Development

Note: The following explicit commands are for bash / zsh on Linux / MacOS.

1. Clone repository

git clone https://github.com/FireDynamics/LectureFireSimulation.git

2. Inside the repository, setup a virtual environment for Python

python -m venv .venv

3. Activate the virtual environment

source .venv/bin/activate

Requirements for different systems, see link:

Platform Shell Command to activate virtual environment
POSIX bash/zsh $ source /bin/activate
fish $ source /bin/activate.fish
csh/tcsh $ source /bin/activate.csh
PowerShell Core $ /bin/Activate.ps1
Windows cmd.exe C:> \Scripts\activate.bat
PowerShell PS C:> \Scripts\Activate.ps1

Note: In Windows PowerShell there is a restriction to run scripts. If the Execution Policy is not changed it will raise a message like "cannot be loaded because the execution of scripts is disabled on this system". One can allow the execution of scripts for the active PowerShell session by Set-ExecutionPolicy Unrestricted -Scope Process, see link.

4. Install the required Python packages, needed only once

pip install -r requirements.txt

5. Launch JupyterLab

jupyter-lab

6. Do some editing. The contents of the book are stored in the content folder.

7. Build a local version of the book

cd book
jupyter-book build .

Note: Some notebooks are capable to turn the output of matplotlib figures on and off based on the environment variable JB_NOSHOW. It should be set (to any value) to prevent the rendering of dublicate figures, e.g.:

cd book
JB_NOSHOW=1 jupyter-book build .

8. If the build is sucessful, the location of the build book is stated. You can open it with a browser.

Data Repository

The simulation input files as well as the resulting simulation data is stored in the data folder.

Execution of Simulations

In all data subfolders, FDS input files as well as a run script case_run.sh is located. You may have to adjust the execution command of FDS at the top of the script.

Download Precomputed Data

The case_download.sh script inside the individual data subfolders can be used to download precomputed data.

Contribution

For external

Please for the development branch and create a pull request based on that.

For internal

New section / content: Create a feature branch of development. Once finished, merge it back and create a release branch with your changes that have to be pushed to main. Assign Lukas as reviewer for the pull request.

Typos / Fixes: Push them directly to the development branch and then directly to main.

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

CC BY-SA 4.0

lecturefiresimulation's People

Contributors

hleemhuis avatar karendelannoye avatar keyvannajarian avatar kriboe90 avatar lu-kas avatar mr-tao avatar tassiaquaresma avatar tristanhehnen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lecturefiresimulation's Issues

fdsreader Module, DEVC data and meta information

In the section fdsreader Module, I get the following error message with fdsreader 1.2.1

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-43-88618739c2ea> in <module>
      1 for i in devc:
----> 2     print(f"ID: {devc[i].id},\t quantity: {devc[i].quantity.quantity},\t position: {devc[i].position}")

AttributeError: 'Quantity' object has no attribute 'quantity'

for

for i in devc:
    print(f"ID: {devc[i].id},\t quantity: {devc[i].quantity.quantity},\t position: {devc[i].position}")

Shouldn't it be?

for i in devc:
    print(f"ID: {devc[i].id},\t quantity: {devc[i].quantity.name},\t position: {devc[i].position}")

Example Projects with Solution

Provide some example projects with solution. I would suggest to use the MacCaffray plume article and a Steckler compartment.

The plume is focussed on the data assessment and to reproduce the procedure to obtain the plume model.

The Steckler compartment is used to explain the concepts of the hot/cold gas layer and the neutral plane. The simulation could be used as quasi-experiment to derive the model.

These example projects should be provided with hidden solution, such that the reader needs to click a button to unhide the information. Thus, the projects can be used for self study. Furthermore, with these projects information can be discussed in more detail as it would be possible in the lecture tasks, but would also make the expectation during the exam more transparent to the students.

Put mor emphasis on the fluid grid and snapping of VENT/OBST

We should be more careful in explaining how the mesh influences the size and location of objects in the simulation. Like how things VENT or OBST snap to the mesh and that this may lead to different actual sizes compared to what was written in the input file.

Also wall thincknesses in terms of SURF and OBST, and what it means when multiple OBST touch each other. Like when someone would try to replicate some sort of sandwich material or wall lining.

The python code examples in section 3.1 don't work.

When executing python code, an error message is displayed in section 3.1.:

TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_3356/82368212.py in
16 to_del.append(s.mesh)
17 for m in to_del:
---> 18 del slice._subslices[m]
19
20 extent = (slice.extent[0][0], slice.extent[0][1],

TypeError: unhashable type: 'Mesh'

Version: fdsreader1.9.1 , FDS 6.7.5

I ask you to update the python code in section 3.1.

I'm new to the fdsreader library

Example to Discuss Flame Length

We could use a somewhat high resolution sim to generate an image series of the hrrpuv animation from smokeview. Use these frames to write a script that determines the flame height with the different regions: flame, intermittent and plume. Could be connected to the McCaffrey plume tasks. Maybe with time averaging the pixels and edge detection?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.