|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <ERF_FireEngineTemplate.H>


Public Member Functions | |
| const char * | name () const override |
| The name erf.fire.engine selects this engine by, for example "my_fire". More... | |
| void | verify_prerequisites (const ERF &erf, int lev) override |
| void | initialize (const ERF &erf, int lev, const FireGrid &fg, const SurfaceLayer *surface_layer, const amrex::MultiFab *z_phys_nd_atm) override |
| void | start_run (amrex::Real stop_time, int max_step, int steps_per_coarse_step) override |
| void | advance (const FireForcing &forcing) override |
| void | fill_fluxes (FireFluxes &fluxes) override |
| amrex::Real | smoke_heat_per_kg () const override |
| bool | wants_surface_precip () const override |
| Optional, false unless declared: true if advance() needs forcing.precip_accum_k0. More... | |
| bool | needs_surface_layer () const override |
| const amrex::MultiFab * | heat_open_fraction_atm () const override |
| const amrex::MultiFab * | roof_height_atm () const override |
| void | write_checkpoint (const std::string &checkpointname) const override |
| void | read_checkpoint (const std::string &restart_chkfile, int search_level, int step) override |
| void | write_plotfile (const std::string &plotfile_prefix, amrex::Real time, int step) const override |
| std::vector< std::string > | plot_var_names () const override |
| const amrex::MultiFab * | plot_var (const std::string &name) const override |
| The field plot_var_names() lists as name, on the fire grid. More... | |
| amrex::Real | burned_area () const override |
| Optional, -1 unless declared: area burned so far [m2], printed with erf.fire.fire_debug. More... | |
| const amrex::MultiFab * | level_set () const override |
| const amrex::MultiFab * | reference_wind () const override |
| Wind (u, v) [m/s] the engine sampled at reference_wind_height() on the fire grid; nullptr if none. More... | |
| amrex::Real | reference_wind_height () const override |
| Height above ground [m] of reference_wind(). More... | |
| const amrex::MultiFab * | heat_release () const override |
Public Member Functions inherited from FireEngine | |
| virtual | ~FireEngine ()=default |
|
overridevirtual |
Advance the fire over one step of the fire grid's level (forcing.dt from forcing.time). forcing holds the face velocities, the cell-center heights, the lowest cell's temperature and humidity, and the surface rain if wants_surface_precip() is true; sample them onto the fire grid here and keep no pointer to them after this call.
Implements FireEngine.
|
overridevirtual |
Optional, -1 unless declared: area burned so far [m2], printed with erf.fire.fire_debug.
Reimplemented from FireEngine.
|
overridevirtual |
Point fluxes.sensible (and fluxes.latent, if the fuel releases water) at the heat flux into the air on the fire grid [W/m2], positive upward, averaged over exactly [forcing.time, forcing.time + forcing.dt] of the last advance() (sum over any substeps, divided by forcing.dt); leave a pointer nullptr for none. A vapor mass flux becomes a latent flux by multiplying by L_v (ERF_Constants.H). The fields must stay valid until the next advance(). Called only when the coupling injects heat or smoke.
Implements FireEngine.
|
overridevirtual |
Optional, nullptr unless declared: for erf.fire.heat_open_fraction, the fraction of each atmospheric column open to the air [0-1] and the mean roof height of the rest [m], on the level's k = 0 slabs with one ghost cell.
Reimplemented from FireEngine.
|
overridevirtual |
Heat released by the fire on the fire grid [W/m2], before any partition into sensible and latent flux; nullptr if the engine has none.
Reimplemented from FireEngine.
|
overridevirtual |
Allocate the engine's fields on the fire grid fg (fg.ba, fg.dm, fg.geom; fg.atm_lo is the fire region's corner in the level's index space) and set the initial fire: fuels, terrain slope, ignition. surface_layer is never null; ERF passes z_phys_nd_atm too.
Implements FireEngine.
|
overridevirtual |
Optional, nullptr (or 0) unless declared: what other surface models read from the fire (a dust or smoke source model, for example). A level set negative where burned; the wind (u, v) the engine sampled at reference_wind_height() above ground; and the heat released before any split into sensible and latent.
Reimplemented from FireEngine.
|
overridevirtual |
The name erf.fire.engine selects this engine by, for example "my_fire".
Implements FireEngine.
|
overridevirtual |
Optional, true unless declared: false if the engine reads nothing from the surface layer, so it may run over any bottom boundary.
Reimplemented from FireEngine.
|
overridevirtual |
The field plot_var_names() lists as name, on the fire grid.
One component, on FireGrid::ba and FireGrid::dm, valid until the next advance(). The coupler averages it over each atmospheric column (the grid_ratio^2 fire cells under it) and writes it into the k = 0 layer of the ERF plotfile, zero elsewhere. nullptr writes zeros.
Reimplemented from FireEngine.
|
overridevirtual |
Optional, none unless declared: the fire fields the ERF plotfile can carry (names starting with "fire_", listed in erf.plot_vars_*), known from the inputs alone (asked before initialize()), and each field on the fire grid; the coupler writes its column means at k = 0.
Reimplemented from FireEngine.
|
overridevirtual |
Optional (the default stops the run, saying restart is not supported). Read back what write_checkpoint() wrote, on a restart, after start_run() and before the first step; step is the fire grid level's step count at the checkpoint; search_level is the finest checkpoint level to look for the fire state on (it may exceed this run's finest level). Abort if the checkpoint's fire grid is not this run's.
Reimplemented from FireEngine.
|
overridevirtual |
Wind (u, v) [m/s] the engine sampled at reference_wind_height() on the fire grid; nullptr if none.
Reimplemented from FireEngine.
|
overridevirtual |
Height above ground [m] of reference_wind().
Reimplemented from FireEngine.
|
overridevirtual |
Reimplemented from FireEngine.
|
overridevirtual |
Heat released per kilogram of fuel burned [J/kg], matching the sensible flux last handed over; the coupling divides by it to get the fuel burnt that the smoke emission factor applies to.
Implements FireEngine.
|
overridevirtual |
Called after initialize(), once the run's end is known: anything that depends on stop_time or max_step (output schedules, a check that the ignition happens before the run ends). On a restart, read_checkpoint() comes after this.
stop_time is the elapsed time at which the run stops [s], on the clock the engine's step times use (ERF's stop_time less start_time), and numeric_limits<amrex::Real>::max() when no stop time is set. max_step counts level-0 steps and is numeric_limits<int>::max() when unset (never negative).
Reimplemented from FireEngine.
|
overridevirtual |
Check the engine's own inputs against the ERF configuration, once at start-up, before the fire grid is built. Abort naming the input on anything the engine cannot run (a missing fuel file, a time step its front tracking cannot take, a grid ratio it does not support).
Implements FireEngine.
|
overridevirtual |
Optional, false unless declared: true if advance() needs forcing.precip_accum_k0.
Reimplemented from FireEngine.
|
overridevirtual |
Optional (the default writes nothing and the engine cannot restart). Write everything the engine carries from one step to the next under checkpointname/Level_<lev>/ (lev the fire grid's level). The coupling writes its lagged fluxes after this; use names that do not start with FireQ.
Reimplemented from FireEngine.
|
overridevirtual |
Optional (the default writes nothing): the engine's plotfile of the fire grid, named plotfile_prefix plus the step.
Reimplemented from FireEngine.