@beerwright/core
    Preparing search index...

    Function mixSpirits

    • The strength and volume of several spirits and waters mixed together, or null when the mix is impossible.

      m_i     = V_i × ρ(p_i, t_i)        (or the kilograms as given)
      p_mix = Σ m_i p_i / Σ m_i
      ABV_mix = massFractionToAbv(p_mix)
      V_mix = Σ m_i / ρ(p_mix, 20 °C)

      Mass and the mass of ethanol both add up when liquids are mixed, but volume does not. So each liquid is turned into a mass with ethanolWaterDensityKgPerL at its own strength and temperature, the masses are added, and the result is turned back into a strength and a volume at 20 °C. The contraction falls out of the density formula.

      A litre of 96 % and a litre of water at 20 °C come out as 1.94 L at 49.5 %. Adding the volumes would say 2 L at 48 %.

      With no liquids, a strength outside 0–100 %, or a temperature outside the formula's −20 to 40 °C. And when negative amounts take out more than is there: if the total mass isn't above zero, or the alcohol left is less than none or more than all of it.

      Parameters

      Returns SpiritMixResult | null