using System.ComponentModel.DataAnnotations;
|
|
namespace Yw.WinFrmUI.Phart
|
{
|
public class PumpSerialParallelInfoViewModel: PumpSerialParallelViewModel
|
{
|
|
public PumpSerialParallelInfoViewModel() { }
|
public PumpSerialParallelInfoViewModel(PumpSerialParallelViewModel rhs):base(rhs)
|
{
|
this.Calc();
|
}
|
|
public PumpSerialParallelInfoViewModel(PumpSerialParallelInfoViewModel rhs) : base(rhs)
|
{
|
this.Code=rhs.Code;
|
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.IsDefault = rhs.IsDefault;
|
this.RunStatus = rhs.RunStatus;
|
this.CalcuQ = rhs.CalcuQ;
|
this.CalcuH = rhs.CalcuH;
|
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 bool IsDefault { get; set; }
|
public bool RunStatus { get; set; }
|
|
public double? CalcuQ { get; set; }
|
public double? CalcuH { get; set; }
|
public double? ExtendFlow { 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;
|
|
|
this.ExtendFlow = this.Qh.MaxX;
|
}
|
|
|
}
|
|
|
}
|