Fri, 13 Jan 2023 12:00:58 +0100
Added a button to automatic recreate the yeast starter steps. Some code cleanup
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | #ifndef _UTILS_H |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | #define _UTILS_H |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
42
diff
changeset
|
4 | #include <QString> |
95
ef6048186cb3
Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
5 | #include <QColor> |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
42
diff
changeset
|
6 | |
134
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
7 | // #define Ka1 0.0000004445 |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
8 | // #define Ka2 0.0000000000468 |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
9 | |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | /** |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * @namespace Utils |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * @brief Global math functions. |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | */ |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | namespace Utils { |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | double lintner_to_kolbach(double lintner); |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | double kolbach_to_lintner(double kolbach); |
42
88e827ea7172
Fixed recommend mash checkmark in fermentable editor. Added fermentables XML export.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
20 | double ebc_to_srm(double ebc); |
88e827ea7172
Fixed recommend mash checkmark in fermentable editor. Added fermentables XML export.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
21 | double srm_to_ebc(double srm); |
102
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
22 | double get_kt(int ebc); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
23 | double plato_to_sg(double plato); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
24 | double sg_to_plato(double sg); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
25 | double brix_to_sg(double brix); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
26 | double sg_to_brix(double sg); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
27 | double brix_to_fg(double o_plato, double refracto); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
28 | double calc_svg(double og, double fg); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
29 | double estimate_sg(double sugars, double batch_size); |
449
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
30 | |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
31 | /** |
453
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
32 | * @brief Return log with custom base. |
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
33 | * @param y The input value. |
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
34 | * @param b The base to use. |
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
35 | * @return The log result. |
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
36 | */ |
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
37 | double logbase(double y, int b); |
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
38 | |
fc0c10d79539
Calculate mash attenuation time using log base 5 instead of a linear function.
Michiel Broek <mbroek@mbse.eu>
parents:
449
diff
changeset
|
39 | /** |
449
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
40 | * @brief Predict FG using recipe data. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
41 | * @param psugar Percentage sugar in the wort. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
42 | * @param pcara Percentage cara/crystal malts in the wort. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
43 | * @param wgratio The water/grain ratio of the mash. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
44 | * @param mashtime The total mash time in minutes. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
45 | * @param mashtemp The average mash temperature. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
46 | * @param svg The SVG percentage of the primary yeast. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
47 | * @param og The Original Gravity of the wort. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
48 | * @param sta1 The STA1 gen present in the yeast flag. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
49 | * @return The predicted Final Gravity. |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
50 | */ |
00757c056ca6
With estimate_fg added a boolean parameter sta1 to correct the outcome if a primary yeast with sta1 gen is used. Fixed a spelling error in EditProduct yeast tab for dry yeast.
Michiel Broek <mbroek@mbse.eu>
parents:
443
diff
changeset
|
51 | double estimate_fg(double psugar, double pcara, double wgratio, double mashtime, double mashtemp, double svg, double og, bool sta1); |
102
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
52 | double kw_to_srm(int colormethod, double c); |
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
53 | double kw_to_ebc(int colormethod, double c); |
168
4bc92122d001
Added kw_to_newebc function to debug EBC differences.
Michiel Broek <mbroek@mbse.eu>
parents:
135
diff
changeset
|
54 | double kw_to_newebc(int colormethod, double c); |
102
b017001850df
Almost finished calcFermentables()
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
55 | double abvol(double og, double fg); |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
56 | |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
57 | /** |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
58 | * @brief Calculate standar air pressure at the brewery. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
59 | * Assume 20°C and use the global setup height. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
60 | * @return Pressure in hPa. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
61 | */ |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
62 | double brewery_hPa(); |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
63 | |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
64 | /** |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
65 | * @brief Return boil temperature in °C at the brewery height. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
66 | * @return Temperature in °C |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
67 | */ |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
68 | double boilPoint(); |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
69 | |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
70 | /** |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
71 | * @brief Calculate IBU reduction at given temperature. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
72 | * @param Tc temperature in °C. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
73 | * @return The reduction factor. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
74 | */ |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
75 | double IBU_reduction(double Tc); |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
76 | |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
77 | /** |
339
2f3cfb983fcc
Removed Garetz and Rager IBU calculations, we will only use Tinseth
Michiel Broek <mbroek@mbse.eu>
parents:
337
diff
changeset
|
78 | * @brief Calculate IBU's of a hop at 100°C using the Tinseth formula. |
343
67e645b9d23f
Removed old experiment to calculate flameout and whirlpool ibu's. Changed Tinseth calculation to use a time window so you can select the ibu contribution during a specified time. Added ibu_method Tinset++. Added calculation extensions for Tinseth++, this calculates the flameout and whirlpool effects on all hops. During cooling is to be done.
Michiel Broek <mbroek@mbse.eu>
parents:
340
diff
changeset
|
79 | * Use a time window, for example T1 = 60, T2 = 70 gives the ibus increment for |
67e645b9d23f
Removed old experiment to calculate flameout and whirlpool ibu's. Changed Tinseth calculation to use a time window so you can select the ibu contribution during a specified time. Added ibu_method Tinset++. Added calculation extensions for Tinseth++, this calculates the flameout and whirlpool effects on all hops. During cooling is to be done.
Michiel Broek <mbroek@mbse.eu>
parents:
340
diff
changeset
|
80 | * a hop that is already 60 minutes in the wort for the next 10 minutes time. |
67e645b9d23f
Removed old experiment to calculate flameout and whirlpool ibu's. Changed Tinseth calculation to use a time window so you can select the ibu contribution during a specified time. Added ibu_method Tinset++. Added calculation extensions for Tinseth++, this calculates the flameout and whirlpool effects on all hops. During cooling is to be done.
Michiel Broek <mbroek@mbse.eu>
parents:
340
diff
changeset
|
81 | * This is useful for calculating flamout, chilling and hopstands. |
67e645b9d23f
Removed old experiment to calculate flameout and whirlpool ibu's. Changed Tinseth calculation to use a time window so you can select the ibu contribution during a specified time. Added ibu_method Tinset++. Added calculation extensions for Tinseth++, this calculates the flameout and whirlpool effects on all hops. During cooling is to be done.
Michiel Broek <mbroek@mbse.eu>
parents:
340
diff
changeset
|
82 | * @param Form HOP_FORMS_PELLET HOP_FORMS_PLUG HOP_FORMS_LEAF HOP_FORMS_LEAF_WET HOP_FORMS_CRYO HOP_FORMS_EXTRACT |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
83 | * @param SG the density |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
84 | * @param Volume in liters |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
85 | * @param Amount in kilograms |
343
67e645b9d23f
Removed old experiment to calculate flameout and whirlpool ibu's. Changed Tinseth calculation to use a time window so you can select the ibu contribution during a specified time. Added ibu_method Tinset++. Added calculation extensions for Tinseth++, this calculates the flameout and whirlpool effects on all hops. During cooling is to be done.
Michiel Broek <mbroek@mbse.eu>
parents:
340
diff
changeset
|
86 | * @param T1 in minutes start of time window |
67e645b9d23f
Removed old experiment to calculate flameout and whirlpool ibu's. Changed Tinseth calculation to use a time window so you can select the ibu contribution during a specified time. Added ibu_method Tinset++. Added calculation extensions for Tinseth++, this calculates the flameout and whirlpool effects on all hops. During cooling is to be done.
Michiel Broek <mbroek@mbse.eu>
parents:
340
diff
changeset
|
87 | * @param T2 in minutes end of time window |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
88 | * @param Alpha in procent |
373
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
89 | * @param Utilisation Hop extract utilisation |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
90 | * @param BU_factor Bitterness Unit multiply factor |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
91 | * @return The calculated IBU's |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
92 | */ |
373
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
93 | double TinsethIBU(int Form, double SG, double Volume, double Amount, double T1, double T2, double Alpha, double Utilisation, double BU_factor); |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
94 | |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
95 | /** |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
96 | * @brief Calculate IBU's of a hop during the whole production process. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
97 | * @param Use HOP_USEAT_MASH HOP_USEAT_FWH HOP_USEAT_BOIL HOP_USEAT_AROMA HOP_USEAT_WHIRLPOOL HOP_USEAT_DRY_HOP HOP_USEAT_BOTTLING |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
98 | * @param Form HOP_FORMS_PELLET HOP_FORMS_PLUG HOP_FORMS_LEAF HOP_FORMS_LEAF_WET HOP_FORMS_CRYO HOP_FORMS_EXTRACT |
373
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
99 | * @param preSG the density pre boil. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
100 | * @param postSG the density after the boil. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
101 | * @param Volume in liters after boil. |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
102 | * @param Amount in kilograms |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
103 | * @param Boiltime in minutes |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
104 | * @param Alpha in procent |
339
2f3cfb983fcc
Removed Garetz and Rager IBU calculations, we will only use Tinseth
Michiel Broek <mbroek@mbse.eu>
parents:
337
diff
changeset
|
105 | * @param Method, 0 = Tinseth, 1 = Tinseth++ (+flamout, +whirlpool etc). |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
106 | * @param Whirlpool9 time in whirlpool above 80°C or zero. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
107 | * @param Whirlpool7 time in whirlpool between 72°C and 77°C. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
108 | * @param Whirlpool6 time in whirlpool between 60°C amd 66°C. |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
109 | * @param Fulltime, full boiltime, even for aroma hops. |
340
b9af88bfe972
Added cooling parameters to the toIBU function.
Michiel Broek <mbroek@mbse.eu>
parents:
339
diff
changeset
|
110 | * @param Cooltype 0 = N/A, 1 = Emersion chiller, 2 = Counterflow, 3 = Au bain marie, 4 = natural |
440
349c0c5bd512
Implemented IBU calculation for chilling.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
111 | * @param CoolTo79 Chiller time to 79 degrees for immersion chillers. |
349c0c5bd512
Implemented IBU calculation for chilling.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
112 | * @param CoolLPM Chiller transfer liters/minute for counterflow chillers. |
373
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
113 | * @param Utilisation Hop extract utilisation |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
114 | * @param BU_factor Bitterness Unit multiply factor |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
115 | * @return The calculated IBU's |
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
116 | */ |
373
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
117 | double toIBU(int Use, int Form, double preSG, double postSG, double Volume, double Amount, double Boiltime, double Alpha, |
340
b9af88bfe972
Added cooling parameters to the toIBU function.
Michiel Broek <mbroek@mbse.eu>
parents:
339
diff
changeset
|
118 | int Method, double Whirlpool9, double Whirlpool7, double Whirlpool6, double Fulltime, |
440
349c0c5bd512
Implemented IBU calculation for chilling.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
119 | int Cooltype, double CoolTo79, double CoolLPM, double Utilisation, double BU_factor); |
337
8133cdb19aa1
Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents:
212
diff
changeset
|
120 | |
373
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
121 | /** |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
122 | * @brief Estimate hop flavour contribution. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
123 | * @param bt Boil time in minutes. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
124 | * @param vol Volume of the wort. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
125 | * @param use Hop use moment. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
126 | * @param amount The amount in kg. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
127 | * @param form The hop form. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
128 | * @return A number indicating a contribution factor. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
129 | */ |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
130 | double hopFlavourContribution(double bt, double vol, int use, double amount, int form); |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
131 | |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
132 | /** |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
133 | * @brief Estimate hop aroma contribution. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
134 | * @param bt Boil time in minutes. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
135 | * @param vol Volume of the wort. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
136 | * @param use Hop use moment. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
137 | * @param amount The amount in kg. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
138 | * @param form The hop form. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
139 | * @return A number indicating a contribution factor. |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
140 | */ |
b02aca4e926c
First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
141 | double hopAromaContribution(double bt, double vol, int use, double amount, int form); |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
42
diff
changeset
|
142 | QString hours_to_string(int hours); |
212
8b84dd3579ef
Added calculation tools to measure volume in the boil kettle using measured centimeters.
Michiel Broek <mbroek@mbse.eu>
parents:
208
diff
changeset
|
143 | double kettle_cm(double volume, double kettle_volume, double kettle_height); |
8b84dd3579ef
Added calculation tools to measure volume in the boil kettle using measured centimeters.
Michiel Broek <mbroek@mbse.eu>
parents:
208
diff
changeset
|
144 | double kettle_vol(double cm, double kettle_volume, double kettle_height); |
98
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
145 | |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
146 | /** |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
147 | * @brief Map SRM color to RGB and return as QColor. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
148 | * @param srm The srm value. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
149 | * @return QColor |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
150 | */ |
95
ef6048186cb3
Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
151 | QColor srm_to_color(int srm); |
98
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
152 | |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
153 | /** |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
154 | * @brief Map EBC color to RGB and return as QColor. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
155 | * @param ebc The ebc value. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
156 | * @return QColor |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
157 | */ |
95
ef6048186cb3
Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
158 | QColor ebc_to_color(int ebc); |
98
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
159 | |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
160 | /** |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
161 | * @brief Map SRM color to a QString for stylesheets. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
162 | * @param srm The srm value. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
163 | * @return A QString with stylesheet colors. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
164 | */ |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
165 | QString srm_to_style(int ebc); |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
166 | |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
167 | /** |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
168 | * @brief Map EBC color to a QString for stylesheets. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
169 | * @param ebc The ebc value. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
170 | * @return A QString with stylesheet colors. |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
171 | */ |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
172 | QString ebc_to_style(int srm); |
134
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
173 | |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
174 | /** |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
175 | * @brief Mix water volumes and ingredients. |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
176 | * |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
177 | */ |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
178 | double mix(double v1, double v2, double c1, double c2); |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
179 | |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
180 | /** |
350
37b3c690b02c
Added calculation preboild pH in recipes. Added water hardness and residual alkalinity calculations in the water tab.
Michiel Broek <mbroek@mbse.eu>
parents:
343
diff
changeset
|
181 | * @brief Calculate water hardness |
37b3c690b02c
Added calculation preboild pH in recipes. Added water hardness and residual alkalinity calculations in the water tab.
Michiel Broek <mbroek@mbse.eu>
parents:
343
diff
changeset
|
182 | */ |
37b3c690b02c
Added calculation preboild pH in recipes. Added water hardness and residual alkalinity calculations in the water tab.
Michiel Broek <mbroek@mbse.eu>
parents:
343
diff
changeset
|
183 | double Hardness(double calcium, double magnesium); |
37b3c690b02c
Added calculation preboild pH in recipes. Added water hardness and residual alkalinity calculations in the water tab.
Michiel Broek <mbroek@mbse.eu>
parents:
343
diff
changeset
|
184 | |
356
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
185 | /** |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
186 | * @brief Calculate HCO3 (bicarbonate) from the total_alkalinity and ph. |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
187 | * @param total_alkalinity as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
188 | * @param ph the pH |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
189 | * @return The bicarbonate as HCO3. |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
190 | */ |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
191 | double Bicarbonate(double total_alkalinity, double ph); |
350
37b3c690b02c
Added calculation preboild pH in recipes. Added water hardness and residual alkalinity calculations in the water tab.
Michiel Broek <mbroek@mbse.eu>
parents:
343
diff
changeset
|
192 | |
37b3c690b02c
Added calculation preboild pH in recipes. Added water hardness and residual alkalinity calculations in the water tab.
Michiel Broek <mbroek@mbse.eu>
parents:
343
diff
changeset
|
193 | /** |
356
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
194 | * @brief Return Residual Alkalinity as CaCO3 |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
195 | * @param bicarbonate as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
196 | * @param carbonate CO3 as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
197 | * @param calcium as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
198 | * @param magnesium as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
199 | * @return Residual Alkalinity |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
200 | */ |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
201 | double RA_CaCO3(double bicarbonate, double carbonate, double calcium, double magnesium); |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
202 | |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
203 | /** |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
204 | * @brief Return Residual Alkalinity as CaCO3, Paul Kolbach. |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
205 | * @param total_alkalinity as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
206 | * @param calcium as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
207 | * @param magnesium as ppm |
f60f5a1fece9
Made the Hardness function more precise. Removed RA_ppm function, was doubles with ResidualAlkalinity. Added RA_CaCO3 and Bicarbonate functions.
Michiel Broek <mbroek@mbse.eu>
parents:
350
diff
changeset
|
208 | * @return Residual Alkalinity |
134
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
209 | */ |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
210 | double ResidualAlkalinity(double total_alkalinity, double calcium, double magnesium); |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
211 | |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
212 | double PartCO3(double pH); |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
213 | |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
214 | double PartHCO3(double pH); |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
215 | |
5099df8ba6c6
Moved the mix function to Utils. Added some calculations to Utils. Added defines to global.h.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
216 | double Charge(double pH); |
135
e68b27ad8a40
Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents:
134
diff
changeset
|
217 | |
e68b27ad8a40
Added dutch translations to the internal acids array. Added slot for calc_acid checkbox. Added more water calculations. The miscs amount fields now have two decimal digits. Show treated waters and good/bad indicators.
Michiel Broek <mbroek@mbse.eu>
parents:
134
diff
changeset
|
218 | double CalcFrac(double TpH, double pK1, double pK2, double pK3); |
442
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
219 | |
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
220 | /** |
443
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
221 | * @brief Calculate residual volumes CO2 in the fermenter. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
222 | * @param T The highest fermentation temperature in celsius. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
223 | * @return The volumes CO2. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
224 | */ |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
225 | double ResCO2(double T); |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
226 | |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
227 | /** |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
228 | * @brief Calculate the grams/liter sugar. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
229 | * @param CO2 The desired volumes CO2. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
230 | * @param T The highest fermentation temperature in celsius. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
231 | * @param SFactor The sugar factor, 1.0 for table sugar. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
232 | * @return The grams/liter of the chosen priming sugar. |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
233 | */ |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
234 | double CarbCO2toS(double CO2, double T, double SFactor); |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
235 | |
3c195eb4e7a1
Details CO2 monitor shows the style limits for the specific beer. Adjust the scale of the pressure widget to the beer limits. Moved more functions to the global Utils. Fix expected pressure in the package screen for other priming sugars. Disabled some debug log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
442
diff
changeset
|
236 | /** |
442
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
237 | * @brief Calculate pressure in Bar after refermentation. |
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
238 | * @param gl Sugar in gram/liter |
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
239 | * @param T Temperature in celsius |
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
240 | * @return Pressure in Bar. |
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
241 | */ |
d8c110d91b1f
Moved GetPressureBar function to the Utils.
Michiel Broek <mbroek@mbse.eu>
parents:
440
diff
changeset
|
242 | double GetPressureBar(double gl, double T); |
20
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
243 | } |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
244 | |
fcbbddcc22c1
Completed the Fermentables editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
245 | #endif |