Пример #1
0
        /// <summary>
        /// 稳态流量压力特性试验
        /// </summary>
        public void StaticFlowPressureTest()
        {
            CurvePanel panel = new CurvePanel();

            panel.Title  = TestType.稳态流量压力特性试验.ToString() + "曲线";
            panel.XLabel = "流量(L/Min)";
            panel.YLabel = "压差(MPa)";

            Dictionary <string, Curve> dictCurve = new Dictionary <string, Curve>();
            bool need_test = true;
            int  i         = 1;

            while (need_test)
            {
                flow_valve_confirmForm frm_confirm = new flow_valve_confirmForm();
                need_test = frm_confirm.ShowDialog() == DialogResult.OK;
                if (!need_test)
                {
                    break;
                }
                StaticFlowPressSingleState(panel, CircuitState.ATIn, i);
                i++;
            }

            this.SetSourcePre(0);
            this.SetSourceFlow(0);
            this.SetThrottleValve(50f);
            this.dictCurvePanel.Remove(panel.Title);
            this.dictCurvePanel.Add(panel.Title, panel);
        }
Пример #2
0
        /// <summary>
        /// 外泄漏试验
        /// </summary>
        public void ExternalLeakTest()
        {
            if (this.外泄漏口 == true)
            {
                CurvePanel panel = new CurvePanel();
                Dictionary <string, Curve> dictCurve = new Dictionary <string, Curve>();
                panel.Title  = TestType.外泄漏试验.ToString() + "曲线";
                panel.XLabel = "流量(L/Min)";
                panel.YLabel = "压差(MPa)";
                bool need_test = true;
                int  test_num  = 0;
                while (need_test)
                {
                    test_num++;
                    flow_valve_confirmForm frm_confirm = new flow_valve_confirmForm();
                    need_test = frm_confirm.ShowDialog() == DialogResult.OK;
                    if (!need_test)
                    {
                        break;
                    }
                    StaticFlowPressSingleState(panel, CircuitState.ATIn, test_num);
                    StaticFlowPressSingleState(panel, CircuitState.ATOut, test_num);
                }

                foreach (string key in dictCurve.Keys)
                {
                    panel.AddCurve(dictCurve[key]);
                }
                this.SetSourcePre(0);
                this.SetSourceFlow(0);
                this.SetThrottleValve(50f);
                this.dictCurvePanel.Remove(panel.Title);
                this.dictCurvePanel.Add(panel.Title, panel);
            }
            else
            {
                LOG.Error("无外泄漏口,无法做外泄漏试验!");
                return;
            }
        }