1 #ifndef ERF_FIRE_ENGINE_H
2 #define ERF_FIRE_ENGINE_H
5 #include <AMReX_MultiFab.H>
6 #include <AMReX_REAL.H>
70 const amrex::MultiFab&
xvel;
71 const amrex::MultiFab&
yvel;
73 const amrex::MultiFab&
T_k0;
137 virtual const char*
name ()
const = 0;
166 const amrex::MultiFab* z_phys_nd_atm) = 0;
177 amrex::ignore_unused(stop_time, max_step, steps_per_coarse_step);
235 amrex::ignore_unused(checkpointname);
248 virtual void read_checkpoint (
const std::string& restart_chkfile,
int max_level,
int step)
250 amrex::ignore_unused(restart_chkfile, max_level, step);
251 amrex::Abort(std::string(
"[FIRE] fire engine \"") +
name()
252 +
"\" does not support restart from a checkpoint");
267 amrex::ignore_unused(plotfile_prefix, time, step);
289 virtual const amrex::MultiFab*
plot_var (
const std::string&
name)
const
291 amrex::ignore_unused(
name);
299 virtual const amrex::MultiFab*
level_set ()
const {
return nullptr; }
306 virtual const amrex::MultiFab*
heat_release ()
const {
return nullptr; }
Fire grid data structure and construction.
amrex::Real Real
Definition: ERF_ShocInterface.H:19
A fire engine behind the shared coupling layer.
Definition: ERF_FireEngine.H:132
virtual std::vector< std::string > plot_var_names() const
Fire fields the ERF plotfile can carry, by name.
Definition: ERF_FireEngine.H:279
virtual const amrex::MultiFab * plot_var(const std::string &name) const
The field plot_var_names() lists as name, on the fire grid.
Definition: ERF_FireEngine.H:289
virtual amrex::Real reference_wind_height() const
Height above ground [m] of reference_wind().
Definition: ERF_FireEngine.H:303
virtual amrex::Real burned_area() const
Area burned so far [m2], for the run log; negative when the engine does not track it.
Definition: ERF_FireEngine.H:296
virtual void write_plotfile(const std::string &plotfile_prefix, amrex::Real time, int step) const
Write the engine's plotfile of the fire grid.
Definition: ERF_FireEngine.H:265
virtual void initialize(const ERF &erf, int lev, const FireGrid &fg, const SurfaceLayer *surface_layer, const amrex::MultiFab *z_phys_nd_atm)=0
Set the engine up on the fire grid.
virtual void write_checkpoint(const std::string &checkpointname) const
Write the engine's own state to the checkpoint directory.
Definition: ERF_FireEngine.H:233
virtual void verify_prerequisites(const ERF &erf, int lev)=0
Check the engine's own inputs against the ERF configuration.
virtual void read_checkpoint(const std::string &restart_chkfile, int max_level, int step)
Restore the engine's state from a checkpoint on a restart.
Definition: ERF_FireEngine.H:248
virtual ~FireEngine()=default
virtual amrex::Real smoke_heat_per_kg() const =0
Heat released per kilogram of fuel burned [J/kg], matching the sensible flux last handed over,...
virtual const amrex::MultiFab * reference_wind() const
Wind (u, v) [m/s] the engine sampled at reference_wind_height() on the fire grid; nullptr if none.
Definition: ERF_FireEngine.H:301
virtual void start_run(amrex::Real stop_time, int max_step, int steps_per_coarse_step)
Start-up after initialize(), once the run's end is known.
Definition: ERF_FireEngine.H:175
virtual bool wants_surface_precip() const
The engine needs the surface precipitation accumulation in FireForcing.
Definition: ERF_FireEngine.H:200
virtual void advance(const FireForcing &forcing)=0
Advance the fire over one step of its level.
virtual const amrex::MultiFab * heat_release() const
Definition: ERF_FireEngine.H:306
virtual const amrex::MultiFab * roof_height_atm() const
Definition: ERF_FireEngine.H:223
virtual const char * name() const =0
Name of the engine, as erf.fire.engine selects it.
virtual const amrex::MultiFab * level_set() const
Level set on the fire grid, negative where burned; nullptr if the engine has none.
Definition: ERF_FireEngine.H:299
virtual bool needs_surface_layer() const
The engine needs a surface layer at the bottom boundary.
Definition: ERF_FireEngine.H:210
virtual const amrex::MultiFab * heat_open_fraction_atm() const
Optional heat placement per atmospheric column, for erf.fire.heat_open_fraction: the fraction of the ...
Definition: ERF_FireEngine.H:222
virtual void fill_fluxes(FireFluxes &fluxes)=0
The fluxes of the step just taken, on the fire grid.
Definition: ERF_SurfaceLayer.H:60
Definition: ERF_InterpolationUtils.H:15
@ fg
Definition: ERF_AdvanceMorrison.cpp:111
The fluxes a fire engine hands to the atmosphere after its step.
Definition: ERF_FireEngine.H:99
const amrex::MultiFab * latent
Definition: ERF_FireEngine.H:101
std::string debug_note
Definition: ERF_FireEngine.H:104
const amrex::MultiFab * sensible
Sensible heat flux into the air [W/m2]; nullptr = none this step.
Definition: ERF_FireEngine.H:100
The atmospheric state a fire engine reads at the start of its step.
Definition: ERF_FireEngine.H:67
amrex::Real time
Start of the step [s].
Definition: ERF_FireEngine.H:68
const amrex::MultiFab & T_k0
Air temperature at k = 0 [K] (theta times Exner), before the dycore.
Definition: ERF_FireEngine.H:73
amrex::Real dt
Step of the fire grid's level [s].
Definition: ERF_FireEngine.H:69
const amrex::MultiFab & z_phys_cc
Cell-centre height [m] of the terrain-following mesh.
Definition: ERF_FireEngine.H:72
const amrex::MultiFab & yvel
y-velocity on y-faces [m/s], the same time level as xvel
Definition: ERF_FireEngine.H:71
const amrex::MultiFab * precip_accum_k0
Surface precipitation accumulated since t = 0 [kg/m2] after this step's microphysics,...
Definition: ERF_FireEngine.H:75
const amrex::MultiFab & RH_k0
Relative humidity at k = 0 [0-1], before the dycore.
Definition: ERF_FireEngine.H:74
const amrex::MultiFab & xvel
x-velocity on x-faces [m/s]: before the dycore (passive, lagged) or after it (synchronous)
Definition: ERF_FireEngine.H:70
2D horizontal fire computational grid
Definition: ERF_FireGrid.H:29