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

    Homebrewing Facebook Group

Am I calculating my ph right?

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
EDIT: A.J., my program blends these waters to an alkalinity of 95.4545, but beyond that, in conjunction with an input of 11 gallons of mash water it can only then function upon various additions of malts in the presence of these 11 gallons of blended 95.4545 alkalinity water.
That says you are coupling grain buffering and water buffering which are independent things.

Can you rephrase this query to accommodate my programs input capabilities?
Assuming we have 30 lbs of malt with the following parameters
pHDi 5.6227
a -40.69
b 14.821
c -10.008

the pH would be 5.742. Again, not surprising as even 11 gal of water with alkalinity 95.45 doesn't have that much proton absorbing capacity (64 mEq) which is, of course, exactly the amount of protons supplied by the grain in going to pH 5.742.

Now if I change only the linear buffering term to -30.69 the predicted mash pH goes to 5.783. This gives some idea of how important it is to use a proper value of a as well as pHDI. But it also suggests that you can use a single value for a for all malts without accumulating that much error as a is distributed reasonably closely around 40 or so, at least for the base malts. But again let me emphasize that the idea behind the robust spreadsheet is to knock out 0.05 pH error here. 0.03 pH error there and 0.02 pH error yonder with the goal of having noticeably better pH estimates than the first generation calculators give.
 
Last edited:
A.J., Initially Mash Made Easy's output for the mashing of 30 lbs. of 5.6227 DI_pH base malt into 11 gallons of 95.4545 alkalinity water results in a mash pH of 5.81, vs. your calculation of 5.742. It is clear that I need to introduce a buffer for the grist to go along with my buffer that impacts mineralization. I presume this buffer to be a function of the Kg.'s of grist being mashed. Therefore, what mash pH do you get for the case of only 10 lbs. of your 5.6227 DI_pH base malt when mashed in 11 gallons of 95.45 ppm alkalinity water?

I will take your results and then work on introducing an appropriate base malt buffer to reduce 30 lbs of such malt mashed into 11 gal of 95.45 ppm alkalinity water to closely match your pH of 5.742, and then 10 lbs. of the same malt to match whatever mash pH you tell me you are getting with respect to my question above. This single buffer value will then likely be applied to all other malts. This gives me a project to keep me busy for a bit. I truly appreciate your helping me along here.

EDIT: If the 10 lb. result is ~6.11 pH, I may already have the solution in hand. If not, it's back to the drawing board.
 
Last edited:
A.J., Initially Mash Made Easy's output for the mashing of 30 lbs. of 5.6227 DI_pH base malt into 11 gallons of 95.4545 alkalinity water results in a mash pH of 5.81, vs. your calculation of 5.742. It is clear that I need to introduce a buffer for the grist to go along with my buffer that impacts mineralization. I presume this buffer to be a function of the Kg.'s of grist being mashed. Therefore, what mash pH do you get for the case of only 10 lbs. of your 5.6227 DI_pH base malt when mashed in 11 gallons of 95.45 ppm alkalinity water?

I will take your results and then work on introducing an appropriate base malt buffer to reduce 30 lbs of such malt mashed into 11 gal of 95.45 ppm alkalinity water to closely match your pH of 5.742, and then 10 lbs. of the same malt to match whatever mash pH you tell me you are getting with respect to my question above. This single buffer value will then likely be applied to all other malts. This gives me a project to keep me busy for a bit. I truly appreciate your helping me along here.

EDIT: If the 10 lb. result is ~6.11 pH, I may already have the solution in hand. If not, it's back to the drawing board.

One thing you want to watch out for is that you aren’t piling band-aids onto a deeper issue. Have you been able to input and run A.J.’s “troubleshooter” code?
 
One thing you want to watch out for is that you aren’t piling band-aids onto a deeper issue. Have you been able to input and run A.J.’s “troubleshooter” code?

I agree, no kludges that don't work, and further, toss a monkey wrench into the works. I have A.J.'s troubleshooter up now. Where do I see the pH change due to alkalinity?
 
I agree, no kludges that don't work, and further, toss a monkey wrench into the works. I have A.J.'s troubleshooter up now. Where do I see the pH change due to alkalinity?

You’ll want to set the solver to zero Δ Q total by varying pHz. Change the alkalinity value and then run that again. pHz should change accordingly.
 
So far, on my pH reduction page I'm subtracting the following:

Kg_grist/40 * mEq_alkalinity
(where 40 is my fixed buffer value)

This change seems to result in 5.81 pH moving to 5.75 pH (rounded) for the case of a 30 lbs. grist, and 6.17 pH moving to 6.11 pH (rounded) for the case of a 10 lb. grist.

All of this for 10 or 30 lbs. of 5.6227 DI_pH base malt mashed into 11 gallons of water with no minerals and 95.4545 ppm alkalinity.
 
So far, on my pH reduction page I'm subtracting the following:

Kg_grist/40 * mEq_alkalinity
(where 40 is my fixed buffer value)

This change seems to result in 5.81 pH moving to 5.75 pH (rounded) for the case of a 30 lbs. grist, and 6.17 pH moving to 6.11 pH (rounded) for the case of a 10 lb. grist.

All of this for 10 or 30 lbs. of 5.6227 DI_pH base malt mashed into 11 gallons of water with no minerals and 95.4545 ppm alkalinity.

The question is does the buffer value system you have going on track for different scenarios.
 
You’ll want to set the solver to zero Δ Q total by varying pHz. Change the alkalinity value and then run that again. pHz should change accordingly.

It kicked out with an error stating that the model is not linear. Apparently Solver within LibreOffice can only handle linear functions.
 
It kicked out with an error stating that the model is not linear. Apparently Solver within LibreOffice can only handle linear functions.

Oh boy. That’s no good. Wish I could help you out further. Maybe make malt linear and try it with just pH DI and a? You’ll be limiting yourself but it’s better than nothing. Or grab a copy of Excel. I think you can but it separate from Office for $129.99.
 
The question is does the buffer value system you have going on track for different scenarios.

I'm not fully sure what you mean by this. I've tossed a few of my recipes at it, and the overall change in output is not dramatic. When I add alkalinity to my water for batches requiring baking soda, the program is reducing the quantity of baking soda fully in line with the added mEq's of added alkalinity. Is this part of what you mean here?
 
I'm not fully sure what you mean by this. I've tossed a few of my recipes at it, and the overall change in output is not dramatic. When I add alkalinity to my water for batches requiring baking soda, the program is reducing the quantity of baking soda fully in line with the added mEq's of added alkalinity. Is this part of what you mean here?

That’s exactly what I meant. Does a static buffer keep values consistent when parameters are changed. Sounds like it does.
 
Oh boy. That’s no good. Wish I could help you out further. Maybe make malt linear and try it with just pH DI and a? You’ll be limiting yourself but it’s better than nothing. Or grab a copy of Excel. I think you can but it separate from Office for $129.99.

The problem is that we run exclusively Linux. No Windows OS will be found in our house. It's part of a protest my wife and I have against some of the things Bill Gates and his wife promote that rub us wrong. The details of this anti-Bill Gates protest of ours are best suited for a PM, if you are actually interested in such details.
 
I think I will tie this buffer value in with the one already found on my main page, so it becomes a variable value that is user selected, right along with the same for added mineralizations downward pH shift variability.
 
The problem is that we run exclusively Linux. No Windows OS will be found in our house. It's part of a protest my wife and I have against some of the things Bill Gates and his wife promote that rub us wrong. The details of this anti-Bill Gates protest of ours are best suited for a PM, if you are actually interested in such details.
Linux was stolen from SCO [emoji210]
 
The problem is that we run exclusively Linux. No Windows OS will be found in our house. It's part of a protest my wife and I have against some of the things Bill Gates and his wife promote that rub us wrong. The details of this anti-Bill Gates protest of ours are best suited for a PM, if you are actually interested in such details.
More to the point, Windows is a really crappy OS as is most of Microsoft's software that I have encountered with the exception of, you guessed it, Excel. The problem is that you can't avoid it. I got lots of nifty gadgets like my Panasonic phone system which is programmable only through a Windows application and a Leica laser "tape measure" that downloads data only through a Windows application and a current recorder that downloads only through a Windows application. We are a Mac household here (which is Unix based) and it runs Excel well including the full Solver (which is not a Microsoft product). You can run other Windows applications if you must through Parallels but it still means putting money into Bill Gates pocket which makes my gorge rise too but mostly because it's such lousy stuff he sells.
 
That’s exactly what I meant. Does a static buffer keep values consistent when parameters are changed. Sounds like it does.

Upon further review, the static buffer is definitely impacting the quantity of alkalinity required to be added to the mash water in order to utilize alkalinity to hit the target mash pH instead of adding baking soda. For the revision into which I placed the grist buffer, the alkalinity required has gone up noticeably, and now it does not seem right to me. This obviously will take a lot more thought.
 
Last edited:
A.J., Initially Mash Made Easy's output for the mashing of 30 lbs. of 5.6227 DI_pH base malt into 11 gallons of 95.4545 alkalinity water results in a mash pH of 5.81, vs. your calculation of 5.742. It is clear that I need to introduce a buffer for the grist to go along with my buffer that impacts mineralization. I presume this buffer to be a function of the Kg.'s of grist being mashed. Therefore, what mash pH do you get for the case of only 10 lbs. of your 5.6227 DI_pH base malt when mashed in 11 gallons of 95.45 ppm alkalinity water?
5.960


I will take your results and then work on introducing an appropriate base malt buffer to reduce 30 lbs of such malt mashed into 11 gal of 95.45 ppm alkalinity water to closely match your pH of 5.742, and then 10 lbs. of the same malt to match whatever mash pH you tell me you are getting with respect to my question above. This single buffer value will then likely be applied to all other malts.
As Scotty points out that may put a bandaid over a cut on one side of your face but then what do you do when another malt gives a result which is in error by about the same amount. You will never hit the target by tweaking this and tweaking that every time a discrepancy arises. It is actually easier, I believe, to use the algorithm suggested by the science.[/QUOTE][/QUOTE]
 
Oh boy. That’s no good. Wish I could help you out further.
Don't forget that the four column version of the troubleshooter is set up to set ∆Q to 0 by using Newton's method (as opposed to, presumably, gradient search with the Solver).

[Edit]But then, of course, Newton's method is a one dimensional gradient search. Doh!
 
Last edited:
Upon further review, the buffer is definitely impacting the quantity of alkalinity required to be added to the mash water in order to utilize alkalinity to hit the target mash pH instead of adding baking soda. For the revision into which I placed the grist buffer, the alkalinity required has gone up noticeably, and now it does not seem right to me. This obviously will take a lot more thought.

One thing you might entertain is converting your malt modeling over to a linear version around Δ Q malt = a * (pHz-pH DI) and ditch the color based modeling.
 
Don't forget that the four column version of the troubleshooter is set up to set ∆Q to 0 by using Newton's method (as opposed to, presumably, gradient search with the Solver).

Right! I forgot about that version.
 
We are trying to solve

∆Q(pHz) = Vw*∆Qw(pHz) + Vw*∆Qc(pHz) + ∑ai*mi*(pHz - pHDI) + ∑bi*mi*(pHz - pHDI)^2 + ∑ci*mi*(pHz - pHDI)^2 = 0

for pHz. If we linearize that helps because while ∆Qw(pHz) and ∆Qc(pHz) are non linear functions of pHz they are pretty close to being linear in the region of mash pH. This implies that a single step in Newton's method may suffice.
 
5.960


As Scotty points out that may put a bandaid over a cut on one side of your face but then what do you do when another malt gives a result which is in error by about the same amount. You will never hit the target by tweaking this and tweaking that every time a discrepancy arises. It is actually easier, I believe, to use the algorithm suggested by the science.

A.J., in one of your comments above, you were the one who initially offered up the suggestion that a static buffer with a value of something along the lines of 40 would be better than no buffer system at all. So I'm trying to run with this suggestion. I'm not of the intention to apply a kludge.

As mentioned above, so far, on my pH reduction page I'm applying the following as my initial stab at this static buffer:

(Kg_grist * mEq_mash_water_alkalinity)/40
(where 40 is the static buffer value)

Is this formula even in the ballpark with regard to how a static buffer is to be utilized?
 
A.J., in one of your comments above, you were the one who initially offered up the suggestion that a static buffer with a value of 40 would be better than no buffer system at all. So I'm trying to run with this suggestion.

As mentioned above, so far, on my pH reduction page I'm applying the following as my initial stab at this static buffer:

Kg_grist/40 * mEq_alkalinity
(where 40 is the static buffer value)

Is this formula even in the ballpark with regard to how a static buffer is to be utilized?

A.J. was talking about a=40, as in the first co-efficient in Δ Q malt = a * (pHz - pH DI), i.e. the linear form of the malt modeling equation in the charge method.
 
So when I applied the buffer formula as I envisioned it and it immediately nigh on matched A.J's 5.742 pH for 30 lbs. of DI_pH 5.6227 grist and 11 gallons of mash water with the alkalinity value of 95.4545, my result was purely a fluke bit of luck, and was not really valid.

Obviously others have been applying grist buffers in relation to mash water alkalinity to their overall pH reduction plan since well before the "Solver" was brought to the forefront, or at least I presume they have. I wonder how they were making this application work properly without utilizing the Solver. I'm having the linearity vs. non linearity problem issue with solver in LibreOffice.
 
Last edited:
So when I applied the buffer formula as I envisioned it and it immediately nigh on matched A.J's 5.742 pH for 30 lbs. of DI_pH 5.6227 grist and 11 gallons of mash water with the alkalinity value of 95.4545, my result was purely a fluke bit of luck, and was not really valid.

Obviously others have been applying grist buffers in relation to mash water alkalinity to their overall pH reduction plan since well before the "Solver" was brought to the forefront, or at least I presume they have. I wonder how they were making this application work properly without utilizing the Solver. I'm having the linearity vs. non linearity problem issue with solver in LibreOffice.

Define what you mean by “grist buffer”?

Pretty much all current spreadsheets solve for Mash pH by using color as a proxy for Q and using a term I’ve heard referred to as “buffering capacity”.

In BW it’s 0.17, in Riffe it’s a calculated value based on WtG ratio, etc. Riffe’s value is termed the pH/RA slope term and has units of l/mEq. If you divide it by the WtG ratio with units of l/kg, you get kg/mEq, which inverted gives mEq/kg.

For example:

Let’s use the BW value of 0.17 l/mEq.

0.17 l/mEq / 5.67 l/kg = 0.029 kg/mEq

1/0.029 kg/mEq = ~35 mEq/kg = a

We know the correct linear form for modeling malts is:

Δ Q malt (mEq/kg) = a * (pHz-pH DI)

If we re-arrange that a bit, and use color as a proxy for Q, we get what most color sheets offer:

pHz = pH DI + ((1/a) * Δ Q malt (mEq/kg))

pHz = pH DI + ((1/a) * (f * A))

Where f * A is the weighted, color based proxy for true acidity.
 
Last edited:
A.J., in one of your comments above, you were the one who initially offered up the suggestion that a static buffer with a value of something along the lines of 40 would be better than no buffer system at all. So I'm trying to run with this suggestion. I'm not of the intention to apply a kludge.

As mentioned above, so far, on my pH reduction page I'm applying the following as my initial stab at this static buffer:

(Kg_grist * mEq_mash_water_alkalinity)/40
(where 40 is the static buffer value)

Is this formula even in the ballpark with regard to how a static buffer is to be utilized?
It's often helpful when looking at a suspect relationship to examine the dimensions. The linear buffering terms is in units of mEq/kg•pH so that your expression is in
kg•mEq/mEq/kg•pH = kg^2•pH. These units don't make any sense. Furthermore, alkalinity represents the resistance of 1L of water to pH change whereas 40 represents the resistance of a kg of malt to pH change. It doesn't make much sense to have one in the numerator and one in the denominator besides which these are separate alkalinities which sum. The ratio is inappropriate.

a is used in the relationship ∆Qi(pHz) = mi*ai*(pHz - pHDIi) to compute the proton deficit of mi kg of a malt with parameters ai and pHDIi. The units of ∆Qi(pHz) are kg•(mEq/kg•pH)•pH = mEq which are the proper units of proton deficit (or surfeit).
 
Last edited:
Obviously others have been applying grist buffers in relation to mash water alkalinity to their overall pH reduction plan since well before the "Solver" was brought to the forefront, or at least I presume they have. I wonder how they were making this application work properly without utilizing the Solver.
They force a non linear problem to be linear (as shown in No. 86) and in so doing get a solution that is an approximation to the real solution. In this sense they don't work properly. However as the problem is not that non linear the approximate answer isn't too far off.
 
If we re-arrange that a bit, and use color as a proxy for Q, we get what most color sheets offer:

pHz = pH DI + ((1/a) * Δ Q malt (mEq/kg))

pHz = pH DI + ((1/a) * (f * A))

Where f * A is the weighted, color based proxy for true acidity.

But this makes no allowance for the alkalinity of the water and most of these programs do consider that, don't they? Is perhaps the water alkalinity somehow conflated with the grains' alkalinity as in Silver's proposed formula or through the f factor here? I suspected something like that might be responsible for the problem (now fixed in case anyone missed that) with Bru'n Water.
 
But this makes no allowance for the alkalinity of the water and most of these programs do consider that, don't they? Is perhaps the water alkalinity somehow conflated with the grains' alkalinity as in Silver's proposed formula or through the f factor here? I suspected something like that might be responsible for the problem (now fixed in case anyone missed that) with Bru'n Water.

You are correct A.J. I overlooked the alkalinity and Ca/Mg hardness term that most apply to the equation:

Mash pH = pH DI - ( (Slope pH/R) * ( (∑ f * A) - ( (HCO3 - (Ca hardness - Mg hardness) ) ) )
 
Back
Top