From 1f2e9b70d4fda0c63a290b4a4e75c2d4746837ae Mon Sep 17 00:00:00 2001 From: Johnathan Tenny <107655580+j-tenny@users.noreply.github.com> Date: Mon, 7 Sep 2026 16:24:20 -0700 Subject: [PATCH] Fix unit conversion for heat of combustion in setCustomFuelModel() No unit conversion was happening on heat of combustion when creating a custom fuel model. Thus, if creating a custom fuel model with metric inputs, reaction intensity, spread rate, etc was off by a factor of 2.3. Added conversion for this value and tested compiling and basic run. --- src/behave/fuelModels.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/behave/fuelModels.cpp b/src/behave/fuelModels.cpp index 995a659..5018ed8 100644 --- a/src/behave/fuelModels.cpp +++ b/src/behave/fuelModels.cpp @@ -721,6 +721,12 @@ bool FuelModels::setCustomFuelModel(int fuelModelNumber, std::string code, std:: moistureOfExtinctionDead = FractionUnits::toBaseUnits(moistureOfExtinctionDead, moistureUnits); + if (heatOfCombustionUnits != HeatOfCombustionUnits::BtusPerPound) + { + heatOfCombustionDead = HeatOfCombustionUnits::toBaseUnits(heatOfCombustionDead, heatOfCombustionUnits); + heatOfCombustionLive = HeatOfCombustionUnits::toBaseUnits(heatOfCombustionLive, heatOfCombustionUnits); + } + if (loadingUnits != LoadingUnits::PoundsPerSquareFoot) { fuelLoadOneHour = LoadingUnits::toBaseUnits(fuelLoadOneHour, loadingUnits);