2
Copyright Philip Greggory Lee (rocketman768@gmail.com), 2008-2009.
4
hoputilization.cpp is part of Brewtarget.
6
Brewtarget is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
11
Brewtarget is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with Brewtarget. If not, see <http://www.gnu.org/licenses/>.
20
// Uses a method outlined at http://www.realbeer.com/hops/research.html
24
double BoilTimeFactor( double minutes )
26
return (1.0 - exp(-0.04 * minutes))/4.15;
29
double BignessFactor( double wort_grav )
31
return 1.65 * pow(0.000125, (wort_grav - 1));
34
double AlphaAcidUtilization( double wort_grav, double minutes )
36
return BoilTimeFactor(minutes) * BignessFactor(wort_grav);
39
double MaxAAConcentration_mgPerLiter(double AArating, double hops_grams, double finalVolume_liters)
41
return (AArating * hops_grams * 1000) / finalVolume_liters;
44
double IBU( double AArating, double hops_grams, double finalVolume_liters, double wort_grav, double minutes)
46
return MaxAAConcentration_mgPerLiter(AArating, hops_grams, finalVolume_liters) * AlphaAcidUtilization(wort_grav, minutes);