namespace HydroUI { [Serializable] public class NozzleModel : NodeCalcModel { /// 流量系数K public float FlowCoefficient { get; set; } /// 需水量 public float Demand { get; set; } /// 用水模式编号 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, }; } } }