# HG changeset patch # User Michiel Broek # Date 1673273035 -3600 # Node ID d4cff87ea1568edcaa4099f7ec3696e54b113d6b # Parent 00757c056ca69522bc92b5c36cfb17df412a6c2a In estimate_fg decrease attenuation for mash temperatures below 66.11 degrees. diff -r 00757c056ca6 -r d4cff87ea156 src/Utils.cpp --- a/src/Utils.cpp Sun Jan 08 15:53:16 2023 +0100 +++ b/src/Utils.cpp Mon Jan 09 15:03:55 2023 +0100 @@ -285,6 +285,7 @@ double Utils::estimate_fg(double psugar, double pcara, double wgratio, double mashtime, double mashtemp, double svg, double og, bool sta1) { double BD; + double att_mashtemp; if (psugar > 40) psugar = 0; @@ -297,10 +298,6 @@ BD = 2; if (BD > 5.5) BD = 5.5; - if (mashtemp < 60) - mashtemp = 60; - if (mashtemp > 72) - mashtemp = 72; } else { BD = 3.5; mashtemp = 67; @@ -320,7 +317,19 @@ * 0.547 Attenuation factor constant * 0.597 Attenuation factor constant when STA1 gen is true. */ - double AttBeer = 0.00825 * svg + 0.00817 * BD - 0.00684 * mashtemp + 0.00026 * mashtime - 0.00356 * pcara + 0.00553 * psugar; + double top_mashtemp = 66.11; /* Highest fermentable at 151 degrees fahrenheit */ + /* + * Derived from Karl Troester's data and Matt Kahn. + */ + if (mashtemp > top_mashtemp) { + /* Above optimum mash temperature decrease attenuation */ + att_mashtemp = - 0.00684 * mashtemp; + } else { + /* Below optimum mash temperature decrease slowly attenuation */ + att_mashtemp = - 0.00684 * (top_mashtemp + (top_mashtemp - mashtemp) / 4); + } + + double AttBeer = 0.00825 * svg + 0.00817 * BD + att_mashtemp + 0.00026 * mashtime - 0.00356 * pcara + 0.00553 * psugar; AttBeer += (sta1) ? 0.597:0.547; qDebug() << "estimate_fg(" << psugar << pcara << wgratio << mashtime << mashtemp << svg << og << sta1 << ") AttBeer:" << AttBeer; return round((1 + (1 - AttBeer) * (og -1)) * 10000) / 10000;