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

    Homebrewing Facebook Group

A thought experiment to test the general validity of available mash pH software

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I downloaded both. Very impressive. How do you do it so quickly?

Excel is my jam. I’m not an Excel guru in general but I am used to doing brewing stuff in Excel so I format very quickly.

What I’m gong to try and do is keep reworking AJs base troubleshooting engine and building it out. The goal for now is to use the solver to solve for pHz based on acid and mineral inputs. I can keep adding creature comforts until I come up on territory which may start to mess with what is so good about his sheet and then contemplate how to proceed.
 
AJ,

Do you have any insights on how we can model Sauermalz in the troubleshooter? I could reverse engineer Kai’s calcs, but seeing as I’ve taken to calling this the deLange Water Troubleshooter, I figured I’d get your input first.

EDIT: Another question I have is this: for color based acidity used by many water sheets, are we essentially approximating a value for co-efficient a for use in a linear approximation of the series solution? How does the color based acidity relate to co-efficient a?
 
Last edited:
When I measured Weyermann's sauermalz I got, for pHDI, a, b and c
Weyermann Sauermalz 3.6165 -292.09 68.443 -5.3985

Joe Walts (who only made three measurements) data yields

Sauermalz Weyermann Joe Walts 3.41 -345.93 69.432 0

Kai measured 2 samples. His measurements yield.

Sauermalz 3.43 -138.8546256 0 0
Sauermalz Weyermann 3.44 -158.4955752 0 0

The question about a and color is a good one. Run dowm dmr's Part III paper referenced earlier in this thread. He has some data in which he relates color to a. As I've said before I think it is in answering questions like that that the challenge lies. Getting the math right is pretty easy.
 
When I measured Weyermann's sauermalz I got, for pHDI, a, b and c
Weyermann Sauermalz 3.6165 -292.09 68.443 -5.3985

Joe Walts (who only made three measurements) data yields

Sauermalz Weyermann Joe Walts 3.41 -345.93 69.432 0

Kai measured 2 samples. His measurements yield.

Sauermalz 3.43 -138.8546256 0 0
Sauermalz Weyermann 3.44 -158.4955752 0 0

What about modeling Sauermalz based on Lactic acid % and weight?
 
Last edited:
The question about a and color is a good one. Run dowm dmr's Part III paper referenced earlier in this thread. He has some data in which he relates color to a. As I've said before I think it is in answering questions like that that the challenge lies. Getting the math right is pretty easy.

I wonder if the answer is wrapped up in Riffe’s calculation of Grist pH:

Grist pH = pH DI - ( 0.0337 (kg/mEq) * SUM ( f * A ) )

where 0.0337 is a slope term whose inverse is buffering capacity, f is the grist fraction of the particular malt, and A is the color based acidity.

If we were to make the Qmalt term from the troubleshooter linear, we’d have:

Qmalt = a * ( pHz - pH DI)

If we rework Riffe’s equation a bit by renaming Grist pH pHz and inverting 0.0337 to get Buffering Constant (Bc) = 29.67 we get:

pHz = pH DI - ( Bc (mEq/kg) * SUM ( f * A ) )

- ( Bc (mEq/kg) * SUM ( f * A ) ) = ( pHz - pH DI )

That's where I am at right now and I'm not sure there is a relation after that.



EDIT: I added in Sauermalz to the troubleshooter by reverse engineering KW 1.58. The calculation is as follows:

QSauermalz (mEq) = ( 1000 * ( Sauermalz Lactic Acid % / 100 ) * Sauermalz (g) ) / 90

for 111 grams of 3% Sauermalz, KW 1.58 shows a pH shift of -0.13. After using the solver in the deLange Water Troubelshooter, pH shift is -0.148. So on the right track...
 
Last edited:
What about modeling Sauermalz based on Lactic acid % and weight?
That's not going to work because while sauermalz does contain acid (sauer) it also contains malt (malz). Thus in addition to the buffering of the lactate ion there is buffering from the malt anions too. The following graph shows the measured titration curve for 1 kg sauermalz (Weyermann) and for 50 grams (5% of a kg) of lactic acid
LacticSAUER.jpg
 
That's not going to work because while sauermalz does contain acid (sauer) it also contains malt (malz). Thus in addition to the buffering of the lactate ion there is buffering from the malt anions too. The following graph shows the measured titration curve for 1 kg sauermalz (Weyermann) and for 50 grams (5% of a kg) of lactic acid
View attachment 578917

AJ,

This is the excerpt from my post above:

I added in Sauermalz to the troubleshooter by reverse engineering KW 1.58. The calculation is as follows:

QSauermalz (mEq) = ( 1000 * ( Sauermalz Lactic Acid % / 100 ) * Sauermalz (g) ) / 90

for 111 grams of 3% Sauermalz, KW 1.58 shows a pH shift of -0.13. After using the solver in the deLange Water Troubelshooter, pH shift is -0.148. So on the right track...

It seems to be moving in the right direction, although your point is well taken. In trying to develop a color based estimate of a, I wonder if we could add an acidity term in the f * A summation where Sauermalz is modelled as a base malt. Sauermalz is Pilsner malt is after all.
 
Last edited:
If one assumes (on first approximation) that acidulated malt is roughly 3% lactic acid by weight, then couldn't you just multiply the weight of your recipes added acid malt by 0.03 and then, utilizing the resultant new weight, treat it from that point forward as if it was now at a concentration of 100% lactic acid? I'm always trying to simplify. I know that for minute precision the graph above details that this approach won't work, but will it be in the proverbial ballpark?
 
If one assumes (on first approximation) that acidulated malt is roughly 3% lactic acid by weight, then couldn't you just multiply the weight of your recipes added acid malt by 0.03 and then, utilizing the resultant new weight, treat it from that point forward as if it was now at a concentration of 100% lactic acid? I'm always trying to simplify. I know that for minute precision the graph above details that this approach won't work, but will it be in the proverbial ballpark?

See my correction above. I mistakenly left off the grams of Sauermalz.
 
I haven't lost interest in case anyone wondered. It's been too busy for me to devote the time needed to absorb it all. You are all doing amazing work!
 
So I am doing a comparison between what I refer to as the "deLange Linear" Grist pH model and the pHG model from the Riffe spreadsheet. I think I may have an initial linear equivalent to the deLange Linear equation using malt color.

deLange Linear -> ∆Qmalt (mEq) = a * ( pHz - pH DI )

We know that in the troubleshooter, if we zero out all other Q values except the malt, that to solve for pHz, we would vary ∆Qmalt. So let's solve for pHz:

pHz = pH DI + ( ∆Qmalt (mEq) / a )

Riffe Grist pH -> pHg = pH DI - ( SGpH * Am (mEq/kg) )

In the Riffe equation, SGpH = 0.0337 (kq/mEq) and is the slope of pHg vs. Am, where Am is color based malt acidity with units (mEq/kg). The inverse of SGpH is malt buffering capacity, or Bg, and has units of mEq/kg. So, for all intents and purposes:

a = Bg

So:

deLange Linear -> pHz = pH DI + ( ∆Qmalt (mEq) / Bg )

Riffe Grist pH -> pHg = pH DI - ( ( Am (mEq/kg) * Grist Weight (kg) ) / Bg )

In the end, it doesn't really give us anything for relating a to color but starts to show an equivalency between the calculations. One issue i'm seeing however is that the values when comparing AJ's ∆Qmalt (mEq) DO NOT even remotely match values for Am (mEq). (EDIT: Of course they don't! The Q values change with solver so you have to use the solver to change Qmalt to Am by varying pHz. Duh!)

to be continued...
 
Last edited:
I did some work on this today. For the purposes of simplifying some stuff, I trimmed the deLange portion so it's just minerals, Lactic Acid, Malt and my Sauermalz portion. The assumption is that we are using RO/DI water with 0 effective alkalinity. I know this inst totally realistic but it simplified some of the content.

I then added some typical water spreadsheet style inputs using a mix of Riffe, my own stuff, and AJ's troubleshooter. I hosted it at LOB.com so that AJ could check it out:

http://www.lowoxygenbrewing.com/wp-...deLange-Water-Troubleshooter-Solver-copy.xlsx
 
Last edited:
The past few days I have been looking for a good way to combine what I have been learning in this thread with what I now know is the most solid way of calculating pH (the deLange troubleshooter charge method). I re-read Riffe's most recent paper on grist buffering and DI pH and have come up with a basis for calculating Grist pH using my brewing sheet. It looks something like this:

pHg = Grist pH
pH DI = Distilled water pH of a single base malt ∑
Bg = Buffering capacity of a single malt of any type
fm = Fraction of grist for each malt
Am = Color based malt acidity for each malt
pH DI/kg = Weighted average of single base malt's pH DI value
Bg/kg = Weighted average of a single malt's buffering capacity

pHg = ∑ pH DI/kg + ( ∑ fm * Am /- ∑ Bg/kg ) (1)

This equation would be used in a normal spreadsheet situation where one didn't plan on using the solver. However, if one was willing to integrate the use of the solver into their spreadsheet (which i'm considering), then you could use a linear form of AJ's equation:

Q (mEq) = ∑ Bg/kg * (pHz - pH DI) (2)

Then you could use the charge conservation method with Q's and the solver embedded into a brewing spreadsheet that will do your recipe calcs as well. This is my plan and i'll compare outcomes from equation 1 and 2.
 
Last edited:
Are you considering that pH is emphatically a logarithmic function? Perhaps I'm missing something, but (unless Bg is based upon the log scale) I don't see any logarithmic nature to your pH equations.
 
Are you considering that pH is emphatically a logarithmic function? Perhaps I'm missing something, but (unless Bg is based upon the log scale) I don't see any logarithmic nature to your pH equations.

I'm not following. Are you talking about a log function somewhere in the calculation? Equation 2 above is just for the malt portion and derives directly from AJ's troubleshooter. It doesn't take into account any of the acid inputs or mineral inputs. Equation 1 is a modified version of Riffe's Grist pH calculation that substitutes a generic buffering capacity value for a weighted average of all the individual malt's buffering capacities and a weighted average of all the base malt pH DI values.

I'm not sure where log fits into any of it.
 
Are you considering that pH is emphatically a logarithmic function? Perhaps I'm missing something, but (unless Bg is based upon the log scale) I don't see any logarithmic nature to your pH equations.
Bg, the buffering, is in units of mEq/kg•pH. I don't really know what 'color based acidity' is but given that it is called acidity I assume it is in units of mEq/kg. Dividing by mEq/kg•pH would give (mEq/kg)/(mEq/kg•pH) = pH.

dmr adds some confusion in his paper by stating that pH is, as it is the log of something, dimensionless. In particular -log(acH+/acref) where acH+ is the activity of hydrogen and acref is a reference activity equal to 1, is dimensionless because acH+/acref is dimensionless. But even so -log(acH+/acref) does have dimension because there is a defined pH scale dependent on the choice of acref and the type of logarithm Sørenson chose to use. Had he chosen to use the natural rather than the Briggs logarithm the scale would be different. The pHaj of pure water would be -ln(1e-7) = 16.1181 and we would express buffering in terms of mEq/kg•pHaj
 
Bg, the buffering, is in units of mEq/kg•pH. I don't really know what 'color based acidity' is but given that it is called acidity I assume it is in units of mEq/kg. Dividing by mEq/kg•pH would give (mEq/kg)/(mEq/kg•pH) = pH.

dmr adds some confusion in his paper by stating that pH is, as it is the log of something, dimensionless. In particular -log(acH+/acref) where acH+ is the activity of hydrogen and acref is a reference activity equal to 1, is dimensionless because acH+/acref is dimensionless. But even so -log(acH+/acref) does have dimension because there is a defined pH scale dependent on the choice of acref and the type of logarithm Sørenson chose to use. Had he chosen to use the natural rather than the Briggs logarithm the scale would be different. The pHaj of pure water would be -ln(1e-7) = 16.1181 and we would express buffering in terms of mEq/kg•pHaj

A.J.: For clarity, does variable 'Bg' contain buried within it a hidden true logarithmic nature, or is it somewhat empirical in that regard?
 
Color based acidity is the commonly used Lovibond based approximation of the grain's Q value in mEq/kg.

This is effectively what I've been eluding to when I state that the data (although you can squeeze a slope out of it) appears to be nigh-on derived from "scatter charts". You can only squeeze so much from a turnip. My spreadsheet is in the same boat with all others in this regard. I have some Briess data for my slopes, and others use their own collected data to create these scatter charts and derive "nominal" value from them. Either way the "fit" is somewhat (to perhaps highly) questionable in the end, and I believe this is what A.J. doesn't understand (as in likely: "I can't understand why everyone but me is willing to get along while using such bad data fits".).
 
A.J.: For clarity, does variable 'Bg' contain buried within it a hidden true logarithmic nature, or is it somewhat empirical in that regard?

Bg is the buffering capacity or a co-efficient of the malt being used. It is empirical in this case. It can be used to make a linear approximation of the series expansion that AJ shows.

Q = a * (pHz-pH DI) + b * (pHz-pH DI)^2 + c * (pHz-pH DI)^3

becomes

Q = a * (pHz-pH DI) = Bg * (pHz-pH DI)

Riffe's Mash pH III paper goes into this in a lot more detail.
 
Color based acidity is the commonly used Lovibond based approximation of the grain's Q value in mEq/kg.

This is effectively what I've been eluding to when I state that the data (although you can squeeze a slope out of it) appears to be nigh-on derived from "scatter charts". You can only squeeze so much from a turnip. My spreadsheet is in the same boat with all others in this regard. I have some Briess data for my slopes, and others use their own collected data to create these scatter charts and derive "nominal" value from them. Either way the "fit" is somewhat (to perhaps highly) questionable in the end, and I believe this is what A.J. doesn't understand (as in likely: "I can't understand why everyone but me is willing to get along while using such bad data fits".).

Well at least I got the units right. The problem I am having is that Q is a function of two pH's: pHDi and pHz. pHDi you can approximate from the color and yes, I do recognize that the fit is poor. Lots of people think "Wow, Pearson's r is 0.8, that's a pretty good fit!" and it is but I then encourage people to hoke up some data with r = 0.8 and see how good a predictor of, in this case, pHDI, the color of the malt is.

But given that we accept that we have a usable estimate of pHDi what do we use for pHz? I faintly recall discussing this with Kai way back when and I think he decided to measure the amount of acid necessary to get to a particular pH, IOW to make two measurements and as I think of it that is indeed what he did because I am able to take his two measurements and compute a ≈ mEq_acid_added/(pHDi - pH_with_acid). So now I think I understand what A is but am still not 100% sure. Given that the units are mEq/kg then it is the acid required to get to a particular pH. But that assertion is confounded by dmr's pratice of declaring pH dimensionless so that to his way of thinking the actual buffering in mEq/kg•pH would be written as mEq/kg. Perhaps deeper study of his paper would reveal the answer.
 
A.J.: For clarity, does variable 'Bg' contain buried within it a hidden true logarithmic nature, or is it somewhat empirical in that regard?
Yes, in the sense that its units are mEq/kg•pH and pH is clearly a logarithmic measure. But I'll admit that dmr's calling it mEq/kg because he thinks pH is dimensionless and the knowledge that you guys rely heavily on his paper has gotten me a bit unclear on this.

On another subject: I've noticed responses coming back pretty quickly at 9:48 in the morning. Putting this together with some remarks you guys have made I need to ask "Are we a bunch of old retired farts who ought to be sitting on the park bench feeding the pigeons?"
 
On another subject: I've noticed responses coming back pretty quickly at 9:48 in the morning. Putting this together with some remarks you guys have made I need to ask "Are we a bunch of old retired farts who ought to be sitting on the park bench feeding the pigeons?"

I'd probably sleep better at night if I sat on a park bench and fed pigeons rather than worrying about all of this stuff.

But then again, our futzy 19 year old cat insists upon breakfast at 4:00 AM (+/- ~ 15 minutes) and she lets my wife and I know about it good and loudly every morning.
 
On another subject: I've noticed responses coming back pretty quickly at 9:48 in the morning. Putting this together with some remarks you guys have made I need to ask "Are we a bunch of old retired farts who ought to be sitting on the park bench feeding the pigeons?"

I've got about 30 more years to go! I was 29 when I graduated from RPI in 2014 so I'm not there quite yet.

I think more clearly in the morning! Give me a minute and i want to post something for you guys to check out...
 
Ok. So here is a brewing sheet I made (adapted, I should say, from an in-progress sheet) that incorporates the mechanics of AJs troubleshooter and does away with all color based acidity calcs:

http://www.lowoxygenbrewing.com/wp-content/uploads/2018/07/Brewing-Sheet-v1.1.xlsx

It's a brewing sheet so it does recipe input. It uses Bg values from Riffe in his Mash pH III paper, assumes distilled water, and (at least I think so) incorporates all the proper calcs for Lactic acid and minerals. I'll admit that I reverse engineered the % of grist based Sauermalz calcs and used them here to show the acidity from Sauermalz, but also used AJ's co-efficient for Sauermalz in the Bg/kg summation.

pH DI values and Bg values are stored in the grain database. Those pH DI values are averages across 3 years worth of Weyermann lots for the respective malts (2015, 2016, 2017 and a few from 2018).

Solver should be used to zero out Q total by varying Mash pH.
 
Last edited:
Ok. So here is a brewing sheet I made (adapted, I should say, from an in-progress sheet) that incorporates the mechanics of AJs troubleshooter and does away with all color based acidity calcs:

http://www.lowoxygenbrewing.com/wp-content/uploads/2018/07/Brewing-Sheet-v1.1.xlsx

I tried to run it in LibreOffice Calc 6.0, and it fails with a statement that says something (from memory) loosely akin to: This spreadsheet contains links to other files, but they are not available. Not having Excel, I may be out of luck here.
 
On another subject: I've noticed responses coming back pretty quickly at 9:48 in the morning. Putting this together with some remarks you guys have made I need to ask "Are we a bunch of old retired farts who ought to be sitting on the park bench feeding the pigeons?"

hah another question might be does anyone have a day job, and if so, why aren't they doing that instead?

Of course i say this as i'm HBT'ing on client time....

This conversation is FAR more interesting than what i'm supposed to be doing though.
 
Back
Top