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); }
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; } }
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; } }
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); }
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; } }