using IStation.Epanet.Enums;
|
|
namespace IStation.Epanet.Network.Structures
|
{
|
|
///<summary>Hydraulic node structure (junction)</summary>
|
|
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;
|
|
///<summary>Node position.</summary>
|
public EnPoint Coordinate { get; set; }
|
|
///<summary>Node elevation(foot).</summary>
|
public double Elevation { get; set; }
|
|
///<summary>Node demand list.</summary>
|
public List<Demand> Demands { get; } = new List<Demand>(1);
|
|
///<summary>Water quality source.</summary>
|
public QualSource QualSource { get; set; }
|
|
///<summary>Initial species concentrations.</summary>
|
public double C0 { get; set; }
|
|
///<summary>Emitter coefficient.</summary>
|
public double Ke { get; set; }
|
|
///<summary>Node reporting flag.</summary>
|
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
|
|
}
|
|
}
|