using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IStation.Calculation.DispatchAna.Model
{
///
/// 机泵基本信息
///
public class MachineDetail
{
///
///
///
public long PumpID { get; set; }
///
///
///
public long MachineID { get; set; }
///
///
///
public string MachineName { get; set; }
///
/// 泵型号
///
public string PumpCode { get; set; }
///
///
///
public bool IsFrequency { get; set; }
///
///
///
public double RatedQ { get; set; }
///
///
///
public double RatedH { get; set; }
///
///
///
public double RatedN { get; set; }
///
/// 出口口径
///
public double? OutletCaliber { get; set; }
///
/// 进口口径
///
public double? InletCaliber { get; set; }
///
/// 最大扬程曲线
///
public IStation.Model.CurveExpress MaxCurveInfoQH;
///
/// 最大功率曲线
///
public IStation.Model.CurveExpress MaxCurveInfoQP;
///
///
///
///
///
public MachineDetail(IStation.Model.Product engine,
IStation.Model.Product pump)
{
this.MachineID = engine.ID;
this.PumpID = pump.ID;
this.MachineName = engine.Name;
this.PumpCode = pump.Code;
if (string.IsNullOrEmpty(this.PumpCode))
this.PumpCode = pump.ID + "|" + engine.ID;//保证为空时 不会影响同型号判断
this.IsFrequency = pump.RatedParas.IsFrequency;
this.RatedN = pump.RatedParas.N;
this.RatedQ = pump.RatedParas.Q;
this.RatedH = pump.RatedParas.H;
this.InletCaliber = pump.RatedParas.InletCaliber;
this.OutletCaliber = pump.RatedParas.OutletCaliber;
}
///
///
///
///
///
///
public MachineDetail(IStation.Model.Product engine,
IStation.Model.Product pump, IStation.Model.PumpCurve pump_curve) :
this(engine, pump)
{
this.MachineID = engine.ID;
this.PumpID = pump.ID;
this.MachineName = engine.Name;
this.PumpCode = pump.Code;
if (string.IsNullOrEmpty(this.PumpCode))
this.PumpCode = pump.ID + "|" + engine.ID;//保证为空时 不会影响同型号判断
this.IsFrequency = pump.RatedParas.IsFrequency;
this.RatedN = pump.RatedParas.N;
this.RatedQ = pump.RatedParas.Q;
this.RatedH = pump.RatedParas.H;
if (pump_curve != null && pump_curve.CurveInfo != null)
{
this.MaxCurveInfoQH = pump_curve.CurveInfo.CurveQH;
this.MaxCurveInfoQP = pump_curve.CurveInfo.CurveQP;
}
this.InletCaliber = pump.RatedParas.InletCaliber;
this.OutletCaliber = pump.RatedParas.OutletCaliber;
}
///
///
///
///
///
public double CalcSpeedByFrequence(double Frq)
{
if (!IsFrequency)
return RatedN;
return Math.Round(RatedN * Frq / 50.0, 1);
}
}
}