www/includes/formulas.php

changeset 103
895829b91057
parent 101
5b6bb99bc52a
child 147
e6e5d007eb54
equal deleted inserted replaced
102:679ddf512b65 103:895829b91057
625 Result := FIBUMax.Value / (1000 * (((FOGMax.Value + FOGMin.Value) / 2) - 1)); 625 Result := FIBUMax.Value / (1000 * (((FOGMax.Value + FOGMin.Value) / 2) - 1));
626 end; 626 end;
627 end; 627 end;
628 628
629 629
630 CalcBitterness;
631
632 // Get concentration of ions in diluted brewwater (1) and target water (2) in mmol/l 630 // Get concentration of ions in diluted brewwater (1) and target water (2) in mmol/l
633 Ca1 := W.Calcium.Value / MMCa; 631 Ca1 := W.Calcium.Value / MMCa;
634 Ca2 := W2.Calcium.Value / MMCa; 632 Ca2 := W2.Calcium.Value / MMCa;
635 Mg1 := W.Magnesium.Value / MMMg; 633 Mg1 := W.Magnesium.Value / MMMg;
636 Mg2 := W2.Magnesium.Value / MMMg; 634 Mg2 := W2.Magnesium.Value / MMMg;
676 end; 674 end;
677 end; 675 end;
678 676
679 677
680 678
681 function TRecipe.CalcColorWort : double;
682 var
683 i: integer;
684 F: TFermentable;
685 c, v: double;
686 begin
687 c := 0;
688 v := FBatchSize.Value;
689 if (v > 0) and (High(FFermentables) >= 0) then
690 begin
691 for i := Low(FFermentables) to High(FFermentables) do
692 begin
693 F := TFermentable(FFermentables[i]);
694 c := c + F.Amount.Value * F.Color.Value / v;
695 end;
696 c := c * 8.34436;
697 case FColorMethod of
698 cmMorey: c := 1.49 * Power(c, 0.69);
699 cmMosher: c := 0.3 * c + 4.7;
700 cmDaniels: c := 0.2 * c + 8.4;
701 end;
702 end;
703 Result:= c;
704 end;
705
706 679
707 procedure TRecipe.CalcWaterBalance; 680 procedure TRecipe.CalcWaterBalance;
708 var 681 var
709 i: integer; 682 i: integer;
710 F: TFermentable; 683 F: TFermentable;

mercurial