Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Dockerfile
# Python virtual environments and cache
.venv/
venv/
docs
__pycache__/
*.pyc
*.pyo
Expand Down
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@ docs/doxygen/html
CMakeLists.txt
build.sh

#other
#tools
tools/postprocessing/loadInParaview.py
tests/config_firecast_local.bash
tools/config_firecast_local.bash
tools/ai
changeLicense.py
httpConnectInfo.txt

#tests
tests/python/FF_FS4roslog.csv
.gitignore
tests/python/ros_computation.py
tests/python/ros_sampling.py
tests/python/test_logdb.csv
tests/runff/altitude.png
tests/runff/httpConnectInfo.txt
tests/python/log.txt
tests/python/runROS.bash
changeLicense.py
httpConnectInfo.txt
tools/ai
simulation_result.geojson
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Welcome to the official documentation for ForeFire — the open-source wildfire
**Key Links:**

- `GitHub Repository <https://github.com/forefireAPI/forefire>`_
- `Online Demo Simulator <http://forefire.univ-corse.fr/sim/dev/>`_
- `Online Demo Simulator <http://forefire.univ-corse.fr/sim>`_

.. toctree::
:maxdepth: 1
Expand Down
4 changes: 2 additions & 2 deletions docs/source/reference/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Creates the smallest possible triangular fire front (an ignition point) at the s
**Arguments:**

* ``loc=(x,y,z)``: Starting location using Cartesian coordinates (x,y,z) in meters.
* ``lonlat=(lon,lat)``: Starting location using WGS84 coordinates (longitude, latitude). *Use either ``loc`` or ``lonlat``.*
* ``lonlat=(lon,lat)``: Starting location using WGS84 coordinates (longitude, latitude). *Use either loc or lonlat.*
* ``t=seconds|date=YYYY-MM-DDTHH:MM:SSZ``: Time when the fire is started, either in seconds since simulation start or as an absolute ISO 8601 GMT date/time.

**Example:**
Expand Down Expand Up @@ -344,7 +344,7 @@ Triggers a change in simulation data at a specific time and location. Can be use

Prints a representation of the current simulation state (primarily the fire front location) to the console or to a specified file. The output format is determined by the `dumpMode` parameter (set via `setParameter`).

**Output Formats (`dumpMode`):**
**Output Formats (dumpMode):**

* `ff`: Native format, potentially re-parsable by ForeFire.
* `json`: Compact Cartesian JSON format.
Expand Down
6 changes: 3 additions & 3 deletions docs/source/user_guide/basic_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Basic Configuration

ForeFire simulations typically require three main input files to run:

1. **Fuels File (`.csv`)**: Defines the classes of fuels and their associated parameters used by the fire spread model (e.g., Rothermel).
2. **Landscape File (`.nc`)**: A NetCDF file containing geospatial data layers for the simulation domain, typically including:
1. **Fuels File (.csv)**: Defines the classes of fuels and their associated parameters used by the fire spread model (e.g., Rothermel).
2. **Landscape File (.nc)**: A NetCDF file containing geospatial data layers for the simulation domain, typically including:

- Elevation (Digital Elevation Model - DEM)
- Fuel types map (matching the indices in the Fuels File)
- (Optionally) Pre-defined wind fields or other environmental data.
3. **ForeFire Script File (`.ff`)**: A text file containing commands and parameters that control the simulation execution. This includes:
3. **ForeFire Script File (.ff)**: A text file containing commands and parameters that control the simulation execution. This includes:

- Setting simulation parameters (e.g., propagation model, output format).
- Loading the landscape and fuels data.
Expand Down
16 changes: 8 additions & 8 deletions docs/source/user_guide/core_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Key Simulation Components

The simulation engine relies on several key C++ components (classes) to manage the fire spread process:

* **`Simulator` & `TimeTable` (Event-Driven Core)**
* **Simulator & TimeTable (Event-Driven Core)**

* ForeFire uses an **event-driven** approach. Instead of fixed time steps for the entire simulation, it maintains a `TimeTable` (a prioritized queue) of future events.
* Each event typically corresponds to a `FireNode` needing an update at a specific future time.
* The `Simulator` processes events from the `TimeTable` in chronological order. It retrieves the next event, tells the associated object (like a `FireNode`) to update its state and calculate its next move, and then the object schedules its *next* update event back into the `TimeTable`.
* **This event-driven approach means the simulation doesn't use fixed global time steps; different parts of the front can advance according to their own calculated timings.**

* **`FireDomain` (The Simulation World)**
* **FireDomain (The Simulation World)**

* Represents the overall simulation area and context.
* Manages the simulation's current time.
Expand All @@ -37,7 +37,7 @@ The simulation engine relies on several key C++ components (classes) to manage t
* Manages the `TimeTable` of simulation events.
* May handle discretization of the domain into cells (e.g., for flux calculations or burning map outputs).

* **`FireFront` & `FireNode` (Representing the Fire)**
* **FireFront & FireNode (Representing the Fire)**

* ForeFire uses a **Lagrangian** approach to track the fire's edge.
* A `FireFront` represents a continuous segment of the fire perimeter. It is essentially a linked list of `FireNode` objects.
Expand All @@ -55,7 +55,7 @@ The simulation engine relies on several key C++ components (classes) to manage t
* **Splitting:** Not explicitly mentioned in summary, but might occur if front self-intersects or hits complex boundaries.
* **Inner Fronts:** `FireFront` s can be nested to represent unburned islands within the main fire perimeter.

* **`DataBroker` & `DataLayer` (Accessing Environmental Data)**
* **DataBroker & DataLayer (Accessing Environmental Data)**

* The `DataBroker` is the central hub for all environmental data needed by the simulation (terrain, fuel, weather).
* It manages a collection of `DataLayer` objects. Each `DataLayer` provides access to a specific type of data (e.g., elevation, fuel index, wind speed).
Expand All @@ -69,13 +69,13 @@ The simulation engine relies on several key C++ components (classes) to manage t
* Interpolating data in space and potentially time (e.g., for time-varying wind fields).
* When a `FireNode` needs environmental data to calculate its speed, it asks the `DataBroker`, which efficiently retrieves the necessary values from the relevant `DataLayer` (s) at the node's location.

* **`PropagationModel` & `FluxModel` (The Physics)**
* **PropagationModel & FluxModel (The Physics)**

* ForeFire uses a **Strategy pattern** for physical calculations, allowing different models to be plugged in.
* `PropagationModel` subclasses (e.g., `Rothermel`, `Balbi`, `Iso`) implement specific algorithms to calculate the Rate of Spread (ROS) based on properties fetched via the `DataBroker`. The active model is chosen using the :ref:`propagationModel <param-propagationmodel>` parameter.
* `FluxModel` subclasses (e.g., `HeatFluxBasicModel`) calculate fluxes (like heat, water vapor) from the burning area, often needed for coupled simulations or specific research outputs.

* **`SimulationParameters` (Configuration)**
* **SimulationParameters (Configuration)**

* A central place (likely a Singleton class internally) holding the global configuration values set by the user via :ref:`setParameter <cmd-setparameter>` or :ref:`setParameters <cmd-setparameters>` commands. This includes things like model choices, resolution parameters, output settings, etc.

Expand All @@ -88,10 +88,10 @@ Simulation Workflow Summary
* Commands from a script file (or interactive input) are processed.
* :doc:`Parameters </reference/parameters>` are set.
* The :ref:`FireDomain <cmd-firedomain>` is created.
* :ref:`loadData <cmd-loaddata>` populates the `DataBroker` with `DataLayer`s from the :doc:`/user_guide/landscape_file`. The :doc:`/user_guide/fuels_file` information is associated.
* :ref:`loadData <cmd-loaddata>` populates the `DataBroker` with `DataLayer` from the :doc:`/user_guide/landscape_file`. The :doc:`/user_guide/fuels_file` information is associated.
* The initial fire state is defined using :ref:`startFire <cmd-startfire>` or custom `FireFront`/`FireNode` commands, scheduling the first update events for the initial nodes into the `TimeTable`.

2. **Simulation Loop (driven by `step` or `goTo`):**
2. **Simulation Loop (driven by step or goTo):**

* The `Simulator` gets the chronologically next event (usually a `FireNode` update) from the `TimeTable`.
* The `Simulator` advances the global simulation time to the event time.
Expand Down
4 changes: 3 additions & 1 deletion tests/runff/run.ff
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ setParameter[perimeterResolution=10]
setParameter[spatialIncrement=3]
setParameter[propagationSpeedAdjustmentFactor=0.6]
setParameter[windReductionFactor=0.4]
setParameter[dumpMode=geojson]

# --- Load Data & Domain ---
loadData[data.nc;2025-02-10T17:35:54Z]
# --- Ignition ---
startFire[lonlat=(8.70, 41.952, 0);t=0]
trigger[wind;loc=(0.,0.,0.);vel=(10,5,0.)]

# --- Run Simulation ---
goTo[t=3600]

# --- End ---
print[]
print[simulation_result.geojson]
# Omit quit[] if using listenHTTP
2 changes: 1 addition & 1 deletion tools/preprocessing/READMEscripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ForeFire is an [open-source code for wildland fire spread models](https://www.researchgate.net/publication/278769168_ForeFire_open-source_code_for_wildland_fire_spread_models), developed and maintained by Université de Corse Pascal Paoli.

Access the [demo simulator here](http://forefire.univ-corse.fr/sim/dev/)
Access the [demo simulator here](http://forefire.univ-corse.fr/sim)

![demo](./doc/sim-forefire.jpg)

Expand Down