private void HotSideHandler(object sender, System.EventArgs e) { if (this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel != null) { if (this.HeatExchangerCtrl.HeatExchanger.ExchangerType == ExchangerType.ShellAndTube) { ErrorMessage error = null; HXRatingModelShellAndTube ratingModel = this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; RadioButton rb = (RadioButton)sender; if (rb == this.radioButtonHotSideShell) { error = ratingModel.SpecifyIsShellSideHot(rb.Checked); } else if (rb == this.radioButtonHotSideTube) { error = ratingModel.SpecifyIsShellSideHot(!rb.Checked); } if (error != null) { UI.ShowError(error); this.SetHotSideShell(ratingModel.IsShellSideHot); } } } }
private void comboBoxFlowDirection_SelectedIndexChanged(object sender, System.EventArgs e) { if (!this.inConstruction) { ErrorMessage error = null; HXRatingModelShellAndTube ratingModel = heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; int idx = this.comboBoxFlowDirection.SelectedIndex; if (idx == HXRatingSimpleGenericValuesControl.INDEX_PARALLEL) { error = ratingModel.SpecifyFlowDirection(FlowDirection.Parallel); } else if (idx == HXRatingSimpleGenericValuesControl.INDEX_COUNTER) { error = ratingModel.SpecifyFlowDirection(FlowDirection.Counter); } else if (idx == HXRatingSimpleGenericValuesControl.INDEX_CROSS) { error = ratingModel.SpecifyFlowDirection(FlowDirection.Cross); } if (error != null) { UI.ShowError(error); this.SetFlowDirection(ratingModel.FlowDirection); } } }
private void heatExchanger_SolveComplete(object sender, SolveState solveState) { HXRatingModelShellAndTube ratingModel = (sender as HeatExchanger).CurrentRatingModel as HXRatingModelShellAndTube; FlowDirection flowDirection = ratingModel.FlowDirection; this.SetFlowDirection(flowDirection); }
public void InitializeVariableLabels(HXRatingModelShellAndTube rating) { this.labelTubeSideEntranceNozzleDiameter.InitializeVariable(rating.TubeSideEntranceNozzleDiameter); this.labelTubeSideExitNozzleDiameter.InitializeVariable(rating.TubeSideExitNozzleDiameter); this.labelShellSideEntranceNozzleDiameter.InitializeVariable(rating.ShellSideEntranceNozzleDiameter); this.labelShellSideExitNozzleDiameter.InitializeVariable(rating.ShellSideExitNozzleDiameter); }
private void comboBoxTubeLayout_SelectedIndexChanged(object sender, System.EventArgs e) { if (!this.inConstruction) { ErrorMessage error = null; HXRatingModelShellAndTube shellAndTubeRating = this.heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; int idx = this.comboBoxTubeLayout.SelectedIndex; if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_INLINE_SQUARE) { error = shellAndTubeRating.SpecifyTubeLayout(TubeLayout.InlineSquare); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_ROTATED_SQUARE) { error = shellAndTubeRating.SpecifyTubeLayout(TubeLayout.RotatedSquare); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_TRIANGULAR) { error = shellAndTubeRating.SpecifyTubeLayout(TubeLayout.Triangular); } if (error != null) { UI.ShowError(error); this.SetTubeLayout(shellAndTubeRating.TubeLayout); } } }
public void InitializeVariableTextBoxes(Flowsheet flowsheet, HXRatingModelShellAndTube rating) { this.textBoxTubeSideEntranceNozzleDiameter.InitializeVariable(flowsheet, rating.TubeSideEntranceNozzleDiameter); this.textBoxTubeSideExitNozzleDiameter.InitializeVariable(flowsheet, rating.TubeSideExitNozzleDiameter); this.textBoxShellSideEntranceNozzleDiameter.InitializeVariable(flowsheet, rating.ShellSideEntranceNozzleDiameter); this.textBoxShellSideExitNozzleDiameter.InitializeVariable(flowsheet, rating.ShellSideExitNozzleDiameter); }
private void heatExchanger_SolveComplete(object sender, SolveState solveState) { HXRatingModelShellAndTube rating = (sender as HeatExchanger).CurrentRatingModel as HXRatingModelShellAndTube; this.SetTubeLayout(rating.TubeLayout); this.SetShellType(rating.ShellType); }
private void heatExchanger_SolveComplete(object sender, SolveState solveState) { HXRatingModelShellAndTube ratingModel = (sender as HeatExchanger).CurrentRatingModel as HXRatingModelShellAndTube; this.checkBoxIncludeWallEffect.Checked = ratingModel.IncludeWallEffect; this.checkBoxIncludeNozzleEffect.Checked = ratingModel.IncludeNozzleEffect; this.SetRatingType(ratingModel.ShellRatingType); }
private void comboBoxRatingType_SelectedIndexChanged(object sender, System.EventArgs e) { if (!this.inConstruction) { ErrorMessage error = null; int idx = this.comboBoxRatingType.SelectedIndex; HXRatingModelShellAndTube ratingModel = heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; if (idx == HXRatingShellAndTubeEditor.INDEX_BELL_DELAWARE) { error = ratingModel.SpecifyShellRatingType(ShellRatingType.BellDelaware); if (error == null) { this.hxRatingShellAndTubeBellDelawareLabelsControl.Visible = true; this.hxRatingShellAndTubeBellDelawareValuesControl.Visible = true; this.hxRatingShellAndTubeDonohueLabelsControl.Visible = false; this.hxRatingShellAndTubeDonohueValuesControl.Visible = false; this.hxRatingShellAndTubeKernLabelsControl.Visible = false; this.hxRatingShellAndTubeKernValuesControl.Visible = false; } } else if (idx == HXRatingShellAndTubeEditor.INDEX_DONOHUE) { error = ratingModel.SpecifyShellRatingType(ShellRatingType.Donohue); if (error == null) { this.hxRatingShellAndTubeBellDelawareLabelsControl.Visible = false; this.hxRatingShellAndTubeBellDelawareValuesControl.Visible = false; this.hxRatingShellAndTubeDonohueLabelsControl.Visible = true; this.hxRatingShellAndTubeDonohueValuesControl.Visible = true; this.hxRatingShellAndTubeKernLabelsControl.Visible = false; this.hxRatingShellAndTubeKernValuesControl.Visible = false; } } else if (idx == HXRatingShellAndTubeEditor.INDEX_KERN) { error = ratingModel.SpecifyShellRatingType(ShellRatingType.Kern); if (error == null) { this.hxRatingShellAndTubeBellDelawareLabelsControl.Visible = false; this.hxRatingShellAndTubeBellDelawareValuesControl.Visible = false; this.hxRatingShellAndTubeDonohueLabelsControl.Visible = false; this.hxRatingShellAndTubeDonohueValuesControl.Visible = false; this.hxRatingShellAndTubeKernLabelsControl.Visible = true; this.hxRatingShellAndTubeKernValuesControl.Visible = true; } } if (error != null) { UI.ShowError(error); this.SetRatingType(ratingModel.ShellRatingType); } } }
public void InitializeTheUI(Flowsheet flowsheet, HeatExchanger heatExchanger) { this.inConstruction = true; this.heatExchanger = heatExchanger; HXRatingModelShellAndTube ratingModel = heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; this.InitializeVariableTextBoxes(flowsheet, ratingModel); heatExchanger.SolveComplete += new SolveCompleteEventHandler(heatExchanger_SolveComplete); this.inConstruction = false; this.SetFlowDirection(ratingModel.FlowDirection); }
public void InitializeTheUI(Flowsheet flowsheet, HeatExchanger heatExchanger) { this.inConstruction = true; this.heatExchanger = heatExchanger; HXRatingModelShellAndTube shellAndTubeRating = heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; this.InitializeVariableTextBoxes(flowsheet, shellAndTubeRating); heatExchanger.SolveComplete += new SolveCompleteEventHandler(heatExchanger_SolveComplete); this.comboBoxShellType.SelectedIndex = -1; this.inConstruction = false; this.SetShellType(shellAndTubeRating.ShellType); }
public override void SetObjectData() { base.SetObjectData(); int persistedClassVersion = (int)info.GetValue("ClassPersistenceVersionShellHTCAndDPCalculator", typeof(int)); if (persistedClassVersion == 1) { this.owner = info.GetValue("Owner", typeof(HeatExchanger)) as HeatExchanger; this.procVarList = info.GetValue("ProcVarList", typeof(ArrayList)) as ArrayList; this.ratingModel = (HXRatingModelShellAndTube)info.GetValue("RatingModel", typeof(HXRatingModelShellAndTube)); } }
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); } }
private void checkBoxIncludeNozzleEffect_CheckedChanged(object sender, System.EventArgs e) { this.hxRating3LabelsControl.Visible = this.checkBoxIncludeNozzleEffect.Checked; this.hxRating3ValuesControl.Visible = this.checkBoxIncludeNozzleEffect.Checked; if (!this.inConstruction) { HXRatingModelShellAndTube ratingModel = heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; ErrorMessage error = ratingModel.SpecifyIncludeNozzleEffect(this.checkBoxIncludeNozzleEffect.Checked); if (error != null) { UI.ShowError(error); } } }
private void HeatExchanger_HXHotSideChanged(HeatExchanger hx) { HXRatingModelShellAndTube ratingModel = this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; this.SetHotSideShell(ratingModel.IsShellSideHot); if ((this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube).IsShellSideHot) { this.groupBoxColdStream.Text = HeatExchangerEditor.COLD_TUBE_INLET_OUTLET; this.groupBoxHotStream.Text = HeatExchangerEditor.HOT_SHELL_INLET_OUTLET; } else { this.groupBoxColdStream.Text = HeatExchangerEditor.COLD_SHELL_INLET_OUTLET; this.groupBoxHotStream.Text = HeatExchangerEditor.HOT_TUBE_INLET_OUTLET; } }
public void InitializeVariableLabels(HXRatingModelShellAndTube rating) { this.labelColdSideHeatTransferCoefficient.InitializeVariable(rating.ColdSideHeatTransferCoefficient); this.labelHotSideHeatTransferCoefficient.InitializeVariable(rating.HotSideHeatTransferCoefficient); this.labelColdSideFoulingFactor.InitializeVariable(rating.ColdSideFoulingFactor); this.labelHotSideFoulingFactor.InitializeVariable(rating.HotSideFoulingFactor); this.labelTotalHeatTransferCoefficient.InitializeVariable(rating.TotalHeatTransferCoefficient); this.labelTotalHeatTransferArea.InitializeVariable(rating.TotalHeatTransferArea); this.labelNumberOfHeatTransferUnits.InitializeVariable(rating.NumberOfHeatTransferUnits); this.labelExchangerEffectiveness.InitializeVariable(rating.ExchangerEffectiveness); this.labelColdSideRe.InitializeVariable(rating.ColdSideRe); this.labelHotSideRe.InitializeVariable(rating.HotSideRe); this.labelFtFactor.InitializeVariable(rating.FtFactor); this.labelTubeSideVelocity.InitializeVariable(rating.TubeSideVelocity); this.labelShellSideVelocity.InitializeVariable(rating.ShellSideVelocity); }
public void InitializeVariableTextBoxes(Flowsheet flowsheet, HXRatingModelShellAndTube rating) { this.textBoxShellInnerDiameter.InitializeVariable(flowsheet.ApplicationPrefs, rating.ShellInnerDiameter); this.textBoxBaffleSpacing.InitializeVariable(flowsheet.ApplicationPrefs, rating.BaffleSpacing); this.textBoxBaffleCut.InitializeVariable(flowsheet.ApplicationPrefs, rating.BaffleCut); this.textBoxShellPasses.InitializeVariable(flowsheet.ApplicationPrefs, rating.ShellPasses); this.textBoxTubePassesPerShellPass.InitializeVariable(flowsheet.ApplicationPrefs, rating.TubePassesPerShellPass); this.textBoxTubeLengthBetweenTubeSheets.InitializeVariable(flowsheet.ApplicationPrefs, rating.TubeLengthBetweenTubeSheets); this.textBoxTubeWallThickness.InitializeVariable(flowsheet.ApplicationPrefs, rating.TubeWallThickness); this.textBoxTubeOuterDiameter.InitializeVariable(flowsheet.ApplicationPrefs, rating.TubeOuterDiameter); this.textBoxTubePitch.InitializeVariable(flowsheet.ApplicationPrefs, rating.TubePitch); this.textBoxTubesPerTubePass.InitializeVariable(flowsheet.ApplicationPrefs, rating.TubesPerTubePass); this.textBoxTubeInnerDiameter.InitializeVariable(flowsheet.ApplicationPrefs, rating.TubeInnerDiameter); this.textBoxBuffles.InitializeVariable(flowsheet.ApplicationPrefs, rating.NumberOfBaffles); this.textBoxTotalTubesInShell.InitializeVariable(flowsheet.ApplicationPrefs, rating.TotalTubesInShell); }
public void InitializeVariableTextBoxes(Flowsheet flowsheet, HXRatingModelShellAndTube rating) { this.textBoxNumberOfHeatTransferUnits.InitializeVariable(flowsheet, rating.NumberOfHeatTransferUnits); this.textBoxTotalHeatTransferArea.InitializeVariable(flowsheet, rating.TotalHeatTransferArea); this.textBoxHotSideFoulingFactor.InitializeVariable(flowsheet, rating.HotSideFoulingFactor); this.textBoxColdSideFoulingFactor.InitializeVariable(flowsheet, rating.ColdSideFoulingFactor); this.textBoxHotSideHeatTransferCoefficient.InitializeVariable(flowsheet, rating.HotSideHeatTransferCoefficient); this.textBoxExchangerEffectiveness.InitializeVariable(flowsheet, rating.ExchangerEffectiveness); this.textBoxTotalHeatTransferCoefficient.InitializeVariable(flowsheet, rating.TotalHeatTransferCoefficient); this.textBoxColdSideHeatTransferCoefficient.InitializeVariable(flowsheet, rating.ColdSideHeatTransferCoefficient); this.textBoxColdSideRe.InitializeVariable(flowsheet, rating.ColdSideRe); this.textBoxHotSideRe.InitializeVariable(flowsheet, rating.HotSideRe); this.textBoxFtFactor.InitializeVariable(flowsheet, rating.FtFactor); this.textBoxTubeSideVelocity.InitializeVariable(flowsheet, rating.TubeSideVelocity); this.textBoxShellSideVelocity.InitializeVariable(flowsheet, rating.ShellSideVelocity); }
public void InitializeVariableLabels(HXRatingModelShellAndTube shellAndTube) { this.labelShellPasses.InitializeVariable(shellAndTube.ShellPasses); this.labelTubePassesPerShellPass.InitializeVariable(shellAndTube.TubePassesPerShellPass); this.labelTubeLengthBetweenTubeSheets.InitializeVariable(shellAndTube.TubeLengthBetweenTubeSheets); this.labelTubeWallThickness.InitializeVariable(shellAndTube.TubeWallThickness); this.labelTubeOuterDiameter.InitializeVariable(shellAndTube.TubeOuterDiameter); this.labelTubesPerTubePass.InitializeVariable(shellAndTube.TubesPerTubePass); this.labelTubeInnerDiameter.InitializeVariable(shellAndTube.TubeInnerDiameter); this.labelTubePitch.InitializeVariable(shellAndTube.TubePitch); this.labelBaffleCut.InitializeVariable(shellAndTube.BaffleCut); this.labelBaffleSpacing.InitializeVariable(shellAndTube.BaffleSpacing); this.labelShellInnerDiameter.InitializeVariable(shellAndTube.ShellInnerDiameter); this.labelBaffles.InitializeVariable(shellAndTube.NumberOfBaffles); this.labelTotalTubesInShell.InitializeVariable(shellAndTube.TotalTubesInShell); }
public HXRatingShellAndTubeEditor(HeatExchangerControl heatExchangerCtrl) { // // Required for Windows Form Designer support // InitializeComponent(); this.inConstruction = true; this.Text = "Shell And Tube Rating: " + heatExchangerCtrl.HeatExchanger.Name; this.heatExchanger = heatExchangerCtrl.HeatExchanger; HXRatingModelShellAndTube ratingModel = this.heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; this.checkBoxIncludeWallEffect.Checked = ratingModel.IncludeWallEffect; this.hxRating2LabelsControl.Visible = this.checkBoxIncludeWallEffect.Checked; this.hxRating2ValuesControl.Visible = this.checkBoxIncludeWallEffect.Checked; this.checkBoxIncludeNozzleEffect.Checked = ratingModel.IncludeNozzleEffect; this.hxRating3LabelsControl.Visible = this.checkBoxIncludeNozzleEffect.Checked; this.hxRating3ValuesControl.Visible = this.checkBoxIncludeNozzleEffect.Checked; this.hxRatingSimpleGenericShellAndTubeLabelsControl.InitializeVariableLabels(ratingModel); this.hxRatingSimpleGenericShellAndTubeValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, heatExchangerCtrl.HeatExchanger); this.hxRating2LabelsControl.InitializeVariableLabels(ratingModel); this.hxRating2ValuesControl.InitializeVariableTextBoxes(heatExchangerCtrl.Flowsheet, ratingModel); this.hxRatingShellAndTubeBellDelawareLabelsControl.InitializeVariableLabels(ratingModel); this.hxRatingShellAndTubeBellDelawareValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, this.heatExchanger); this.hxRatingShellAndTubeDonohueLabelsControl.InitializeVariableLabels(ratingModel); this.hxRatingShellAndTubeDonohueValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, this.heatExchanger); this.hxRatingShellAndTubeKernLabelsControl.InitializeVariableLabels(ratingModel); this.hxRatingShellAndTubeKernValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, this.heatExchanger); this.hxRating3LabelsControl.InitializeVariableLabels(ratingModel); this.hxRating3ValuesControl.InitializeVariableTextBoxes(heatExchangerCtrl.Flowsheet, ratingModel); this.heatExchanger.SolveComplete += new SolveCompleteEventHandler(heatExchanger_SolveComplete); this.comboBoxRatingType.SelectedIndex = -1; this.inConstruction = false; this.SetRatingType(ratingModel.ShellRatingType); }
private void comboBoxShellType_SelectedIndexChanged(object sender, System.EventArgs e) { if (!this.inConstruction) { ErrorMessage error = null; HXRatingModelShellAndTube shellAndTubeRating = this.heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; int idx = this.comboBoxShellType.SelectedIndex; if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_E) { error = shellAndTubeRating.SpecifyShellType(ShellType.E); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_F) { error = shellAndTubeRating.SpecifyShellType(ShellType.F); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_G) { error = shellAndTubeRating.SpecifyShellType(ShellType.G); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_H) { error = shellAndTubeRating.SpecifyShellType(ShellType.H); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_J) { error = shellAndTubeRating.SpecifyShellType(ShellType.J); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_K) { error = shellAndTubeRating.SpecifyShellType(ShellType.K); } else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_X) { error = shellAndTubeRating.SpecifyShellType(ShellType.X); } if (error != null) { UI.ShowError(error); this.SetShellType(shellAndTubeRating.ShellType); } } }
public void InitializeVariableTextBoxes(Flowsheet flowsheet, HXRatingModelShellAndTube rating) { this.textBoxSealingStrips.InitializeVariable(flowsheet, rating.SealingStrips); this.textBoxBundleToShellDiametralClearance.InitializeVariable(flowsheet, rating.BundleToShellDiametralClearance); this.textBoxShellInnerDiameter.InitializeVariable(flowsheet, rating.ShellInnerDiameter); this.textBoxShellToBaffleDiametralClearance.InitializeVariable(flowsheet, rating.ShellToBaffleDiametralClearance); this.textBoxBaffles.InitializeVariable(flowsheet, rating.NumberOfBaffles); this.textBoxEntranceBaffleSpacing.InitializeVariable(flowsheet, rating.EntranceBaffleSpacing); this.textBoxExitBaffleSpacing.InitializeVariable(flowsheet, rating.ExitBaffleSpacing); this.textBoxBaffleSpacing.InitializeVariable(flowsheet, rating.BaffleSpacing); this.textBoxBaffleCut.InitializeVariable(flowsheet, rating.BaffleCut); this.textBoxShellPasses.InitializeVariable(flowsheet, rating.ShellPasses); this.textBoxTubePassesPerShellPass.InitializeVariable(flowsheet, rating.TubePassesPerShellPass); this.textBoxTubeLengthBetweenTubeSheets.InitializeVariable(flowsheet, rating.TubeLengthBetweenTubeSheets); this.textBoxTubeWallThickness.InitializeVariable(flowsheet, rating.TubeWallThickness); this.textBoxTubeOuterDiameter.InitializeVariable(flowsheet, rating.TubeOuterDiameter); this.textBoxTubePitch.InitializeVariable(flowsheet, rating.TubePitch); this.textBoxTubesPerTubePass.InitializeVariable(flowsheet, rating.TubesPerTubePass); this.textBoxTubeInnerDiameter.InitializeVariable(flowsheet, rating.TubeInnerDiameter); this.textBoxTotalTubesInShell.InitializeVariable(flowsheet, rating.TotalTubesInShell); }
public void InitializeVariableLabels(HXRatingModelShellAndTube shellAndTube) { this.labelShellPasses.InitializeVariable(shellAndTube.ShellPasses); this.labelTubePassesPerShellPass.InitializeVariable(shellAndTube.TubePassesPerShellPass); this.labelTubeLengthBetweenTubeSheets.InitializeVariable(shellAndTube.TubeLengthBetweenTubeSheets); this.labelTubeWallThickness.InitializeVariable(shellAndTube.TubeWallThickness); this.labelTubeOuterDiameter.InitializeVariable(shellAndTube.TubeOuterDiameter); this.labelTubesPerTubePass.InitializeVariable(shellAndTube.TubesPerTubePass); this.labelTubeInnerDiameter.InitializeVariable(shellAndTube.TubeInnerDiameter); this.labelTubePitch.InitializeVariable(shellAndTube.TubePitch); this.labelBaffleCut.InitializeVariable(shellAndTube.BaffleCut); this.labelBaffleSpacing.InitializeVariable(shellAndTube.BaffleSpacing); this.labelEntranceBaffleSpacing.InitializeVariable(shellAndTube.EntranceBaffleSpacing); this.labelExitBaffleSpacing.InitializeVariable(shellAndTube.ExitBaffleSpacing); this.labelBaffles.InitializeVariable(shellAndTube.NumberOfBaffles); this.labelShellToBaffleDiametralClearance.InitializeVariable(shellAndTube.ShellToBaffleDiametralClearance); this.labelShellInnerDiameter.InitializeVariable(shellAndTube.ShellInnerDiameter); this.labelBundleToShellDiametralClearance.InitializeVariable(shellAndTube.BundleToShellDiametralClearance); this.labelSealingStrips.InitializeVariable(shellAndTube.SealingStrips); this.labelTotalTubesInShell.InitializeVariable(shellAndTube.TotalTubesInShell); }
public ShellHTCAndDPCalculatorBellDelaware(HXRatingModelShellAndTube ratingModel) : base(ratingModel) { InitializeVarList(); InitializeGeometryParams(); }
protected ShellHTCAndDPCalculator(HXRatingModelShellAndTube ratingModel) { this.ratingModel = ratingModel; this.owner = ratingModel.Owner; //InitializeVarList(); }
public HeatExchangerEditor(HeatExchangerControl heatExchangerCtrl) : base(heatExchangerCtrl) { // // Required for Windows Form Designer support // //InitializeComponent(); this.inConstruction = true; HeatExchanger heatExchanger = this.HeatExchangerCtrl.HeatExchanger; this.Text = "Heat Exchanger: " + heatExchanger.Name; this.UpdateStreamsUI(); this.initializeGrid(heatExchangerCtrl, columnIndex, false, "Heat Exchanger"); // shell and tube hot side this.groupBoxHotSide = new System.Windows.Forms.GroupBox(); this.radioButtonHotSideTube = new System.Windows.Forms.RadioButton(); this.radioButtonHotSideShell = new System.Windows.Forms.RadioButton(); // // groupBoxHotSide // this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideTube); this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideShell); this.groupBoxHotSide.Location = new System.Drawing.Point(0, 0); this.groupBoxHotSide.Name = "groupBoxHotSide"; this.groupBoxHotSide.Size = new System.Drawing.Size(104, 68); this.groupBoxHotSide.TabIndex = 0; this.groupBoxHotSide.TabStop = false; this.groupBoxHotSide.Text = "Hot Side"; // // radioButtonHotSideTube // this.radioButtonHotSideTube.Location = new System.Drawing.Point(8, 44); this.radioButtonHotSideTube.Name = "radioButtonHotSideTube"; this.radioButtonHotSideTube.Size = new System.Drawing.Size(72, 20); this.radioButtonHotSideTube.TabIndex = 1; this.radioButtonHotSideTube.Text = "Tube"; this.radioButtonHotSideTube.CheckedChanged += new System.EventHandler(this.HotSideHandler); // // radioButtonHotSideShell // this.radioButtonHotSideShell.Location = new System.Drawing.Point(8, 20); this.radioButtonHotSideShell.Name = "radioButtonHotSideShell"; this.radioButtonHotSideShell.Size = new System.Drawing.Size(72, 20); this.radioButtonHotSideShell.TabIndex = 0; this.radioButtonHotSideShell.Text = "Shell"; this.radioButtonHotSideShell.CheckedChanged += new System.EventHandler(this.HotSideHandler); this.groupBoxHeatExchanger.Controls.Add(this.groupBoxHotSide); this.groupBoxHotSide.Location = new Point(20, 112); heatExchangerCtrl.HeatExchanger.StreamAttached += new StreamAttachedEventHandler(HeatExchanger_StreamAttached); heatExchangerCtrl.HeatExchanger.StreamDetached += new StreamDetachedEventHandler(HeatExchanger_StreamDetached); this.menuItemRating = new MenuItem(); this.menuItemRating.Index = this.menuItemReport.Index + 1; this.menuItemRating.Text = "Rating"; this.menuItemRating.Click += new EventHandler(menuItemRating_Click); this.mainMenu.MenuItems.Add(this.menuItemRating); this.comboBoxCalculationType = new System.Windows.Forms.ComboBox(); this.comboBoxExchangerType = new System.Windows.Forms.ComboBox(); this.labelCalculationType = new System.Windows.Forms.Label(); this.labelCalculationType.BackColor = Color.DarkGray; this.labelExchangerType = new System.Windows.Forms.Label(); this.labelExchangerType.BackColor = Color.DarkGray; // comboBoxCalculationType this.comboBoxCalculationType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxCalculationType.Items.AddRange(new object[] { "Balance", "Rating" }); this.comboBoxCalculationType.Location = new System.Drawing.Point(502, 8); this.comboBoxCalculationType.Name = "comboBoxCalculationType"; this.comboBoxCalculationType.Size = new System.Drawing.Size(80, 21); this.comboBoxCalculationType.TabIndex = 7; this.comboBoxCalculationType.SelectedIndexChanged += new EventHandler(comboBoxCalculationType_SelectedIndexChanged); // comboBoxExchangerType this.comboBoxExchangerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxExchangerType.Items.AddRange(new object[] { "Simple Generic", "Shell And Tube", "Plate And Frame" }); this.comboBoxExchangerType.Location = new System.Drawing.Point(802, 8); this.comboBoxExchangerType.Name = "comboBoxExchangerType"; this.comboBoxExchangerType.Size = new System.Drawing.Size(108, 21); this.comboBoxExchangerType.TabIndex = 6; this.comboBoxExchangerType.SelectedIndexChanged += new EventHandler(comboBoxExchangerType_SelectedIndexChanged); // labelCalculationType this.labelCalculationType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.labelCalculationType.Location = new System.Drawing.Point(310, 8); this.labelCalculationType.Name = "labelCalculationType"; this.labelCalculationType.Size = new System.Drawing.Size(192, 20); this.labelCalculationType.TabIndex = 5; this.labelCalculationType.Text = "Calculation Type:"; this.labelCalculationType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // labelExchangerType this.labelExchangerType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.labelExchangerType.Location = new System.Drawing.Point(610, 8); this.labelExchangerType.Name = "labelExchangerType"; this.labelExchangerType.Size = new System.Drawing.Size(192, 20); this.labelExchangerType.TabIndex = 4; this.labelExchangerType.Text = "Exchanger Type:"; this.labelExchangerType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.namePanel.Controls.Add(this.labelExchangerType); this.namePanel.Controls.Add(this.comboBoxExchangerType); this.namePanel.Controls.Add(this.labelCalculationType); this.namePanel.Controls.Add(this.comboBoxCalculationType); this.HeatExchangerCtrl.HeatExchanger.HXHotSideChanged += new HXHotSideChangedEventHandler(HeatExchanger_HXHotSideChanged); this.comboBoxCalculationType.SelectedIndex = -1; this.comboBoxExchangerType.SelectedIndex = -1; this.inConstruction = false; this.SetExchangerType(this.HeatExchangerCtrl.HeatExchanger.ExchangerType); this.SetCalculationType(this.HeatExchangerCtrl.HeatExchanger.CalculationType); if (this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel != null) { if (this.HeatExchangerCtrl.HeatExchanger.ExchangerType == ExchangerType.ShellAndTube) { HXRatingModelShellAndTube ratingModel = this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; this.SetHotSideShell(ratingModel.IsShellSideHot); } } }
public HeatExchangerEditor(HeatExchangerControl heatExchangerCtrl) : base(heatExchangerCtrl) { // // Required for Windows Form Designer support // InitializeComponent(); this.inConstruction = true; HeatExchanger heatExchanger = this.HeatExchangerCtrl.HeatExchanger; this.Text = "Heat Exchanger: " + heatExchanger.Name; this.UpdateStreamsUI(); this.groupBoxHeatExchanger = new System.Windows.Forms.GroupBox(); this.groupBoxHeatExchanger.Location = new System.Drawing.Point(724, 24); this.groupBoxHeatExchanger.Name = "groupBoxHeatExchanger"; this.groupBoxHeatExchanger.Text = "Heat Exchanger"; this.groupBoxHeatExchanger.Size = new System.Drawing.Size(280, 300); this.groupBoxHeatExchanger.TabIndex = 128; this.groupBoxHeatExchanger.TabStop = false; this.panel.Controls.Add(this.groupBoxHeatExchanger); // TO DO: to customize the height? or not // if (heatExchanger.ColdSideInlet is DryingGasStream) // { // this.groupBoxColdStream.Size = new System.Drawing.Size(360, 280); // this.panel.Size = new System.Drawing.Size(1010, 309); // this.ClientSize = new System.Drawing.Size(1010, 331); // } // else if (heatExchanger.ColdSideInlet is DryingMaterialStream) // { this.groupBoxColdStream.Size = new System.Drawing.Size(360, 300); this.panel.Size = new System.Drawing.Size(1010, 329); this.ClientSize = new System.Drawing.Size(1010, 351); // } this.groupBoxHotStream.Size = new System.Drawing.Size(360, 300); HeatExchangerLabelsControl heatExchangerLabelsCtrl = new HeatExchangerLabelsControl(this.HeatExchangerCtrl.HeatExchanger); //ProcessVarLabelsControl heatExchangerLabelsCtrl = new ProcessVarLabelsControl(this.HeatExchangerCtrl.HeatExchanger.VarList); this.groupBoxHeatExchanger.Controls.Add(heatExchangerLabelsCtrl); heatExchangerLabelsCtrl.Location = new Point(4, 12 + 20 + 2); HeatExchangerValuesControl heatExchangerValuesCtrl = new HeatExchangerValuesControl(this.HeatExchangerCtrl); //ProcessVarValuesControl heatExchangerValuesCtrl = new ProcessVarValuesControl(this.HeatExchangerCtrl); this.groupBoxHeatExchanger.Controls.Add(heatExchangerValuesCtrl); heatExchangerValuesCtrl.Location = new Point(196, 12 + 20 + 2); // shell and tube hot side this.groupBoxHotSide = new System.Windows.Forms.GroupBox(); this.radioButtonHotSideTube = new System.Windows.Forms.RadioButton(); this.radioButtonHotSideShell = new System.Windows.Forms.RadioButton(); // // groupBoxHotSide // this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideTube); this.groupBoxHotSide.Controls.Add(this.radioButtonHotSideShell); this.groupBoxHotSide.Location = new System.Drawing.Point(0, 0); this.groupBoxHotSide.Name = "groupBoxHotSide"; this.groupBoxHotSide.Size = new System.Drawing.Size(104, 68); this.groupBoxHotSide.TabIndex = 0; this.groupBoxHotSide.TabStop = false; this.groupBoxHotSide.Text = "Hot Side"; // // radioButtonHotSideTube // this.radioButtonHotSideTube.Location = new System.Drawing.Point(8, 44); this.radioButtonHotSideTube.Name = "radioButtonHotSideTube"; this.radioButtonHotSideTube.Size = new System.Drawing.Size(72, 20); this.radioButtonHotSideTube.TabIndex = 1; this.radioButtonHotSideTube.Text = "Tube"; this.radioButtonHotSideTube.CheckedChanged += new System.EventHandler(this.HotSideHandler); // // radioButtonHotSideShell // this.radioButtonHotSideShell.Location = new System.Drawing.Point(8, 20); this.radioButtonHotSideShell.Name = "radioButtonHotSideShell"; this.radioButtonHotSideShell.Size = new System.Drawing.Size(72, 20); this.radioButtonHotSideShell.TabIndex = 0; this.radioButtonHotSideShell.Text = "Shell"; this.radioButtonHotSideShell.CheckedChanged += new System.EventHandler(this.HotSideHandler); this.groupBoxHeatExchanger.Controls.Add(this.groupBoxHotSide); this.groupBoxHotSide.Location = new Point(20, 112); heatExchangerCtrl.HeatExchanger.StreamAttached += new StreamAttachedEventHandler(HeatExchanger_StreamAttached); heatExchangerCtrl.HeatExchanger.StreamDetached += new StreamDetachedEventHandler(HeatExchanger_StreamDetached); this.menuItemRating = new MenuItem(); this.menuItemRating.Index = this.menuItemReport.Index + 1; this.menuItemRating.Text = "Rating"; this.menuItemRating.Click += new EventHandler(menuItemRating_Click); this.mainMenu.MenuItems.Add(this.menuItemRating); this.comboBoxCalculationType = new System.Windows.Forms.ComboBox(); this.comboBoxExchangerType = new System.Windows.Forms.ComboBox(); this.labelCalculationType = new System.Windows.Forms.Label(); this.labelCalculationType.BackColor = Color.DarkGray; this.labelExchangerType = new System.Windows.Forms.Label(); this.labelExchangerType.BackColor = Color.DarkGray; // comboBoxCalculationType this.comboBoxCalculationType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxCalculationType.Items.AddRange(new object[] { "Balance", "Rating" }); this.comboBoxCalculationType.Location = new System.Drawing.Point(492, 0); this.comboBoxCalculationType.Name = "comboBoxCalculationType"; this.comboBoxCalculationType.Size = new System.Drawing.Size(80, 21); this.comboBoxCalculationType.TabIndex = 7; this.comboBoxCalculationType.SelectedIndexChanged += new EventHandler(comboBoxCalculationType_SelectedIndexChanged); // comboBoxExchangerType this.comboBoxExchangerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxExchangerType.Items.AddRange(new object[] { "Simple Generic", "Shell And Tube", "Plate And Frame" }); this.comboBoxExchangerType.Location = new System.Drawing.Point(792, 0); this.comboBoxExchangerType.Name = "comboBoxExchangerType"; this.comboBoxExchangerType.Size = new System.Drawing.Size(108, 21); this.comboBoxExchangerType.TabIndex = 6; this.comboBoxExchangerType.SelectedIndexChanged += new EventHandler(comboBoxExchangerType_SelectedIndexChanged); // labelCalculationType this.labelCalculationType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.labelCalculationType.Location = new System.Drawing.Point(300, 0); this.labelCalculationType.Name = "labelCalculationType"; this.labelCalculationType.Size = new System.Drawing.Size(192, 20); this.labelCalculationType.TabIndex = 5; this.labelCalculationType.Text = "Calculation Type:"; this.labelCalculationType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // labelExchangerType this.labelExchangerType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.labelExchangerType.Location = new System.Drawing.Point(600, 0); this.labelExchangerType.Name = "labelExchangerType"; this.labelExchangerType.Size = new System.Drawing.Size(192, 20); this.labelExchangerType.TabIndex = 4; this.labelExchangerType.Text = "Exchanger Type:"; this.labelExchangerType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.panel.Controls.Add(this.labelExchangerType); this.panel.Controls.Add(this.comboBoxExchangerType); this.panel.Controls.Add(this.labelCalculationType); this.panel.Controls.Add(this.comboBoxCalculationType); this.HeatExchangerCtrl.HeatExchanger.HXHotSideChanged += new HXHotSideChangedEventHandler(HeatExchanger_HXHotSideChanged); this.comboBoxCalculationType.SelectedIndex = -1; this.comboBoxExchangerType.SelectedIndex = -1; this.inConstruction = false; this.SetExchangerType(this.HeatExchangerCtrl.HeatExchanger.ExchangerType); this.SetCalculationType(this.HeatExchangerCtrl.HeatExchanger.CalculationType); this.comboBoxCalculationType.Enabled = false; if (this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel != null) { if (this.HeatExchangerCtrl.HeatExchanger.ExchangerType == ExchangerType.ShellAndTube) { HXRatingModelShellAndTube ratingModel = this.HeatExchangerCtrl.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; this.SetHotSideShell(ratingModel.IsShellSideHot); } } }
private string ToPrintShellAndTubeRating() { UnitSystem us = UnitSystemService.GetInstance().CurrentUnitSystem; string nfs = this.flowsheet.ApplicationPrefs.NumericFormatString; StringBuilder sb = new StringBuilder(); HXRatingModelShellAndTube ratingModel = this.HeatExchanger.CurrentRatingModel as HXRatingModelShellAndTube; sb.Append("Shell and Tube Rating:"); sb.Append("\r\n"); // the left side string flowDirectionStr = ""; if (ratingModel.FlowDirection == FlowDirectionType.Counter) { flowDirectionStr = "Counter"; } else if (ratingModel.FlowDirection == FlowDirectionType.Cross) { flowDirectionStr = "Cross"; } else if (ratingModel.FlowDirection == FlowDirectionType.Parallel) { flowDirectionStr = "Parallel"; } sb.Append("Flow Direction"); sb.Append(" = "); sb.Append(flowDirectionStr); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ColdSideHeatTransferCoefficient, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ColdSideHeatTransferCoefficient, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.HotSideHeatTransferCoefficient, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.HotSideHeatTransferCoefficient, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ColdSideFoulingFactor, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ColdSideFoulingFactor, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.HotSideFoulingFactor, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.HotSideFoulingFactor, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TotalHeatTransferCoefficient, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TotalHeatTransferCoefficient, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TotalHeatTransferArea, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TotalHeatTransferArea, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.NumberOfHeatTransferUnits, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.NumberOfHeatTransferUnits, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ExchangerEffectiveness, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ExchangerEffectiveness, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.FtFactor, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.FtFactor, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubeSideVelocity, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubeSideVelocity, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ColdSideRe, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ColdSideRe, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ShellSideVelocity, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ShellSideVelocity, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.HotSideRe, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.HotSideRe, us, nfs)); sb.Append("\r\n"); if (ratingModel.IncludeWallEffect) { sb.Append(UI.GetVariableName(ratingModel.WallThermalConductivity, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.WallThermalConductivity, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.WallThickness, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.WallThickness, us, nfs)); sb.Append("\r\n"); } // the right side string ratingTypeStr = ""; if (ratingModel.ShellRatingType == ShellRatingType.BellDelaware) { ratingTypeStr = "Bell Delaware"; } else if (ratingModel.ShellRatingType == ShellRatingType.Donohue) { ratingTypeStr = "Donohue"; } else if (ratingModel.ShellRatingType == ShellRatingType.Kern) { ratingTypeStr = "Kern"; } sb.Append("Shell Rating Type"); sb.Append(" = "); sb.Append(ratingTypeStr); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubeOuterDiameter, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubeOuterDiameter, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubeWallThickness, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubeWallThickness, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubeInnerDiameter, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubeInnerDiameter, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubeLengthBetweenTubeSheets, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubeLengthBetweenTubeSheets, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubesPerTubePass, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubesPerTubePass, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubePassesPerShellPass, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubePassesPerShellPass, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ShellPasses, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ShellPasses, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TotalTubesInShell, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TotalTubesInShell, us, nfs)); sb.Append("\r\n"); string shellTypeStr = ""; if (ratingModel.ShellType == ShellType.E) { shellTypeStr = "E"; } else if (ratingModel.ShellType == ShellType.F) { shellTypeStr = "F"; } else if (ratingModel.ShellType == ShellType.G) { shellTypeStr = "G"; } else if (ratingModel.ShellType == ShellType.H) { shellTypeStr = "H"; } else if (ratingModel.ShellType == ShellType.J) { shellTypeStr = "J"; } else if (ratingModel.ShellType == ShellType.K) { shellTypeStr = "K"; } else if (ratingModel.ShellType == ShellType.X) { shellTypeStr = "X"; } sb.Append("Shell Type"); sb.Append(" = "); sb.Append(shellTypeStr); sb.Append("\r\n"); if (ratingModel.ShellRatingType == ShellRatingType.BellDelaware || ratingModel.ShellRatingType == ShellRatingType.Kern) { string tubeLayoutStr = ""; if (ratingModel.TubeLayout == TubeLayout.InlineSquare) { tubeLayoutStr = "Inline Square"; } else if (ratingModel.TubeLayout == TubeLayout.RotatedSquare) { tubeLayoutStr = "Rotated Square"; } else if (ratingModel.TubeLayout == TubeLayout.Triangular) { tubeLayoutStr = "Triangular"; } sb.Append("Tube Layout"); sb.Append(" = "); sb.Append(tubeLayoutStr); sb.Append("\r\n"); } sb.Append(UI.GetVariableName(ratingModel.TubePitch, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubePitch, us, nfs)); sb.Append("\r\n"); if (ratingModel.ShellRatingType == ShellRatingType.BellDelaware || ratingModel.ShellRatingType == ShellRatingType.Donohue) { sb.Append(UI.GetVariableName(ratingModel.BaffleCut, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.BaffleCut, us, nfs)); sb.Append("\r\n"); } sb.Append(UI.GetVariableName(ratingModel.BaffleSpacing, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.BaffleSpacing, us, nfs)); sb.Append("\r\n"); if (ratingModel.ShellRatingType == ShellRatingType.BellDelaware) { sb.Append(UI.GetVariableName(ratingModel.EntranceBaffleSpacing, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.EntranceBaffleSpacing, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ExitBaffleSpacing, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ExitBaffleSpacing, us, nfs)); sb.Append("\r\n"); } sb.Append(UI.GetVariableName(ratingModel.NumberOfBaffles, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.NumberOfBaffles, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ShellInnerDiameter, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ShellInnerDiameter, us, nfs)); sb.Append("\r\n"); if (ratingModel.ShellRatingType == ShellRatingType.BellDelaware) { sb.Append(UI.GetVariableName(ratingModel.ShellToBaffleDiametralClearance, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ShellToBaffleDiametralClearance, us, nfs)); sb.Append("\r\n"); } if (ratingModel.ShellRatingType == ShellRatingType.BellDelaware) { sb.Append(UI.GetVariableName(ratingModel.BundleToShellDiametralClearance, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.BundleToShellDiametralClearance, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.SealingStrips, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.SealingStrips, us, nfs)); sb.Append("\r\n"); } if (ratingModel.IncludeNozzleEffect) { sb.Append(UI.GetVariableName(ratingModel.TubeSideEntranceNozzleDiameter, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubeSideEntranceNozzleDiameter, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.TubeSideExitNozzleDiameter, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.TubeSideExitNozzleDiameter, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ShellSideEntranceNozzleDiameter, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ShellSideEntranceNozzleDiameter, us, nfs)); sb.Append("\r\n"); sb.Append(UI.GetVariableName(ratingModel.ShellSideExitNozzleDiameter, us)); sb.Append(" = "); sb.Append(UI.GetVariableValue(ratingModel.ShellSideExitNozzleDiameter, us, nfs)); sb.Append("\r\n"); } return(sb.ToString()); }
public ShellHTCAndDPCalculatorDonohue(HXRatingModelShellAndTube ratingModel) : base(ratingModel) { InitializeVarList(); //InitializeGeometryParams(); }