using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Hydro.Core.Model { public class NozzleModel : NodeModel { /// /// 流量系数K /// public float FlowCoefficient { 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, PatternID = base.PatternID, Demand = base.Demand, Elev = base.Elev, ID = base.ID, Level = base.Level, Name = base.Name, Status = base.Status, X = base.X, }; } } }