Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
310 stars 134 forks source link

Efficiency into boil kettle calculation unstable after closing and re-opening Brewtarget #789

Closed dschwilk closed 5 months ago

dschwilk commented 5 months ago

brewtarget-3.0.10-2_amd64.deb on Kubuntu 22.04 fresh install. Fresh sqlite database

If I edit the SG value under a BrewNote preboil tab, the "Efficiency into boil kettle" recalculates. The first time it does this, the calculation looks correct and matches the recipe tab and my external calculations. However, after a save and re-opening, this changes and the "Efficiency into boil kettle" number goes WAY up (and so does predicted postboil OG). It then stays stable at some new incorrect calculation (eg 99% when it should be 75%).

The only fix is to delete that brewnote and create another, but the problem re-emerges. I deleted my database and re-installed. This happens with built in recipes. For example, If I "brew it" on the Bt: American Pale Ale recipe, and change the preoboil sg, it calculates correctly (69.6% at sg 1.042 vol 6.75 gal). Closing brewtarget and re-opening, then changing that sg field, results in an incorrect Efficiency into boil kettle number (85.41% at sg 1.042).

dschwilk commented 5 months ago

Getting the same problem with brewtarget-3.0.11 latest build (using github built deb)

matty0ung commented 5 months ago

Thanks for the detailed report. I've reproduced the bug locally. Will have a look at what's going on.

matty0ung commented 5 months ago

It's a one-line fix. The "getter" function for "expected volume into kettle" is picking up the wrong field and returning "expected volume into fermenter", which then, obviously, throws off the other calculations. Patch incoming.

matty0ung commented 5 months ago

Should be fixed by https://github.com/Brewtarget/brewtarget/pull/790, but please reopen if not.

Will try to get to a 3.0.11 release soon!

matty0ung commented 5 months ago

Fix included in https://github.com/Brewtarget/brewtarget/releases/tag/v3.0.11.