namespace HStation.WinFrmUI.Xhs
|
{
|
public class SinglePumpAnalyViewModel
|
{
|
public SinglePumpAnalyViewModel() { }
|
public SinglePumpAnalyViewModel(SinglePumpAnalyViewModel rhs)
|
{
|
this.Id = rhs.Id;
|
this.Name = rhs.Name;
|
this.IsBp = rhs.IsBp;
|
this.RatedSpeed = rhs.RatedSpeed;
|
this.CurrentSpeed = rhs.CurrentSpeed;
|
this.CurrentHz = rhs.CurrentHz;
|
this.IsDefault = rhs.IsDefault;
|
this.Color = rhs.Color;
|
this.ExtendRatio = rhs.ExtendRatio;
|
this.Qh = new Yw.Geometry.CubicSpline2d(rhs.Qh);
|
this.Qe = new Yw.Geometry.CubicSpline2d(rhs.Qe);
|
this.Qp = new Yw.Geometry.CubicSpline2d(rhs.Qp);
|
this.QhCalc = new Yw.Geometry.CubicSpline2d(rhs.QhCalc);
|
this.QeCalc = new Yw.Geometry.CubicSpline2d(rhs.QeCalc);
|
this.QpCalc = new Yw.Geometry.CubicSpline2d(rhs.QpCalc);
|
|
this.SectQ = rhs.QueryQ;
|
this.SectH = rhs.QueryH;
|
this.SectE = rhs.QueryE;
|
this.SectP = rhs.QueryP;
|
|
this.QueryQ = rhs.QueryQ;
|
this.QueryH = rhs.QueryH;
|
this.QueryE = rhs.QueryE;
|
this.QueryP = rhs.QueryP;
|
}
|
|
public SinglePumpAnalyViewModel(Yw.WinFrmUI.Phart.PumpVariableSpeedInfoViewModel rhs, Yw.WinFrmUI.Phart.PumpSectPointViewModel sect)
|
{
|
this.Id = rhs.Id;
|
this.Name = rhs.Name;
|
this.IsBp = rhs.IsBp;
|
this.RatedSpeed = rhs.RatedSpeed;
|
this.CurrentSpeed = rhs.CurrentSpeed;
|
this.CurrentHz = rhs.CurrentHz;
|
this.IsDefault = rhs.IsDefault;
|
this.Color = rhs.Color;
|
this.ExtendRatio = rhs.ExtendRatio;
|
this.Qh = new Yw.Geometry.CubicSpline2d(rhs.Qh);
|
this.Qe = new Yw.Geometry.CubicSpline2d(rhs.Qe);
|
this.Qp = new Yw.Geometry.CubicSpline2d(rhs.Qp);
|
this.QhCalc = new Yw.Geometry.CubicSpline2d(rhs.QhCalc);
|
this.QeCalc = new Yw.Geometry.CubicSpline2d(rhs.QeCalc);
|
this.QpCalc = new Yw.Geometry.CubicSpline2d(rhs.QpCalc);
|
|
this.SectQ = sect.QueryQ;
|
this.SectH = sect.QueryH;
|
this.SectE = sect.QueryE;
|
this.SectP = sect.QueryP;
|
|
this.QueryQ = rhs.QueryQ;
|
this.QueryH = rhs.QueryH;
|
this.QueryE = rhs.QueryE;
|
this.QueryP = rhs.QueryP;
|
}
|
|
public Yw.WinFrmUI.Phart.PumpVariableSpeedInfoViewModel ToInfo()
|
{
|
var info = new Yw.WinFrmUI.Phart.PumpVariableSpeedInfoViewModel();
|
info.Id = this.Id;
|
info.Name = this.Name;
|
info.IsBp = this.IsBp;
|
info.RatedSpeed = this.RatedSpeed;
|
info.CurrentSpeed = this.CurrentSpeed;
|
info.CurrentHz = this.CurrentHz;
|
info.IsDefault = this.IsDefault;
|
info.Color = this.Color;
|
info.ExtendRatio = this.ExtendRatio;
|
info.Qh = new Yw.Geometry.CubicSpline2d(this.Qh);
|
info.Qe = new Yw.Geometry.CubicSpline2d(this.Qe);
|
info.Qp = new Yw.Geometry.CubicSpline2d(this.Qp);
|
info.QhCalc = new Yw.Geometry.CubicSpline2d(this.QhCalc);
|
info.QeCalc = new Yw.Geometry.CubicSpline2d(this.QeCalc);
|
info.QpCalc = new Yw.Geometry.CubicSpline2d(this.QpCalc);
|
|
info.QueryQ = this.QueryQ;
|
info.QueryH = this.QueryH;
|
info.QueryE = this.QueryE;
|
info.QueryP = this.QueryP;
|
|
return info;
|
}
|
|
/// <summary>
|
/// 标识
|
/// </summary>
|
[Display(Name = "标识")]
|
public string Id { get; set; }
|
|
/// <summary>
|
/// 名称
|
/// </summary>
|
[Display(Name = "名称")]
|
public string Name { get; set; }
|
|
/// <summary>
|
/// 是否变频
|
/// </summary>
|
[Display(Name = "是否变频")]
|
public bool IsBp { get; set; }
|
|
/// <summary>
|
/// 额定转速
|
/// </summary>
|
[Display(Name = "额定转速")]
|
public double RatedSpeed { get; set; }
|
|
/// <summary>
|
/// 当前转速
|
/// </summary>
|
[Display(Name = "转速")]
|
public double CurrentSpeed { get; set; }
|
|
/// <summary>
|
/// 当前频率
|
/// </summary>
|
[Display(Name = "频率")]
|
public double CurrentHz { get; set; }
|
|
/// <summary>
|
/// 是否默认
|
/// </summary>
|
[Display(Name = "是否默认")]
|
public bool IsDefault { get; set; }
|
|
/// <summary>
|
/// 颜色
|
/// </summary>
|
[Display(Name = "颜色")]
|
public Color Color { get; set; }
|
|
/// <summary>
|
/// 延长(%)
|
/// </summary>
|
[Display(Name = "延长(%)")]
|
public double ExtendRatio { get; set; } = 100;
|
|
/// <summary>
|
/// 流量扬程线
|
/// </summary>
|
[Display(Name = "")]
|
public Yw.Geometry.CubicSpline2d Qh { get; set; }
|
|
/// <summary>
|
/// 流量效率线
|
/// </summary>
|
[Display(Name = "")]
|
public Yw.Geometry.CubicSpline2d Qe { get; set; }
|
|
/// <summary>
|
/// 流量功率线
|
/// </summary>
|
[Display(Name = "")]
|
public Yw.Geometry.CubicSpline2d Qp { get; set; }
|
|
/// <summary>
|
/// 流量扬程线
|
/// </summary>
|
[Display(Name = "")]
|
public Yw.Geometry.CubicSpline2d QhCalc { get; set; }
|
|
/// <summary>
|
/// 流量效率线
|
/// </summary>
|
[Display(Name = "")]
|
public Yw.Geometry.CubicSpline2d QeCalc { get; set; }
|
|
/// <summary>
|
/// 流量功率线
|
/// </summary>
|
[Display(Name = "")]
|
public Yw.Geometry.CubicSpline2d QpCalc { get; set; }
|
|
|
/// <summary>
|
/// 流量(m³/h)
|
/// </summary>
|
[Display(Name = "流量(m³/h)")]
|
public string SectQ { get; set; }
|
|
/// <summary>
|
/// 扬程(m)
|
/// </summary>
|
[Display(Name = "扬程(m)")]
|
public string SectH { get; set; }
|
|
/// <summary>
|
/// 效率(%)
|
/// </summary>
|
[Display(Name = "效率(%)")]
|
public string SectE { get; set; }
|
|
/// <summary>
|
/// 功率(kW)
|
/// </summary>
|
[Display(Name = "功率(kW)")]
|
public string SectP { get; set; }
|
|
|
/// <summary>
|
/// 流量(m³/h)
|
/// </summary>
|
[Display(Name = "流量(m³/h)")]
|
public string QueryQ { get; set; }
|
|
/// <summary>
|
/// 扬程(m)
|
/// </summary>
|
[Display(Name = "扬程(m)")]
|
public string QueryH { get; set; }
|
|
/// <summary>
|
/// 效率(%)
|
/// </summary>
|
[Display(Name = "效率(%)")]
|
public string QueryE { get; set; }
|
|
/// <summary>
|
/// 功率(kW)
|
/// </summary>
|
[Display(Name = "功率(kW)")]
|
public string QueryP { get; set; }
|
|
|
/// <summary>
|
/// 计算
|
/// </summary>
|
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;
|
|
}
|
|
|
}
|
}
|