示例#1
0
        private void cyclone_SolveComplete(object sender, SolveState solveState)
        {
            CycloneRatingModel rating = (sender as Cyclone).CurrentRatingModel;

            this.SetInletConfiguration(rating.InletConfiguration);
            this.SetParticleTypeGroup(rating.ParticleTypeGroup);
        }
示例#2
0
        public void InitializeTheUI(Flowsheet flowsheet, Cyclone cyclone)
        {
            this.inConstruction = true;
            this.cyclone        = cyclone;
            CycloneRatingModel cycloneRating = cyclone.CurrentRatingModel;

            this.InitializeVariableTextBoxes(flowsheet, cycloneRating);
            cyclone.SolveComplete += new SolveCompleteEventHandler(cyclone_SolveComplete);
            this.comboBoxInletConfiguration.SelectedIndex = -1;
            this.comboBoxParticleTypeGroup.SelectedIndex  = -1;
            this.inConstruction = false;
            this.SetInletConfiguration(cycloneRating.InletConfiguration);
            this.SetParticleTypeGroup(cycloneRating.ParticleTypeGroup);
        }
示例#3
0
        public CycloneRatingEditor(CycloneControl cycloneCtrl)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.ShowInTaskbar = false;
            this.cycloneCtrl   = cycloneCtrl;
            CycloneRatingModel rating = cycloneCtrl.Cyclone.CurrentRatingModel;

            this.cycloneRatingLabelsControl.InitializeVariableLabels(rating);
            this.cycloneRatingValuesControl.InitializeTheUI(this.cycloneCtrl.Flowsheet, cycloneCtrl.Cyclone);

            this.Text = "Cyclone Rating: " + this.cycloneCtrl.Cyclone.Name;

            this.menuItemParticleDistribution        = new MenuItem();
            this.menuItemParticleDistribution.Index  = 1;
            this.menuItemParticleDistribution.Text   = "Particle Distributions";
            this.menuItemParticleDistribution.Click += new EventHandler(menuItemParticleDistribution_Click);
            this.mainMenu.MenuItems.Add(this.menuItemParticleDistribution);
        }
示例#4
0
 public void InitializeVariableTextBoxes(Flowsheet flowsheet, CycloneRatingModel rating)
 {
     this.textBoxNumberOfCyclones.InitializeVariable(flowsheet, rating.NumberOfCyclones);
     this.textBoxCutParticleDiameter.InitializeVariable(flowsheet, rating.CutParticleDiameter);
     this.textBoxParticleBulkDensity.InitializeVariable(flowsheet, rating.ParticleBulkDensity);
     this.textBoxParticleDensity.InitializeVariable(flowsheet, rating.ParticleDensity);
     this.textBoxOutletWallThickness.InitializeVariable(flowsheet, rating.OutletWallThickness);
     this.textBoxOutletInnerDiameter.InitializeVariable(flowsheet, rating.OutletInnerDiameter);
     this.textBoxCycloneDiameter.InitializeVariable(flowsheet, rating.CycloneDiameter);
     this.textBoxInletHeightToWidthRatio.InitializeVariable(flowsheet, rating.InletHeightToWidthRatio);
     this.textBoxInletHeight.InitializeVariable(flowsheet, rating.InletHeight);
     this.textBoxInletWidth.InitializeVariable(flowsheet, rating.InletWidth);
     this.textBoxInletVelocity.InitializeVariable(flowsheet, rating.InletVelocity);
     this.textBoxExternalVesselDiameter.InitializeVariable(flowsheet, rating.ExternalVesselDiameter);
     this.textBoxDiplegDiameter.InitializeVariable(flowsheet, rating.DiplegDiameter);
     this.textBoxOutletTubeLengthBelowRoof.InitializeVariable(flowsheet, rating.OutletTubeLengthBelowRoof);
     this.textBoxOutletBelowRoofToInletHeightRatio.InitializeVariable(flowsheet, rating.OutletBelowRoofToInletHeightRatio);
     this.textBoxConeAngle.InitializeVariable(flowsheet, rating.ConeAngle);
     this.textBoxBarrelLength.InitializeVariable(flowsheet, rating.BarrelLength);
     this.textBoxConeLength.InitializeVariable(flowsheet, rating.ConeLength);
     this.textBoxBarrelPlusConeLength.InitializeVariable(flowsheet, rating.BarrelPlusConeLength);
     this.textBoxNaturalVortexLength.InitializeVariable(flowsheet, rating.NaturalVortexLength);
 }
示例#5
0
 public void InitializeVariableLabels(CycloneRatingModel rating)
 {
     this.labelNumberOfCyclones.InitializeVariable(rating.NumberOfCyclones);
     this.labelInletWidth.InitializeVariable(rating.InletWidth);
     this.labelCycloneDiameter.InitializeVariable(rating.CycloneDiameter);
     this.labelParticleDensity.InitializeVariable(rating.ParticleDensity);
     this.labelParticleBulkDensity.InitializeVariable(rating.ParticleBulkDensity);
     this.labelCutParticleDiameter.InitializeVariable(rating.CutParticleDiameter);
     this.labelInletHeight.InitializeVariable(rating.InletHeight);
     this.labelInletHeightToWidthRatio.InitializeVariable(rating.InletHeightToWidthRatio);
     this.labelOutletInnerDiameter.InitializeVariable(rating.OutletInnerDiameter);
     this.labelOutletWallThickness.InitializeVariable(rating.OutletWallThickness);
     this.labelOutletTubeLengthBelowRoof.InitializeVariable(rating.OutletTubeLengthBelowRoof);
     this.labelOutletBelowRoofToInletHeightRatio.InitializeVariable(rating.OutletBelowRoofToInletHeightRatio);
     this.labelDiplegDiameter.InitializeVariable(rating.DiplegDiameter);
     this.labelExternalVesselDiameter.InitializeVariable(rating.ExternalVesselDiameter);
     this.labelInletVelocity.InitializeVariable(rating.InletVelocity);
     this.labelConeAngle.InitializeVariable(rating.ConeAngle);
     this.labelBarrelLength.InitializeVariable(rating.BarrelLength);
     this.labelConeLength.InitializeVariable(rating.ConeLength);
     this.labelBarrelPlusConeLength.InitializeVariable(rating.BarrelPlusConeLength);
     this.labelNaturalVortexLength.InitializeVariable(rating.NaturalVortexLength);
 }
示例#6
0
        public string ToPrintRating()
        {
            UnitSystem    us  = UnitSystemService.GetInstance().CurrentUnitSystem;
            string        nfs = this.flowsheet.ApplicationPrefs.NumericFormatString;
            StringBuilder sb  = new StringBuilder();

            sb.Append("Cyclone Rating:");
            sb.Append("\r\n");

            CycloneRatingModel ratingModel = this.Cyclone.CurrentRatingModel;

            sb.Append(GetVariableName(ratingModel.NumberOfCyclones, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.NumberOfCyclones, us, nfs));
            if (ratingModel.NumberOfCyclones.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            string particleTypeGroupStr = "";

            if (ratingModel.ParticleTypeGroup == ParticleTypeGroup.A)
            {
                particleTypeGroupStr = "A";
            }
            else if (ratingModel.ParticleTypeGroup == ParticleTypeGroup.B)
            {
                particleTypeGroupStr = "B";
            }
            else if (ratingModel.ParticleTypeGroup == ParticleTypeGroup.C)
            {
                particleTypeGroupStr = "C";
            }
            else if (ratingModel.ParticleTypeGroup == ParticleTypeGroup.D)
            {
                particleTypeGroupStr = "D";
            }
            sb.Append("Particle Type Group");
            sb.Append(" = ");
            sb.Append(particleTypeGroupStr);
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.ParticleDensity, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.ParticleDensity, us, nfs));
            if (ratingModel.ParticleDensity.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.ParticleBulkDensity, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.ParticleBulkDensity, us, nfs));
            if (ratingModel.ParticleBulkDensity.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.CutParticleDiameter, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.CutParticleDiameter, us, nfs));
            if (ratingModel.CutParticleDiameter.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            string inletConfigurationStr = "";

            if (ratingModel.InletConfiguration == CycloneInletConfiguration.Scroll)
            {
                inletConfigurationStr = "Scroll";
            }
            else if (ratingModel.InletConfiguration == CycloneInletConfiguration.Tangential)
            {
                inletConfigurationStr = "Tangential";
            }
            else if (ratingModel.InletConfiguration == CycloneInletConfiguration.Volute)
            {
                inletConfigurationStr = "Volute";
            }
            sb.Append("Inlet Configuration");
            sb.Append(" = ");
            sb.Append(inletConfigurationStr);
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.InletWidth, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.InletWidth, us, nfs));
            if (ratingModel.InletWidth.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.InletHeight, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.InletHeight, us, nfs));
            if (ratingModel.InletHeight.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.InletHeightToWidthRatio, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.InletHeightToWidthRatio, us, nfs));
            if (ratingModel.InletHeightToWidthRatio.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.CycloneDiameter, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.CycloneDiameter, us, nfs));
            if (ratingModel.CycloneDiameter.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.OutletInnerDiameter, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.OutletInnerDiameter, us, nfs));
            if (ratingModel.OutletInnerDiameter.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.OutletWallThickness, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.OutletWallThickness, us, nfs));
            if (ratingModel.OutletWallThickness.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.OutletTubeLengthBelowRoof, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.OutletTubeLengthBelowRoof, us, nfs));
            if (ratingModel.OutletTubeLengthBelowRoof.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.OutletBelowRoofToInletHeightRatio, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.OutletBelowRoofToInletHeightRatio, us, nfs));
            if (ratingModel.OutletBelowRoofToInletHeightRatio.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.DiplegDiameter, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.DiplegDiameter, us, nfs));
            if (ratingModel.DiplegDiameter.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.ExternalVesselDiameter, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.ExternalVesselDiameter, us, nfs));
            if (ratingModel.ExternalVesselDiameter.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.InletVelocity, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.InletVelocity, us, nfs));
            if (ratingModel.InletVelocity.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.ConeAngle, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.ConeAngle, us, nfs));
            if (ratingModel.ConeAngle.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.NaturalVortexLength, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.NaturalVortexLength, us, nfs));
            if (ratingModel.NaturalVortexLength.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.BarrelLength, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.BarrelLength, us, nfs));
            if (ratingModel.BarrelLength.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.ConeLength, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.ConeLength, us, nfs));
            if (ratingModel.ConeLength.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            sb.Append(GetVariableName(ratingModel.BarrelPlusConeLength, us));
            sb.Append(" = ");
            sb.Append(GetVariableValue(ratingModel.BarrelPlusConeLength, us, nfs));
            if (ratingModel.BarrelPlusConeLength.IsSpecified)
            {
                sb.Append(" * ");
            }
            sb.Append("\r\n");

            return(sb.ToString());
        }
示例#7
0
 public CycloneRatingLabelsControl(CycloneRatingModel rating)
 {
     // NOTE: this constructor is not used
     InitializeComponent();
     this.InitializeVariableLabels(rating);
 }