-
Notifications
You must be signed in to change notification settings - Fork 1
/
Form1.cs
93 lines (57 loc) · 1.94 KB
/
Form1.cs
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using EngineeringUnits;
using EngineeringUnits.Units;
using SharpFluids;
namespace EESharp
{
public partial class Form1 : Form
{
public Form1()
{
//Starting up frontpage
InitializeComponent();
//Starting LOGPH diagram
Plot_LogPH LOGPH = new Plot_LogPH(MyChart, FluidList.Ammonia);
//Setting up class's
Compressor Comp = new Compressor(FluidList.Ammonia);
Condenser Cond = new Condenser(FluidList.Ammonia);
ExpValve Valve = new ExpValve(FluidList.Ammonia);
Evaporator Evap = new Evaporator(FluidList.Ammonia);
//Connecting the units
Cond.Inlet = Comp.Outlet;
Valve.Inlet = Cond.Outlet;
Evap.Inlet = Valve.Outlet;
Comp.Inlet = Evap.Outlet;
//Settings for the compressor
Comp.DischargePressure = Pressure.FromBars(60);
Comp.EtaI = 0.80;
Comp.EtaV = 0.80;
//Settings for the Valve
Valve.EvapPressure = Pressure.FromBars(10);
//Settings for the Valve
Evap.SuperHeat = Temperature.FromKelvins(10);
for (int i = 0; i < 10; i++)
{
Comp.DoCalculation();
Cond.DoCalculation();
Valve.DoCalculation();
Evap.DoCalculation();
}
//Drawing the dome
LOGPH.PlotLogPH();
LOGPH.Plot(Comp.Inlet, Comp.Outlet);
LOGPH.Plot(Cond.Inlet, Cond.Outlet);
LOGPH.Plot(Valve.Inlet, Valve.Outlet);
LOGPH.Plot(Evap.Inlet, Evap.Outlet);
}
}
}