Brewtarget / brewtarget

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

bug in recipe tab when changing mash #728

Open Jazzbeerman opened 1 year ago

Jazzbeerman commented 1 year ago

Hey, I think I found a couple of interesting stumbles. So, if I need to recalculate the mash profile for correction purposes, then I have a series of bugs. Let's start with "simple". Let's say you need to reduce the amount of cooking. Enter in the target batch size, target boil size. After that, in the mashing tab, use mash wiz. Calculation works correctly, but no changes are made in the main recipe window, and if you click "generate instructions" in the brewday tab, the instructions will be generated as if there were no changes in the target batch size and boil. This will also be indicated by the graphical display of the blue lines "batch size" and "boil size". But if you restart brewtarget, then the changes will be made, and everything is correct. As far as I can tell, this bug (or maybe not) is related to query and persistence in SQLite. Perhaps in the case of a batch correction, saving does not occur immediately.

The second bug is also related to the overwrite tab. We can use mash wiz to adjust the density of the mash by changing the L/kg and, in the case of Batch Sparge, the number of batches. But if we want to stop using sparge, then the program will refuse to add this water (the one used for sparge) to the previous steps in order to maintain the target boil volume. Maybe I'm a brewing noob and everyone should be using sparge, but then why does the program have a "no sparge" option? :)

P.S. this generally does not interfere with the operation of the program, so I would not call these bugs significant. (As always, I can describe the problem without saying my setup. I still need to learn how to post.) So, this is win10, the error is definitely on versions 3.0.5, 3.0.6., 3.0.7. However, it seems that it is rather used only in the case of the decoction method of infusion, since in the infusion it seems to work correctly.

matty0ung commented 1 year ago

Thanks for the detailed info. Will have a look at this. I managed to break the mash wizard a while back when I rewrote the database abstraction layer. @mikfire gave me lots of patient feedback on what was misbehaving, which resulted in a fair few fixes, but it's entirely plausible that I didn't get everything 100% right!

mikfire commented 1 year ago

The first will almost certainly be a missing signal. It has all the signs I have come to associate with a missing signal.

For the second problem, do the mash steps get deleted and the volume of water simply is not added back to the infusion step, or do the old mash steps not get deleted?

The reason we have a 'no-sparge' option is that one of the developers (cough) bought an electric, all-in-one brewing system and has not sparged since.

Jazzbeerman commented 1 year ago

Since I am not very fluent in English, I may not have been able to describe this process clearly and precisely. I will try to fix this using an example and settings from my home equipment (the pathos word equipment looks like two pans, 50 and 24 liters, haha) So, the mash tun is 50 liters. This is a pot with a false bottom that eats up 13,2 liters of usable volume, but for now this is what we have. I use the decoction method, so the first step is to pour in the bulk of the water and fill in the grain for the first temperature break (because my malt isn't always of good quality, I go through most of the breaks). So, pauses can be seen in the screenshot. 1

Great, this is what I need. But let's say I want to do a little experiment and make a mash in a 100 liter vat (this is just for the sake of an example). In this case, I would not like to cook sparge water separately, and I mark "no sparge". And... We see the result in the next screenshot. 2 Boom! The program simply deprived me of this water! That is, 15,888 liters disappeared without being added to the infusion phase.

But now the fun part. If I take a different mash profile (anything from the standard sets) then selecting the "no sparge" option works correctly! Let it be the recipe Bt: Saison (in this case, it does not matter which recipe, the main thing is that the mashing is infusion) With sparge screenshot: 3 Without sparge: 4

It works! I think the program just can't figure out what to look for any further than the previous mash step if it happens to be the last step is decoction. After all, it's not that scary to manually rewrite the original infusion (I think I could add 35,250+15,888 and then press mash wiz again to have the program adjust the amount of decoctions, haha). But perhaps this fix to the "no sparge" algorithm would be a bit helpful. I tried to describe this situation to a greater extent so that some brewers who may follow my example take into account this feature of the program and test their mashing algorithms.

mikfire commented 1 year ago

Wonderful. Your English is fine. The screen shots were perfect and this should help a lot. Thanks for the update.