using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace Yw.EPAnet.Calcu
|
{
|
[Serializable]
|
public class NozzleModel : NodeCalcModel
|
{
|
/// <summary>
|
/// 流量系数K
|
/// </summary>
|
public float FlowCoefficient { get; set; }
|
|
/// <summary>
|
/// 需水量
|
/// </summary>
|
public float Demand { get; set; }
|
/// <summary>
|
/// 用水模式编号
|
/// </summary>
|
public string PatternID { get; set; }
|
|
public string Node1 { get; set; }
|
public string Node2 { get; set; }
|
|
public override string ToString()
|
{
|
if (string.IsNullOrEmpty(PatternID)) PatternID = "";
|
return $"{ID}\t{Elev}\t{Demand}\t{PatternID}\t;\t";
|
}
|
|
public string ToEmitterString()
|
{
|
if (FlowCoefficient > 0)
|
return $"{ID}\t{FlowCoefficient * Math.Pow(10 / 101.972, 0.5) / 1000 * 60}\r\n";
|
return null;
|
}
|
|
public JunctionModel ToJunction()
|
{
|
return new JunctionModel()
|
{
|
Y = base.Y,
|
Elev = base.Elev,
|
ID = base.ID,
|
Name = base.Name,
|
Status = base.Status,
|
X = base.X,
|
};
|
}
|
}
|
}
|