protected void CalculateBaffleSpacing() { double bs = (ratingModel.TubeLengthBetweenTubeSheets.Value - ratingModel.EntranceBaffleSpacing.Value - ratingModel.ExitBaffleSpacing.Value) / (ratingModel.NumberOfBaffles.Value - 1); owner.Calculate(ratingModel.BaffleSpacing, bs); CalculateCrossFlowArea(); }
//internal virtual void TubeLayoutChanged() //{ //} protected virtual void CalculateBaffleSpacing() { double bs = ratingModel.TubeLengthBetweenTubeSheets.Value / (ratingModel.NumberOfBaffles.Value - 1); owner.Calculate(ratingModel.BaffleSpacing, bs); //CalculateCrossFlowArea(); }
protected void CalculateHTUAndExchEffectiveness() { //number of heat tranfer units //Chemical Equipment Chapter 8, page 179 double cpCold = MathUtility.Average(owner.ColdSideInlet.SpecificHeat.Value, owner.ColdSideOutlet.SpecificHeat.Value); double cpHot = MathUtility.Average(owner.HotSideInlet.SpecificHeat.Value, owner.HotSideOutlet.SpecificHeat.Value); double mcCold = owner.ColdSideInlet.MassFlowRate.Value * cpCold; double mcHot = owner.HotSideInlet.MassFlowRate.Value * cpHot; //double massFlowCold = coldSideInlet.MassFlowRate.Value; //double massFlowHot = hotSideInlet.MassFlowRate.Value; double mcMin = mcCold < mcHot ? mcCold : mcHot; //double htArea = totalHeatTransferArea.Value; double totalHtc = totalHeatTransferCoefficient.Value; double totalHeat = owner.TotalHeatTransfer.Value; double tColdIn = owner.ColdSideInlet.Temperature.Value; double tColdOut = owner.ColdSideOutlet.Temperature.Value; double tHotIn = owner.HotSideInlet.Temperature.Value; double tHotOut = owner.HotSideOutlet.Temperature.Value; //hCold = coldSideHeatTransferCoefficient.Value; //hHot = hotSideHeatTransferCoefficient.Value; double lmtd = CalculateLmtd(tHotIn, tHotOut, tColdIn, tColdOut); double ft = GetFtFactor(tHotIn, tHotOut, tColdIn, tColdOut); if (this is HXRatingModelShellAndTube) { HXRatingModelShellAndTube model = this as HXRatingModelShellAndTube; owner.Calculate(model.FtFactor, ft); } if (Math.Abs(lmtd) > 1.0e-8) { double ua = totalHeat / (ft * lmtd); //owner.Calculate(totalHeatTransferArea, totalArea); double ntu = ua / mcMin; double c = mcCold < mcHot ? mcCold / mcHot : mcHot / mcCold; double p; if (IsParallelFlow()) { p = (1.0 - Math.Exp(-ntu * (1.0 + c))) / (1.0 + c); } else { p = (1.0 - Math.Exp(-ntu * (1.0 - c))) / (1.0 - c * Math.Exp(-ntu * (1.0 - c))); } owner.Calculate(numberOfHeatTransferUnits, ntu); owner.Calculate(exchangerEffectiveness, p); } }