/// <summary> /// Initializes a new instance of the <see cref="HeatExchanger"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="w">The w.</param> /// <param name="h">The h.</param> /// <param name="admittance">The admittance.</param> /// <param name="nodeIn">The node in.</param> /// <param name="nodeOut">The node out.</param> /// <param name="next">The next.</param> public HeatExchanger(string name = "", float x = 0, float y = 0, float w = 10, float h = 20, double admittance = 10, Node nodeIn = null, Node nodeOut = null, VVS next = null) { Name = name; X = x; Y = y; W = w; H = h; Admittance = admittance; NodeIn = nodeIn; NodeOut = nodeOut; Next = next; }
/// <summary> /// Initializes a new instance of the <see cref="Kylsim"/> class. /// </summary> public Kylsim() { const int ROW1 = 100; const int ROW2 = 200; const int ROW3 = 300; const int ROW4 = 400; const int ROW5 = 500; const int COL1 = 50; const int COL2 = 150; const int COL3 = 250; const int COL4 = 350; const int COL5 = 450; const int COL6 = 550; const int COL7 = 650; const int COL8 = 680; // Create Nodes Node node1 = new Node("N1", COL1, ROW5, 10, 10, 2, false, 0, null); Node node2 = new Node("N2", COL4, ROW5, 10, 10, 1, true, 0, node1); Node node3 = new Node("N3", COL7, ROW5, 10, 10, 1, true, 0, node2); Node node4 = new Node("N4", COL7, ROW3, 10, 10, 1, true, 0, node3); Node node5 = new Node("N5", COL5, ROW2, 10, 10, 1, true, 0, node4); Node node6 = new Node("N6", COL3, ROW2, 10, 10, 1, true, 0, node5); Node node7 = new Node("N7", COL1, ROW2, 10, 10, 2, false, 0, node6); Node node8 = new Node("N8", COL8, ROW1, 10, 10, 1, false, 0, node7); RootNodes = node8; // Create valves Valve valve1 = new Valve("V1", COL2, ROW5, 15, 10, 1, 10, true, node1, node2, null); Valve valve2 = new Valve("V2", COL6, ROW2, 15, 10, 1, 10, true, node4, node5, valve1); Valve valve3 = new Valve("V3", COL2, ROW2, 15, 10, 1, 10, true, node6, node7, valve2); Valve valve4 = new Valve("V4", COL5, ROW3, 15, 10, 0, 10, false, node4, node6, valve3); Valve valve5 = new Valve("V5", COL6, ROW1, 15, 10, 0, 10, false, node5, node8, valve4); // Create filters const int PUSH_UP = 10; Filter filter1 = new Filter("F1", COL4, ROW2 - PUSH_UP, 30, 20, 1, 0.0001, 10, node5, node6, valve5, valve5); // Create HeatExchangers const int PUSH_SIDE = 5; HeatExchanger heatExchanger1 = new HeatExchanger("HX1", COL7 + PUSH_SIDE, ROW4, 10, 20, 10, node3, node4, filter1); // Create Pump Pump pump1 = new Pump("P1", COL5 + 40, ROW5, 20, 0, 1, node2, node3, heatExchanger1); // Change to last component in the chain RootComponents = pump1; }
/// <summary> /// Initializes a new instance of the <see cref="Valve"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="w">The w.</param> /// <param name="h">The h.</param> /// <param name="next">The next.</param> /// <param name="nodeIn">The node in.</param> /// <param name="nodeOut">The node out.</param> /// <param name="position">The position.</param> /// <param name="admittance">The admittance.</param> public Valve(string name = "", float x = 0, float y = 0, float w = 15, float h = 10, double position = 0, double admittance = 10, bool open = true, Node nodeIn = null, Node nodeOut = null, VVS next = null) { Name = name; X = x; Y = y; W = w; H = h; NodeIn = nodeIn; NodeOut = nodeOut; Position = position; Admittance = admittance; Next = next; Open = open; gt = 0.5; }
/// <summary> /// Initializes a new instance of the <see cref="Node"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="w">The w.</param> /// <param name="h">The h.</param> /// <param name="next">The next.</param> /// <param name="nodeIn">The node in.</param> /// <param name="nodeOut">The node out.</param> /// <param name="pressure">The pressure.</param> /// <param name="adjustable">if set to <c>true</c> [adjustable].</param> /// <param name="sumFlow">The sum flow.</param> public Node(string name = "", float x = 0, float y = 0, float w = 0, float h = 0, double pressure = 0, bool adjustable = false, double sumFlow = 0, VVS next = null) { Name = name; X = x; Y = y; W = w; H = h; Pressure = pressure; Adjustable = adjustable; SumFlow = sumFlow; Next = next; PropConst = 0.05; InError = 0.001; }
/// <summary> /// Initializes a new instance of the <see cref="Pump"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="w">The w.</param> /// <param name="h">The h.</param> /// <param name="next">The next.</param> /// <param name="nodeIn">The node in.</param> /// <param name="nodeOut">The node out.</param> /// <param name="position">The position.</param> /// <param name="admittance">The admittance.</param> public Pump(string name = "", float x = 0, float y = 0, float r = 40, double speed = 0, double k = 1, Node nodeIn = null, Node nodeOut = null, VVS next = null) { Name = name; X = x; Y = y; R = r; W = R * 2; H = R * 2; NodeIn = nodeIn; NodeOut = nodeOut; Speed = speed; K = k; Next = next; Open = false; gt = 0.5; }
/// <summary> /// Initializes a new instance of the <see cref="Filter"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="w">The w.</param> /// <param name="h">The h.</param> /// <param name="position">The position.</param> /// <param name="admittance">The admittance.</param> /// <param name="nodeIn">The node in.</param> /// <param name="nodeOut">The node out.</param> /// <param name="next">The next.</param> public Filter(string name = "", float x = 0, float y = 0, float w = 30, float h = 20, double opening = 0, double g = 0, double admittance = 10, Node nodeIn = null, Node nodeOut = null, VVS next = null, Valve valves = null) { Name = name; X = x; Y = y; W = w; H = h; Opening = opening; G = g; NodeIn = nodeIn; NodeOut = nodeOut; Next = next; Admittance = admittance; Valves = valves; OpeningLimitWarning = 0.5; OpeningLimitCleaning = 0.2; OpeningLimit = 1; }
public FormSetGt(VVS obj) { vvsComp = obj; InitializeComponent(); setUpDownValue(obj.gt); }