Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibu in whirlpool #418

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

marcelobarrosalmeida
Copy link

@marcelobarrosalmeida marcelobarrosalmeida commented Aug 7, 2018

Hi, here are the changes for supporting better IBU estimation in whirlpool, after flameout. As far as I understood, I did all the changes:

  • database changes and database update
  • recipes generation
  • equipment and hop editors
  • UI modifications

The code does not affect any older recipe. Calculations are only applied if the feature is selected in equipment editor. I only couldn't understand what to do for locales.

About the last attempt of pull request:
As the error reported by travis does not happen in my base I decided to update the code from develop and tried to rebase. But I had many problems during merge. Please, cancel that push request.

@marcelobarrosalmeida
Copy link
Author

Sorry, I misunderstood your comments. I saw many comments not related to my modifications so I understood that I should start again. But it is ok, there is a expression that explains what happened:

Not sure if these comments belong in #418 or here, but I'm putting them here to avoid cluttering the pull request.

I have a comment, related to the following phrase:

Unit type of length should probably be distance, for generalization and in accordance with unit conventions.

The quantity name, according to International System of Units, is length, not distance. Should I really keep distance ?

Marcelo

@pricelessbrewing
Copy link
Contributor

Thanks Marcel! Sorry for the misunderstanding, the UI changes I think would help, but aren't necessary for this pull.

Length vs distance

That's surprising to me that isu uses length instead of the dimensionless qty of distance, but not a problem. I'm not concerned with that too much, it's not really an issue.

@pricelessbrewing
Copy link
Contributor

Doesn't look like the travis CI errors are related to this PR. They seem to either be due to mashwizard.cpp, or some part of Qt.

@dpettersson
Copy link
Contributor

@pricelessbrewing The travis CI error has something to do with QT. We have seen it before so is not related to the pull request.
A visual inspection of the code tells me that it looks good. Can you compile and test it?
it is 11:15pm here and i need to get to bed (early workday tomorrow).

Copy link
Contributor

@dpettersson dpettersson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK. Can be merged after tests.

@pricelessbrewing
Copy link
Contributor

I'm getting some errors when building.

95%] Built target brewtarget_autogen
[ 95%] Generating ../win/icon.o
gcc: error: IBU: No such file or directory
gcc: error: whirlpool: No such file or directory
gcc: error: testing/brewtarget-64c9512e0a65172549ab35a0b24ab483a38ef055/src: No such file or directory
windres.exe: preprocessing failed.
src\CMakeFiles\brewtarget.dir\build.make:60: recipe for target 'win/icon.o' failed
mingw32-make[2]: *** [win/icon.o] Error 1
CMakeFiles\Makefile2:227: recipe for target 'src/CMakeFiles/brewtarget.dir/all' failed
mingw32-make[1]: *** [src/CMakeFiles/brewtarget.dir/all] Error 2
makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

@pricelessbrewing
Copy link
Contributor

@marcelobarrosalmeida or @dpettersson would one of you please try and build from this PR? I'm unable to perform tests due to error log above.

@dpettersson
Copy link
Contributor

dpettersson commented Sep 25, 2018 via email

@dpettersson
Copy link
Contributor

I downloaded a new copy of the develop-branch and applied this commit. It built as it should.
@pricelessbrewing Try using a fresh copy of develop and it should work.

@pricelessbrewing
Copy link
Contributor

Alright, so I got this built. Some quick feedback from testing below:

The issue I'm seeing is that hop time for whirlpool additions don't matter. They should. Additionally, an error should be thrown if the hop addition whirlpool time exceeds the whirlpool time in the equipment editor, or set it so you can't enter a value greater than what is in the equipment.

Additionally I'd like to see the tooltip in the equipment editor specify the assumptions made for this formula (ie No chilling or heat applied during whirlpool for the time specified).

Lastly, this additional IBU contribution should be applied to boil additions as well, as these oils will continue to isomerize. (see blue graph sections for graphs 4, 5, and 8) on.

https://alchemyoverlord.wordpress.com/2015/05/12/a-modified-ibu-measurement-especially-for-late-hopping/

I'd also like the toggle for this formula to be placed in tools/options/formulas with a dropdown selection for something like "mIBU - modification of Tinseth's approximation."

Personally I think this is a great idea and something I really want to see done but probably push back to v2.5, and also implement a new process step for boil/whirlpool and chilling so this can be done properly.

@marcelobarrosalmeida
Copy link
Author

marcelobarrosalmeida commented Oct 3, 2018 via email

@pricelessbrewing
Copy link
Contributor

pricelessbrewing commented Oct 4, 2018

Thanks for the correction, I see that the IBUs do in fact change for boil additions when the option is checked in equipment.

I'm still not comfortable approving this without the whirlpool time for a hop addition being taken into account. I think it will cause confusion with the user base to have an option for whirlpooling utilization, but not take the hop addition into account.

I'd have to take a look at what formula you're using more closely to suggest an approach to take, but in general the whirlpooling utilization for each addition can be taken separately, then summed at the end, and for whirlpool additions set the whirlpooling utilization time equal to

max( equipment_time, hop_addition_whirlpool_time).

Of course @Brewtarget/integration get the final say if they want to overrule me.

@marcelobarrosalmeida
Copy link
Author

marcelobarrosalmeida commented Oct 4, 2018 via email

@pricelessbrewing
Copy link
Contributor

@marcelobarrosalmeida I think the simplest way to go would be to change the double whirlpool_minutes to be something like

min(equipment_whirlpool, hop_addition_whirlpool)

so that if a hop addition's whirlpool time exceeds the equipment whirlpool time then it's doesn't continue to add IBUS, but if it's less than the whirlpool time it behaves according to the hop table.

If we can do that, then I'd be happy to approve it after testing compared to the alchemyoverlord mIBU calculator. Would also appreciation some code comments in this PR, specifically in IBUMethods.cpp getIbusWhirlpool function.

Would still LIKE to move towards separating processes and equipment, but I don't think I'm familiar enough with the code to figure that out right now. It can wait till the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants