Pardon me for being dense AJ, but in the grand scheme of things, how does using the Newton method help us?
Given good malt data (which I'll get back to) estimates of mash pH, solidly based on the science we have (the alkalinity of water itself is not ignored, bicarbonate is not used as a proxy for alkalinity, the pH of source water is considered, the end point titration pH used by the lab in reporting alkalinity has been considered, the non linear problem has not been represented by a linear approximation) are obtained by computing ∑∆Q(pHz) and finding the value of pHz resulting in ∑∆Q(pHz) = 0. We can do this in several ways:
1)We can grope for an answer by entering value after value for pHz until we get one that gives us ∑∆Q(pHz) close to 0
2)We can search more intelligently (bisection technique) for that pHz value
3)We can set up the Solver to do the search automatically
4)We can use Newton's method
From the user's POV 3) and 4) are obviously preferable as they give the answer automatically. 4) may be slightly preferrable to 3) in the sense that as soon as you change any input parameter the new pHz estimate pops up (in the Newton 3rd step cell in the troubleshooter/voltmeter spreadsheet). With 3) either the Solver has to be set up manually or a macro radio button has to be pressed but the manual case has the advantage that you can ask Solver to adjust any parameter to satisfy any condition. For example one might well want to use it to determine how much lactic acid should be added to set a particular mash pH. Of course we could have several radio buttons one labeled "Calculate pH", another "Calculate acid addition" a third labeled "Calculate sauermalz" a 4th labeled "Calculate Malt 2" etc. This might be the most convenient. OTOH having the Newton's method solution always on the screen does not preclude the use of the Solver, by macro or manually, for other parameters.
How does it relate to trying to model the co-efficiencts used in getting Q malt values?
It doesn't. It only gives an alternative means for finding the solution given that you have coefficients to put into the malt models. I cooked it up only because it never occurred to me, until I was typing the post on it, that one could invoke the Solver through a macro. It may yet have some value in that it is nice to see immediately (i.e. without having even to press a radio button) what any change to an input parameter does to pHz.
Most importantly, how do we apply this analysis.
It isn't really an analysis but rather an algorithm for finding pHz.
When we go to code this thing, we will need to adapt a grain bill section to the calculations in the troubleshooter.
Yes, and that's where the challenges really lie, IMO. The model
∆Qmalt = a*(pHz - pHDI) + b*(pHz - pHDI)^2 + c*(pHz - pHDI)^3 is a good model for any malt that I can imagine we will ever encounter (and if it isn't we can always add a 4th term). I'll note that in my correspondence with Joe Walts he preferred
∆Qmalt = u + v*pHz + w*pHz^2 (I think because his curve fitting routine didn't allow offset) and all the data he gave me was based on that which is an acceptable model but not as convenient and obscures
pHDI but
pHDI,
a and
b can be calculated from
u, v and
w. Kai measured
pHDI and the amount of acid required to get to
pHref (I don't remember what
pHref was). It is possible to deduce
a from his measurements. Thus I'll assert that any reasonable set of malt measurements can be converted into the parameters set (
pHDI, a, b, c) though you may have to use 0 for
c and
b as it takes
at least n measurements to get
n parameter values. Thus we will have to agree on a model, and I'll advocate strongly for
∆Qmalt = a*(pHz - pHDI) + b*(pHz - pHDI)^2 + c*(pHz - pHDI)^3, and then convert any available malt measurements to (
pHDI, a, b, c).
I’m not the sharpest tool in the shed but I am good at applying concepts in Excel.
Don't sell yourself short! After years of trying to get people to appreciate the power of this method you guys here are the first to have shown any level of understanding of it and what it can potentially do.