Ejemplo n.º 1
0
        public override SolvableConnection CreateConnection(UnitOperation uo, ProcessStreamBase ps, int ad)
        {
            ProcessStreamBaseControl ctrl = this.flowsheet.StreamManager.GetProcessStreamBaseControl(ps);
            SolvableConnection       conn = null;

            if (ad == FiredHeater.AIR_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ad;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetAirInConnectionPoint();
                PointOrientation uoOrientation = FiredHeaterControl.AIR_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == FiredHeater.FUEL_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ad;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetFuelInConnectionPoint();
                PointOrientation uoOrientation = FiredHeaterControl.FUEL_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == FiredHeater.FLUE_GAS_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ad;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetFlueGasOutConnectionPoint();
                PointOrientation uoOrientation = FiredHeaterControl.FLUE_GAS_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == FiredHeater.HEATED_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ad;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetHeatedInConnectionPoint();
                PointOrientation uoOrientation = FiredHeaterControl.HEATED_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == FiredHeater.HEATED_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ad;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetHeatedOutConnectionPoint();
                PointOrientation uoOrientation = FiredHeaterControl.HEATED_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }

            if (conn != null)
            {
                this.flowsheet.ConnectionManager.AddConnection(conn);
                //this.flowsheet.ConnectionManager.Connections.Add(conn);
                //this.flowsheet.ConnectionManager.DrawConnections();
            }
            return(conn);
        }
Ejemplo n.º 2
0
        public override SolvableConnection CreateConnection(UnitOperation uo, ProcessStreamBase ps, int ad)
        {
            StreamType streamType = StreamType.Unknown;

            if (ps is DryingGasStream)
            {
                streamType = StreamType.Gas;
            }
            else if (ps is ProcessStream)
            {
                streamType = StreamType.Process;
            }
            else if (ps is DryingMaterialStream)
            {
                streamType = StreamType.Material;
            }

            ProcessStreamBaseControl ctrl = this.flowsheet.StreamManager.GetProcessStreamBaseControl(ps);
            SolvableConnection       conn = null;

            if (ad > 0)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ad;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetStreamInConnectionPoint(ad, uo.InletStreams.Count);
                PointOrientation uoOrientation = MixerControl.INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }
            else if (ad == Mixer.OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Mixer.OUTLET_INDEX;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetStreamOutConnectionPoint();
                PointOrientation uoOrientation = MixerControl.OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }

            if (conn != null)
            {
                this.flowsheet.ConnectionManager.AddConnection(conn);
                //this.flowsheet.ConnectionManager.Connections.Add(conn);
                //this.flowsheet.ConnectionManager.UpdateConnections(this);
                //this.flowsheet.ConnectionManager.DrawConnections();
                this.DoThePaint();
            }
            return(conn);
        }
Ejemplo n.º 3
0
        public override SolvableConnection CreateConnection(UnitOperation uo, ProcessStreamBase ps, int ad)
        {
            StreamType streamType = StreamType.Unknown;

            if (ps is DryingGasStream)
            {
                streamType = StreamType.Gas;
            }
            else if (ps is ProcessStream)
            {
                streamType = StreamType.Process;
            }
            else if (ps is DryingMaterialStream)
            {
                streamType = StreamType.Material;
            }

            ProcessStreamBaseControl ctrl = this.flowsheet.StreamManager.GetProcessStreamBaseControl(ps);
            SolvableConnection       conn = null;

            if (ad == Cyclone.GAS_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Cyclone.GAS_INLET_INDEX;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetGasInConnectionPoint();
                PointOrientation uoOrientation = CycloneControl.MIXTURE_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }
            else if (ad == Cyclone.GAS_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Cyclone.GAS_OUTLET_INDEX;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetGasOutConnectionPoint();
                PointOrientation uoOrientation = CycloneControl.FLUID_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }
            else if (ad == Cyclone.PARTICLE_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Cyclone.PARTICLE_OUTLET_INDEX;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetParticleOutConnectionPoint();
                PointOrientation uoOrientation = CycloneControl.PARTICLE_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }

            if (conn != null)
            {
                this.flowsheet.ConnectionManager.AddConnection(conn);
                //this.flowsheet.ConnectionManager.Connections.Add(conn);
                //this.flowsheet.ConnectionManager.DrawConnections();
            }
            return(conn);
        }
Ejemplo n.º 4
0
        public override SolvableConnection CreateConnection(UnitOperation uo, ProcessStreamBase ps, int ad)
        {
            ProcessStreamBaseControl ctrl = this.flowsheet.StreamManager.GetProcessStreamBaseControl(ps);
            SolvableConnection       conn = null;

            if (ad == ScrubberCondenser.GAS_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ScrubberCondenser.GAS_INLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetGasInConnectionPoint();
                PointOrientation uoOrientation = ScrubberCondenserControl.GAS_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == ScrubberCondenser.GAS_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ScrubberCondenser.GAS_OUTLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetGasOutConnectionPoint();
                PointOrientation uoOrientation = ScrubberCondenserControl.GAS_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == ScrubberCondenser.LIQUID_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ScrubberCondenser.LIQUID_OUTLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetLiquidOutConnectionPoint();
                PointOrientation uoOrientation = ScrubberCondenserControl.LIQUID_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == ScrubberCondenser.WATER_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ScrubberCondenser.WATER_INLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetWaterInConnectionPoint();
                PointOrientation uoOrientation = ScrubberCondenserControl.WATER_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == ScrubberCondenser.WATER_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = ScrubberCondenser.WATER_OUTLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetWaterOutConnectionPoint();
                PointOrientation uoOrientation = ScrubberCondenserControl.WATER_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }


            if (conn != null)
            {
                this.flowsheet.ConnectionManager.AddConnection(conn);
                //this.flowsheet.ConnectionManager.Connections.Add(conn);
                //this.flowsheet.ConnectionManager.DrawConnections();
            }
            return(conn);
        }
Ejemplo n.º 5
0
        public override void CreateConnection(UnitOperation uo, ProcessStreamBase ps, int ad)
        {
            StreamType streamType = StreamType.Unknown;

            if (ps is DryingGasStream)
            {
                streamType = StreamType.Gas;
            }
            else if (ps is ProcessStream)
            {
                streamType = StreamType.Process;
            }
            else if (ps is DryingMaterialStream)
            {
                streamType = StreamType.Material;
            }

            ProcessStreamBaseControl ctrl = this.flowsheet.StreamManager.GetProcessStreamBaseControl(ps);
            SolvableConnection       conn = null;

            if (ad == Ejector.MOTIVE_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Ejector.MOTIVE_INLET_INDEX;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetMotiveInConnectionPoint();
                PointOrientation uoOrientation = EjectorControl.MOTIVE_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }
            else if (ad == Ejector.SUCTION_INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Ejector.SUCTION_INLET_INDEX;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetSuctionInConnectionPoint();
                PointOrientation uoOrientation = EjectorControl.SUCTION_INLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }
            else if (ad == Ejector.DISCHARGE_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Ejector.DISCHARGE_OUTLET_INDEX;
                string           uoName        = this.Solvable.Name;
                Point            uoPoint       = this.GetDischargeOutConnectionPoint();
                PointOrientation uoOrientation = EjectorControl.DISCHARGE_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, streamType);
            }

            if (conn != null)
            {
                this.flowsheet.ConnectionManager.Connections.Add(conn);
                this.flowsheet.ConnectionManager.DrawConnections();
            }
        }
Ejemplo n.º 6
0
        public override SolvableConnection CreateConnection(UnitOperation uo, ProcessStreamBase ps, int ad)
        {
            //StreamType streamType = StreamType.Unknown;
            //if (ps is DryingGasStream) {
            //   streamType = StreamType.Gas;
            //}
            //else if (ps is ProcessStream) {
            //   streamType = StreamType.Process;
            //}
            //else if (ps is DryingMaterialStream) {
            //   streamType = StreamType.Material;
            //}

            ProcessStreamBaseControl ctrl = this.flowsheet.StreamManager.GetProcessStreamBaseControl(ps);
            SolvableConnection       conn = null;

            if (ad == TwoStreamUnitOperation.INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = TwoStreamUnitOperation.INLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetStreamInConnectionPoint();
                PointOrientation uoOrientation = TwoStreamUnitOpControl.INLET_ORIENTATION;
                // adjust for Recycle
                if (uo is Recycle)
                {
                    uoOrientation = RecycleControl.INLET_ORIENTATION;
                }
                ConnectionPoint uoConnPoint = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == TwoStreamUnitOperation.OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = TwoStreamUnitOperation.OUTLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetStreamOutConnectionPoint();
                PointOrientation uoOrientation = TwoStreamUnitOpControl.OUTLET_ORIENTATION;
                // adjust for Recycle
                if (uo is Recycle)
                {
                    uoOrientation = RecycleControl.OUTLET_ORIENTATION;
                }
                ConnectionPoint uoConnPoint = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);
                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }

            if (conn != null)
            {
                //this.flowsheet.ConnectionManager.DrawConnection(conn);
                this.flowsheet.ConnectionManager.AddConnection(conn);
                //this.flowsheet.ConnectionManager.Connections.Add(conn);
                //this.flowsheet.ConnectionManager.DrawConnections();
            }
            return(conn);
        }
Ejemplo n.º 7
0
        public override SolvableConnection CreateConnection(UnitOperation uo, ProcessStreamBase ps, int ad)
        {
            ProcessStreamBaseControl ctrl = this.flowsheet.StreamManager.GetProcessStreamBaseControl(ps);
            SolvableConnection       conn = null;

            if (ad == TwoStreamUnitOperation.INLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.OUT_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetOutConnectionPoint();
                PointOrientation strOrientation = ctrl.OutOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = TwoStreamUnitOperation.INLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetStreamInConnectionPoint();
                PointOrientation uoOrientation = TwoStreamUnitOpControl.INLET_ORIENTATION;

                ConnectionPoint uoConnPoint = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == TwoStreamUnitOperation.OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = TwoStreamUnitOperation.OUTLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetStreamOutConnectionPoint();
                PointOrientation uoOrientation = TwoStreamUnitOpControl.OUTLET_ORIENTATION;

                ConnectionPoint uoConnPoint = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);
                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }
            else if (ad == Cyclone.PARTICLE_OUTLET_INDEX)
            {
                int              strIdx         = ProcessStreamBaseControl.IN_INDEX;
                string           strName        = ctrl.Solvable.Name;
                Point            strPoint       = ctrl.GetInConnectionPoint();
                PointOrientation strOrientation = ctrl.InOrientation;
                ConnectionPoint  strConnPoint   = new ConnectionPoint(strIdx, strName, strPoint, strOrientation);

                int              uoIdx         = Cyclone.PARTICLE_OUTLET_INDEX;
                string           uoName        = this.solvable.Name;
                Point            uoPoint       = this.GetParticleOutConnectionPoint();
                PointOrientation uoOrientation = PARTICLE_OUTLET_ORIENTATION;
                ConnectionPoint  uoConnPoint   = new ConnectionPoint(uoIdx, uoName, uoPoint, uoOrientation);

                conn = new SolvableConnection(this.flowsheet, strConnPoint, uoConnPoint, ps.GetType());
            }

            if (conn != null)
            {
                this.flowsheet.ConnectionManager.AddConnection(conn);
            }
            return(conn);
        }