using IStation.Epanet.Enums; namespace IStation.Epanet.Network.Structures { ///Hydraulic node structure (junction) public abstract class Node : Element { protected Node(string name) : base(name) { Coordinate = EnPoint.Invalid; } #region Overrides of Element public override ElementType ElementType => ElementType.NODE; #endregion public abstract void ConvertUnits(Network nw); public Demand PrimaryDemand { get; } = new Demand(0, null); public virtual NodeType NodeType => NodeType.Junction; ///Node position. public EnPoint Coordinate { get; set; } ///Node elevation(foot). public double Elevation { get; set; } ///Node demand list. public List Demands { get; } = new List(1); ///Water quality source. public QualSource QualSource { get; set; } ///Initial species concentrations. public double C0 { get; set; } ///Emitter coefficient. public double Ke { get; set; } ///Node reporting flag. public bool RptFlag { get; set; } #if NUCONVERT public double GetNuElevation(UnitsType units) { return NUConvert.RevertDistance(units, Elevation); } public void SetNuElevation(UnitsType units, double elev) { Elevation = NUConvert.ConvertDistance(units, elev); } #endif } }