www/includes/formulas.php

changeset 428
a5d4467c9201
parent 392
544d7d0183b2
child 446
ee7bcfb8e270
--- a/www/includes/formulas.php	Thu Jun 20 22:16:05 2019 +0200
+++ b/www/includes/formulas.php	Fri Jun 21 16:55:36 2019 +0200
@@ -289,198 +289,4 @@
 }
 
 
-
-/*
-
-Brouwhulp data.pas
-
-
-
-Procedure TFermentable.SetpHParameters(force : boolean);
-var x, ebc : double;
-begin
-  if Between(FDIpH.Value, -0.01, 0.01) or Between(FAcidTo57.Value, -0.1, 0.1) or force then
-  begin
-    ebc:= SRMtoEBC(FColor.Value);
-    case FGrainType of
-    gtBase, gtKilned:
-    begin
-      FDIpH.Value:= -0.0132 * ebc + 5.7605;
-      x:= 0.4278 * ebc - 1.8106;
-      FAcidTo57.Value:= x;
-    end;
-    gtRoast:
-    begin
-      FDIpH.Value:= 0.00018 * ebc + 4.558;
-      FAcidTo57.Value:= -0.0176 * ebc + 60.04;
-    end;
-    gtCrystal:
-    begin
-      FDIpH.Value:= -0.0019 * ebc + 5.2175;
-      FAcidTo57.Value:= 0.132 * ebc + 14.277;
-    end;
-    gtSour:
-    begin
-      FDIpH.Value:= 3.44;
-      FAcidTo57.Value:= 337;
-    end;
-    gtSpecial: //this could be anything. Assume for now it is a non-acidulated base or kilned malt
-    begin
-      FDIpH.Value:= -0.0132 * ebc + 5.7605;
-      FAcidTo57.Value:= 0.4278 * ebc - 1.8106;
-    end;
-    end;
-  end;
-  //known parameters should be filled in here
-  if FSupplier.Value = 'Weyermann' then
-  begin
-    if FName.Value = 'Vienna mout' then
-    begin
-      FDIpH.Value:= 5.65;
-      FAcidTo57.Value:= 1.6;
-    end;
-    if FName.Value = 'Münchner I' then
-    begin
-      FDIpH.Value:= 5.44;
-      FAcidTo57.Value:= 8.4;
-    end;
-    if FName.Value = 'Münchner II' then
-    begin
-      FDIpH.Value:= 5.54;
-      FAcidTo57.Value:= 5.6;
-    end;
-    if FName.Value = 'Caramunich I' then
-    begin
-      FDIpH.Value:= 5.1;
-      FAcidTo57.Value:= 22.4;
-    end;
-    if FName.Value = 'Caramunich II' then
-    begin
-      FDIpH.Value:= 4.71;
-      FAcidTo57.Value:= 49;
-    end;
-    if FName.Value = 'Caramunich III' then
-    begin
-      FDIpH.Value:= 4.92;
-      FAcidTo57.Value:= 31.2;
-    end;
-    if FName.Value = 'Cara-aroma' then
-    begin
-      FDIpH.Value:= 4.48;
-      FAcidTo57.Value:= 74.4;
-    end;
-    if FName.Value = 'Carafa I' then
-    begin
-      FDIpH.Value:= 4.71;
-      FAcidTo57.Value:= 42;
-    end;
-    if FName.Value = 'Carafa III' then
-    begin
-      FDIpH.Value:= 4.81;
-      FAcidTo57.Value:= 35.4;
-    end;
-    if FName.Value = 'Carafa II' then
-    begin
-      FDIpH.Value:= 4.76;
-      FAcidTo57.Value:= 38.7;
-    end;
-    if FName.Value = 'Carafa Special I' then
-    begin
-      FDIpH.Value:= 4.73;
-      FAcidTo57.Value:= 46.4;
-    end;
-    if FName.Value = 'Carafa Special II' then
-    begin
-      FDIpH.Value:= 4.78;
-      FAcidTo57.Value:= 42.9;
-    end;
-    if FName.Value = 'Carafa Special III' then
-    begin
-      FDIpH.Value:= 4.83;
-      FAcidTo57.Value:= 38.9;
-    end;
-    if IsInString(FName.Value, 'Zuurmout') then
-    begin
-      FDIpH.Value:= 3.44;
-      FAcidTo57.Value:= 358.2;
-    end;
-  end;
-end;
-
-
-function TFermentable.GetExtract: double;
-begin
-  Result := 0;
-  if FRecipe <> nil then
-  begin
-    Result := FAmount.Value * FYield.Value / 100 * (1 - FMoisture.Value / 100);
-    if FAdded = atMash then
-      Result := Result * FRecipe.Efficiency / 100;
-  end;
-end;
-
-
-function TFermentable.GetKolbachIndex: double;
-begin
-  if FProtein.Value > 0 then
-    Result := FDissolvedProtein.Value / FProtein.Value
-  else
-    Result := 0;
-end;
-
-
-function TWater.GetResidualAlkalinity: double;
-begin
-  //Result in mg/l as CaCO3
-  Result:= FTotalAlkalinity.Value - (FCalcium.Value / 1.4 + FMagnesium.Value / 1.7);
-end;
-
-
-function TWater.GetHardness: double;
-begin
-  Result := 0.14 * FCalcium.Value - 0.23 * FMagnesium.Value;
-end;
-
-function TWater.GetEstPhMash: double;
-{var
-  pHdemi, S: double;}
-begin
-  Result:= MashpH;
-{  Result := 0;
-  if FRecipe <> nil then
-  begin
-    pHDemi := FRecipe.pHdemi;
-    S := 0.013 * FRecipe.MashThickness + 0.013;
-    Result := pHDemi + ResidualAlkalinity / 50 * S;
-  end;}
-end;
-
-
-
-
-
-Procedure TRecipe.CalcCalories;
-var sug, alc, org, fig : double;
-begin
-  if FOGFermenter.Value > 1.001 then org:= FOGFermenter.Value
-  else if FOG.Value > 1.001 then org:= FOG.Value
-  else org:= 0;
-  if FFG.Value > 0.999 then fig:= FFG.Value
-  else if FEstFG.Value > 1.000 then fig:= FEstFG.Value
-  else if FEstFG2.Value > 1.000 then fig:= FEstFG2.Value
-  else fig:= 0;
-  if (org > 0) and (fig > 0) then
-  begin
-    alc:= 1881.22 * fig * (org - fig) / (1.775 - org);
-    sug:= 3550 * fig * (0.1808 * org + 0.8192 * fig - 1.0004);
-    FCalories.Value:= (alc + sug) / (12 * 0.0295735296);
-  end
-  else FCalories.Value:= 0;
-end;
-
-
-
-
-*/
-
 ?>

mercurial