コード例 #1
0
        internal override bool DoAttach(ProcessStreamBase ps, int streamIndex)
        {
            bool attached = true;

            if (streamIndex == FUEL_INLET_INDEX)
            {
                fuelInlet          = ps as FuelStream;
                ps.DownStreamOwner = this;
                inletStreams.Add(ps);
            }
            else if (streamIndex == AIR_INLET_INDEX)
            {
                airInlet         = ps as DryingGasStream;
                ps.UpStreamOwner = this;
                inletStreams.Add(ps);
            }
            else if (streamIndex == FLUE_GAS_OUTLET_INDEX)
            {
                flueGasOutlet    = ps as DryingGasStream;
                ps.UpStreamOwner = this;
                outletStreams.Add(ps);
            }
            else
            {
                attached = false;
            }
            return(attached);
        }
コード例 #2
0
        public override void SetObjectData()
        {
            base.SetObjectData();
            int persistedClassVersion = (int)info.GetValue("ClassPersistenceVersionFurnace", typeof(int));

            if (persistedClassVersion == 1)
            {
                this.fuelInlet     = info.GetValue("FuelInlet", typeof(FuelStream)) as FuelStream;
                this.airInlet      = info.GetValue("AirInlet", typeof(DryingGasStream)) as DryingGasStream;
                this.flueGasOutlet = info.GetValue("FlueGasOutlet", typeof(DryingGasStream)) as DryingGasStream;
                this.excessAir     = RecallStorableObject("ExcessAir", typeof(ProcessVarDouble)) as ProcessVarDouble;
            }
        }
コード例 #3
0
        public override void SetObjectData()
        {
            base.SetObjectData();
            int persistedClassVersion = (int)info.GetValue("ClassPersistenceVersionFiredHeater", typeof(int));

            if (persistedClassVersion == 1)
            {
                this.fuelInlet     = info.GetValue("FuelInlet", typeof(FuelStream)) as FuelStream;
                this.airInlet      = info.GetValue("AirInlet", typeof(DryingGasStream)) as DryingGasStream;
                this.flueGasOutlet = info.GetValue("FlueGasOutlet", typeof(DryingGasStream)) as DryingGasStream;
                this.heatedInlet   = info.GetValue("HeatedInlet", typeof(DryingGasStream)) as DryingGasStream;
                this.heatedOutlet  = info.GetValue("HeatedOutlet", typeof(DryingGasStream)) as DryingGasStream;
            }
        }
コード例 #4
0
        internal override bool DoDetach(ProcessStreamBase ps)
        {
            bool detached = true;

            if (ps == fuelInlet)
            {
                fuelInlet          = null;
                ps.DownStreamOwner = null;
                inletStreams.Remove(ps);
            }
            else if (ps == airInlet)
            {
                airInlet           = null;
                ps.DownStreamOwner = null;
                inletStreams.Remove(ps);
            }
            else if (ps == flueGasOutlet)
            {
                flueGasOutlet    = null;
                ps.UpStreamOwner = null;
                outletStreams.Remove(ps);
            }
            else if (ps == heatedInlet)
            {
                heatedInlet        = null;
                ps.DownStreamOwner = null;
                inletStreams.Remove(ps);
            }
            else if (ps == heatedOutlet)
            {
                heatedOutlet     = null;
                ps.UpStreamOwner = null;
                outletStreams.Remove(ps);
            }
            else
            {
                detached = false;
            }

            if (detached)
            {
                HasBeenModified(true);
                ps.HasBeenModified(true);
                OnStreamDetached(this, ps);
            }

            return(detached);
        }
コード例 #5
0
        public override void SetObjectData()
        {
            base.SetObjectData();
            int persistedClassVersion = (int)info.GetValue("ClassPersistenceVersionFurnace", typeof(int));

            if (persistedClassVersion == 1)
            {
                this.fuelInlet                 = info.GetValue("FuelInlet", typeof(FuelStream)) as FuelStream;
                this.airInlet                  = info.GetValue("AirInlet", typeof(DryingGasStream)) as DryingGasStream;
                this.flueGasOutlet             = info.GetValue("FlueGasOutlet", typeof(DryingGasStream)) as DryingGasStream;
                this.excessAir                 = RecallStorableObject("ExcessAir", typeof(ProcessVarDouble)) as ProcessVarDouble;
                this.totalHeatGeneration       = RecallStorableObject("TotalHeatGeneration", typeof(ProcessVarDouble)) as ProcessVarDouble;
                this.percentageHeatLoss        = RecallStorableObject("PercentHeatLoss", typeof(ProcessVarDouble)) as ProcessVarDouble;
                this.oxygenMassFractionFlueGas = RecallStorableObject("OxygenMassFractionFlueGas", typeof(ProcessVarDouble)) as ProcessVarDouble;
                this.oxygenMoleFractionFlueGas = RecallStorableObject("OxygenMoleFractionFlueGas", typeof(ProcessVarDouble)) as ProcessVarDouble;
            }
        }