示例#1
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);
        }
示例#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);
        }