using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DPumpHydr.OpenFwUI.Volute { public class HdrBaseInfo { public HdrBaseInfo() { } public bool IsSame(HdrBaseInfo para) { if (para == null) return false; if (this.ShapeType != para.ShapeType) return false; if (this.Q != para.Q) return false; if (this.H != para.H) return false; if (this.n != para.n) return false; if (this.D2 != para.D2) return false; if (this.B2 != para.B2) return false; if (this.IsSXB != para.IsSXB) return false; return true; } public void ModelToThis(DPumpHydr.OpenModel.HdrBaseInfo hdrBaseInfo) { this.ShapeType = hdrBaseInfo.ShapeType; this.Q = hdrBaseInfo.Q; this.H = hdrBaseInfo.H; this.n = hdrBaseInfo.n; this.D2 = hdrBaseInfo.D2; this.B2 = hdrBaseInfo.B2; this.IsSXB = hdrBaseInfo.IsSXB; this.ns = hdrBaseInfo.ns; } public DPumpHydr.OpenModel.HdrBaseInfo ThisToModel() { DPumpHydr.OpenModel.HdrBaseInfo hdrBaseInfo = new OpenModel.HdrBaseInfo(); hdrBaseInfo.ShapeType = this.ShapeType; hdrBaseInfo.Q = this.Q; hdrBaseInfo.H = this.H; hdrBaseInfo.n = this.n; hdrBaseInfo.D2 = this.D2; hdrBaseInfo.B2 = this.B2; hdrBaseInfo.IsSXB = this.IsSXB; hdrBaseInfo.ns = this.ns; return hdrBaseInfo; } /// /// 形状类型 0 旋转型 1 双蜗壳型 2 环型 3准旋转型 /// public int ShapeType { get; set; } /// /// 流量 /// public double Q { get; set; } /// /// 扬程 /// public double H { get; set; } /// /// 转速 /// public double n { get; set; } /// /// 叶轮外径 /// public double D2 { get; set; } /// /// 叶轮宽度 /// public double B2 { get; set; } /// /// 是否是双吸泵 /// public bool IsSXB { get; set; } /// /// 比转速 /// public double ns { get; set; } /// /// 计算比转速 /// public void CalcNs() { var calc_q = this.Q ; if(IsSXB) calc_q = this.Q / 2; ns = Math.Round( 3.65 * n * Math.Sqrt(calc_q / 3600) / Math.Pow(this.H, 0.75),2); } } }