419 ibu *= (1 + my_factor_cryohop / 100.0); |
419 ibu *= (1 + my_factor_cryohop / 100.0); |
420 } else if (Form == HOP_FORMS_EXTRACT) { |
420 } else if (Form == HOP_FORMS_EXTRACT) { |
421 // Nothing for now. |
421 // Nothing for now. |
422 } |
422 } |
423 |
423 |
424 qDebug() << "boilIBU" << Form << SG << Volume << Amount << T1 << T2 << Alpha << "IBU:" << ibu; |
424 //qDebug() << "boilIBU" << Form << SG << Volume << Amount << T1 << T2 << Alpha << "IBU:" << ibu; |
425 return ibu; |
425 return ibu; |
426 } |
426 } |
427 |
427 |
428 |
428 |
429 double Utils::toIBU(int Use, int Form, double SG, double Volume, double Amount, double Boiltime, double Alpha, |
429 double Utils::toIBU(int Use, int Form, double SG, double Volume, double Amount, double Boiltime, double Alpha, |
430 int Method, double Whirlpool9, double Whirlpool7, double Whirlpool6, double Fulltime, int Cooltype, double Coolparm1, double Coolparm2) |
430 int Method, double Whirlpool9, double Whirlpool7, double Whirlpool6, double Fulltime, int Cooltype, double Coolparm1, double Coolparm2) |
431 { |
431 { |
432 double loss_boiltemp = 1.0; /* Loss due to the lower boil temperature at higher altitude. */ |
432 double ibu = 0.0; |
433 |
433 |
434 double ibu = 0.0, whirlibus = 0.0; |
434 if (Use == HOP_USEAT_MASH) { |
435 double alpha = Alpha / 100.0; |
435 /* |
436 double mass = Amount * 1000.0; |
436 * Mash hops. About -30% to -90% utilization. Is a global setting. |
437 |
437 * They count for 60 minutes, this is a fixed value. |
438 /* |
438 * Almost all these hops will be gone after removing the malt. From |
439 * IBU's from hops during Mash, FWH and boil. |
439 * pellets there may be some dust left, but that has minor effects. |
440 */ |
440 * |
441 if ((Use == HOP_USEAT_MASH) || (Use == HOP_USEAT_FWH) || (Use == HOP_USEAT_BOIL)) { |
441 * http://scottjanish.com/the-locksmith-utilizing-bioengineered-yeast-and-high-bound-thiol-precersour-hops-and-phantasm-powder-to-thiol-drive-beer/ |
|
442 */ |
|
443 ibu = TinsethIBU(Form, SG, Volume, Amount, 0, 60, Alpha) * (1 + my_factor_mashhop / 100.0); |
|
444 |
|
445 } else if ((Use == HOP_USEAT_FWH) || (Use == HOP_USEAT_BOIL)) { |
|
446 /* |
|
447 * IBU's from hops during FWH and boil. |
|
448 */ |
442 double boil_time = Fulltime; |
449 double boil_time = Fulltime; |
443 if (Use == HOP_USEAT_BOIL) |
450 if (Use == HOP_USEAT_BOIL) |
444 boil_time = Boiltime; |
451 boil_time = Boiltime; |
445 ibu = TinsethIBU(Form, SG, Volume, Amount, 0, boil_time, Alpha); |
452 ibu = TinsethIBU(Form, SG, Volume, Amount, 0, boil_time, Alpha); |
446 |
453 |
447 /* |
454 /* |
448 * Corrections for Mash and FWH |
455 * Corrections for Mash and FWH |
449 */ |
456 */ |
450 if (Use == HOP_USEAT_MASH) { |
|
451 ibu *= (1 + my_factor_mashhop / 100.0); |
|
452 } |
|
453 if (Use == HOP_USEAT_FWH) { |
457 if (Use == HOP_USEAT_FWH) { |
454 ibu *= (1 + my_factor_fwh / 100.0); |
458 ibu *= (1 + my_factor_fwh / 100.0); |
455 } |
459 } |
456 |
460 |
457 if (Method > 0) { |
461 if (Method > 0) { |
458 double nibu = ibu; |
462 double nibu = ibu; |
459 loss_boiltemp = IBU_reduction(boilPoint()); |
463 nibu *= IBU_reduction(boilPoint()); |
460 nibu *= loss_boiltemp; |
|
461 qDebug() << "ibu" << nibu << "loss_boiltemp" << loss_boiltemp; |
|
462 |
464 |
463 /* |
465 /* |
464 * Flameout, currently fixed 1 minute. |
466 * Flameout, currently fixed 1 minute. |
465 */ |
467 */ |
466 double flameout_time = 1; |
468 double flameout_time = 1; |
467 double fibu = TinsethIBU(Form, SG, Volume, Amount, boil_time, boil_time + flameout_time, Alpha); |
469 double fibu = TinsethIBU(Form, SG, Volume, Amount, boil_time, boil_time + flameout_time, Alpha); |
468 fibu *= IBU_reduction(98.0); |
470 fibu *= IBU_reduction(98.0); |
469 qDebug() << "during flameout" << fibu; |
471 //qDebug() << "during flameout" << fibu; |
470 nibu += fibu; |
472 nibu += fibu; |
471 |
473 |
472 // Add this hop during cooling |
474 // Add this hop during cooling |
473 /* |
475 /* |
474 * Hopstands, this boil hop adds some IBU's too. |
476 * Hopstands, this boil hop adds some IBU's too. |