509 $this->Checkline('mout schroten'); |
509 $this->Checkline('mout schroten'); |
510 $this->Ln(5); |
510 $this->Ln(5); |
511 |
511 |
512 $this->Checkheader('Maischen'); |
512 $this->Checkheader('Maischen'); |
513 $mvol = 0; |
513 $mvol = 0; |
|
514 $msugars = 0; // mash sugars |
514 $grainabsortion = 0; |
515 $grainabsortion = 0; |
515 $arr = json_decode($row['json_mashs'], true); |
516 $arr = json_decode($row['json_mashs'], true); |
516 if (count($arr) > 0) { |
517 if (count($arr) > 0) { |
517 $loop = 0; |
518 $loop = 0; |
518 foreach($arr as $item) { |
519 foreach($arr as $item) { |
549 $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C'); |
550 $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C'); |
550 } |
551 } |
551 $loop++; |
552 $loop++; |
552 } |
553 } |
553 $est_mash_sg = 0; |
554 $est_mash_sg = 0; |
554 $s = 0; |
|
555 $ferms = json_decode($row['json_fermentables'], true); |
555 $ferms = json_decode($row['json_fermentables'], true); |
556 foreach($ferms as $item) { |
556 foreach($ferms as $item) { |
557 if ($item['f_added'] == 0) { |
557 if ($item['f_added'] == 0) { |
558 $d = $item['f_amount'] * ($item['f_yield'] / 100) * (1 - $item['f_moisture'] / 100); |
558 $d = $item['f_amount'] * ($item['f_yield'] / 100) * (1 - $item['f_moisture'] / 100); |
559 $mvol += $item['f_amount'] * $item['f_moisture'] / 100; |
559 $mvol += $item['f_amount'] * $item['f_moisture'] / 100; |
560 $grainabsorbtion += $my_grain_absorbtion * $item['f_amount']; |
560 $grainabsorbtion += $my_grain_absorbtion * $item['f_amount']; |
561 $s += $d; |
561 $msugars += $d; |
562 } |
562 } |
563 } |
563 } |
564 $sugardensity = 1.611; |
564 $sugardensity = 1.611; |
565 $v = $s / $sugardensity + $mvol; |
565 $v = $msugars / $sugardensity + $mvol; |
566 $plato = 1000 * $s / ($v * 10); // deg. Plato |
566 $plato = 1000 * $msugars / ($v * 10); // deg. Plato |
567 $mash_sg = plato_to_sg($plato); |
567 $mash_sg = plato_to_sg($plato); |
568 $brix = $plato * $my_brix_correction; |
568 $brix = $plato * $my_brix_correction; |
569 $s = 'doel sg eind maischen: '.sprintf("%.3f",$mash_sg); |
569 $s = 'doel sg eind maischen: '.sprintf("%.3f",$mash_sg); |
570 $s .= ' SG ('.sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'; |
570 $s .= ' SG ('.sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'; |
571 $this->Checkline($s); |
571 $this->Checkline($s); |
583 $spoelw = ($row['boil_size'] - $mashwater + $grainabsorbtion + $row['eq_lauter_deadspace']) * 1.03; // A small heat correction |
583 $spoelw = ($row['boil_size'] - $mashwater + $grainabsorbtion + $row['eq_lauter_deadspace']) * 1.03; // A small heat correction |
584 $this->Checkline('spoelen met ongeveer '.sprintf("%.1f",$spoelw).' liter spoelwater'); |
584 $this->Checkline('spoelen met ongeveer '.sprintf("%.1f",$spoelw).' liter spoelwater'); |
585 $s = 'doelvolume in kookketel: '.sprintf("%.1f",$row['boil_size'] * 1.04).' liter ('; |
585 $s = 'doelvolume in kookketel: '.sprintf("%.1f",$row['boil_size'] * 1.04).' liter ('; |
586 $s .= sprintf("%.1f",kettle_cm($row['boil_size'] * 1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])).' cm onder de rand)'; |
586 $s .= sprintf("%.1f",kettle_cm($row['boil_size'] * 1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])).' cm onder de rand)'; |
587 $this->Checkline($s); |
587 $this->Checkline($s); |
588 // TODO: doel SG in kookketel: 1.053 SG (13.4 Brix, 13.0 P) |
588 $pre_sg = estimate_sg($msugars * floatval($row['efficiency']) / 100,floatval($row['boil_size'])); |
|
589 $plato = sg_to_plato($pre_sg); |
|
590 $brix = $plato * $my_brix_correction; |
|
591 $s = 'doel SG in kookketel: '.sprintf("%.3f",$pre_sg).' SG ('.sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'; |
|
592 $this->Checkline($s); |
589 $hops = json_decode($row['json_hops'], true); |
593 $hops = json_decode($row['json_hops'], true); |
590 foreach($hops as $item2) { |
594 foreach($hops as $item2) { |
591 if ($item2['h_useat'] == 1) { |
595 if ($item2['h_useat'] == 1) { |
592 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; |
596 $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; |
593 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen na het spoelen'; |
597 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen na het spoelen'; |
643 $s .= ' cm onder de rand)'; |
647 $s .= ' cm onder de rand)'; |
644 $this->Checkline($s); |
648 $this->Checkline($s); |
645 $plato = sg_to_plato($row['est_og']); |
649 $plato = sg_to_plato($row['est_og']); |
646 $brix = $plato * $my_brix_correction; |
650 $brix = $plato * $my_brix_correction; |
647 $s = 'doel SG einde koken: '.sprintf("%.3f",$row['est_og']).' SG ('; |
651 $s = 'doel SG einde koken: '.sprintf("%.3f",$row['est_og']).' SG ('; |
648 $s .= sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'.$this->GetY(); |
652 $s .= sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'; |
649 $this->Checkline($s); |
653 $this->Checkline($s); |
650 if ($this->GetY() > 200) |
654 if ($this->GetY() > 200) |
651 $this->AddPage(); |
655 $this->AddPage(); |
652 else |
656 else |
653 $this->Ln(5); |
657 $this->Ln(5); |