Пример #1
0
 public Evaporator(FluidList fluidType)
 {
     //Setting the inlet and outlet to the selected fluid type
     Inlet  = new Fluid(fluidType);
     Outlet = new Fluid(fluidType);
 }
Пример #2
0
 public Condenser(FluidList fluidType)
 {
     //Setting the inlet and outlet to the selected fluid type
     Inlet  = new Fluid(fluidType);
     Outlet = new Fluid(fluidType);
 }
Пример #3
0
 /// <summary>
 /// Create an new <see cref="Fluid"/> with a fluid type!
 /// <br>Exemple:</br>
 /// <br><c><see cref="Fluid"/> Water = <see langword="new"/> <see cref="Fluid"/>(<see cref="FluidList"/>.Water);</c></br>
 /// </summary>
 public Fluid(FluidList Type) : this(FluidListToMediaType(Type))
 {
     //This is just converting from One media type to another
 }
Пример #4
0
        public Plot_LogPH(LiveCharts.WinForms.CartesianChart myChart, FluidList refType)
        {
            //Settings
            MyChart = myChart;
            RefType = refType;
            Fluid Dome = new Fluid(RefType);


            //Finding the zoom on the X-axis
            Dome.UpdatePX(Dome.LimitPressureMin, 0);
            SpecificEnergy GraphHMin = Dome.Enthalpy * 0.5;

            Dome.UpdatePX(Dome.LimitPressureMin, 1);
            SpecificEnergy GraphHMax = Dome.Enthalpy * 1.4;

            //Rounds to nearest 50
            GraphHMin = SpecificEnergy.FromJoulesPerKilogram(Math.Round(GraphHMin.JoulesPerKilogram / 50) * 50);


            //Creating Y Axis
            MyChart.AxisY.Add(new LogarithmicAxis
            {
                LabelFormatter = value => (Math.Pow(10, value)).ToString("N0"),
                Base           = 10,  //Note that Max and min values are based on the 'Base = 10'!
                MaxValue       = 2.5, //2.5,
                MinValue       = 0,   //1
                Title          = "Pressure - [" + string.Format(new CultureInfo("en-US"), "{0:a}", Dome.Pressure.ToUnit(PressureUnit.Bar)) + "]",



                Separator = new Separator
                {
                    Stroke          = Brushes.LightGray,
                    Step            = Math.Log10(10) / 2,
                    StrokeThickness = 1,
                },
            });



            //Creating X Axis
            MyChart.AxisX.Add(new Axis
            {
                LabelFormatter = value => value.ToString("N0"),
                MaxValue       = GraphHMax.As(SpecificEnergyUnit.KilojoulePerKilogram),
                MinValue       = GraphHMin.As(SpecificEnergyUnit.KilojoulePerKilogram),
                Title          = "Enthalpy - [" + string.Format(new CultureInfo("en-US"), "{0:a}", GraphHMax.ToUnit(SpecificEnergyUnit.KilojoulePerKilogram)) + "]",
                Separator      = new Separator
                {
                    Stroke          = Brushes.LightGray,
                    Step            = 100,
                    StrokeThickness = 0.3,
                },
            });

            //Settings
            MyChart.DataTooltip       = null;
            MyChart.DisableAnimations = true;
            MyChart.Background        = new SolidColorBrush(Color.FromRgb(250, 250, 250));
            MyChart.Hoverable         = false;
        }