Beispiel #1
0
        public double GetWetBulbFromDryBulbHumidityAndPressure(double dryBulbTemperature, double humidity, double totalPressure)
        {
            dryBulbTemperature = moistureProperties.GetModifiedTemperature(dryBulbTemperature);
            //Note: the convergence speed of the iteration procedure used in this method is very good.
            //It has a better convergence speed than Newton method.

            double dampingFactor = 0.5;

            if (dryBulbTemperature <= 273.15 && dryBulbTemperature > 263.15)
            {
                dampingFactor = 0.75;
            }
            else if (dryBulbTemperature <= 263.15 && dryBulbTemperature > 258.15)
            {
                dampingFactor = 0.85;
            }
            else if (dryBulbTemperature <= 258.15)
            {
                dampingFactor = 0.95;
            }

            int    counter = 0;
            double tempDiff;
            double saturationHumidityAtWetBulb;
            double evapHeat;
            double pSaturationAtWetBulb;
            double wetBulbTemperatureOld;
            double cpGas              = GetSpecificHeatOfDryGas();
            double cpMoisture         = moistureProperties.GetSpecificHeatOfVapor();
            double psychrometricRatio = 1.0;
            //intial estimate of the wet bulb temperature is 5 degrees lower than dry bulb temperature
            double wetBulbTemperature = dryBulbTemperature - 5;

            do
            {
                counter++;
                psychrometricRatio          = CalculatePsychrometricRatio(dryBulbTemperature, wetBulbTemperature, humidity, totalPressure);
                evapHeat                    = moistureProperties.GetEvaporationHeat(wetBulbTemperature);
                evapHeat                   *= psychrometricRatio;
                saturationHumidityAtWetBulb = (cpGas + cpMoisture * humidity) / (evapHeat) * (dryBulbTemperature - wetBulbTemperature) + humidity;
                pSaturationAtWetBulb        = totalPressure * saturationHumidityAtWetBulb / (moistureGasMolarMassRatio + saturationHumidityAtWetBulb);
                wetBulbTemperatureOld       = wetBulbTemperature;
                wetBulbTemperature          = moistureProperties.GetSaturationTemperature(pSaturationAtWetBulb);
                tempDiff                    = wetBulbTemperature - wetBulbTemperatureOld;
                wetBulbTemperature          = wetBulbTemperature - dampingFactor * tempDiff;
                //cpGas = gasProperties.GetSpecificHeatOfDryGas((dryBulbTemperature + wetBulbTemperature) / 2.0);
                //cpMoisture = moistureProperties.GetSpecificHeatOfVapor((dryBulbTemperature + wetBulbTemperature) / 2.0);
                cpGas      = gasProperties.GetMeanSpecificHeatOfDryGas(dryBulbTemperature, wetBulbTemperature);
                cpMoisture = moistureProperties.GetMeanSpecificHeatOfVapor(dryBulbTemperature, wetBulbTemperature);
            } while(counter < 500 && Math.Abs(tempDiff / wetBulbTemperature) > 1.0e-6);

            if (counter == 500)
            {
                throw new CalculationFailedException("Calculation of wet-bulb temperature from dry-bulb temperature and humidity failed.");
            }

            return(wetBulbTemperature);
        }
Beispiel #2
0
        //this is a generic constructor for all possible drying gases

        /*public HumidGasCalculator(double moistureMolarMass, double gasMolarMass, double specificHeatOfMoisture, double specificHeatOfDryGas) {
         * this.moistureMolarMass = moistureMolarMass;
         * this.gasMolarMass = gasMolarMass;
         * this.specificHeatOfMoisture = moistureProperties.GetSpecificHeatOfVapor();
         * this.specificHeatOfDryGas = gasProperties.GetSpecificHeatOfDryGas();
         * moistureGasMolarMassRatio = moistureMolarMass/gasMolarMass;
         * }*/

        public double GetHumidityFromDryBulbWetBulbAndPressure(double dryBulbTemperature, double wetBulbTemperature, double totalPressure)
        {
            double pSaturation        = moistureProperties.GetSaturationPressure(wetBulbTemperature);
            double saturationHumidity = moistureGasMolarMassRatio * pSaturation / (totalPressure - pSaturation);
            double evapHeat           = moistureProperties.GetEvaporationHeat(wetBulbTemperature);
            double cpGas      = gasProperties.GetSpecificHeatOfDryGas((dryBulbTemperature + wetBulbTemperature) / 2.0);
            double cpMoisture = moistureProperties.GetSpecificHeatOfVapor((dryBulbTemperature + wetBulbTemperature) / 2.0);
            double humidity   = (evapHeat * saturationHumidity - cpGas * (dryBulbTemperature - wetBulbTemperature)) /
                                (evapHeat + cpMoisture * (dryBulbTemperature - wetBulbTemperature));

            return(humidity);
        }
Beispiel #3
0
        //this is a generic constructor for all possible drying gases

        /*public HumidGasCalculator(double moistureMolarMass, double gasMolarMass, double specificHeatOfMoisture, double specificHeatOfDryGas) {
         * this.moistureMolarMass = moistureMolarMass;
         * this.gasMolarMass = gasMolarMass;
         * this.specificHeatOfMoisture = moistureProperties.GetSpecificHeatOfVapor();
         * this.specificHeatOfDryGas = gasProperties.GetSpecificHeatOfDryGas();
         * moistureGasMolarMassRatio = moistureMolarMass/gasMolarMass;
         * }*/

        public double GetHumidityFromDryBulbWetBulbAndPressure(double dryBulbTemperature, double wetBulbTemperature, double totalPressure)
        {
            //double pSaturation = moistureProperties.GetSaturationPressure(wetBulbTemperature);
            //double saturationHumidity = moistureGasMolarMassRatio * pSaturation / (totalPressure - pSaturation);
            double saturationHumidity = GetHumidityFromDewPointAndPressure(wetBulbTemperature, totalPressure);

            double evapHeat = moistureProperties.GetEvaporationHeat(wetBulbTemperature);
            double humidity = 0.01;
            double humidity_old;
            double cpGas;
            double cpMoisture;
            double psychrometricRatio = 1.0;
            double evapHeatSigma;
            int    counter = 0;

            do
            {
                psychrometricRatio = CalculatePsychrometricRatio(dryBulbTemperature, wetBulbTemperature, humidity, totalPressure);

                evapHeatSigma = evapHeat * psychrometricRatio;
                cpGas         = gasProperties.GetSpecificHeatOfDryGas((dryBulbTemperature + wetBulbTemperature) / 2.0);
                cpMoisture    = moistureProperties.GetSpecificHeatOfVapor((dryBulbTemperature + wetBulbTemperature) / 2.0);
                humidity_old  = humidity;
                humidity      = (evapHeatSigma * saturationHumidity - cpGas * (dryBulbTemperature - wetBulbTemperature)) /
                                (evapHeatSigma + cpMoisture * (dryBulbTemperature - wetBulbTemperature));
            } while (Math.Abs(humidity - humidity_old) / humidity > 1.0e-6 && counter < 200);

            if (counter == 200)
            {
                throw new CalculationFailedException("Calculation of humidity from dry-bulb and wet-bulb temperatures failed.");
            }
            return(humidity);
        }