| | |
| | | |
| | | double _ratedn = -1; |
| | | PumpGroupPt _work_point = null; |
| | | List<Yw.Geometry.Point2d> _pt_qh_list = null; |
| | | List<Yw.Geometry.Point2d> _pt_qe_list = null; |
| | | List<Yw.Geometry.Point2d> _pt_qp_list = null; |
| | | List<Yw.Geometry.Point2d> _qh_pt_list = null; |
| | | List<Yw.Geometry.Point2d> _qe_pt_list = null; |
| | | List<Yw.Geometry.Point2d> _qp_pt_list = null; |
| | | List<Yw.Geometry.Point2d> _npsh_pt_list = null; |
| | | |
| | | |
| | |
| | | //得到点位置 |
| | | |
| | | bool iOK = PumpDimensionlessCurvesHelper.CalcPoints(_work_point, _ratedn, k0, |
| | | ref _pt_qh_list, ref _pt_qe_list, ref _pt_qp_list, ref _npsh_pt_list, checkEditSXB.Checked, Convert.ToInt32(spinEditYLJS.Value)); |
| | | ref _qh_pt_list, ref _qe_pt_list, ref _qp_pt_list, ref _npsh_pt_list, checkEditSXB.Checked, Convert.ToInt32(spinEditYLJS.Value)); |
| | | if (!iOK) |
| | | { |
| | | XtraMessageBox.Show("Error:265"); |
| | |
| | | { |
| | | double spaceH = _work_point.H / 200;//200为预估值 |
| | | |
| | | for (int i = _pt_qh_list.Count - 2; i >= 0; i--) |
| | | for (int i = _qh_pt_list.Count - 2; i >= 0; i--) |
| | | { |
| | | if (_pt_qh_list[i].Y < _pt_qh_list[i + 1].Y) |
| | | if (_qh_pt_list[i].Y < _qh_pt_list[i + 1].Y) |
| | | { |
| | | _pt_qh_list[i].Y = _pt_qh_list[i + 1].Y + spaceH; |
| | | _qh_pt_list[i].Y = _qh_pt_list[i + 1].Y + spaceH; |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (qre > 1.01 && qre < 1.8) |
| | | { |
| | | var ratio = _work_point.Q * qre / _pt_qh_list.Last().X; |
| | | var ratio = _work_point.Q * qre / _qh_pt_list.Last().X; |
| | | if (qre > 1.35) |
| | | { |
| | | var pointInfoQH2 = GetFitPointListByExtend(_pt_qh_list, ratio); |
| | | var maxPt_E = GetLineInsert(_pt_qe_list[_pt_qe_list.Count - 2].X, _pt_qe_list[_pt_qe_list.Count - 1].X, _pt_qe_list[_pt_qe_list.Count - 2].Y, _pt_qe_list[_pt_qe_list.Count - 1].Y, qre * _work_point.Q); |
| | | _pt_qe_list.Add(new Yw.Geometry.Point2d(qre * _work_point.Q, maxPt_E)); |
| | | _pt_qh_list = pointInfoQH2; |
| | | _pt_qe_list = _pt_qe_list.GetFitPointList(20); |
| | | _pt_qp_list = CalculateP(_pt_qh_list, _pt_qe_list); |
| | | var pointInfoQH2 = GetFitPointListByExtend(_qh_pt_list, ratio); |
| | | var maxPt_E = GetLineInsert(_qe_pt_list[_qe_pt_list.Count - 2].X, _qe_pt_list[_qe_pt_list.Count - 1].X, _qe_pt_list[_qe_pt_list.Count - 2].Y, _qe_pt_list[_qe_pt_list.Count - 1].Y, qre * _work_point.Q); |
| | | _qe_pt_list.Add(new Yw.Geometry.Point2d(qre * _work_point.Q, maxPt_E)); |
| | | _qh_pt_list = pointInfoQH2; |
| | | _qe_pt_list = _qe_pt_list.GetFitPointList(20); |
| | | _qp_pt_list = CalculateP(_qh_pt_list, _qe_pt_list); |
| | | } |
| | | else |
| | | { |
| | | _pt_qh_list = GetFitPointListByExtend(_pt_qh_list, ratio); |
| | | _pt_qe_list = GetFitPointListByExtend(_pt_qe_list, ratio); |
| | | _pt_qp_list = GetFitPointListByExtend(_pt_qp_list, ratio); |
| | | _qh_pt_list = GetFitPointListByExtend(_qh_pt_list, ratio); |
| | | _qe_pt_list = GetFitPointListByExtend(_qe_pt_list, ratio); |
| | | _qp_pt_list = GetFitPointListByExtend(_qp_pt_list, ratio); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var pt_qh_list = _pt_qh_list.ToList(); |
| | | var pt_qe_list = _pt_qe_list.ToList(); |
| | | var pt_qp_list = _pt_qp_list.ToList(); |
| | | var qh_pt_list = _qh_pt_list.ToList(); |
| | | var qe_pt_list = _qe_pt_list.ToList(); |
| | | var qp_pt_list = _qp_pt_list.ToList(); |
| | | |
| | | var qhCurve = new Yw.Geometry.CubicSpline2d(pt_qh_list); |
| | | var qeCurve = new Yw.Geometry.CubicSpline2d(pt_qe_list); |
| | | var qPCurve = new Yw.Geometry.CubicSpline2d(pt_qp_list); |
| | | var qhCurve = new Yw.Geometry.CubicSpline2d(qh_pt_list); |
| | | var qeCurve = new Yw.Geometry.CubicSpline2d(qe_pt_list); |
| | | var qPCurve = new Yw.Geometry.CubicSpline2d(qp_pt_list); |
| | | |
| | | this.xtrPerform2dChart1.SetBindingData(qhCurve, qeCurve, qPCurve); |
| | | return true; |
| | |
| | | XtraMessageBox.Show("请输入曲线名称!"); |
| | | return false; |
| | | } |
| | | qh = new Pump.CurveQH(Yw.Pump.eFeatType.Cubic, _pt_qh_list); |
| | | qe = new Pump.CurveQE(Yw.Pump.eFeatType.Cubic, _pt_qe_list); |
| | | qp = new Pump.CurveQP(Yw.Pump.eFeatType.Cubic, _pt_qp_list); |
| | | qh = new Pump.CurveQH(Yw.Pump.eFeatType.Cubic, _qh_pt_list); |
| | | qe = new Pump.CurveQE(Yw.Pump.eFeatType.Cubic, _qe_pt_list); |
| | | qp = new Pump.CurveQP(Yw.Pump.eFeatType.Cubic, _qp_pt_list); |
| | | |
| | | return true; |
| | | } |