In estimate_fg decrease attenuation for mash temperatures below 66.11 degrees.

Mon, 09 Jan 2023 15:03:55 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 09 Jan 2023 15:03:55 +0100
changeset 450
d4cff87ea156
parent 449
00757c056ca6
child 451
ccf00788bccc

In estimate_fg decrease attenuation for mash temperatures below 66.11 degrees.

src/Utils.cpp file | annotate | diff | comparison | revisions
--- 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;

mercurial