Example #1
0
 protected void OnHCTypeChanged(HCType hcType)
 {
     if (HCTypeChanged != null)
     {
         HCTypeChanged(hcType);
     }
 }
Example #2
0
        public PsychrometricChartModel(string name, DryingGasStream input, DryingGasStream output, DryingGasStream current, UnitOperationSystem uoSys) : base(name, uoSys)
        {
            this.inputStream            = input;
            inputStream.DownStreamOwner = this;
            this.outputStream           = output;
            outputStream.UpStreamOwner  = this;
            pressure                      = new ProcessVarDouble(StringConstants.PRESSURE, PhysicalQuantity.Pressure, 1.0132685e5, VarState.Specified, this);
            this.currentStream            = current;
            currentStream.DownStreamOwner = this;

            inputStream.Pressure   = pressure;
            outputStream.Pressure  = pressure;
            currentStream.Pressure = pressure;

            ProcessVarDouble dryBulbTemp = new ProcessVarDouble(StringConstants.DRY_BULB_TEMPERATURE, PhysicalQuantity.Temperature, 293.15, VarState.Specified, this);

            xVar = new PlotVariable(dryBulbTemp, 283.15, 373.15);
            ProcessVarDouble humidity      = new ProcessVarDouble(StringConstants.ABSOLUTE_HUMIDITY, PhysicalQuantity.MoistureContent, 0.1, VarState.Specified, this);
            string           moistureName  = ((EvaporationAndDryingSystem)(unitOpSystem)).DryingMaterial.Moisture.Name;
            double           humidityScale = humidityScaleTable[moistureName];

            //yVar = new PlotVariable(humidity, 0.0, 0.3);
            yVar = new PlotVariable(humidity, 0.0, humidityScale);
            GenerateHumidityChartData();
            inletStreams.Add(inputStream);
            outletStreams.Add(outputStream);
            InitializeStreams();

            this.hcType = HCType.GasState;
        }
Example #3
0
        public ErrorMessage SpecifyHCType(HCType aValue)
        {
            ErrorMessage retMsg = null;

            if (aValue != hcType)
            {
                HCType oldValue = hcType;
                try
                {
                    hcType = aValue;
                    HasBeenModified(true);
                }
                catch (Exception e)
                {
                    hcType = oldValue;
                    retMsg = HandleException(e);
                    OnHCTypeChanged(hcType);
                }
            }
            return(retMsg);
        }
Example #4
0
 private void psychrometricChartModel_HCTypeChanged(HCType hcType)
 {
     this.HumidityChartTypeChanged();
 }