www/js/global.js

changeset 713
8dae8479d5e8
parent 697
367ae7ff52f0
child 717
aad750d942df
equal deleted inserted replaced
712:65da479b5542 713:8dae8479d5e8
1089 function brix_to_fg(OBrix, FBrix) { 1089 function brix_to_fg(OBrix, FBrix) {
1090 // Brouwhulp, werkt zonder brix_correctie, waarom? 1090 // Brouwhulp, werkt zonder brix_correctie, waarom?
1091 var FGbh = Round(1.0031 - 0.002318474 * OBrix - 0.000007775 * (OBrix * OBrix) - 0.000000034 * Math.pow(OBrix, 3) + 1091 var FGbh = Round(1.0031 - 0.002318474 * OBrix - 0.000007775 * (OBrix * OBrix) - 0.000000034 * Math.pow(OBrix, 3) +
1092 0.00574 * (FBrix) + 0.00003344 * (FBrix * FBrix) + 0.000000086 * Math.pow(FBrix, 3), 4); 1092 0.00574 * (FBrix) + 0.00003344 * (FBrix * FBrix) + 0.000000086 * Math.pow(FBrix, 3), 4);
1093 1093
1094 // from http://seanterrill.com FGoc = old cubix, FGnc = new cubic, FGnl = new linear 1094 // from http://seanterrill.com FGoc = old cubic, FGnc = new cubic, FGnl = new linear
1095 var OBc = OBrix / my_brix_correction; 1095 var OBc = OBrix / my_brix_correction;
1096 var FBc = FBrix / my_brix_correction; 1096 var FBc = FBrix / my_brix_correction;
1097 1097
1098 // Old Cubic, almost the same a BrouwHulp, different offset and with brix_correction. 1098 // Old Cubic, almost the same a BrouwHulp, different offset and with brix_correction.
1099 var FGoc = Round(1.001843 - 0.002318474 * OBc - 0.000007775 * (OBc * OBc) - 0.000000034 * Math.pow(OBc, 3) + 1099 var FGoc = Round(1.001843 - 0.002318474 * OBc - 0.000007775 * (OBc * OBc) - 0.000000034 * Math.pow(OBc, 3) +
1105 0.00000727999 * Math.pow(OBc, 3) + 0.0000632929 * Math.pow(FBc, 3), 4); 1105 0.00000727999 * Math.pow(OBc, 3) + 0.0000632929 * Math.pow(FBc, 3), 4);
1106 1106
1107 // New linear, results are pretty much too high and way off for heavy beers. 1107 // New linear, results are pretty much too high and way off for heavy beers.
1108 var FGnl = Round(1 - 0.000856829 * OBc + 0.00349412 * FBc, 4); 1108 var FGnl = Round(1 - 0.000856829 * OBc + 0.00349412 * FBc, 4);
1109 1109
1110 console.log('brix_to_fg(' + Round(OBrix, 2) + ', ' + FBrix + ') FGbh:' + FGbh + ' FGoc:' + FGoc + ' FGnc:' + FGnc + ' FGnl:' + FGnl); 1110 // Petr Novotny, Zymurgy July/August 2017. Used by Brewers Friend.
1111 var FGbf = Round(1 + 0.006276 * FBc - 0.002349 * OBc, 4);
1112
1113 console.log('brix_to_fg(' + Round(OBrix, 2) + ', ' + FBrix + ') FGbh:' + FGbh + ' FGoc:' + FGoc + ' FGnc:' + FGnc + ' FGnl:' + FGnl + ' FGbf:' + FGbf);
1111 return FGnc; 1114 return FGnc;
1112 } 1115 }
1113 1116
1114 1117
1115 1118

mercurial