Shuxia Ning
2024-09-10 049f546f25cabfb5b08e29c54f49d61a544b0395
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
using System.ComponentModel.DataAnnotations;
 
namespace Verify
{
    public class PumpScadaViewModel
    {  
        [Display(Name = "泵")]
        public int Flag { get; set; }
 
        [Display(Name = "运行状态")]
        public double? RunStatus { get; set; }
 
        [Display(Name = "水位")]
        public double? WL { get; set; } 
 
        [Display(Name = "压差")]
        public double? PressureDiff { get; set; }
 
        [Display(Name = "泵扬程")]
        public double? PumpHead { get; set; }
 
        [Display(Name = "出口扬程")]
        public double? Head { get; set; }
 
        [Display(Name = "流量")]
        public double? Flow { get; set; }
 
        [Display(Name = "功率")]
        public double? Power { get; set; }
 
        [Display(Name = "转速")]
        public double? Speed { get; set; }
 
        [Display(Name = "检修状态")]
        public double? MaintenanceState { get; set; }
 
 
        [Display(Name = "曲线流量")]
        public double? CurveFlow { get; set; }
         
        [Display(Name = "流量偏差")]
        public double? CurveFlowDiff { get; set; }
         
 
        [Display(Name = "曲线扬程")]
        public double? CurveHead { get; set; }
 
        [Display(Name = "扬程偏差")]
        public double? CurveHeadDiff { get; set; }
 
        public void Round()
        {  
            if (this.RunStatus != 1)
            {
                this.RunStatus = null;
                this.WL = null;
                this.PumpHead = null;
                this.Head = null; 
                this.Flow = null;
                this.Power = null;
                this.Speed = null;
                this.MaintenanceState = null; 
            }
            else
            {
                this.Flow= Math.Round(this.Flow ?? 0, 2); 
                this.Head = Math.Round(this.Head ?? 0, 3);
                if (this.Flag==15||this.Flag==16)
                {
                    this.Speed = 590;
                }
            }  
 
        }
 
 
        public void Set(IStation.Model.Pump pump)
        {
            if (this.Head==null)
            {
                return;
            }
            var h = this.Head - this.WL;
            var other_head = IStation.Curve.PumpCalculateHelper.CalculateOtherPress(this.Flow, pump.Ic, pump.Oc, null, null);//测量扬程=压差 + 表位差 + 流速
            this.PumpHead = h + other_head; 
            this.PumpHead = Math.Round(this.PumpHead ?? 0, 3);
            this.PressureDiff = Math.Round(h ?? 0, 1);
             
        }
    }
 
 
 
}