• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

Check out my water spreadsheet

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
P=kg_of_extract/(volume_of_wort*SG*0.998203)
So here you are assuming that you have made an SG measurement (though you didn't mention that in the previous post).

No, that's not it.

SG is a function of P. One example of such a function is the ASBC equation.

What you do is put this function P(SG) in the denominator instead of an SG value, and so you are left with only one variable P on both sides of the equation.

If I plug in my huge inverse ASBC equation above for P(SG) function, I probably won't be able to express P explicitly. So there comes the root finder.

As home brewers we might expect to be 10% less efficient than the lab people and so we assume 70%.
Does this mean you assume your efficiency = 7/8 = 87.5%?

Now to the example. I know my grain absorption is 1.2 L/kg.
I don't have any deadspace.
So I get 40-1.2*10=28 L in the first drain.
Then I batch sparge with 10 more L of water.
That leaves me with 38 L of wort (of what mass?) with 7 kg of extract pre-boil?

That's the way I was calculating it, but now I'm questioning if I could add volumes like this.

I guess this is confusing to me because I always thought of the whole process including grain absorption on the basis of volume.

What I knew for sure was I lose this volume of water on absorption and this volume on evaporation, and I end up with this volume post-boil. This worked for me.
When I thought of calculating OG, I instinctively went with kg of extract and post-boil volume as my variables.
 
No, that's not it.

SG is a function of P. One example of such a function is the ASBC equation.

What you do is put this function P(SG) in the denominator instead of an SG value, and so you are left with only one variable P on both sides of the equation.

I think the problem you must be trying to solve is, in effect:
I have put 126 grams of sucrose into a volumetric flask and made up to 1 L without measuring the amount of water I added. How much water did I add? From the answer to that question we can trivially compute °P, SG and density, the partial molar volume of sucrose at that concentration etc.

I think this must be the problem because the equation you posted solves that problem

P(SG) = 100*M/(V*SG*.998203)

Multiplying both sides by SG gives

SG*P(SG) = M/(0.998293*V)

and we then have to solve the 4th order equation in SG

SG*P(SG) -M/(0.998293*V) = 0


If I plug in my huge inverse ASBC equation above for P(SG) function, I probably won't be able to express P explicitly. So there comes the root finder.

There are closed form solutions for 4th order equations but here a root finder or Newtons method is much easier to implement. For the 100 grams in a 1000 mL solution.

0.126 Extract Mass
1 Volume
1.05 trial SG
0.38434652 trialFunction
-367.6201786 Slope
-0.001045499 Correction
1.048954501 New trial
0.110834741 New Trial Function
-367.4250912 Slope
-0.000301653 Correction
1.048652848 New trial
0.031930129 New Trial Function
-367.3687939 Slope
-8.69157E-05 Correction
1.048565933 New trial
0.00919606 New Trial Function
-367.3525721 Slope
-2.50333E-05 Correction
1.048540899 New trial
0.002648301 New Trial Function
-367.3478999 Slope
-7.20924E-06 Correction
1.04853369 New trial
-6.87555E-06 New Trial Function
12.03914164 °P
1.046649475 Mass of Solution
0.920641862 Mass of Water
8.62% Volume Expansion

The function is

(((135.997*SG - 630.272)*SG + 1111.14)*SG - 616.868)*SG-100*Mass/(0.998203*Vol)

and we want to drive that to 0. The slope is

((3*135.997*SG-2*630.272)*SG+1111.14)*SG-616.868

So the Newton method solution isn't bad though as the problem is now less linear it takes more iterations to get the function down to 5E-5 though note that the SG solution changes in decimal places beyond the 3rd after the 3rd iteration.

Is this what you had in mind?






Does this mean you assume your efficiency = 7/8 = 87.5%?
It's really moot as the numbers are for illustration only but I had intended to mean that rather than 80% extract you might get 10% less than that or 70% - 7 kg extract per 10 kg malt.

Now to the example. I know my grain absorption is 1.2 L/kg.
I don't have any deadspace.
So I get 40-1.2*10=28 L in the first drain.
Then I batch sparge with 10 more L of water.
That leaves me with 38 L of wort (of what mass?) with 7 kg of extract pre-boil?
Keep in mind that if you add 1 liter of water to a wort the volume of the wort will not change by 1 L but by something close to that because the sugar expands the volume of the liquid. In the example above we added 126 grams of extract to 920 grams of water and got 1 L of 12 °P solution. The volume of the water expanded by 8.62%. It is this volume expansion that makes things difficult.


That's the way I was calculating it, but now I'm questioning if I could add volumes like this.
What you can do is make adjustments to get a particular volume in the kettle. You can make up the kettle to 38 L if you want to and, if you know that this 38L really contains 7 kg extract calculate that the wort would be 17.22 P and that it contains 33.6 kg of water.


I instinctively went with kg of extract and post-boil volume as my variables.

It's really much easier to think in terms of mass. I even put load cells under my kettle. If I have 400 lbs wort at 12 °P I imediateley know I have 48 lbs extract and can quickly figure my efficiency by dividing that by the weight of the grain I mashed. You can, clearly, work in terms of volume too if you set the volume. However, as soon as you ask the question 'How strong is a sugar solution with x grams of sugar per liter you have to solve the 4th order equation.
 
I just started playing with it and it looks pretty good.

I plugged in two recipes I've brewed and compared them to Bru'n Water and actual results.

Hopefully this makes sense, but here are the results (assuming I entered everything correctly):
CEAWK9U.jpg


So the Bru'n water lactic amount is the amount it said to hit the target of 5.4 and the actual pH is what I got when I added the Bru'n Water lactic level.

So Bru'n Water was spot on for the 2nd batch and Q Water would have me adding a little more acid, which would lower the pH below the target.

For the first batch, Bru'n Water was off by 0.2 pH units high and Q Water would have me add more acid, which would probably move me closer to target.

A couple problems is I didn't see all the malts on there, but the recipes I entered did have all the ingredients, so that's why I picked them.

Also, do you know why switching from Crisp to Muntons MO gives widely different acid amounts? The second recipe used MO, but I'm not even sure what I used, but I put Muntons as that gave a lactic addition closer to what I used.

Good start though. Thanks for sharing.
 
Also, do you know why switching from Crisp to Muntons MO gives widely different acid amounts? The second recipe used MO, but I'm not even sure what I used, but I put Muntons as that gave a lactic addition closer to what I used.

If you titrate those malts at close to 50 °C you will find that the acid required to reach pH is

Crisp:
mEq/kg = -46.589*(pH - 5.408) + 6.3156*(pH - 5.408)^2 -2.673*(pH - 5.408)^3

Muntons:

mEq/kg = -46.094*(pH - 5.420) + 7.6213*(pH - 5.420)^2 -2.5325*(pH - 5.420)^3

IOW the malts are actually very similar. Now, however, if you cool the mash, for purposes of pH measurement you will find that the DI mash pH for the Crisp shifts from 5.408 to 5.689 whereas for the Muntons it shifts from 5.420 to 5.842. Thus, while the one isn't really more alkaline than the other at mash temperature it appears to be if you wish to set things based on room temperature mash pH measurement.

This is a new finding and one that I haven't quite decided what to do about yet. I think the answer has to be that we should actually calculate at mash temperature (which, of course, raises the question as to which mash temperature we should use) and then convert, based on what we know about how the individual malts pH's vary with temperature, to room temperature in order to get an idea as to what to expect from the pH meter reading.
 
I think the problem you must be trying to solve is, in effect:
I have put 126 grams of sucrose into a volumetric flask and made up to 1 L without measuring the amount of water I added. How much water did I add?
Is this what you had in mind?

Almost. My question is though: what's gravity of the solution?

However, as soon as you ask the question 'How strong is a sugar solution with x grams of sugar per liter you have to solve the 4th order equation.
Yes... However I managed to get by with a 3rd order equation. I created a 2nd degree SG(P) trendline for the range 0-30°P which should cover even the highest gravity barley wines. Its maximum error is at the real SG=1.091982; so instead of that my trendline yields 1.091938. This is the largest error throughout the range. I doubt brewers would wish for more accuracy.

I'm only vaguely familiar with the Newton's method. I think I won't need to resort to it.

It is this volume expansion that makes things difficult. It's really much easier to think in terms of mass. I even put load cells under my kettle.

Right. Well, I think a load cell would be overkill for most homebrewers.
Do you know if grain absorption can be converted to the mass basis?

Here are my thoughts on it: during the mash the grains absorb a constant volume of wort with the same gravity as the surrounding solution. When I batch sparge the absorbed wort inside the grains equalizes SG with the sparge water. Bottom line, this seems way too complicated to calculate.

Or is there some other way to predict what mass of wort with how much extract I would get pre-boil?
 
I just started playing with it and it looks pretty good.

I just spotted a pretty big flaw in my spreadsheet. All mineral additions were assumed anhydrous !!! If you used any, this must have skewed the results.

I'll upload a new version with this fixed very soon

A couple problems is I didn't see all the malts on there

This is because there is not a lot of available data on many malts. Other spreadsheets use color approximations, but it's a wild guess.
 
Now, however, if you cool the mash, for purposes of pH measurement you will find that the DI mash pH for the Crisp shifts from 5.408 to 5.689 whereas for the Muntons it shifts from 5.420 to 5.842. Thus, while the one isn't really more alkaline than the other at mash temperature it appears to be if you wish to set things based on room temperature mash pH measurement.

This is a problem! Let's go back to the basics. Do we adjust mash pH to get higher conversion/efficiency, do we do it for clarity, or are we mainly concerned with flavor?

I think clarity and conversion can be achieved within a very broad range.
If we are looking for better flavor, is it about the yeast performance? Then we can adjust the pH post-boil. Or is it about the extraction of something other than sugar from the grain?

With grains having different pH shifts, we would either miss the mash pH or the post-boil pH.
 
Almost. My question is though: what's gravity of the solution?

Once you know the amount of water (mass), given that you know the amount of sugar (mass) then °P is trivially computed from

°P = S/(S+W)

S = mass of sugar
W = mass of water

But from the previous post, the equation we need to solve is:
(((135.997*SG - 630.272)*SG + 1111.14)*SG - 616.868)*SG-100*Mass/(0.998203*Vol) = 0
and we need to solve it for SG, the gravity. Thus solution of this equation gives the gravity directly which, of course, can immediately be converted to °P with the ASBC polynomial.


Yes... However I managed to get by with a 3rd order equation. I created a 2nd degree SG(P) trendline for the range 0-30°P which should cover even the highest gravity barley wines. Its maximum error is at the real SG=1.091982; so instead of that my trendline yields 1.091938. This is the largest error throughout the range. I doubt brewers would wish for more accuracy.
That should work.

Keep in mind that most of this work was done for a program called ProMash. I was always on the author's case about things needing to 'close' to near machine precision and so pushed him into using roots using bisection, accounting for the temperature dependence of the specific heat of water etc.

I'm only vaguely familiar with the Newton's method. I think I won't need to resort to it.
I'm sure it was taught to you somewhere along the line as it is a very simple method of finding the roots of well behaved equations like these. The idea is you have a guess as to what the solution of

(((135.997*SG - 630.272)*SG + 1111.14)*SG - 616.868)*SG-100*Mass/(0.998203*Vol) = 0

might be, say 1.05. You plug 1.05 into the equation and instead of 0 you get 0.38, not zero. So you assume that near 1.05 the equation is linear and compute the slope at 1.05. Your error, ∆y = (dy/dSG)∆SG = 0.38 and solve for ∆SG = 0.38/(dy/dSG). (dy/dSG) is obtained by differentiating the equation you are solving:

(dy/dSG) = ((3*135.997*SG-2*630.272)*SG+1111.14)*SG-616.868

You then 'correct' your original guess by adding ∆SG to it and repeating until the calculated ∆SG isn't changing significantly or (((135.997*SG - 630.272)*SG + 1111.14)*SG - 616.868)*SG-100*Mass/(0.998203*Vol) is close enough to 0.



Right. Well, I think a load cell would be overkill for most homebrewers.
Of course it would be. Just one of many goofy ideas I've tried out over the years.

Do you know if grain absorption can be converted to the mass basis?
Why not. Grind some grain, put it in a tared bucket, weigh it, cover it with warm water, wait, then pour off the water through a strainer, cheese cloth or something similar, drain to your satisfaction and then weigh again.

Here are my thoughts on it: during the mash the grains absorb a constant volume of wort with the same gravity as the surrounding solution. When I batch sparge the absorbed wort inside the grains equalizes SG with the sparge water. Bottom line, this seems way too complicated to calculate.
Agreed

Or is there some other way to predict what mass of wort with how much extract I would get pre-boil?
Yes. Take the FGHWE number from the maltster or a number for a similar grain and adjust it by your 'brew house efficiency' i.e. what you have learned by calculating extract based on worts you have prepared. This efficiency will include the effects of extract hung up in the grain during sparge. Most programs that do these sort of calculations have a place to enter this efficiency figure. For a given set of equipment and practices finding it has to be an iterative procedure.
 
This is a problem!

Yes it is and as I said I haven't figured out what to do about it yet.

Let's go back to the basics. Do we adjust mash pH to get higher conversion/efficiency, do we do it for clarity, or are we mainly concerned with flavor?
As far as I am concerned flavor.

I think clarity and conversion can be achieved within a very broad range.
If we are looking for better flavor, is it about the yeast performance?
Yes, I think good extraction can occur over a range of pH, so it's about flavor IMO.

Then we can adjust the pH post-boil. Or is it about the extraction of something other than sugar from the grain?
Other stuff. If you need to tweak pH to optimize yeast performance you can, of course, do that too.


With grains having different pH shifts, we would either miss the mash pH or the post-boil pH.

The problem in this case is that if we use Muntons MO based on a target room temperature pH we will add more acid to the mash than we would if we used Crisp targeting that same room temperature pH. At mash temperature, though, the Muntons mash would be at lower pH than the Crisp mash. Theoretically that's not good. Now the really conscientious brewer will have noticed that a mash using Muntons should be adjusted to a higher room temperature pH than one using Crisp. When we say mash pH should be 5.3 - 5.6 we are allowing ourselves quite a lot of wiggle room for effects like this.
 
I just spotted a pretty big flaw in my spreadsheet. All mineral additions were assumed anhydrous !!! If you used any, this must have skewed the results.

I'll upload a new version with this fixed very soon
Yes, I did. Thanks.



This is because there is not a lot of available data on many malts. Other spreadsheets use color approximations, but it's a wild guess.
Well without the data, using malts that aren't in your sheet would just be a wild guess too, right?
 
Q-water v1.5 is up now!

Well without the data, using malts that aren't in your sheet would just be a wild guess too, right?

Definitely.
In fact, I'd prefer titration models to just 1 value for buffering capacity at an unknown pH.
For now just try to replace those grains with the similar colored grains that I have. For example Special B with Caramel 120L, Black Patent with Roasted Barley, or something along those lines.
Maybe in later versions I'll include a color based calculator for malts.

I plugged in two recipes I've brewed and compared them to Bru'n Water and actual results.
I'd to take a closer look at your results. Especially now that I've fixed mineral additions.
Can you please post all the details of your water and recipe, or send me the spreadsheet with everything plugged in.
 
I think the answer has to be that we should actually calculate at mash temperature (which, of course, raises the question as to which mash temperature we should use)
If the extraction of flavor compounds from the grain during the mash depends on pH, indeed it makes sense to measure pH at mash temperature. When we calculate for pH=5.4 at 20°C, given different pH glides for different malts, we end up knowing nothing of what the actual pH at 65-70°C will be.
Moreover, we should be interested in malt parameters and titration curves at mash temperature as well. These glide coefficients are only a linear approximation of DI pH shift with temperature. Do other malt coefficients a1, a2, a3 shift with temperature? Probably. Can we linearize their glide in the range 50 to 20°C and apply that with respect to 65-70°C? I doubt that. I'll even suggest this: maybe different beers benefit from different mash pH because it turns out to be the same pH at mash temperature, more or less. The point is we know nothing about that.
I think the best logical way would be to titrate malts at 65-70°C, use that number and never look back at what pH it is at other temperatures. And it should not matter whether it is 65°C or 70°C, as it's only a 5 degree difference.
Not sure how realistic this idea is though, I heard pH probes don't like high temperatures.
I know I'm being a perfectionist here, but we are trying to achieve as much accuracy as possible and it's still a shot in the dark.
 
Q-water v1.5 is up now!



Definitely.
In fact, I'd prefer titration models to just 1 value for buffering capacity at an unknown pH.
For now just try to replace those grains with the similar colored grains that I have. For example Special B with Caramel 120L, Black Patent with Roasted Barley, or something along those lines.
Maybe in later versions I'll include a color based calculator for malts.


I'd to take a closer look at your results. Especially now that I've fixed mineral additions.
Can you please post all the details of your water and recipe, or send me the spreadsheet with everything plugged in.
PM sent.
 

Thanks! As was expected, all parameters of mineral salts, acid, and water are spot on. They exactly repeat what Bru'n Water does. The only difference is in malt alkalinities. I got my numbers from AJ and I trust them. Martin probably got his numbers from Kai's experiments that attempted to establish a relationship between malt parameters and color.

Here is my summary:
Recommended acid additions in the 4th column from left to right: Weyermann Pneumatic Pils, Crisp Maris Otter, Weyermann Floor Pils, Muntons Maris Otter

Untitled.png


I'm also not happy about the huge difference in acid additions for different base malts of the same color: 7.9ml to 2.5ml !
Now that AJ mentioned yesterday that was might be a result of temperature correction, I'm puzzled.
 
For the Dale's I did use MO and I'm pretty sure it is Munton's. If I'm reading your table right, are you saying 4.2 ml lactic addition would have been 5.4 pH? That looks wrong as my pH would have been even lower than 5.39 since it's a higher acid addition.

For the Pliny it was 2 Row from Briess which wasn't in there, so not sure what to do with that.
 
That looks wrong as my pH would have been even lower than 5.39 since it's a higher acid addition.
Yes, I know it's wrong. The algorithm to calculate pH is there, now it all comes down to where we get the data on malts.
For now as far as I know only a few individuals like AJ and Kai are collecting such data.
And there is this big issue with temperature that I described a few posts above.
Do we need to set mash pH at mash temperature or at room temperature? At what temperature we need to measure malt parameters?
 
gmax: Thank you for creating an open and unlocked water spreadsheet. Being a novice to water chemistry and having no real way of confirming your calculations aside from comparing to other "locked" calculators out there, I'm finding it very comparable to the more trusted ones. I agree that the mash pH lactic acid additions are very speculative, often showing 2x or 3x what the "locked" calculators show. Aside from that, I think it's coming along nicely and would happily replace my current calculator once I can fully wrap my head around this one. Very nicely done and a sincere thank you for sharing your time, effort and knowledge with the brewing community. Cheers :mug:
 
gmax: Thank you for creating an open and unlocked water spreadsheet. Being a novice to water chemistry and having no real way of confirming your calculations aside from comparing to other "locked" calculators out there, I'm finding it very comparable to the more trusted ones. I agree that the mash pH lactic acid additions are very speculative, often showing 2x or 3x what the "locked" calculators show. Aside from that, I think it's coming along nicely and would happily replace my current calculator once I can fully wrap my head around this one. Very nicely done and a sincere thank you for sharing your time, effort and knowledge with the brewing community. Cheers :mug:

Thank you so much for your kind words :)
There is nothing special about lactic acid. The reason for acid additions being speculative is questionable malt data.
In fact I've done a few extra calculations with acids just to prove their redundancy. For example, even though phosphoric is a weak acid, its dissociation is just 1 in the range 5.2-5.5 pH. However to calculate that, you need a lengthy formula. I would also dig up voluminous data sheets to curve fit the effect of temperature on acid density, which is totally necessary.

Be sure to ask if you get any questions on any of my formulas
 
Version 1.6 with more new stuff is up now!

I created a calculator that may come in handy in case you miss your mash pH. It predicts how much acid or base is needed to adjust to the original target pH.
I also added a buffering capacity calculator.
Lastly, there is a new automated optimization tool that can help you build any water profile you want
 
There is nothing special about lactic acid. The reason for acid additions being speculative is questionable malt data.
The fact of the matter is that malts are variable. Crisp Maris Otter is not the same as Munton's Maris Otter is not the same as Fawcett Maris Otter and I suspect a bag of Crisp Maris Otter bought this winter will not be the same as a bag bought next summer. I used to think that this was probably enough to make prediction of mash pH a fools errand. The question is really, however, as to how precise we need to be in the specification of malt parameters. As the base malt predominates in any given mash it's clear we need to be more accurate WRT base malt than with the specialty malts. I'm thinking that it may not be too much to ask the brewer to measure the DI pH of his base malt and then to measure again with an acid addition of say 10 mEq/kg and calculate a1 = ∂(mEq/kg)/∂pH.

In fact I've done a few extra calculations with acids just to prove their redundancy. For example, even though phosphoric is a weak acid, its dissociation is just 1 in the range 5.2-5.5 pH. However to calculate that, you need a lengthy formula.

You can call the normality of phosphoric acid at pH approximately 1 mEq/mmol or you can calculate it quite simply. I'll lay it out here just to illustrate how simple it is:

r1 = 10^(pH - pK1)
r2 = 10^(pH - pK2)
r2 = 10^(pH - pK3)

f0 = 1(1 + r1 + r1*r2 + r1*r2*r3)
f1 = r1*f0
f2 = r2*f1
f3 = r3*f2

Q = -(f1 + 2*f2 + 3*f3)

Q is the charge on 1 mol so that the normality of a molar solution of the acid (0 charge) at pH is -Q (the number of protons a mmol would give up in being taken to pH) which depends only on pH and the three pK's. Now if you substitute back to a single formula it is going to be a mess so the obvious way to do this is to have the cells for this calculation on a 2d or 3rd sheet where they are not visible to the user unless he wants to go back there and look at them. I put them on the main sheet because I am not trying to produce something 'pretty' for use by the average home brewer. Another way to do it would be to write a VBA macro which would update any time pH changed but I don't know how to do that nor am I even sure it is possible. Note that this same 'code' can be used for phosphoric, lactic, carbonic, sulfuric, citric or indeed any acid for which you have the pK's (use -10 for a fully dissociated proton and +40 for a non existent proton such as the 2d and 2rd protons of lactic acid). If you are going to rely on the power of a computer to do mash calculations for you there is really no reason not to have all the accuracy that it can give you especially when it is so easy to get it.

I would also dig up voluminous data sheets to curve fit the effect of temperature on acid density, which is totally necessary.

I have data for lactic:

g/cc = (-0.0000032247*Y + 0.0026771)*Y +0.99464

Y is strength as %, w/w

for citric

g/cc=0.99719+0.0040515*Y +0.000015801*Y^2

for phosphoric:

g/cc =0.99987+0.0047225*Y+0.000039351*Y^2

and for sulfuric:

g/cc = (((((-0.0000000000021834*Y +0.00000000026389)*Y + 0.0000000016863)*Y-0.000001076)*Y +0.00006785)*Y +0.0060196)*Y +0.99981
 
I'm thinking that it may not be too much to ask the brewer to measure the DI pH of his base malt and then to measure again with an acid addition of say 10 mEq/kg and calculate a1 = ∂(mEq/kg)/∂pH.

In fact, I'm trying to create an easy-to-understand titration calculator so that any homebrewer with a pH meter could measure their malt and maybe share the results for everyone's benefit.
I'm thinking it's not even necessary to use DI water as Z RA could be computed and subtracted from the charge balance calculations.
I would have the brewer measure this "congress" mash pH (which will include the effects of Z RA), titrate a simple to a target pH (5.4 or whatever results after the acid addition), and the calculator would compute the rest from the amount of acid it took, water profile, and mash thickness.
The calculated parameters will be the malt DI pH and the average buffering capacity from DI pH to target pH.

I would really like to know your opinion on the pH vs temperature problem that I described in the post #42.
Another question, when you titrate a malt, can you just dissolve it in water at 20°C, or do you have to mash it for some time and then cool it down?

You can call the normality of phosphoric acid at pH approximately 1 mEq/mmol or you can calculate it quite simply. I'll lay it out here just to illustrate how simple it is:
This is exactly how I did it. I even looked it up in your AJdeLange_MBAA_FREDERIC.pptx

I put them on the main sheet because I am not trying to produce something 'pretty' for use by the average home brewer.

I understand that. However, I also see the merit of easily navigable and pleasantly looking software.
It may be harder to debug, but I try to leave descriptions of what I'm doing for the more complicated formulas. :mug:

I have data for lactic:
Thanks. I've already had most of those, but your formula for H2SO4 seems more accurate
 
In fact, I'm trying to create an easy-to-understand titration calculator so that any homebrewer with a pH meter could measure their malt and maybe share the results for everyone's benefit.
I'm thinking it's not even necessary to use DI water as Z RA could be computed and subtracted from the charge balance calculations.

I see two problems with this. First you would have to do titrations to get the alkalinity and hardess. The alternative would be to rely on a water authority report or a Ward Labs report for alkalinity and hardness data and in many cases neither is closely representative of what comes out of your tap. Then you have to do the malt measurement. Three measurements (whether you do the water measurements you self or not) implies three error sources. DI water is easy enough to obtain (any drugstore in the US anyway) and decouples the malt measurement from the water measurement.

The second and bigger problem is that RA is not representative of what happens in the mash. It represents what happens in the kettle at knockout (at least Kolbach's 3.5 factor does) and then on average with the presumption that Kolbach's number is more representative of the lager brewing in Germany in his day than of current craft brewing in the UK. Is this a problem in computing mash pH using Kolbach's observations? Yes, but not much of one because calcium doesn't have that much of an effect compared to the effects of colored malts.

I would have the brewer measure this "congress" mash pH (which will include the effects of Z RA), titrate a simple to a target pH (5.4 or whatever results after the acid addition), and the calculator would compute the rest from the amount of acid it took, water profile, and mash thickness.
The calculated parameters will be the malt DI pH and the average buffering capacity from DI pH to target pH.

In order to keep it simple for the brewer I'd have him do a single acid addition. It is, IMO, easier to add a fixed amount of acid and measure the pH shift than to try to titrate to an end point especially as in titrating malt the end point changes over time. I suggested 10 mEq/kg because that's enough to carry a typical base malt to mash or near mash pH (a couple tenths of a pH). Over a step that small the fact that a2 and a3 are not determined shouldn't much matter as it will typically be over such a small pH step that base malt is moved when mashed under pH control in the brewery. I wouldn't want the brewer to have to go to the labor required to do the full titration and curve fitting. I'd like the maltsters to do that.


I would really like to know your opinion on the pH vs temperature problem that I described in the post #42.

The way I have been handling this is to allow the user to specify the reference temperature. For the most recent malt measurements I made I recorded temperature glide as well as the three coefficients. Since the glide only changes DI mash pH it is a simple matter to calculate at any reference temperature one wants to. So for example in the Maris Otter where I first really noticed a difference, I find predicted mash pH's to be different by 0.1 or more between Munton's and Crisp at 20 °C. If then switch reference temperature to 50 °C I find that the predicted mash pH's are within 0.01 and I make the observation that in fact the two malts are pretty much the same but that one gets a higher room temperature pH with Muntons. I simply note, in such a case, that one shouldn't be bothered by higher room temperature mash pH with Muntons. This seems a reasonable way to handle this. I don't like having this extra complexity but it seems the nature of malts demands it.

Another question, when you titrate a malt, can you just dissolve it in water at 20°C, or do you have to mash it for some time and then cool it down?


This is exactly how I did it. I even looked it up in your AJdeLange_MBAA_FREDERIC.pptx

I thought that the details of the titration procedure was spelled out in those slides but in brief: the malt was ground to flour using a spice blender. Forty grams was measured out with an analytical balance and placed in a metal beaker which went into a water bath at 50 °C. About 50 mL of DI water was placed in a cylinder, the amount of acid (or base) to be used for the data point to be collected was added to the water and the total made up to 100 mL. The cylinder went into the water bath too. After allowing time for the water to warm up the cylinder was emptied into the beaker and pH measurement initiated.

BTW it appears that the paper based on the MBAA presentations in Austin and Frederick will be published in the first number of the MBAA TQ this year. There is nothing really in it that wasn't in the Frederick slides so what I really hope it will accomplish is to nudge the maltsters into collecting some of this data for the community.


I understand that. However, I also see the merit of easily navigable and pleasantly looking software.
It may be harder to debug, but I try to leave descriptions of what I'm doing for the more complicated formulas. :mug:

I am absolutely on board with that which is why I suggested that such calculations go on a separate sheet. I am also very much on board with your notion of producing an open spreadsheet so that anyone can see exactly what the algorithms are and thereby have the ability to understand the underlying science. If you do the full set of calculations on Sheet 2 and present only the results of the calculations on Sheet 1 then the user who just wants answers sees the answer and it is more accurate than just assuming that 1 M phosphoric acid is 1 N at any pH. If you have a comment (little triangle) in the cell that displays the results that says "Go to Sheet 2 Cells ... for detailed calculation" then the user that wants deeper understanding is accommodated too. Thus you can realize your goal of an uncluttered, easy to understand smooth user interface and simultaneously have better accuracy and enhanced educational potential for those who desire it. It should also make your job easier as we discussed when talking earlier about the cubic equation solution.

This is exactly what I do in my color analysis spreadsheet. The user pastes in his measured spectrum and the spreadsheet calculates SRM, EBC, color in CIELAB, CIELUV and AdobeRGB spaces for two observers in any of several Illuminants in any glass width, and the coefficients which describe how the measured spectrum deviates from the average spectrum... As you can probably guess this requires a lot of calculation using a lot of data (color matching functions, beer color eigenfunctions, illuminant eigenfuctions...) All the data are on a second sheet, all the calculations on a third. The user only sees the results but can check the spectral distribution of Illuminant C, for example, by going to the appropriate sheet if he wants to do that.

Thanks. I've already had most of those, but your formula for H2SO4 seems more accurate
I don't remember where I got the underlying data for any of them but I think we can be pretty sure that sulfuric acid, as the most produced chemical in the world, has probably been pretty thoroughly characterized.
 
The second and bigger problem is that RA is not representative of what happens in the mash. It represents what happens in the kettle at knockout.

What do you mean by that? My understanding was that RA accounts for apatite reactions in the mash. And as such, we use it to determine the mash pH. What does it have to do with the boil?
10Ca++ + 6H2PO4- + 2H2O = Ca10(PO4)6(OH)2 + 14H+

In order to keep it simple for the brewer I'd have him do a single acid addition.
Good idea. However, this won't affect the calculation in any way, since you plug in the amount of acid and the endpoint pH that you got, regardless of the number of additions.


Since the glide only changes DI mash pH it is a simple matter to calculate at any reference temperature one wants to.
How linear is the pH(temperature) function? In other words, how accurately does a constant glide coefficient reflect it?
Do you calculate this glide by measuring DI pH at 45°C than cooling down to 20°C, measuring again and dividing the shift by (45-20)?

What about the the rest of the titration curve and the other coefficients?
Do they change with temperature as well?

So for example in the Maris Otter where I first really noticed a difference, I find predicted mash pH's to be different by 0.1 or more between Munton's and Crisp at 20 °C. If then switch reference temperature to 50 °C I find that the predicted mash pH's are within 0.01 and I make the observation that in fact the two malts are pretty much the same but that one gets a higher room temperature pH with Muntons. I simply note, in such a case, that one shouldn't be bothered by higher room temperature mash pH with Muntons.
In my mind this is a far more important issue than assuming the correct H3PO4 dissociation 1.0089 mEq/mmol at pH=5.2 and 1.024 mEq/mmol at pH=5.6.

First off, what is our basis for measuring mash pH and malt parameters at 20°C? Does it really reflect the chemistry in the mash?
If pH during the mash determines the flavor, it happens at the mash temperature. How does our measurement at 20°C correlate with the actual pH that affects the chemistry?

I thought that the details of the titration procedure was spelled out in those slides
I know there is a standard procedure. I'm just thinking there may be a way to simplify it for the homebrewer like dough in at 20°C and then measure the pH. There is a limit to what precision a homebrewer can achieve.

I am also very much on board with your notion of producing an open spreadsheet so that anyone can see exactly what the algorithms are and thereby have the ability to understand the underlying science.
As it stands now, I don't think I will be rewriting the whole thing to create a second page with the more explicitly stated formulas. Also, I don't like constantly switching between different pages in Excel, maybe that's why my entire water spreadsheet occupies only 1 page. Tracing references to another page is not my idea of convenience.
I think it's more important to just get the broad understanding of how the mEq balance comes together and what my spreadsheet does conceptually, rather than look at each step of the solution of a cubic equation.
 
What do you mean by that? My understanding was that the residual alkalinity accounts for apatite reactions in the mash. And as such, we use it to determine the mash pH. What does it have to do with the boil?
Re-read Kolbach's paper (at http://wetnewf.org/pdfs/Brewing_articles/KolbachPaper.pdf if you don't have it handy). A relevant quotation is

"From the previously mentioned laboratory experiments it can be concluded that a water of 10° residual alkalinity raises the pH of a 12°P wort at knockout something like 0.3 when one compares the pH with the pH of a 12°P knockout wort prepared with distilled water. A water with a residual alkalinity of –10° will, by contrast, lower the pH of knockout wort around 0.3."

Everyone grabbed the 10° and 0.3 pH numbers and used them for mash pH prediction until someone noticed (and I, who translated this paper hadn't) that they referred to knockout wort).

10Ca++ + 6H2PO4- + 2H2O = Ca10(PO4)6(OH)2 + 14H+
If you look at that it implies that you get 14/20 = 0.7 mEq of alkalinity-cancelling protons for each mEq of calcium precipitated. Kolbach in the paper says it is more like 1/3.5 = 0.28. Thus, clearly, not all the calcium in the mash participates in the reaction and we know this to be true as pH continues to drop in the kettle because of additional apatite precipitation.

Kolbach's 0.3 pH per 10° implies some value of mash buffering which would depend on the mash thickness and the types of malts he studied. As part of pH estimation we are calculating malt buffering so rather than relate mash pH shift to the 0.3 pH per 10° change in RA I have interpreted the observation that 3.5 mEq of calcium or 7 mEq of magnesium cancels 1 mEq of alkalinity to mean that 3.5 mEq of calcium or 7 mEq of magnesium releases 1 mEq of protons. The effective pH shift attributable to those protons is their number divided by the buffering of the total mash. Since everything else in Kolbach's paper refers to knockout wort I assume that 3.5 and 7 apply to knockout wort as well and that the number of protons released by 3.5 mEq of calcium or 7 mEq to the mash must be somewhat less than 1 mEq. In my spreadsheet I use 3.5 and 7. As this results in small pH shifts in most cases I don't worry too much about the error this may cause.


Good idea. However, this won't affect the calculation in any way, since you plug in the amount of acid and the endpoint pH that you got, regardless of the number of additions.
That's right and since it doesn't, we might as well make it as simple for the brewer as possible.




How linear is the pH(temperature) function? In other words, how accurately does a constant glide coefficient reflect it?
Reasonably well, I'd say.

Do you calculate this glide by measuring DI pH at 45°C than cooling down to 20°C, measuring again and dividing the shift by (45-20)?
As the detailed procedure for the malt titration indicates the test mashes, including the DI one, are made at about 50 °C and pH is recorded continuously over half an hour or so. At the conclusion of DI pH recording the mash is then allowed to cool while recording continues. I may, after appreciable cooling, increase temperature again. The result is a block of data of pH vs. time and temperature vs. time. I plot pH vs temperature and then do a straight line fit. It certainly isn't a perfect fit but it's not bad.

What about the the rest of the titration curve and the other coefficients?
Do they change with temperature as well?
They are bound to somewhat but the assumption is that they do not. I haven't verified this, IOW I haven't checked to see if the glide with 20 mEq/kg acid added is the same as the glide with 0 mEq/kg (distilled water mash). If it were terribly different I wouldn't be able to predict room temperature pH using this method and I can do so pretty well in the cases I've tested.



In my mind this is a far more important issue than assuming the correction H3PO4 dissociation of 1.0089 mEq/mmol at pH=5.2 and 1.024 mEq/mmol at pH=5.6.
It is an important issue and we certainly need to understand it better and verify that is is a manageable issue. The supposition is, at this point, that it will introduce a small error. Failure to account for time introduces a small error. Assuming that molar solutions of sulfuric, phosphoric and lactic are, respectively 2, 1 and 1 normal introduces small errors, assuming that the bag of Munton's M.O. I buy and measure today is the same as the one I buy and brew with 5 months from now introduces small errors (or we hope they are small). All these small errors eventually add up and so my philosophy has always been to go after any that I can easily deal with. Certainly computing the normalities of the acids is easy enough to do and can be done without compromising the requirement for a clean, simple user interface. So I do it. Measuring every bag of malt that comes into the brewery to the extent that a1, a2 and a3 can be determined accurately is out of the question so I live with that one.

First off, what is our basis for measuring mash pH and malt parameters at 20°C? Does it really reflect the chemistry in the mash?
Yes, it does reflect the chemistry of the mash to the extent that it is a useable metric for controlling the brewing process. I often use the analogy of altimeter setting in an airplane. Above 18,000 ft (FL180) the altimeter setting at the nearest airport (which may be hundreds of km away in, for example, transoceanic flight) does not reflect the actual pressure conditions at the aircraft's location so all aircraft set their altimeters to 1013 mb. When the altimeter says, under those conditions, 24,000 ft the aircraft is not (very probably) at 24,000 ft but another aircraft whose altimeter is also set to 1013 mb and which also reads 24,000 is at the same altitude, whatever that may be, there is potential for a collision. Thus while it is clear that the altimeter does not read the correct altitude pretending that it does allows safe operation of the airspace.

In brewing a mash pH of 5.4 doesn't tell you what the actual mash pH is at beta glucan rest temperature, protein rest temperature or any saccharification rest temperature but you know by experience that if you set your room temperature mash pH to 5.4 you get better beer than if you set it to 5.5 and so you aim for 5.4.

We use lab temperature largely because when brewers started measuring pH they didn't have accurate meters that slipped into shirt pockets. They had a bulky set of gear in the laboratory. By the time a sample was transported to the laboratory it would have cooled. Furthermore, the meter probably used a calomel reference cell that would melt at mash temperature and temperature stress on the pH half cell induced by measuring hot mash/wort shortened its life. Beyond that, there would be a problem with talking about pH in the literature. It's much easier if all pH measurements are referenced to a standard temperature.

If pH during the mash determines the flavor, it happens at the mash temperature. How does our measurement at 20°C correlate with the actual pH that affects the chemistry?
The point is that it seems to correlate with the quality of the produce irrespective of how it correlates with the details of the biochemistry. The pKs of acids are temperature dependent so it is natural that the pH of a buffer system is going to shift. That's why the buffers we use to calibrate our pH meters have pH vs temperature data on their labels. They are just as useful at 50 °C as they are at 20 °C as long as you have that data.



I know there is a standard procedure. I'm just thinking there may be a way to simplify it for the homebrewer like dough in at 20°C and then measure the pH. There is a limit to what precision a homebrewer can achieve.
If you are referring to procedures for measuring malt parameters there is no standard procedure. I have proposed one and published it. If the industry thinks what I have suggested is a good idea then ASBC and/or EBC will study what I have proposed, quite possibly suggest improvements, publish proposed standard methodologies for implementing it, do collaborative studies and if things work out, adopt the method. We are a long way from that and I sort of doubt that any of this will come to pass.


As it stands now, I don't think I will be rewriting the entire thing to create a second page with the more explicitly stated formulas. Also, I don't like constantly switching between different pages in Excel, maybe that's why my entire water spreadsheet occupies only 1 page. Tracing references to another page is not my idea of convenience.
I'm not trying to load you up with work or tell you how to organize your spreadsheet but I will point out that if you have a cell in which the used enters mL of phosphoric acid and another cell where that is multiplied by density and multiplied by molecular weight and strength and another cell with trial pH, that the cell which does the calculation can get the necessary charge info by reference to a cell on another sheet as easily as it can reference a cell on the same sheet. IOW you wouldn't have to reorganize the whole thing if you didn't want to.

Actually I think it's more important to just get the broad understanding of how the mEq balance comes together and what my spreadsheet does conceptually, rather than look at each step of the solution of a cubic equation.

It's your spreadsheet and your decisions. I only suggest these things because they are things that I have used and found helpful.
 
I have not said it yet, but I'm grateful for your answers and I find them very insightful.
The result is a block of data of pH vs. time and temperature vs. time. I plot pH vs temperature and then do a straight line fit. It certainly isn't a perfect fit but it's not bad.

Do you have these pH(temperature) curves? I've never seen one and I'd like to take a look.
Do we even know what happens with this curve at ~65-70°C?

Munton's and Crisp MO differ in alkalinity by the factor of 1.5, and it is solely the result of temperature adjustment. I just did a quick calculation with my water, and substituting Muntons for Crisp or the other way around throws off my mash pH by ±0.15 units. And what puzzles me the most is that this effect is canceled out at mash temperature.

The point is that it seems to correlate with the quality of the produce irrespective of how it correlates with the details of the biochemistry.
Does it mean I should aim 0.15 pH higher for Muntons MO to get the same mash pH at mash temperature?
Most of the time I do single infusion mashes, and I think pH at 65-70°C would have the strongest correlation with the quality of the beer.
 
v1.7 is up now.
I created an easy titration calculator with instructions if anyone wants to measure their base malts and get a better pH prediction.
The procedure is easier than making a starter.
There is NO data at all on oats, malted and unmalted wheat and rye to name a few.
 
Do you have these pH(temperature) curves? I've never seen one and I'd like to take a look.

Here's one (for Munton's Maris Otter which is the largest glide I have seen).

Do we even know what happens with this curve at ~65-70°C?
No. The electrode I do this work with is only rated up to 50°C.

Munton's and Crisp MO differ in alkalinity by the factor of 1.5, and it is solely the result of temperature adjustment. I just did a quick calculation with my water, and substituting Muntons for Crisp or the other way around throws off my mash pH by ±0.15 units. And what puzzles me the most is that this effect is canceled out at mash temperature.


Does it mean I should aim 0.15 pH higher for Muntons MO to get the same mash pH at mash temperature?
Most of the time I do single infusion mashes, and I think pH at 65-70°C would have the strongest correlation with the quality of the beer.[/QUOTE]

MuntonMOGlide.jpg
 
Here's one (for Munton's Maris Otter which is the largest glide I have seen).
Okay, thanks. We still do not know what happens at the saccharification temperatures nor what happens with the buffering capacity.

Hopefully in a few years, we'll see more research on the effects of temperature on the malt titration curve.
I believe only when we know what pH we really have at any mash temperature, we can understand what impact it has on the flavor of the beer.
We are clearly not there yet.
 
Okay, thanks. We still do not know what happens at the saccharification temperatures nor what happens with the buffering capacity.

We are never going to know what happens exactly at the saccharification temperature because that could range from 60°C to 70°C and even if we did that is not the whole story as relatively few beers are made with single step infusion mashes.

Hopefully in a few years, we'll see more research on the effects of temperature on the malt titration curve.
That I don't know. I'm interested in it certainly but I expect that many will conclude that an occasional mash pH at room temperature is a sufficient quality control measure. That is, after all, what most breweries that do mash pH checks, do. Given that they tend to get their malts from the same suppliers over time they don't have maltster to maltster variations but rather the presumably less dramatic lot to lot variations.

I believe only when we know what pH we really have at any mash temperature, we can understand what impact it has on the flavor of the beer.
We are clearly not there yet.
Room temperature mash pH becomes a proxy for all the details of what happens to each enzyme at each step and I think that it is a sufficiently good proxy as were it not people wouldn't bother with it. My efforts are aimed at seeing whether we can improve the value of that proxy. I can't see any practical way to get the desired detailed data other than by applying a constant pH shift with temperature. It is on validity of re-referenced mash pH that I must now focus my attention.

So far the science seems supportive. As noted, a temperature shift shifts a titration curve appreciably in the region of the particular acid's pK's. If you are close to an acid's pK then you need to have a good model of its behaviour with temperature. If you are not it doesn't matter so much. If the van't Hoff equation, ∂pK/∂(1/T) = constant, is a good model then we ought to be able to predict (and even project) the effect on data measured at one temperature to other temperatures based on measurements at enough temperatures that we can estimate the slope of a mixture. Preliminary evidence that we probably can comes from the small amount of data I currently have. The graph below shows the change in pH plotted against 1/T. Certainly the conclusions to be drawn from this graph aren't appreciably different than the ones to be drawn from the pH vs T plot I posted yesterday but I do note that doing a second order fit to the pH vs T data does result in a slight reduction in chi-squared. Doing a 2nd order fit to the pH vs 1/T data does not. Thus pH is a more linear function of 1/T than it is of T and, as this matches the van 't Hoff model that result is gratifying and improves my confidence that one could project the results of the measurements beyond 50 °C. I would, of course, want to see some real data at those higher temperatures. Perhaps one day I'll get an electrode that is comfortable at higher temps and get some of that data.

For now I am
1)Re-referencing pH predictions using 1/T
2)Paying much more attention to glide.

MuntonRecipGlide.jpg
 

Latest posts

Back
Top