Improving Basic Water Calculator

Discussion in 'Feature Requests' started by hairycheese, Jul 26, 2017.

Tags:
  1. hairycheese

    hairycheese New Member

    Joined:
    Jul 26, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    The basic water calculator can be improved to automatically determine the mass of salts that need to be added to hit a profile. This is because there are six target ions and six source salts so you can write a 6x6 matrix that converts input salts to output ions. Inverting this matrix and multiplying it against the goal change in ions returns the quantities of salts that must be added to hit the target profile. This may also apply to the more advanced calculator by limiting the salt choices and iteratively calculating solutions to deal with the non-linear equilibria calculations.
     
  2. Yooper

    Yooper Administrator
    Staff Member

    Joined:
    Nov 16, 2013
    Messages:
    2,494
    Likes Received:
    1,584
    Trophy Points:
    113
    Gender:
    Female
    Occupation:
    Happily retired
    Location:
    Upper Michigan/Florida
    Thanks for the input. That's not something that has been asked for before (as far as I know), but it's something to keep in mind.
     
  3. pruby

    pruby New Member

    Joined:
    Apr 13, 2016
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Wellington, New Zealand
    Just noticed this, similar to something I mocked up last year. I used a slightly different method, but have actually written it up in PHP if that's helpful. It wouldn't be hard to integrate that in to the calculator, though you might want to use GSL or some well-known library for the simplex algorithm rather than my barely-tested implementation.

    Suggestion was https://www.brewersfriend.com/forum/threads/optimal-salt-addition-calculator.3117/

    Code is at https://github.com/pruby/brew-salt-optimiser
     

Share This Page

arrow_white