Beispiel #1
0
def b20200411ipa(beer_file='', save_beer=False, overwrite=False):
    '''
    Returns beer object with all attributes of brew day, fermentation, etc.
    '''
    # ---------- Constants -----------------------------
    mash_in_temp_c = 70.5
    mash_temp_data = False
    if mash_temp_data:
        print('load in data')

    # ================= INPUTS =============================
    name = "None"
    classification = "Ale"
    beer_type = "IPA"
    yeast = 'Safe Ale US-05'
    beer = bu(saps, name)
    final_vol = mu.gal2l(6)
    og = 1.056
    fg = 1.018
    og_temp = 82
    fg_temp = 64

    # hops = [Alpha, Boil, Ounces]
    additions = 1
    hops = np.array((additions, 3))
    cascade = np.array([12.8, 60, 0.80])
    hops = cascade
    hops = hops.reshape((additions, 3))
    hop_types = ['cascade']

    # Grain Bill kgs
    grain_bill_dict = {
        'pale_malt': 1.35,
        'pilsner_malt': 2.73,
        'caramel_malt_60l': 2.72
    }

    #====================================================================
    # --------- Mash and water calculations
    #====================================================================
    total_grain = sum(grain_bill_dict.values())
    mash_vol, t_water = beer.mash_in(total_grain, mash_in_temp_c)

    #====================================================================
    #---------- Calculated values
    #====================================================================
    beer.set_classification(classification)
    beer.set_beer_type(beer_type)
    beer.set_og(og)
    beer.set_fg(fg)
    beer.set_yeast(yeast)
    beer.set_hop_types(hop_types)
    beer.set_final_vol_L(final_vol)
    beer.set_grain_bill_dict(grain_bill_dict)
    beer.set_hop_types(hop_types)
    beer.set_hops(hops)

    theoretical = beer.potential_gravity(grain_bill_dict,
                                         final_vol,
                                         grain_units='plk')
    theo_points = (theoretical - 1) * 1000
    og_points = (og - 1) * 1000
    efficeincy = og_points / theo_points * 100
    abv = beer.abv(tog=og_temp, tfg=fg_temp)
    ibus = beer.ibus(hops)
    calories = beer.calories(og, fg)

    print('\n')
    print("BEER: " + name + '\n')
    print('MASH:')
    print('     Water vol(l):   {}'.format(round(mash_vol, 2)))
    print('     Water vol(gal): {}'.format(round(mu.l2gal(mash_vol), 2)))
    print('     Water Temp(C):  {}'.format(round(t_water, 2)))
    print('     Water Temp(F):  {}'.format(round(mu.c2f(t_water), 2)))
    print('Final:')
    print('     Potential OG:   {}'.format(round(theoretical, 3)))
    print('     Actual OG:      {}'.format(og))
    print('     Efficiency:     {}'.format(round(efficeincy, 2)))
    print('     ABV:            {}'.format(round(abv, 2)))
    print('     IBUs:           {}'.format(round(ibus, 2)))
    print('     Calories:       {}'.format(round(calories, 2)))
    print('\n')

    if save_beer:
        mu.save_beer_to_archive(beer_file, beer, overwrite=overwrite)

    return beer
def m20200509wash0019(wash_file='', save_wash=False, overwrite=False):
    '''
    Returns wash object with all attributes of brew day, fermentation, etc.
    '''
    # ---------- Constants -----------------------------
    mash_in_temp_c = 70.5
    mash_temp_data = False
    if mash_temp_data:
        print('load in data')

    # ================= INPUTS =============================
    name = "Wash #0019"
    yeast = 'WLP099 Super High Gravity Yeast'
    wash = bu(saps, name)
    final_vol = mu.gal2l(8)
    og = 1.124
    fg = 1.026
    og_temp = 84
    fg_temp = 70

    # Grain Bill kgs
    grain_bill_dict = {
        'cracked_corn': 5,
        'white_wheat_malt': 2,
        'six_row_malt': 2.5,
        'sucrose': mu.lb2kg(9),
    }
    #====================================================================
    # --------- Mash and water calculations
    #====================================================================
    total_grain = sum(grain_bill_dict.values())
    mash_vol, t_water = wash.mash_in(total_grain, mash_in_temp_c)

    #====================================================================
    #---------- Calculated values
    #====================================================================
    wash.set_og(og)
    wash.set_fg(fg)
    wash.set_yeast(yeast)
    wash.set_final_vol_L(final_vol)
    wash.set_grain_bill_dict(grain_bill_dict)
    theoretical = wash.potential_gravity(grain_bill_dict,
                                         final_vol,
                                         grain_units='plk')
    theo_points = (theoretical - 1) * 1000
    og_points = (og - 1) * 1000
    efficeincy = og_points / theo_points * 100
    abv = wash.abv(tog=og_temp, tfg=fg_temp)

    print('\n')
    print("Wash: " + name + '\n')
    print('MASH:')
    print('     Water vol(l):   {}'.format(round(mash_vol, 2)))
    print('     Water vol(gal): {}'.format(round(mu.l2gal(mash_vol), 2)))
    print('     Water Temp(C):  {}'.format(round(t_water, 2)))
    print('     Water Temp(F):  {}'.format(round(mu.c2f(t_water), 2)))
    print('Final:')
    print('     Potential OG:   {}'.format(round(theoretical, 3)))
    print('     Actual OG:      {}'.format(og))
    print('     Efficiency:     {}'.format(round(efficeincy, 2)))
    print('     ABV:            {}'.format(round(abv, 2)))
    print('\n')

    if save_wash:
        mu.save_beer_to_archive(wash_file, wash, overwrite=overwrite)

    return wash
def b20191221mexican_lager(beer_file='', save_beer=False):
    '''
    Returns beer object with all attributes of brew day, fermentation, etc.
    '''
    # ---------- Constants -----------------------------
    mash_in_temp_c = 62
    mash_temp_data = False
    if mash_temp_data:
        print('load in data')

    # ================= INPUTS =============================
    name = "Tim's Beer"
    classification = "Lager"
    beer_type = "Pilsner"
    yeast = 'WLP940 Mexican Lager Yeast'
    beer = bu(saps, name)
    final_vol = mu.gal2l(5.5)
    og = 1.041
    fg = 1.01
    og_temp = 73
    fg_temp = 58

    # hops = [Alpha, Boil, Ounces]
    additions = 1
    cascade = np.array([5, 60, 0.5])
    hop_types = ['cascade']
    hops = cascade
    hops = hops.reshape((additions, 3))

    # Grain Bill kgs
    grain_bill_dict = {
        'marris_otter_malt': mu.lb2kg(9),
        'caramel_malt_20l': mu.lb2kg(1)
    }

    #====================================================================
    # --------- Mash and water calculations
    #====================================================================
    total_grain = sum(grain_bill_dict.values())
    mash_vol, t_water = beer.mash_in(total_grain, mash_in_temp_c)

    #====================================================================
    #---------- Calculated values
    #====================================================================
    beer.set_classification(classification)
    beer.set_beer_type(beer_type)
    beer.set_og(og)
    beer.set_fg(fg)
    beer.set_yeast(yeast)
    beer.set_hop_types(hop_types)
    beer.set_final_vol_L(final_vol)
    beer.set_grain_bill_dict(grain_bill_dict)
    beer.set_hop_types(hop_types)
    beer.set_hops(hops)

    theoretical = beer.potential_gravity(grain_bill_dict,
                                         final_vol,
                                         grain_units='plk')
    theo_points = (theoretical - 1) * 1000
    og_points = (og - 1) * 1000
    efficeincy = og_points / theo_points * 100
    abv = beer.abv(tog=og_temp, tfg=fg_temp)
    ibus = beer.ibus(hops)
    calories = beer.calories(og, fg)

    print('\n')
    print("BEER: " + name + '\n')
    print('MASH:')
    print('     Water vol(l):   {}'.format(round(mash_vol, 2)))
    print('     Water vol(gal): {}'.format(round(mu.l2gal(mash_vol), 2)))
    print('     Water Temp(C):  {}'.format(round(t_water, 2)))
    print('     Water Temp(F):  {}'.format(round(mu.c2f(t_water), 2)))
    print('Final:')
    print('     Potential OG:   {}'.format(round(theoretical, 3)))
    print('     Actual OG:      {}'.format(og))
    print('     Efficiency:     {}'.format(round(efficeincy, 2)))
    print('     ABV:            {}'.format(round(abv, 2)))
    print('     IBUs:           {}'.format(round(ibus, 2)))
    print('     Calories:       {}'.format(round(calories, 2)))
    print('\n')

    overwrite = True
    if save_beer:
        mu.save_beer_to_archive(beer_file, beer, overwrite=overwrite)

    return beer
Beispiel #4
0
def b20191231nut_brown(beer_file='', save_beer=False):
    '''
    Returns beer object with all attributes of brew day, fermentation, etc.
    '''
    # ---------- Constants -----------------------------
    mash_in_temp_c = 62
    mash_temp_data = False
    if mash_temp_data:
        print('load in data')

    # ================= INPUTS =============================
    name = "Lead Ale (Pb)"
    classification = 'Ale'
    beer_type = 'Brown'
    yeast = 'Safe Ale US-04 Yeast'
    beer = bu(saps, name)
    final_vol = mu.gal2l(5.8)
    og = 1.059
    fg = 1.016
    og_temp = 70
    fg_temp = 70

    # hops = [Alpha, Boil, Ounces]
    additions = 1
    hops = np.array((additions, 3))
    east_kent_golding = np.array([4.4, 60, 1])
    hops = east_kent_golding
    hops = hops.reshape((additions, 3))
    hop_types = ['east kent golding']

    # Grain Bill kgs
    pale_malt = mu.lb2kg(6)
    caramel_malt_80l = mu.lb2kg(3)
    chocolate_malt = mu.lb2kg(1)
    honey_malt = mu.lb2kg(1)
    victory_malt = mu.lb2kg(3)

    grain_bill_dict = {
        'pale_malt': pale_malt,
        'caramel_malt_80l': caramel_malt_80l,
        'chocolate_malt': chocolate_malt,
        'honey_malt': honey_malt,
        'victory_malt': victory_malt
    }

    #====================================================================
    # --------- Mash and water calculations
    #====================================================================
    total_grain = sum(grain_bill_dict.values())
    mash_vol, t_water = beer.mash_in(total_grain, mash_in_temp_c)

    #====================================================================
    #---------- Calculated values
    #====================================================================
    beer.set_classification(classification)
    beer.set_beer_type(beer_type)
    beer.set_og(og)
    beer.set_fg(fg)
    beer.set_yeast(yeast)
    beer.set_hop_types(hop_types)
    beer.set_final_vol_L(final_vol)
    beer.set_grain_bill_dict(grain_bill_dict)
    beer.set_hop_types(hop_types)
    beer.set_hops(hops)

    theoretical = beer.potential_gravity(grain_bill_dict,
                                         final_vol,
                                         grain_units='plk')
    theo_points = (theoretical - 1) * 1000
    og_points = (og - 1) * 1000
    efficeincy = og_points / theo_points * 100
    abv = beer.abv(tog=og_temp, tfg=fg_temp)
    ibus = beer.ibus(hops)
    calories = beer.calories(og, fg)

    print('\n')
    print("BEER: " + name + '\n')
    print('MASH:')
    print('     Water vol(l):   {}'.format(round(mash_vol, 2)))
    print('     Water vol(gal): {}'.format(round(mu.l2gal(mash_vol), 2)))
    print('     Water Temp(C):  {}'.format(round(t_water, 2)))
    print('     Water Temp(F):  {}'.format(round(mu.c2f(t_water), 2)))
    print('Final:')
    print('     Potential OG:   {}'.format(round(theoretical, 3)))
    print('     Actual OG:      {}'.format(og))
    print('     Efficiency:     {}'.format(round(efficeincy, 2)))
    print('     ABV:            {}'.format(round(abv, 2)))
    print('     IBUs:           {}'.format(round(ibus, 2)))
    print('     Calories:       {}'.format(round(calories, 2)))
    print('\n')

    overwrite = True
    if save_beer:
        mu.save_beer_to_archive(beer_file, beer, overwrite=overwrite)

    mu.delete_beer_from_archive(beer_file, "Jiffy's Lube")

    return beer
def b20200202milk_porter(beer_file='', save_beer=False, overwrite=False):
    '''
    Returns beer object with all attributes of brew day, fermentation, etc.
    '''
    # ---------- Constants -----------------------------
    mash_in_temp_c = 65
    mash_temp_data = False
    if mash_temp_data:
        print('load in data')

    # ================= INPUTS =============================
    name = "Chocolate Portering Unit (CPU)"
    classification = "Ale"
    beer_type = "Porter"
    yeast = 'WLP001 California Ale Yeast'
    beer = bu(saps, name)
    final_vol = mu.gal2l(6.2)
    og = 1.077
    fg = 1.026
    og_temp = 70
    fg_temp = 60

    # hops = [Alpha, Boil, Ounces]
    additions = 1
    hops = np.array((additions, 3))
    willamette = np.array([3.8, 60, 0.65])
    hop_types = ['willamette']
    hops = willamette
    hops = hops.reshape((additions, 3))

    # Grain Bill kgs
    grain_bill_dict = {
        'pale_malt': mu.lb2kg(2),
        'pale_chocolate_malt': mu.lb2kg(1),
        'black_malt': mu.lb2kg(3 / 16),
        'chocolate_wheat_malt': mu.lb2kg(0.25),
        'two_row_malt': mu.lb2kg(10),
        'flaked_oats': mu.lb2kg(0.5)
    }

    #====================================================================
    # --------- Mash and water calculations
    #====================================================================
    total_grain = sum(grain_bill_dict.values())
    mash_vol, t_water = beer.mash_in(total_grain, mash_in_temp_c)

    #====================================================================
    #---------- Calculated values
    #====================================================================
    beer.set_classification(classification)
    beer.set_beer_type(beer_type)
    beer.set_og(og)
    beer.set_fg(fg)
    beer.set_yeast(yeast)
    beer.set_hop_types(hop_types)
    beer.set_final_vol_L(final_vol)
    beer.set_grain_bill_dict(grain_bill_dict)
    beer.set_hop_types(hop_types)
    beer.set_hops(hops)

    theoretical = beer.potential_gravity(grain_bill_dict,
                                         final_vol,
                                         grain_units='plk')
    theo_points = (theoretical - 1) * 1000
    og_points = (og - 1) * 1000
    efficeincy = og_points / theo_points * 100
    abv = beer.abv(tog=og_temp, tfg=fg_temp)
    ibus = beer.ibus(hops)
    calories = beer.calories(og, fg)

    print('\n')
    print("BEER: " + name + '\n')
    print('MASH:')
    print('     Water vol(l):   {}'.format(round(mash_vol, 2)))
    print('     Water vol(gal): {}'.format(round(mu.l2gal(mash_vol), 2)))
    print('     Water Temp(C):  {}'.format(round(t_water, 2)))
    print('     Water Temp(F):  {}'.format(round(mu.c2f(t_water), 2)))
    print('Final:')
    print('     Potential OG:   {}'.format(round(theoretical, 3)))
    print('     Actual OG:      {}'.format(og))
    print('     Efficiency:     {}'.format(round(efficeincy, 2)))
    print('     ABV:            {}'.format(round(abv, 2)))
    print('     IBUs:           {}'.format(round(ibus, 2)))
    print('     Calories:       {}'.format(round(calories, 2)))
    print('\n')

    if save_beer:
        mu.save_beer_to_archive(beer_file, beer, overwrite=overwrite)

    return beer