ningshuxia
2024-06-18 e83dca6e861b622b54d3392ca0d3f1f1eb69f7c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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
 
    }
 
}