Exemple #1
0
        public void HumRatio_VapPres(
            UnitSystem system,
            double vapPres,
            double pressure,
            double expectedHumRatio,
            double humRatioWithin,
            double vapPresWithin)
        {
            var psy = new Psychrometrics(system);

            Assert.Multiple(() =>
            {
                // conditions at 77 F, std atm pressure at 1000 ft; conditions at 25 C, std atm pressure at 500 m
                var calculatedHumRatio = psy.GetHumRatioFromVapPres(vapPres, pressure);
                RelativeDifference(calculatedHumRatio, expectedHumRatio, humRatioWithin, "GetHumRatioFromVapPres");
                var calculatedVapPres = psy.GetVapPresFromHumRatio(calculatedHumRatio, pressure);
                RelativeDifference(calculatedVapPres, vapPres, vapPresWithin, "GetVapPresFromHumRatio");
            });
        }