Module: Mash

Defined in:
lib/mash.rb

Overview

Various mash calculations

Class Method Summary collapse

Class Method Details

.infusion_volume(data) ⇒ Float

Note:

Temperatures must be measured in Celsius, mass in kilograms and volume in liters

Calculates volume of boiling water needed to increase mash temperature

Examples:

Mash.infusion_volume({
  initial: 40, # current mash temperature
  target: 60,  # target mash temperature
  mass: 4,     # grain mass in mash
  volume: 6    # water volume in mash
})

Parameters:

  • data (Hash)

    data required to calculate strike temperature; initial, target, mass, volume

Returns:

  • (Float)

    liters of infusion water needed for step



49
50
51
52
53
54
55
# File 'lib/mash.rb', line 49

def self.infusion_volume data
  target = data[:target]

  ((target - data[:initial]) *
  ((0.41 * data[:mass]) + data[:volume]) /
   (100 - target)).round 1
end

.strike_temperature(data) ⇒ Fixnum

Note:

Temperatures must be measured in Celsius, ratio is liters per kilograms

Calculates strike water temperature

Examples:

Mash.strike_water({
  initial: 20, # temperature of grain; i.e. ambient temperature
  target: 60,  # target mash temperature
  ratio: 1.25  # water to grain ratio; e.g. 1.25L/kg
})

Mash.strike_water({
  initial: 20,
  target: 60,
  ratio: 1.25,
  adjustment: 1.015 # calculated temperature is multiplied by the adjustment to compensate for heat lost to the mash tun
})

Parameters:

  • data (Hash)

    data required to calculate strike temperature; initial, target, ratio and optionally adjustment

Returns:

  • (Fixnum)

    strike water temperature



25
26
27
28
29
30
31
32
# File 'lib/mash.rb', line 25

def self.strike_temperature data
  adjustment = data[:adjustment] || 1
  target = data[:target]

  (((0.41 / data[:ratio]) *
    (target - data[:initial]) +
     target) * adjustment).round
end