6#include "LookupTable.h"
8#include "SimpleStandardFuel.h"
9#ifdef DEBUG_FUEL_VARIABLE
12namespace fs::simplefbp
14using settings::Settings;
20[[nodiscard]]
constexpr bool calculate_is_green(
const int nd) {
return nd >= 30; }
25static constexpr int START_GREENING = -43;
26[[nodiscard]]
constexpr int calculate_grass_curing(
const int nd)
28 const auto curing = (nd < START_GREENING)
37 : static_cast<int>(52.5042 - 1.07324 * nd);
38 return max(0, min(100, curing));
40[[nodiscard]]
static MathSize calculate_surface_fuel_consumption_mixed_or_c2(
const MathSize bui
43 return 5.0 * (1.0 - exp(-0.0115 * bui));
45static const LookupTable<&calculate_surface_fuel_consumption_mixed_or_c2>
46 SURFACE_FUEL_CONSUMPTION_MIXED_OR_C2{};
47[[nodiscard]]
static MathSize calculate_surface_fuel_consumption_d1(
const MathSize bui)
noexcept
49 return 1.5 * (1.0 - exp(-0.0183 * bui));
51static LookupTable<&calculate_surface_fuel_consumption_d1> SURFACE_FUEL_CONSUMPTION_D1{};
75 :
public SimpleStandardFuel<A, B, C, Bui0, Cbh, Cfl, BulkDensity, InorganicPercent, DuffDepth>
97 const noexcept override
100 1.0,
calculateRos(spread.nd(), *spread.weather, isi) * spread.slopeFactor()
133 int InorganicPercent,
136 :
public SimpleFuelNonMixed<A, B, C, Bui0, Cbh, Cfl, BulkDensity, InorganicPercent, DuffDepth>
156 const FuelCodeSize&
code,
159 const Duff* duff_ffmc,
162 :
SimpleFuelNonMixed<A, B, C, Bui0, Cbh, Cfl, BulkDensity, InorganicPercent, DuffDepth>(
179 const FuelCodeSize&
code,
192[[nodiscard]]
static MathSize calculate_surface_fuel_consumption_jackpine(
const MathSize bui
195 return 5.0 * pow(1.0 - exp(-0.0164 * bui), 2.24);
201static LookupTable<&calculate_surface_fuel_consumption_jackpine> SURFACE_FUEL_CONSUMPTION_JACKPINE{
214template <
int A,
int B,
int C,
int Bui0,
int Cbh,
int Cfl,
int BulkDensity,
int DuffDepth>
225 using SimpleFuelConifer<A, B, C, Bui0, Cbh, Cfl, BulkDensity, 15, DuffDepth>::SimpleFuelConifer;
233 return SURFACE_FUEL_CONSUMPTION_JACKPINE(spread.weather->bui.value);
241[[nodiscard]]
static MathSize calculate_surface_fuel_consumption_pine(
const MathSize bui)
noexcept
243 return 5.0 * pow(1.0 - exp(-0.0149 * bui), 2.48);
250static LookupTable<&calculate_surface_fuel_consumption_pine> SURFACE_FUEL_CONSUMPTION_PINE{};
262template <
int A,
int B,
int C,
int Bui0,
int Cbh,
int Cfl,
int BulkDensity,
int DuffDepth>
272 using SimpleFuelConifer<A, B, C, Bui0, Cbh, Cfl, BulkDensity, 15, DuffDepth>::SimpleFuelConifer;
280 return SURFACE_FUEL_CONSUMPTION_PINE(spread.weather->bui.value);
309 return SURFACE_FUEL_CONSUMPTION_D1(spread.weather->bui.value);
318 [[nodiscard]] MathSize
isfD1(
const SpreadInfo& spread, MathSize ros_multiplier, MathSize isi)
341 int InorganicPercent,
344 :
public SimpleStandardFuel<A, B, C, Bui0, 6, 80, BulkDensity, InorganicPercent, DuffDepth>
376 return SURFACE_FUEL_CONSUMPTION_MIXED_OR_C2(spread.weather->bui.value);
395 const noexcept override
408 const noexcept override
417 [[nodiscard]]
static constexpr MathSize
ratioConifer() {
return PercentMixed / 100.0; }
422 [[nodiscard]]
static constexpr MathSize
ratioDeciduous() {
return 1.0 - (PercentMixed / 100.0); }
429 [[nodiscard]]
static constexpr MathSize
rosMultiplier() {
return RosMultiplier / 10.0; }
436 [[nodiscard]]
static MathSize
isfD1(
const SpreadInfo& spread,
const MathSize isi)
noexcept
451template <
int A,
int B,
int C,
int Bui0,
int RosMultiplier,
int PercentDeadFir>
453 :
public SimpleFuelMixed<A, B, C, Bui0, RosMultiplier, PercentDeadFir, 61, 15, 75>
469 :
SimpleFuelMixed<A, B, C, Bui0, RosMultiplier, PercentDeadFir, 61, 15, 75>(
code,
name, log_q)
477template <
int RosMultiplier,
int RatioMixed>
479 :
public SimpleFuelMixed<110, 282, 150, 50, RosMultiplier, RatioMixed, 108, 25, 50>
494 :
SimpleFuelMixed<110, 282, 150, 50, RosMultiplier, RatioMixed, 108, 25, 50>(
510 + this->
ratioDeciduous() * SURFACE_FUEL_CONSUMPTION_D1(spread.weather->bui.value);
516[[nodiscard]]
static MathSize calculate_length_to_breadth_grass(
const MathSize ws)
noexcept
518 return ws < 1.0 ? 1.0 : (1.1 * pow(ws, 0.464));
523static LookupTable<calculate_length_to_breadth_grass> LENGTH_TO_BREADTH_GRASS{};
529[[nodiscard]]
static MathSize calculate_base_multiplier_curing(
const MathSize curing)
noexcept
531 return (curing >= 58.8) ? (0.176 + 0.02 * (curing - 58.8)) : (0.005 * expm1(0.061 * curing));
537static LookupTable<&calculate_base_multiplier_curing> BASE_MULTIPLIER_CURING{};
544template <
int A,
int B,
int C>
546 :
public SimpleStandardFuel<A, B, C, 1, 0, 0, 0, 0, static_cast<int>(DUFF_FFMC_DEPTH * 10.0)>
563 :
SimpleStandardFuel<A, B, C, 1, 0, 0, 0, 0, static_cast<int>(DUFF_FFMC_DEPTH * 10.0)>(
578 return DEFAULT_GRASS_FUEL_LOAD;
587 static const auto& settings = fs::settings::instance();
588 if (settings.static_curing.has_value())
590 return settings.static_curing.value();
592 const auto is_drought = wx.
dc.value > 500;
593 return is_drought ? 100 : calculate_grass_curing(nd);
612 const noexcept override
616 const auto mu_not_zero = max(0.001, mu);
627 const noexcept override
640 return LENGTH_TO_BREADTH_GRASS(ws);
650 [[nodiscard]] MathSize
calculateRos(
const MathSize multiplier,
const MathSize isi)
const noexcept
652 return multiplier * this->
rosBasic(isi);
801 )
const noexcept override;
863 const noexcept override;
869template <
int PercentConifer>
892template <
int PercentConifer>
915template <
int PercentDeadFir>
938template <
int PercentDeadFir>
1009template <
int A,
int B,
int C,
int Bui0,
int FfcA,
int FfcB,
int WfcA,
int WfcB,
int BulkDensity>
1028 const FuelCodeSize&
code,
1031 const Duff* duff_ffmc,
1032 const Duff* duff_dmc
1049 return ffcA() * (1.0 - exp(
ffcB() * spread.weather->bui.value))
1050 +
wfcA() * (1.0 - exp(
wfcB() * spread.weather->bui.value));
1058 [[nodiscard]]
static constexpr MathSize
ffcA() {
return FfcA; }
1063 [[nodiscard]]
static constexpr MathSize
ffcB() {
return FfcB / 10000.0; }
1068 [[nodiscard]]
static constexpr MathSize
wfcA() {
return WfcA; }
1073 [[nodiscard]]
static constexpr MathSize
wfcB() {
return WfcB / 10000.0; }
1135template <
class FuelSpring,
class FuelSummer>
1136class SimpleFuelVariable;
1137template <
class FuelSpring,
class FuelSummer>
1138[[nodiscard]]
const SimpleFuelType& find_fuel_by_season(
1140 const SimpleFuelVariable<FuelSpring, FuelSummer>& fuel
1144 static const auto& settings = fs::settings::instance();
1146 return settings.force_greenup ? fuel.summer()
1147 : settings.force_no_greenup ? fuel.spring()
1148 : calculate_is_green(nd) ? fuel.summer()
1151template <
class FuelSpring,
class FuelSummer>
1152[[nodiscard]] MathSize compare_by_season(
1153 const SimpleFuelVariable<FuelSpring, FuelSummer>& fuel,
1154 const function<MathSize(
const SimpleFuelType&)>& fct
1159 const auto for_spring = fct(fuel.spring());
1160#ifdef DEBUG_FUEL_VARIABLE
1161 const auto for_summer = fct(fuel.summer());
1162 logging::check_fatal(for_spring != for_summer,
"Expected spring and summer cfb to be identical");
1171template <
class FuelSpring,
class FuelSummer>
1186 const FuelCodeSize&
code,
1188 const bool can_crown,
1189 const FuelSpring*
const spring,
1190 const FuelSummer*
const summer
1201 [[nodiscard]]
bool isValid()
const override {
return true; }
1207 [[nodiscard]] MathSize
buiEffect(MathSize bui)
const override
1209 return compare_by_season(*
this, [bui](
const SimpleFuelType& fuel) {
1219 return compare_by_season(*
this, [&](
const SimpleFuelType& fuel) {
1227 [[nodiscard]] MathSize
cbh()
const override
1229 return compare_by_season(*
this, [](
const SimpleFuelType& fuel) {
return fuel.
cbh(); });
1235 [[nodiscard]] MathSize
cfl()
const override
1237 return compare_by_season(*
this, [](
const SimpleFuelType& fuel) {
return fuel.
cfl(); });
1246 return compare_by_season(*
this, [cfb](
const SimpleFuelType& fuel) {
1260 return find_fuel_by_season(nd, *
this).
calculateRos(nd, wx, isi);
1270 return find_fuel_by_season(spread.
nd(), *
this).
calculateIsf(spread, isi);
1288 return compare_by_season(*
this, [ws](
const SimpleFuelType& fuel) {
1307 return find_fuel_by_season(spread.
nd(), *
this).
finalRos(spread, isi, cfb, rss);
1325 const noexcept override
1334 [[nodiscard]] MathSize
probabilityPeat(
const MathSize mc_fraction)
const noexcept override
1388 const FuelCodeSize&
code,
1399template <
int PercentConifer>
1401 :
public SimpleFuelVariable<SimpleFuelM1<PercentConifer>, SimpleFuelM2<PercentConifer>>
1419 const FuelCodeSize&
code,
1437template <
int PercentDeadFir>
1439 :
public SimpleFuelVariable<SimpleFuelM3<PercentDeadFir>, SimpleFuelM4<PercentDeadFir>>
1456 const FuelCodeSize&
code,
1490 const FuelCodeSize&
code,
1499namespace fs::testing
1501using settings::Settings;
1502int test_fbp(
const int argc,
const char*
const argv[]);
An FBP fuel type.
Definition FuelType.h:42
virtual MathSize lengthToBreadth(MathSize ws) const =0
Length to Breadth ratio [ST-X-3 eq 79].
constexpr FuelCodeSize code() const
Code for this fuel type.
Definition FuelType.h:212
virtual MathSize cfl() const =0
Crown fuel load (kg/m^2) [ST-X-3 table 8].
virtual MathSize criticalSurfaceIntensity(const SpreadInfo &spread) const =0
Critical Surface Fire Intensity (CSI) [ST-X-3 eq 56].
virtual MathSize surfaceFuelConsumption(const SpreadInfo &spread) const =0
Surface fuel consumption (SFC) (kg/m^2) [ST-X-3 eq 9-25].
virtual MathSize crownFractionBurned(MathSize rss, MathSize rso) const noexcept=0
Crown Fraction Burned (CFB) [ST-X-3 eq 58].
virtual MathSize crownConsumption(MathSize cfb) const =0
Crown Fuel Consumption (CFC) (kg/m^2) [ST-X-3 eq 66].
constexpr const char * name() const
Name of the fuel.
Definition FuelType.h:207
virtual MathSize buiEffect(MathSize bui) const =0
BUI Effect on surface fire rate of spread [ST-X-3 eq 54].
virtual MathSize finalRos(const SpreadInfo &spread, MathSize isi, MathSize cfb, MathSize rss) const =0
Final rate of spread (m/min)
virtual MathSize grass_curing(const int, const FwiWeather &) const
Grass curing.
Definition FuelType.h:114
virtual MathSize calculateRos(int nd, const FwiWeather &wx, MathSize isi) const =0
Calculate rate of spread (m/min)
virtual ThresholdSize survivalProbability(const FwiWeather &wx) const noexcept=0
Survival probability calculated using probability of ony survival based on multiple formulae.
virtual MathSize cbh() const =0
Crown base height (m) [ST-X-3 table 8].
virtual MathSize probabilityPeat(MathSize mc_fraction) const noexcept=0
Calculate probability of burning [Anderson eq 1].
virtual MathSize calculateIsf(const SpreadInfo &spread, MathSize isi) const =0
Calculate ISI with slope influence and zero wind (ISF) [ST-X-3 eq 41/42].
Information regarding spread within a Cell for a specific Scenario and time.
Definition FireSpread.h:40
constexpr int nd() const
Difference between date and the date of minimum foliar moisture content.
Definition FireSpread.h:123
A fuel with pine as the base fuel type.
Definition SimpleFBP.h:264
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface fuel consumption (SFC) (kg/m^2) [ST-X-3 eq 12].
Definition SimpleFBP.h:278
FBP fuel type C-1.
Definition SimpleFBP.h:659
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [GLC-X-10 eq 9a/9b].
Definition SimpleFBP.cpp:41
constexpr SimpleFuelC1(const FuelCodeSize &code) noexcept
FBP fuel type C-1.
Definition SimpleFBP.h:671
FBP fuel type C-2.
Definition SimpleFBP.h:685
constexpr SimpleFuelC2(const FuelCodeSize &code) noexcept
FBP fuel type C-2.
Definition SimpleFBP.h:697
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 eq 10].
Definition SimpleFBP.cpp:45
FBP fuel type C-3.
Definition SimpleFBP.h:711
constexpr SimpleFuelC3(const FuelCodeSize &code) noexcept
FBP fuel type C-3.
Definition SimpleFBP.h:723
FBP fuel type C-4.
Definition SimpleFBP.h:731
constexpr SimpleFuelC4(const FuelCodeSize &code) noexcept
FBP fuel type C-4.
Definition SimpleFBP.h:743
FBP fuel type C-5.
Definition SimpleFBP.h:751
constexpr SimpleFuelC5(const FuelCodeSize &code) noexcept
FBP fuel type C-5.
Definition SimpleFBP.h:763
FBP fuel type C-6.
Definition SimpleFBP.h:771
MathSize finalRos(const SpreadInfo &spread, MathSize isi, MathSize cfb, MathSize rss) const noexcept override
Final rate of spread (m/min)
Definition SimpleFBP.cpp:49
constexpr SimpleFuelC6(const FuelCodeSize &code) noexcept
FBP fuel type C-6.
Definition SimpleFBP.h:783
FBP fuel type C-7.
Definition SimpleFBP.h:807
constexpr SimpleFuelC7(const FuelCodeSize &code) noexcept
FBP fuel type C-7.
Definition SimpleFBP.h:819
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 eq 15].
Definition SimpleFBP.cpp:88
A conifer fuel type.
Definition SimpleFBP.h:137
constexpr SimpleFuelConifer(const FuelCodeSize &code, const char *name, const LogValue log_q, const Duff *duff)
A conifer FBP fuel type.
Definition SimpleFBP.h:178
constexpr SimpleFuelConifer(const FuelCodeSize &code, const char *name, const LogValue log_q, const Duff *duff_ffmc, const Duff *duff_dmc)
A conifer FBP fuel type.
Definition SimpleFBP.h:155
FBP fuel type D-1/D-2.
Definition SimpleFBP.h:1373
constexpr SimpleFuelD1D2(const FuelCodeSize &code, const SimpleFuelD1 *d1, const SimpleFuelD2 *d2) noexcept
A fuel that changes between D-1/D-2 depending on green-up.
Definition SimpleFBP.h:1387
FBP fuel type D-1.
Definition SimpleFBP.h:287
MathSize isfD1(const SpreadInfo &spread, MathSize ros_multiplier, MathSize isi) const noexcept
Calculate ISI with slope influence and zero wind (ISF) for D-1 [ST-X-3 eq 41].
Definition SimpleFBP.cpp:16
constexpr SimpleFuelD1(const FuelCodeSize &code) noexcept
FBP fuel type D-1.
Definition SimpleFBP.h:299
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 eq 25].
Definition SimpleFBP.h:307
FBP fuel type D-2.
Definition SimpleFBP.h:833
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2)
Definition SimpleFBP.cpp:98
constexpr SimpleFuelD2(const FuelCodeSize &code) noexcept
FBP fuel type D-2.
Definition SimpleFBP.h:846
MathSize calculateRos(int nd, const FwiWeather &wx, MathSize isi) const noexcept override
Calculate rate of spread (m/min)
Definition SimpleFBP.cpp:102
A grass fuel type.
Definition SimpleFBP.h:547
MathSize calculateIsf(const SpreadInfo &spread, const MathSize isi) const noexcept override
Calculate ISI with slope influence and zero wind (ISF) [ST-X-3 eq 41].
Definition SimpleFBP.h:611
MathSize surfaceFuelConsumption(const SpreadInfo &) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 pg 21].
Definition SimpleFBP.h:576
MathSize baseMultiplier(const int nd, const FwiWeather &wx) const noexcept
Calculate base rate of spread multiplier.
Definition SimpleFBP.h:601
MathSize grass_curing(const int nd, const FwiWeather &wx) const override
Grass curing.
Definition SimpleFBP.h:584
MathSize calculateRos(const int nd, const FwiWeather &wx, const MathSize isi) const noexcept override
Calculate rate of spread (m/min)
Definition SimpleFBP.h:626
MathSize lengthToBreadth(const MathSize ws) const noexcept override
Length to Breadth ratio [ST-X-3 eq 80/81].
Definition SimpleFBP.h:638
constexpr SimpleFuelGrass(const FuelCodeSize &code, const char *name, const LogValue log_q)
A grass fuel type.
Definition SimpleFBP.h:561
MathSize calculateRos(const MathSize multiplier, const MathSize isi) const noexcept
Calculate rate of spread (m/min)
Definition SimpleFBP.h:650
A fuel with jackpine as base fuel type.
Definition SimpleFBP.h:217
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface fuel consumption (SFC) (kg/m^2) [ST-X-3 eq 11].
Definition SimpleFBP.h:231
FBP fuel type M-1/M-2.
Definition SimpleFBP.h:1402
constexpr SimpleFuelM1M2(const FuelCodeSize &code, const char *name, const SimpleFuelM1< PercentConifer > *m1, const SimpleFuelM2< PercentConifer > *m2)
A fuel that changes between M-1/M-2 depending on green-up.
Definition SimpleFBP.h:1418
FBP fuel type M-1.
Definition SimpleFBP.h:871
constexpr SimpleFuelM1(const FuelCodeSize &code, const char *name)
FBP fuel type M-1.
Definition SimpleFBP.h:884
FBP fuel type M-2.
Definition SimpleFBP.h:894
constexpr SimpleFuelM2(const FuelCodeSize &code, const char *name)
FBP fuel type M-2.
Definition SimpleFBP.h:907
FBP fuel type M-3/M-4.
Definition SimpleFBP.h:1440
constexpr SimpleFuelM3M4(const FuelCodeSize &code, const char *name, const SimpleFuelM3< PercentDeadFir > *m3, const SimpleFuelM4< PercentDeadFir > *m4)
A fuel that changes between M-3/M-4 depending on green-up.
Definition SimpleFBP.h:1455
FBP fuel type M-3.
Definition SimpleFBP.h:917
constexpr SimpleFuelM3(const FuelCodeSize &code, const char *name)
FBP fuel type M-3.
Definition SimpleFBP.h:930
FBP fuel type M-4.
Definition SimpleFBP.h:940
constexpr SimpleFuelM4(const FuelCodeSize &code, const char *name)
FBP fuel type M-4.
Definition SimpleFBP.h:953
A fuel made of dead fir and D1.
Definition SimpleFBP.h:454
constexpr SimpleFuelMixedDead(const FuelCodeSize &code, const char *name, const LogValue log_q)
A mixed dead FBP fuel type.
Definition SimpleFBP.h:468
A fuel composed of C2 and D1 mixed.
Definition SimpleFBP.h:480
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 eq 17].
Definition SimpleFBP.h:505
constexpr SimpleFuelMixedWood(const FuelCodeSize &code, const char *name)
A mixedwood FBP fuel type.
Definition SimpleFBP.h:493
A mixedwood fuel type.
Definition SimpleFBP.h:345
MathSize calculateRos(const int, const FwiWeather &, const MathSize isi) const noexcept override
Calculate rate of spread (m/min) [ST-X-3 27/28, GLC-X-10 29/31].
Definition SimpleFBP.h:394
constexpr SimpleFuelMixed(const FuelCodeSize &code, const char *name, const LogValue log_q)
A mixed FBP fuel type.
Definition SimpleFBP.h:359
static MathSize isfD1(const SpreadInfo &spread, const MathSize isi) noexcept
Calculate ISI with slope influence and zero wind (ISF) for D-1 [ST-X-3 eq 41].
Definition SimpleFBP.h:436
MathSize calculateIsf(const SpreadInfo &spread, const MathSize isi) const noexcept override
Calculate ISI with slope influence and zero wind (ISF) [ST-X-3 eq 42].
Definition SimpleFBP.h:407
static constexpr MathSize ratioDeciduous()
Percent Deciduous (% / 100)
Definition SimpleFBP.h:422
MathSize crownConsumption(const MathSize cfb) const noexcept override
Crown Fuel Consumption (CFC) (kg/m^2) [ST-X-3 eq 66, pg 38].
Definition SimpleFBP.h:383
static constexpr MathSize rosMultiplier()
Rate of spread multiplier [ST-X-3 eq 27/28, GLC-X-10 eq 29/30].
Definition SimpleFBP.h:429
static constexpr MathSize ratioConifer()
Percent Conifer (% / 100)
Definition SimpleFBP.h:417
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 eq 10].
Definition SimpleFBP.h:374
A SimpleStandardFuel that is not made of multiple fuels.
Definition SimpleFBP.h:76
MathSize calculateRos(const int, const FwiWeather &, const MathSize isi) const noexcept override
Initial rate of spread (m/min) [ST-X-3 eq 26].
Definition SimpleFBP.h:108
MathSize calculateIsf(const SpreadInfo &spread, const MathSize isi) const noexcept override
ISI with slope influence and zero wind (ISF) [ST-X-3 eq 41].
Definition SimpleFBP.h:96
FBP fuel type O-1a.
Definition SimpleFBP.h:961
constexpr SimpleFuelO1A(const FuelCodeSize &code) noexcept
FBP fuel type O-1a.
Definition SimpleFBP.h:973
FBP fuel type O-1b.
Definition SimpleFBP.h:981
constexpr SimpleFuelO1B(const FuelCodeSize &code) noexcept
FBP fuel type O-1b.
Definition SimpleFBP.h:993
FBP fuel type O-1.
Definition SimpleFBP.h:1474
constexpr SimpleFuelO1(const FuelCodeSize &code, const char *name, const SimpleFuelO1A *o1a, const SimpleFuelO1B *o1b)
A fuel that changes between O-1a/O-1b depending on green-up.
Definition SimpleFBP.h:1489
FBP fuel type S-1.
Definition SimpleFBP.h:1079
constexpr SimpleFuelS1(const FuelCodeSize &code) noexcept
FBP fuel type S-1.
Definition SimpleFBP.h:1091
FBP fuel type S-2.
Definition SimpleFBP.h:1099
constexpr SimpleFuelS2(const FuelCodeSize &code) noexcept
FBP fuel type S-2.
Definition SimpleFBP.h:1111
FBP fuel type S-3.
Definition SimpleFBP.h:1119
constexpr SimpleFuelS3(const FuelCodeSize &code) noexcept
FBP fuel type S-3.
Definition SimpleFBP.h:1131
A slash fuel type.
Definition SimpleFBP.h:1011
static constexpr MathSize ffcA()
Forest Floor Consumption parameter a [ST-X-3 eq 19/21/23].
Definition SimpleFBP.h:1058
static constexpr MathSize wfcB()
Woody Fuel Consumption parameter b [ST-X-3 eq 20/22/24].
Definition SimpleFBP.h:1073
constexpr SimpleFuelSlash(const FuelCodeSize &code, const char *name, const LogValue log_q, const Duff *duff_ffmc, const Duff *duff_dmc)
A slash fuel type.
Definition SimpleFBP.h:1027
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const noexcept override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 eq 25].
Definition SimpleFBP.h:1047
static constexpr MathSize wfcA()
Woody Fuel Consumption parameter a [ST-X-3 eq 20/22/24].
Definition SimpleFBP.h:1068
static constexpr MathSize ffcB()
Forest Floor Consumption parameter b [ST-X-3 eq 19/21/23].
Definition SimpleFBP.h:1063
A fuel type that changes based on the season.
Definition SimpleFBP.h:1173
MathSize calculateRos(const int nd, const FwiWeather &wx, const MathSize isi) const override
Initial rate of spread (m/min) [ST-X-3 eq 26].
Definition SimpleFBP.h:1257
MathSize criticalSurfaceIntensity(const SpreadInfo &spread) const override
Critical Surface Fire Intensity (CSI) [ST-X-3 eq 56].
Definition SimpleFBP.h:1314
MathSize grass_curing(const int nd, const FwiWeather &wx) const override
Grass curing.
Definition SimpleFBP.h:1217
MathSize cfl() const override
Crown fuel load (kg/m^2) [ST-X-3 table 8].
Definition SimpleFBP.h:1235
MathSize finalRos(const SpreadInfo &spread, const MathSize isi, const MathSize cfb, const MathSize rss) const override
Final rate of spread (m/min)
Definition SimpleFBP.h:1300
const FuelSummer *const summer_
Fuel to use after green-up.
Definition SimpleFBP.h:1367
constexpr SimpleFuelVariable(const FuelCodeSize &code, const char *name, const bool can_crown, const FuelSpring *const spring, const FuelSummer *const summer)
A slash fuel type.
Definition SimpleFBP.h:1185
MathSize lengthToBreadth(const MathSize ws) const override
Length to Breadth ratio [ST-X-3 eq 79].
Definition SimpleFBP.h:1286
MathSize surfaceFuelConsumption(const SpreadInfo &spread) const override
Surface Fuel Consumption (SFC) (kg/m^2) [ST-X-3 eq 9-25].
Definition SimpleFBP.h:1277
MathSize calculateIsf(const SpreadInfo &spread, const MathSize isi) const override
Calculate ISI with slope influence and zero wind (ISF) [ST-X-3 eq 41].
Definition SimpleFBP.h:1268
MathSize survivalProbability(const FwiWeather &wx) const noexcept override
Survival probability calculated using probability of ony survival based on multiple formulae.
Definition SimpleFBP.h:1344
constexpr const SimpleFuelType & spring() const
Fuel to use before green-up.
Definition SimpleFBP.h:1352
MathSize cbh() const override
Crown base height (m) [ST-X-3 table 8].
Definition SimpleFBP.h:1227
MathSize buiEffect(MathSize bui) const override
BUI Effect on surface fire rate of spread [ST-X-3 eq 54].
Definition SimpleFBP.h:1207
MathSize crownFractionBurned(const MathSize rss, const MathSize rso) const noexcept override
Crown Fraction Burned (CFB) [ST-X-3 eq 58].
Definition SimpleFBP.h:1324
bool isValid() const override
Is fuel a valid fuel type.
Definition SimpleFBP.h:1201
MathSize probabilityPeat(const MathSize mc_fraction) const noexcept override
Calculate probability of burning [Anderson eq 1].
Definition SimpleFBP.h:1334
const FuelSpring *const spring_
Fuel to use before green-up.
Definition SimpleFBP.h:1363
constexpr const SimpleFuelType & summer() const
Fuel to use after green-up.
Definition SimpleFBP.h:1357
MathSize crownConsumption(const MathSize cfb) const override
Crown Fuel Consumption (CFC) (kg/m^2) [ST-X-3 eq 66].
Definition SimpleFBP.h:1244
A SimpleFuelBase made of a standard fuel type.
Definition SimpleStandardFuel.h:80
constexpr SimpleStandardFuel(const FuelCodeSize &code, const char *name, const bool can_crown, const LogValue log_q, const Duff *duff_ffmc, const Duff *duff_dmc) noexcept
Constructor.
Definition SimpleStandardFuel.h:91
MathSize limitIsf(const MathSize mu, const MathSize rsf) const noexcept
ISI with slope influence and zero wind (ISF) [ST-X-3 eq 41].
Definition SimpleStandardFuel.h:150
MathSize crownConsumption(const MathSize cfb) const noexcept override
Crown Fuel Consumption (CFC) (kg/m^2) [ST-X-3 eq 66].
Definition SimpleStandardFuel.h:143
MathSize rosBasic(const MathSize isi) const noexcept
Initial rate of spread (m/min) [ST-X-3 eq 26].
Definition SimpleStandardFuel.h:134
A Weather value with calculated FWI indices.
Definition FWI.h:142
Dc dc
Drought Code.
Definition FWI.h:167
A result of calling log(x) for some value of x, pre-calculated at compile time.
Definition LogValue.h:12
A specific type of Duff layer, and the associated smouldering coefficients.
Definition Duff.h:40