def infusion(ratio, curr_temp, new_temp, water_temp, grain):
    """
    Calculate the amount of hot water required to raise the mash
    temperature to a specific temperature.

    From: http://howtobrew.com/book/section-3/the-methods-of-mashing/calculations-for-boiling-water-additions

    Wa = (T2 - T1)(.2G + Wm)/(Tw - T2)

    :arg ratio: Grist ratio in quarts/lbs
    :arg curr_temp: Current mash temperature in fahrenheit
    :arg new_temp: The target temperature of the mash in fahrenheit
    :arg water_temp: The temperature of the water to be added in fahrenheit
    :arg grain: The dry weight of the grain in the mash in pounds
    :returns: The amount of water at given temperature to add to achieve
        requested change in mash temperature
    """
    mash_water = grain * ratio
    return (new_temp - curr_temp) * (0.2 * grain + mash_water) / (water_temp -
        new_temp)
