diff -r e97f9e87d94b -r 8133cdb19aa1 src/Utils.h --- a/src/Utils.h Tue Jul 05 14:31:39 2022 +0200 +++ b/src/Utils.h Thu Jul 07 08:51:57 2022 +0200 @@ -32,8 +32,60 @@ double kw_to_ebc(int colormethod, double c); double kw_to_newebc(int colormethod, double c); double abvol(double og, double fg); + + /** + * @brief Calculate standar air pressure at the brewery. + * Assume 20°C and use the global setup height. + * @return Pressure in hPa. + */ + double brewery_hPa(); + + /** + * @brief Return boil temperature in °C at the brewery height. + * @return Temperature in °C + */ + double boilPoint(); + + /** + * @brief Calculate IBU reduction at given temperature. + * @param Tc temperature in °C. + * @return The reduction factor. + */ + double IBU_reduction(double Tc); + + /** + * @brief Calculate IBU's of a hop at 100°C. + * @param Use HOP_USEAT_MASH HOP_USEAT_FWH HOP_USEAT_BOIL, all others are ignored. + * @param Form HOP_FORMS_PELLET HOP_FORMS_PLUG HOP_FORMS_LEAF HOP_FORMS_LEAF_WET HOP_FORMS_CRYO HOP_FORMS_EXTRACT + * @param SG the density + * @param Volume in liters + * @param Amount in kilograms + * @param Time in minutes + * @param Alpha in procent + * @param Method, 0 = Tinseth, 1 = Rager, 2 = Daniels + * @return The calculated IBU's + */ + double boilIBU(int Form, double SG, double Volume, double Amount, double Time, double Alpha, int Method); + + /** + * @brief Calculate IBU's of a hop during the whole production process. + * @param Use HOP_USEAT_MASH HOP_USEAT_FWH HOP_USEAT_BOIL HOP_USEAT_AROMA HOP_USEAT_WHIRLPOOL HOP_USEAT_DRY_HOP HOP_USEAT_BOTTLING + * @param Form HOP_FORMS_PELLET HOP_FORMS_PLUG HOP_FORMS_LEAF HOP_FORMS_LEAF_WET HOP_FORMS_CRYO HOP_FORMS_EXTRACT + * @param SG the density + * @param Volume in liters + * @param Amount in kilograms + * @param Boiltime in minutes + * @param Alpha in procent + * @param Method, 0 = Tinseth, 1 = Rager, 2 = Daniels + * @param Whirlpool9 time in whirlpool above 80°C or zero. + * @param Whirlpool7 time in whirlpool between 72°C and 77°C. + * @param Whirlpool6 time in whirlpool between 60°C amd 66°C. + * @param Fulltime, full boiltime, even for aroma hops. + * @return The calculated IBU's + */ double 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); + double hopFlavourContribution(double bt, double vol, int use, double amount); double hopAromaContribution(double bt, double vol, int use, double amount); QString hours_to_string(int hours);