--- a/src/Utils.cpp Sun Jul 03 19:02:02 2022 +0200 +++ b/src/Utils.cpp Tue Jul 05 14:31:39 2022 +0200 @@ -360,6 +360,38 @@ return round((og * 1000 - fg * 1000) * factor * 100) / 100; } +/* +double Utils::boilIBU(int Form, double SG, double Volume, double Amount, double Time, double Alpha, int Method) +{ + if (Method == 0) { // Tinseth +*/ /* http://realbeer.com/hops/research.html */ +/* AddedAlphaAcids = (alpha * mass * 1000) / liters; + Bigness_factor = 1.65 * pow(0.000125, gravity - 1); + BoilTime_factor = ((1 - exp(-0.04 * time)) / 4.15); + utiisation = Bigness_factor * BoilTime_factor; + ibu = round((utiisation * AddedAlphaAcids * fmoment * pfactor + whirlibus) * 100) / 100; + } + if (Method == 2) { // Daniels + if (Form == 2) // Leaf + boilfactor = -(0.0041 * time * time) + (0.6162 * time) + 1.5779; + else + boilfactor = -(0.0051 * time * time) + (0.7835 * time) + 1.9348; + if (gravity < 1050) + sgfactor = 0; + else + sgfactor = (gravity - 1050) / 200; + ibu = round((fmoment * ((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor))) + whirlibus) * 100) / 100; + } + if (Method == 1) { // Rager + boilfactor = fmoment * 18.11 + 13.86 * tanh((time * 31.32) / 18.27); + if (gravity < 1050) + sgfactor = 0; + else + sgfactor = (gravity - 1050) / 200; + ibu = round(((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)) + whirlibus) * 100) / 100; + } +} +*/ double Utils::toIBU(int Use, int Form, double SG, double Volume, double Amount, double Boiltime, double Alpha, int Method, double Whirlpool9, double Whirlpool7, double Whirlpool6, double Fulltime)