Skip to content

Commit

Permalink
boil impact on colour
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-mcl committed Sep 11, 2019
1 parent 13118d2 commit f030d9e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
34 changes: 34 additions & 0 deletions src/mclachlan/brewday/math/Equations.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,40 @@ public static ColourUnit calcColourSrmMoreyFormula(
return new ColourUnit(1.499D * (Math.pow(mcu, 0.6859D)), Quantity.Unit.SRM, true);
}

/*-------------------------------------------------------------------------*/

/**
* Calculates the colour impact of a boil.
*
* @param colourIn
* @return
*/
public static ColourUnit calcColourAfterBoil(ColourUnit colourIn)
{
//
// Brewday has an issue with colour calculations: existing formulae (eg Morey)
// require the use of MCUs based on post-boil gravity. But Brewday can't
// easily do that because the process steps are decoupled and there isn't
// necessarily a 1:1 mapping from mash to boil.
//
// One option would be passing MCUs around in volumes waiting to arrive at a
// post-boil gravity. I doubt this would work properly and haven't tried it
// yet.
//
// Instead I'm doing this: the typical brew process produces a post-boil
// volume about 60% of the input water. Working out a table of SRM values
// shows me that the SRM output is 42% higher when the MCU's are worked
// out with 60% of the water.
// So to model this in Brewday at boil time we increase the SRM by 42%.
//
// This is kinda wacky I admit. But to quote Palmer, there are "inherent
// limits of any model for beer colour".
//

double srmIn = colourIn.get(Quantity.Unit.SRM);
return new ColourUnit(srmIn*1.42, Quantity.Unit.SRM);
}

/*-------------------------------------------------------------------------*/
/**
* @param volumeIn in ml, assumed SRM of 0
Expand Down
7 changes: 4 additions & 3 deletions src/mclachlan/brewday/process/Boil.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ public void apply(Volumes volumes, EquipmentProfile equipmentProfile, ProcessLo
PercentageUnit abvOut = Equations.calcAbvWithVolumeChange(
inputWort.getVolume(), inputWort.getAbv(), volumeOut);

// todo: account for kettle caramelisation darkening?
ColourUnit colourOut = Equations.calcColourWithVolumeChange(
inputWort.getVolume(), inputWort.getColour(), volumeOut);
// colour changes
ColourUnit colourOut = Equations.calcColourAfterBoil(inputWort.getColour());
colourOut = Equations.calcColourWithVolumeChange(
inputWort.getVolume(), colourOut, volumeOut);

BitternessUnit bitternessOut = new BitternessUnit(inputWort.getBitterness());
for (IngredientAddition hopCharge : hopCharges)
Expand Down
6 changes: 3 additions & 3 deletions stufftodo.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
water chemistry & pH
mash hop, misc additions
boil misc additions
first wort hop additions
boil step: add kettle caramelisation colour change
persistence back ends: Github, Dropbox
---------------------
first wort hop additions
right click menu for ingredient additions/step options
import from beersmith
packaging 2: javapackager?
Expand All @@ -15,6 +14,7 @@ fix yeast pitch rate impact
batch/inventory integration
shopping list document generation
---------------------
package step: kegging, krausen and other carbonation methods
extract & partial mash brewing
tools on the step pages: eg target mash temp
UI support for user selected units of measurement
Expand All @@ -25,5 +25,5 @@ bitterness: rager, gareth methods
decoction mashing
ferment step: multiple yeast additions, yeast blends
ferment step: impact of yeast addition size
package step: kegging, krausen and other carbonation methods


0 comments on commit f030d9e

Please sign in to comment.