-
-
Save felipec/06389d19b34fcf727226 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
$sucrose_points = 386.5 | |
$extract_potential = { | |
'2 row' => 0.79, | |
'crystal 10L' => 0.75, | |
'carapils' => 0.72, | |
} | |
wort = 80 | |
gravity = 1.045 | |
ef = 0.70 | |
hours = 1 | |
grains = [ | |
['2 row', 92], | |
['crystal 10L', 4], | |
['carapils', 4], | |
] | |
puts '=' * 40 | |
grain = 0.0 | |
grains.each do |name, perc| | |
gp = (gravity * 1000 - 1000) * wort * perc / 100 | |
ep = $extract_potential[name] | |
weight = gp / (ep * ef * $sucrose_points) | |
puts '%s: %0.2f kg (%0.2f lb)' % [name, weight, weight * 2.20462] | |
grain += weight | |
end | |
l_grain = grain * (1.7) # 1.0 - 1.7 | |
l_evaporation = hours * (5.7) | |
mash_thickness = 2.78 | |
strike_volume = grain * mash_thickness | |
mash_volume = strike_volume + 0.67 * grain | |
runoff_volume = wort / 0.96 + l_evaporation | |
start_volume = runoff_volume + l_grain | |
puts '=' * 40 | |
puts 'grains = %0.0f kg (%0.2f lb)' % [grain, grain * 2.20462] | |
puts 'strike_volume = %0.0f L' % strike_volume | |
puts 'mash_volume = %0.0f L' % mash_volume | |
puts 'sparge_volume = %0.0f L' % (start_volume - strike_volume) | |
puts 'runoff_volume = %0.0f L' % runoff_volume | |
puts 'start_volume = %0.0f L' % start_volume | |
puts '=' * 40 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment