@beerwright/core
    Preparing search index...

    Function proofAndSweeten

    • What to add to a jar of macerate to reach a target strength and sweetness, or null when that isn't possible.

      final_L      = spirit_L × ABV / target ABV      (alcohol is conserved)
      sugar_kg = target g/L × final_L / 1000
      sugar_room_L = sugar_kg × L/kg at the final concentration
      water_L = final_L − spirit_L − sugar_room_L − the syrup's own water

      The first line does most of the work. Water and sugar add no alcohol, so the alcohol in the jar and the target strength fix the final volume before anything else. The rest is accounting within that volume. Proofing first and sweetening second solves these in the wrong order and falls short on both targets.

      We treat volumes as additive, which they aren't. Ethanol and water contract by a couple of per cent when mixed at these strengths, and the sucrose relation was measured in water, not spirit. So the predicted final volume runs a little high. We don't model it; the explanation tells the maker to add slightly less water and top up to volume by measuring. Modelling the contraction would need a table, and the note is nearly as useful.

      A target at or above the current strength. Water can't make a spirit stronger. The formula wouldn't catch this (it returns a final volume smaller than the spirit already in the jar, and negative water), so we check for it.

      A sugar target that doesn't fit. Past some sweetness the sugar alone takes more volume than the target strength leaves, so the two targets are incompatible. We return null instead of a negative volume of water.

      A jar with no volume, no alcohol, or a zero target also returns null, since the calculation would divide by zero.

      Parameters

      Returns ProofAndSweetenResult | null