def main():

    recipe = {
        u'name':
        u"Wunderbah Heffeweizen (Extract)",
        u'start_volume':
        4.0,
        u'final_volume':
        5.0,
        u'grains': [
            {
                u'name': u'Wheat Liquid Extract',
                u'weight': 7.0 + (7.25 - 3.5) / 16,
                u'grain_type': u'lme'
            },
        ],
        u'hops': [
            # bittering
            {
                u'name': u'Hallertau US',
                u'weight': 1.0,
                u'boil_time': 60.0,
                u'hop_type': u'whole',
                u'percent_alpha_acids': 0.054,  # from bag
            },
            # flavoring
            {
                u'name': u'Hallertau US',
                u'weight': 1.0,
                u'boil_time': 30.0,
                u'hop_type': u'whole',
                u'percent_alpha_acids': 0.054,  # from bag
            },
        ],
        u'yeast': {
            u'name': u'Wyeast 3068',
        },
        u'data': {
            u'units': u'imperial',
        },
    }

    data_dir = os.path.abspath(os.path.join(os.getcwd(), 'data/'))
    loader = JSONDataLoader(data_dir)
    beer = parse_recipe(recipe, loader)
    print(beer.format(short=True))

    factory = StyleFactory(os.path.join(data_dir, 'bjcp', 'styles.json'))
    style = factory.create_style(10,
                                 'A')  # German Wheat Beer, Weizen/Weissbier
    print("")
    print(style.format())

    print('Style issues:')
    errors = style.recipe_errors(beer)
    for err in errors:
        print('- {}'.format(err))
Ejemplo n.º 2
0
def main():
    """
    From Northern Brewer Kit
    """
    brew_house_yield = 0.425

    recipe = {
        u"name": u"Kama Citra Session IPA (Extract)",
        u"start_volume": 2.5,
        u"final_volume": 5.0,
        u"grains": [
            {
                "name": "Golden Light Liquid Extract",
                "weight": 6.0,
                "grain_type": "lme"
            },
            {
                "name": "Golden Light Dry Extract",
                "weight": 1.0,
                "grain_type": "dme"
            },
            {
                "name": "Caramel Crystal Malt 40l", # Valencia Grains Caramel 40
                "weight": 0.75,
                "grain_type": "specialty",
            }
        ],
        u"hops": [
            {
                "name": "Centennial",
                "weight": 0.5,
                "hop_type": "pellet",
                "boil_time": 60.0,
                "percent_alpha_acids": 0.082,
            },
            {
                "name": "Cascade US",
                "weight": 1.0,
                "hop_type": "pellet",
                "boil_time": 20.0,
                "percent_alpha_acids": 0.06,
            },
            {
                "name": "Cascade US",
                "weight": 1.0,
                "hop_type": "pellet",
                "boil_time": 10.0,
                "percent_alpha_acids": 0.06,
            },
            {
                "name": "Citra",
                "weight": 2.0,
                "hop_type": "pellet",
                "boil_time": 0.0,
                "percent_alpha_acids": 0.133,
            }
            # { # Dry Hop
            #     "name": "Cascade",
            #     "weight": 1.0,
            #     "hop_type": "pellet",
            #     u"boil_time": 10.0,
            #     "percent_alpha_acids": 0.06,
            # },
            # { # Dry Hop
            #     "name": "Citra",
            #     "weight": 2.0,
            #     "hop_type": "pellet",
            #     u"boil_time": 0.0,
            #     "percent_alpha_acids": 0.133,
            # },
        ],
        u"yeast": {
            "name": "Omega Yeast 009",
        },
        u"data": {u"brew_house_yield": brew_house_yield, u"units": u"imperial"},
    }

    data_dir = os.path.abspath(os.path.join(os.getcwd(), "data/"))
    loader = JSONDataLoader(data_dir)
    beer = parse_recipe(recipe, loader)
    print(beer.format(short=True))

    factory = StyleFactory(os.path.join(data_dir, "bjcp", "styles.json"))
    style = factory.create_style("21", "B")
    print("")
    print(style.format())

    print("Style issues:")
    errors = style.recipe_errors(beer)
    for err in errors:
        print("- {}".format(err))

    print("")

    builder = RecipeBuilder(
        name="Specialty IPA",
        grain_list=[g.grain for g in beer.grain_additions],
        hop_list=[h.hop for h in beer.hop_additions],
        target_ibu=27.0,
        target_og=1.50,
        brew_house_yield=brew_house_yield,
        start_volume=2.5,
        final_volume=5.0,
    )
def main():

    recipe = {
        u'name':
        u"Yellow Moon IPA (Extract)",
        u'start_volume':
        4.0,
        u'final_volume':
        5.0,
        u'grains': [
            {
                u'name': u'Pale Liquid Extract',
                u'weight': 7.0,
                u'grain_type': u'lme'
            },
            {
                u'name': u'Caramel Crystal Malt 20l',
                u'weight': 1.0,
                u'grain_type': u'specialty'
            },
            {
                u'name': u'Munich Malt',
                u'weight': 0.5,
                u'grain_type': u'specialty'
            },
            {
                u'name': u'Cara Pils Dextrine',
                u'weight': 0.5,
                u'grain_type': u'specialty'
            },
        ],
        u'hops': [
            {
                u'name': u'Centennial',
                u'weight': 1.0,
                u'boil_time': 60.0
            },
            {
                u'name': u'Centennial',
                u'weight': 1.0,
                u'boil_time': 30.0
            },
            {
                u'name': u'Cascade US',
                u'weight': 1.0,
                u'boil_time': 10.0
            },
            {
                u'name': u'Cascade US',
                u'weight': 1.0,
                u'boil_time': 0.0
            },
        ],
        u'yeast': {
            u'name': u'Wyeast 1056',
        },
        u'data': {
            u'brew_house_yield': 0.425,
            u'units': u'imperial',
        },
    }

    data_dir = os.path.abspath(os.path.join(os.getcwd(), 'data/'))
    loader = JSONDataLoader(data_dir)
    beer = parse_recipe(recipe, loader)
    print(beer.format(short=True))

    factory = StyleFactory(os.path.join(data_dir, 'bjcp', 'styles.json'))
    style = factory.create_style('21', 'A')
    print("")
    print(style.format())

    print('Style issues:')
    errors = style.recipe_errors(beer)
    for err in errors:
        print('- {}'.format(err))

    print('')

    builder = RecipeBuilder(
        name='Pale Ale',
        grain_list=[g.grain for g in beer.grain_additions],
        hop_list=[h.hop for h in beer.hop_additions],
        target_ibu=54.6,
        target_og=1.060,
        brew_house_yield=0.50,
        start_volume=4.0,
        final_volume=5.0,
    )

    percent_list = [0.9, 0.05, 0.025, 0.025]
    grain_additions = builder.get_grain_additions(percent_list)
    for grain_add in grain_additions:
        print(grain_add.convert_to_lme(0.50).format())
        print('')

    # BIAB Measurement 1.0085, volume reduced by 0.5 Gallons
    # This is before adding extract to volume but after grains were removed
    grain_additions = beer.get_grain_additions_by_type(GRAIN_TYPE_SPECIALTY)
    bhy = calculate_brew_house_yield(3.5, 1.0085, grain_additions)
    print("\nBrew House Yield: {:0.2%} (Specialty Grains BIAB)".format(bhy))

    # After extract added
    # This is before adding extract to volume but after grains were removed
    bhy = calculate_brew_house_yield(3.5, 1.075, beer.grain_additions)
    print("\nBrew House Yield: {:0.2%} (After extract addition)".format(bhy))

    lbs_dme = beer.get_wort_correction(75, 3.5)
    print("\nAdd {:0.2f} lbs of DME to fix wort".format(lbs_dme))
Ejemplo n.º 4
0
def main():

    recipe = {
        u'name':
        u"10 Pound Stout (Extract)",
        u'start_volume':
        5.0,
        u'final_volume':
        5.0,
        u'grains': [
            {
                u'name': u'Amber Liquid Extract',
                u'weight': 6.0 + 15.75 / 16.0,
                u'grain_type': u'lme'
            },
            {
                u'name': u'Dark Dry Extract',
                u'weight': 3.001,
                u'grain_type': u'dme'
            },
            {
                u'name': u'Caramel Crystal Malt 120l',
                u'weight': 1.0,
                u'grain_type': u'specialty'
            },
            {
                u'name': u'Black Barley Stout',
                u'weight': 0.5,
                u'grain_type': u'specialty'
            },
            {
                u'name': u'Roasted Barley',
                u'weight': 0.5,
                u'grain_type': u'specialty'
            },
        ],
        u'hops': [
            # bittering
            {
                u'name': u'Columbus',
                u'weight': 2.0,
                u'boil_time': 60.0,
                u'hop_type': u'pellet',
                u'percent_alpha_acids': 0.149,  # from bag
            },
            # flavoring
            {
                u'name': u'Cascade US',
                u'weight': 7.0,
                u'boil_time': 15.0,
                u'hop_type': u'whole wet'
            },  # from garden
            # aroma
            {
                u'name': u'Cascade US',
                u'weight': 5.0 + 5.0 / 8.0,
                u'boil_time': 5.0,
                u'hop_type': u'whole wet'
            },  # from garden
        ],
        u'yeast': {
            u'name': u'Wyeast 1084',
        },
        u'data': {
            u'brew_house_yield': 0.79,
            u'units': u'imperial',
        },
    }

    data_dir = os.path.abspath(os.path.join(os.getcwd(), 'data/'))
    loader = JSONDataLoader(data_dir)
    beer = parse_recipe(recipe, loader)
    print(beer.format(short=True))

    factory = StyleFactory(os.path.join(data_dir, 'bjcp', 'styles.json'))
    # style = factory.create_style(15, 'C')  # Irish Stout
    style = factory.create_style(20, 'C')  # Imperial Stout
    print("")
    print(style.format())

    print('Style issues:')
    errors = style.recipe_errors(beer)
    for err in errors:
        print('- {}'.format(err))

    # Specialty Grains, Multi Step Mash
    grain_additions = beer.get_grain_additions_by_type(GRAIN_TYPE_SPECIALTY)
    bhy = calculate_brew_house_yield(6.12 / 4.0, 1.030, grain_additions)
    print("\nBrew House Yield: {:0.2%} (Multi Step Mash)".format(bhy))  # noqa

    # After diluting
    grain_additions = beer.get_grain_additions_by_type(GRAIN_TYPE_SPECIALTY)
    bhy = calculate_brew_house_yield(
        6.12 / 4.0 + 3.5,  # Added into water
        1.009,
        grain_additions)
    print("\nBrew House Yield: {:0.2%} (Dilution)".format(bhy))  # noqa
Ejemplo n.º 5
0
def main():

    recipe = {
        u"name": u"Indian Orange Cardamom Milk Stout (Extract)",
        u"start_volume": 4.0,
        u"final_volume": 5.0,
        u"grains": [
            {u"name": u"Pale Liquid Extract", u"weight": 7.0, u"grain_type": u"lme"},
            {"name": "Milk Sugar Lactose", "weight": 1.0},
            {
                "name": "Black Patent Malt",
                "weight": 1.0,
                "grain_type": "specialty",
                "color": 525,
            },
            {
                "name": "Caramel Crystal Malt 80l",
                "weight": 0.75,
                "grain_type": "specialty",
                "color": 80,
            },
            {
                "name": "Chocolate Malt",
                "weight": 0.5,
                "grain_type": "specialty",
                "color": 200,  # 180 - 250
            },
        ],
        u"hops": [
            {
                "name": "East Kent Golding",
                "weight": 1.5,
                "hop_type": "pellet",
                u"boil_time": 60.0,
                "percent_alpha_acids": 0.047,
            }
        ],
        u"add_in": [
            {"name": "Ground Cardamom", "weight": 0.5, "boil_time": 30.0},
            {"name": "Orange Zest", "boil_time": 15.0, "note": "6 oranges"},
        ],
        u"yeast": {u"name": u"Wyeast 1099"},
        u"data": {u"brew_house_yield": 0.425, u"units": u"imperial"},
    }

    data_dir = os.path.abspath(os.path.join(os.getcwd(), "data/"))
    loader = JSONDataLoader(data_dir)
    beer = parse_recipe(recipe, loader)
    print(beer.format(short=True))

    factory = StyleFactory(os.path.join(data_dir, "bjcp", "styles.json"))
    style = factory.create_style("16", "A")
    print("")
    print(style.format())

    print("Style issues:")
    errors = style.recipe_errors(beer)
    for err in errors:
        print("- {}".format(err))

    print("")

    # builder = RecipeBuilder(
    #     name="Sweet Stout",
    #     grain_list=[g.grain for g in beer.grain_additions],
    #     hop_list=[h.hop for h in beer.hop_additions],
    #     target_ibu=27.0,
    #     target_og=1.056,
    #     brew_house_yield=0.425,
    #     start_volume=4.0,
    #     final_volume=5.0,
    # )

    # TODO: Unclear why this doesn't work
    # percent_list = [0.8044, 0.0869, 0.06525, 0.04345]
    # grain_additions = builder.get_grain_additions(percent_list)
    # for grain_add in grain_additions:
    #     print(grain_add.convert_to_cereal().format())
    #     print("")

    # BIAB Measurement at 6 qts water added, 1.037 OG
    # Removal of bag revealed only 4qts, so lost 2 qts to grain.
    grain_additions = beer.get_grain_additions_by_type(GRAIN_TYPE_SPECIALTY)
    bhy = calculate_brew_house_yield(1.0, 1.037, grain_additions)
    print(
        "\nBrew House Yield: {:0.2%} (Specialty Grains BIAB, Enzymatic Rest)".format(
            bhy
        )
    )

    # Started with 3 gallons of hot water in pot, added 1 gallon of specialty grains
    # BIAB Measurement 1.008, volume reduced by 0.5 Gallons
    # This is before adding extract to volume and after grains were removed
    grain_additions = beer.get_grain_additions_by_type(GRAIN_TYPE_SPECIALTY)
    bhy = calculate_brew_house_yield(4.0, 1.008, grain_additions)
    print("\nBrew House Yield: {:0.2%} (Specialty Grains BIAB)".format(bhy))

    # After extract added
    # This is after adding extract and lactose to volume and after grains were removed
    # Before adding lactose we has 1.054
    bhy = calculate_brew_house_yield(4.0, 1.063, beer.grain_additions)
    print("\nBrew House Yield: {:0.2%} (After extract addition)".format(bhy))

    lbs_dme = beer.get_wort_correction(63, 4.0)
    print("\nAdd {:0.2f} lbs of DME to fix wort".format(lbs_dme))

    # At this point added 1.0 lbs of DME to bring up the gravity

    original_gravity = 1.075  # at approximately 4.75 G
    print("\nOriginal Gravity: {:0.4} at 4.75G".format(original_gravity))

    # Added yeast starter (2qt water, 6oz dme) and 2 bags of yeast
    original_gravity = 1.069  # at approximately 5.33G
    print("\nOriginal Gravity: {:0.4} at 5.33G".format(original_gravity))

    # 1.066 at 5.5G

    original_gravity = 1.061  # at approximately 6G
    print("\nOriginal Gravity: {:0.4} at 6G".format(original_gravity))

    final_gravity_refractometer = 1.041
    print("\nFinal Gravity (r): {:0.4}".format(final_gravity_refractometer))
    final_gravity_hydrometer = 1.024
    print("\nFinal Gravity (h): {:0.4}".format(final_gravity_hydrometer))
def main():

    recipe = {
        u'name':
        u"Munich Dunkel (All Grain)",
        u'start_volume':
        7.0,
        u'final_volume':
        6.0,
        u'grains': [
            {
                u'name': u'Munich Malt',
                u'weight': 12.2,
                u'grain_type': u'cereal'
            },
            {
                u'name': u'Chocolate Malt',
                u'weight': 0.38,
                u'data': {
                    u'color': 420.0
                },
                u'grain_type': u'cereal'
            },
            {
                u'name': u'Light Dry Extract',
                u'weight': 0.375,
                u'grain_type': u'dme',
                u'notes': u'Added from yeast starter'
            },
            {
                u'name': u'Light Dry Extract',
                u'weight': 2.7125,
                u'grain_type': u'dme',
                u'notes': u'Added to correct gravity'
            },
        ],
        u'hops': [
            # bittering
            {
                u'name': u'Hallertau US',
                u'weight': 1.25,
                u'boil_time': 60.0,
                u'hop_type': u'pellet',
                u'percent_alpha_acids': 0.038,  # from bag
            },
            # flavoring
            {
                u'name': u'Hallertau US',
                u'weight': 0.75,
                u'boil_time': 20.0,
                u'hop_type': u'pellet',
                u'percent_alpha_acids': 0.038,  # from bag
            },
        ],
        u'yeast': {
            u'name': u'Wyeast 2308',
        },
        u'data': {
            u'brew_house_yield': 0.5684,
            u'units': u'imperial',
        },
    }

    data_dir = os.path.abspath(os.path.join(os.getcwd(), 'data/'))
    loader = JSONDataLoader(data_dir)
    beer = parse_recipe(recipe, loader)
    print(beer.format(short=True))

    factory = StyleFactory(os.path.join(data_dir, 'bjcp', 'styles.json'))
    style = factory.create_style(8, 'A')  # Munich Dunkel
    print("")
    print(style.format())

    print('Style issues:')
    errors = style.recipe_errors(beer)
    for err in errors:
        print('- {}'.format(err))

    # Multi Step Mash
    grain_additions = beer.get_grain_additions_by_type(GRAIN_TYPE_CEREAL)
    bhy = calculate_brew_house_yield(
        5.36,
        1.049,  # measure after lautering
        grain_additions)
    print("\nBrew House Yield: {:0.2%} (Multi Step Mash)".format(bhy))  # noqa
def main():

    recipe = {
        u'name':
        u"White House Honey Ale (Extract)",
        u'start_volume':
        3.0,
        u'final_volume':
        5.0,
        u'grains': [
            {
                u'name': u'Caramel Crystal Malt 60l',
                u'weight': 0.75,
                u'grain_type': u'specialty'
            },
            {
                u'name': u'Biscuit Malt',
                u'weight': 0.5,
                u'grain_type': u'specialty'
            },
            {
                u'name': u'Pilsner Liquid Extract',
                u'weight': 3.3,
                u'data': {
                    u'color': 8.0
                },
                u'grain_type': u'lme'
            },
            {
                u'name': u'Light Dry Extract',
                u'weight': 1.0,
                u'grain_type': u'dme'
            },
            # Add honey after aroma hops, boil for 5 min
            {
                u'name': u'Honey',
                u'weight': 1.0,
                u'grain_type': u'lme'
            },
        ],
        u'hops': [
            # bittering
            {
                u'name': u'East Kent Golding',
                u'weight': 1.5,
                u'boil_time': 45.0,
                u'hop_type': u'pellet',
                u'percent_alpha_acids': 0.058,  # from bag
            },
            # flavoring (none)
            # aroma
            {
                u'name': u'Fuggle',
                u'weight': 1.5,
                u'boil_time': 1.0,
                u'hop_type': u'pellet',
                u'percent_alpha_acids': 0.049,  # from bag
            },
        ],
        u'yeast': {
            u'name': u'Danstar Lallemand Windsor Ale Yeast',
        },
        u'data': {
            u'units': u'imperial',
        },
    }

    data_dir = os.path.abspath(os.path.join(os.getcwd(), 'data/'))
    loader = JSONDataLoader(data_dir)
    beer = parse_recipe(recipe, loader)
    print(beer.format(short=True))

    factory = StyleFactory(os.path.join(data_dir, 'bjcp', 'styles.json'))
    style = factory.create_style(
        26, 'B')  # Belgian Dubbel (Wikipedia), could be 23 Specialty
    print("")
    print(style.format())

    print('Style issues:')
    errors = style.recipe_errors(beer)
    for err in errors:
        print('- {}'.format(err))