Esempio n. 1
0
 public RecipeFermentable(Recipe recipe, IFermentable fermentable, Weight weight, decimal pppg)
     : base(fermentable.Name)
 {
     this.recipe = recipe;
     this.fermentable = fermentable;
     this.weight = weight;
     this.pppg = pppg;
 }
Esempio n. 2
0
 public RecipeHop(IHop hop, Weight weight, int boilTime, decimal alphaAcid, Recipe recipe)
     : base(hop.Name)
 {
     this.hop = hop;
     this.Weight = weight;
     this.BoilTime = boilTime;
     this.alphaAcid = alphaAcid;
     this.Recipe = recipe;
 }
Esempio n. 3
0
        public decimal GetStrikeTemp(decimal desiredStrikeTemp, decimal grainTemp, decimal ratio, Weight grainAmount)
        {
            var tw = (0.2M / ratio) * (desiredStrikeTemp - grainTemp) + desiredStrikeTemp;

            liquorAmount = (grainAmount.ConvertTo(MassUnit.KiloGrams).GetValue() / ratio);
            this.grainAmount = grainAmount.ConvertTo(MassUnit.KiloGrams).GetValue();

            return tw;
        }
Esempio n. 4
0
        public decimal GetInfusionAmount(decimal ratio, Weight grain, decimal desiredStepTemp, decimal liquorTemperature, decimal previousStepTemp)
        {
            decimal grainWeight = grain.ConvertTo(MassUnit.Pounds).GetValue();
            var wm = ratio * grainWeight;

            var wa = (desiredStepTemp - previousStepTemp) * ((0.2M * grainWeight) + wm) /
                     (liquorTemperature - desiredStepTemp);

            return Math.Round(wa);
        }
Esempio n. 5
0
 public RecipeHop(IHop hop, Weight weight, int boilTime, Recipe recipe)
     : base(hop.Name)
 {
     //this.hop = hop;
     this.Name = hop.Name;
     this.Description = hop.Description;
     this.AddOilCharacteristics(hop.GetCharacteristics());
     this.Weight = weight;
     this.BoilTime = boilTime;
     this.Recipe  = recipe;
 }
Esempio n. 6
0
        public virtual void AddFermentable(IFermentable fermentable, Weight weight, decimal pppg)
        {
            if (grains.Count > 0)
            {
                var existing = grains.SingleOrDefault(x => x.Name == fermentable.Name && x.Pppg == pppg);

                if (existing != null)
                    existing.IncreaseWeight(weight);
                else
                    grains.Add(new RecipeFermentable(this, fermentable, weight, pppg));
            }
            else
                grains.Add(new RecipeFermentable(this, fermentable, weight, pppg));
        }
Esempio n. 7
0
        public decimal GetInfusionAmount(Weight grain, decimal desiredInfusionTemp, decimal liquorTemperature, decimal strikeTemp)
        {
            ReCalcRatio();

            decimal grainWeight = grain.ConvertTo(MassUnit.Pounds).GetValue();
            var wm = ratio * grainWeight;

            var wa = (desiredInfusionTemp - strikeTemp) * ((0.2M * grainWeight) + wm) /
                     (liquorTemperature - desiredInfusionTemp);

            liquorAmount += wa;

            ReCalcRatio();

            return Math.Round(wa);
        }
Esempio n. 8
0
 public virtual void AddHop(IHop hop, Weight weight, int boilTime, decimal alphaAcid)
 {
     hops.Add(new RecipeHop(hop, weight, boilTime, alphaAcid, this));
 }
Esempio n. 9
0
 public virtual void AddHop(IHop hop, Weight weight, int boilTime)
 {
     hops.Add(new RecipeHop(hop, weight, boilTime, this));
 }
Esempio n. 10
0
 public virtual void IncreaseWeight(Weight weightToAdd)
 {
     this.weight += weightToAdd;
 }