Пример #1
0
        //Steam Table
        //calculated value unit is J/kg.K, t unit is K
        public static double CalculateWaterMeanHeatCapacity(double p, double t1, double t2)
        {
            SteamTable steamTable = SteamTable.GetInstance();
            double     h1         = steamTable.GetEnthalpyFromPressureAndTemperature(p, t1);
            double     h2         = steamTable.GetEnthalpyFromPressureAndTemperature(p, t2);
            double     cp         = (h2 - h1) / (t2 - t1);

            return(cp);
        }
Пример #2
0
        //Steam Table
        //calculated value unit is J/kg.K, t unit is K
        public static double CalculateWaterEnthalpy(double p, double t)
        {
            SteamTable steamTable = SteamTable.GetInstance();
            double     h          = steamTable.GetEnthalpyFromPressureAndTemperature(p, t);

            return(h);
        }
Пример #3
0
        //Steam Table
        //calculated value unit is J/kg.K, t unit is K
        public double CalculateEnthalpy(double p, double t, Substance s)
        {
            double h = 0;

            if (s.Name.Equals("water"))
            {
                SteamTable steamTable = SteamTable.GetInstance();
                h = steamTable.GetEnthalpyFromPressureAndTemperature(p, t);
            }
            return(h);
        }