9#include "LookupTable.h"
18static constexpr MathSize SLOPE_LIMIT_ISI = 0.01;
24[[nodiscard]]
static constexpr MathSize
25 calculate_standard_foliar_moisture_fmc(
26 const MathSize fmc)
noexcept
28 return util::pow_int<4>(1.5 - 0.00275 * fmc) / (460.0 + 25.9 * fmc) / 0.778 * 1000.0;
33static const util::LookupTable<&calculate_standard_foliar_moisture_fmc>
34 STANDARD_FOLIAR_MOISTURE_FMC{};
40[[nodiscard]]
static MathSize
41 calculate_standard_foliar_moisture_isi(
42 const MathSize isi)
noexcept
44 return 60.0 * (1.0 - exp(-0.0497 * isi));
50static const util::LookupTable<&calculate_standard_foliar_moisture_isi>
51 STANDARD_FOLIAR_MOISTURE_ISI{};
57[[nodiscard]]
static MathSize
58 calculate_standard_length_to_breadth(
const MathSize ws)
noexcept
60 return 1.0 + 8.729 * pow(1.0 - exp(-0.030 * ws), 2.155);
66static const util::LookupTable<&calculate_standard_length_to_breadth>
67 STANDARD_LENGTH_TO_BREADTH{};
80template <
int A,
int B,
int C,
int Bui0,
int Cbh,
int Cfl,
int BulkDensity,
int InorganicPercent,
int DuffDepth>
82 :
public FuelBase<BulkDensity, InorganicPercent, DuffDepth>
98 const Duff* duff_ffmc,
99 const Duff* duff_dmc) noexcept
118 const bool can_crown,
120 const Duff* duff) noexcept
138 [[nodiscard]] MathSize
rosBasic(
const MathSize isi)
const noexcept
140 return a() * pow(1.0 - exp(
negB() * isi),
c());
158 [[nodiscard]] MathSize
limitIsf(
const MathSize mu,
const MathSize rsf)
const noexcept
160 return (1.0 /
negB()) *
log(max(SLOPE_LIMIT_ISI, (rsf > 0.0) ? (1.0 - pow((rsf / (mu *
a())), (1.0 /
c()))) : 1.0));
170 return 0.001 * pow(
cbh(), 1.5) * pow(460.0 + 25.9 * spread.foliarMoisture(), 1.5);
179 return STANDARD_LENGTH_TO_BREADTH(ws);
189 const MathSize rss)
const noexcept override
198 [[nodiscard]] MathSize
buiEffect(
const MathSize bui)
const noexcept override
204 * ((1.0 / bui) - (1.0 /
bui0())))
213 [[nodiscard]]
static constexpr MathSize
bui0() noexcept
221 [[nodiscard]] MathSize
cbh()
const override
229 [[nodiscard]] MathSize
cfl()
const override
237 [[nodiscard]]
static constexpr MathSize
a() noexcept
245 [[nodiscard]]
static constexpr MathSize
negB() noexcept
254 [[nodiscard]]
static constexpr MathSize
c() noexcept
265 const MathSize fmc)
noexcept
267 return STANDARD_FOLIAR_MOISTURE_ISI(isi) * STANDARD_FOLIAR_MOISTURE_FMC(fmc);
274 static_assert(-
negB() < 1);
275 static_assert(
c() < 10 &&
c() > 1);
constexpr MathSize asValue() const noexcept
Returns value as a MathSize.
Definition Index.h:84
A result of calling log(x) for some value of x, pre-calculated at compile time.
Definition Index.h:168
Base class for DuffType.
Definition Duff.h:43
Base class for all FuelTypes.
Definition FuelType.h:261
constexpr FuelBase(const FuelCodeSize &code, const char *name, const bool can_crown, const Duff *duff_ffmc, const Duff *duff_dmc)
Constructor.
Definition FuelType.h:272
constexpr FuelCodeSize code() const
Code for this fuel type.
Definition FuelType.h:234
constexpr const char * name() const
Name of the fuel.
Definition FuelType.h:226
A FuelBase made of a standard fuel type.
Definition StandardFuel.h:83
constexpr StandardFuel(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 StandardFuel.h:94
MathSize buiEffect(const MathSize bui) const noexcept override
BUI Effect on surface fire rate of spread [ST-X-3 eq 54].
Definition StandardFuel.h:198
static constexpr MathSize c() noexcept
Rate of spread parameter c [ST-X-3 table 6].
Definition StandardFuel.h:254
LogValue log_q_
Log value of q [ST-X-3 table 7].
Definition StandardFuel.h:273
MathSize criticalSurfaceIntensity(const SpreadInfo &spread) const noexcept override
Critical Surface Fire Intensity (CSI) [ST-X-3 eq 56].
Definition StandardFuel.h:167
virtual MathSize crownConsumption(const MathSize cfb) const noexcept override
Crown Fuel Consumption (CFC) (kg/m^2) [ST-X-3 eq 66].
Definition StandardFuel.h:148
constexpr StandardFuel(const FuelCodeSize &code, const char *name, const bool can_crown, const LogValue log_q, const Duff *duff) noexcept
Constructor.
Definition StandardFuel.h:116
static constexpr MathSize a() noexcept
Rate of spread parameter a [ST-X-3 table 6].
Definition StandardFuel.h:237
static constexpr MathSize negB() noexcept
Negative of rate of spread parameter b [ST-X-3 table 6].
Definition StandardFuel.h:245
MathSize cfl() const override
Crown fuel load (kg/m^2) [ST-X-3 table 8].
Definition StandardFuel.h:229
MathSize lengthToBreadth(const MathSize ws) const noexcept override
Length to Breadth ratio [ST-X-3 eq 79].
Definition StandardFuel.h:177
MathSize cbh() const override
Crown base height (m) [ST-X-3 table 8].
Definition StandardFuel.h:221
MathSize rosBasic(const MathSize isi) const noexcept
Initial rate of spread (m/min) [ST-X-3 eq 26].
Definition StandardFuel.h:138
static constexpr MathSize crownRateOfSpread(const MathSize isi, const MathSize fmc) noexcept
Crown fire spread rate (RSC) (m/min) [ST-X-3 eq 64].
Definition StandardFuel.h:264
MathSize finalRos(const SpreadInfo &, MathSize, MathSize, const MathSize rss) const noexcept override
Final rate of spread (m/min)
Definition StandardFuel.h:186
static constexpr MathSize bui0() noexcept
Average Build-up Index for the fuel type [ST-X-3 table 7].
Definition StandardFuel.h:213
MathSize limitIsf(const MathSize mu, const MathSize rsf) const noexcept
ISI with slope influence and zero wind (ISF) [ST-X-3 eq 41].
Definition StandardFuel.h:158
Information regarding spread within a Cell for a specific Scenario and time.
Definition FireSpread.h:30