Kudos Martin, we all appreciate the effort. I've been playing with it and noticed that - once the 'Net Water Alkailinity' (following RA) goes negative (by adding Gypsum, for instance) , no amount of Lactic Acid as a water adjustment will change the Mash PH, while even a small amount of acidulated malt will reduce the mash PH.
How can that be?
I put that in there purposely since the phosphate buffers will not let the mash pH drop below about 5 under normal circumstances. By normal, I mean no external acid additions to the mash.
This pH response was confirmed through experiments that Kai ran last month. No matter how much calcium or magnesium hardness you add to the mash water, the mash pH will not drop below roughly 5. This is a good thing since a mash pH of less than 5.2 (room-temp measurement) does not produce a very inviting beer in my opinion. The body is thinner and the beer is noticably tart.
I incorporated this response in the mash pH calculation by limiting the minimum RA value used in the pH estimate to zero. Negative RA values are assumed to be zero RA. (The acid malt is on the other side of the equation in the malt acidity. Its not affected by the zero RA limit. I'll be adding a note that acid additions to the water that produce a negative RA would not be properly accounted in this program. Unlike adding Ca or MG, acid in the mash can drop the pH below 5.)
So, you did find an interesting quirk, but in practice it should not be an issue to most brewers. I welcome any suggestions that we should include the ability to model pH below 5, but I haven't found the need at this time.
Kai, the malt acidity was based on your work and you are credited on the instruction sheet of the program. Thanks!