Shuxia Ning
2024-11-03 342fa8be89ce72d4a1f87fc857def22b41722dfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
namespace Yw.WinFrmUI.Phart
{
    public class PumpVariableSpeedInfoViewModel: PumpVariableSpeedViewModel
    {  
        public PumpVariableSpeedInfoViewModel() { }
        public PumpVariableSpeedInfoViewModel(PumpVariableSpeedViewModel rhs):base(rhs) 
        {
            this.Calc();
        }
 
        public PumpVariableSpeedInfoViewModel(PumpVariableSpeedInfoViewModel rhs) : base(rhs)
        {
            this.Color = rhs.Color;
            this.QueryQ = rhs.QueryQ;
            this.QueryH = rhs.QueryH;
            this.QueryP = rhs.QueryP;
            this.QueryE = rhs.QueryE;
            this.ExtendRatio = rhs.ExtendRatio;
            this.SectPoint = rhs.SectPoint;
            this.Calc();
        }
 
        public Color Color { get; set; }
        public string QueryQ { get; set; }
        public string QueryH { get; set; }
        public string QueryE { get; set; }
        public string QueryP { get; set; }
        public double ExtendRatio { get; set; } = 100; 
 
 
        public Yw.Geometry.CubicSpline2d QhCalc { get; set; }
        public Yw.Geometry.CubicSpline2d QeCalc { get; set; }
        public Yw.Geometry.CubicSpline2d QpCalc { get; set; } 
        public Yw.Geometry.Point2d SectPoint { get; set; }
 
        public bool IsDefault { get; set; }
        public void Calc()
        {
            this.CurrentSpeed = Math.Round(this.CurrentHz / 50 * this.RatedSpeed);
 
            this.QhCalc = Yw.WinFrmUI.Phart.PumpCalcHelper.CalculateSimilarQH(this.Qh, this.RatedSpeed, this.CurrentSpeed);
            this.QeCalc = Yw.WinFrmUI.Phart.PumpCalcHelper.CalculateSimilarQE(this.Qe, this.RatedSpeed, this.CurrentSpeed);
            this.QpCalc = Yw.WinFrmUI.Phart.PumpCalcHelper.CalculateSimilarQP(this.Qp, this.RatedSpeed, this.CurrentSpeed);
 
            if (this.QhCalc != null)
                this.QhCalc.MaxX = this.QhCalc.MaxX * this.ExtendRatio / 100;
 
            if (this.QeCalc != null)
                this.QeCalc.MaxX = this.QeCalc.MaxX * this.ExtendRatio / 100;
 
            if (this.QpCalc != null)
                this.QpCalc.MaxX = this.QpCalc.MaxX * this.ExtendRatio / 100;
 
        }
 
 
    }
 
 
}