diff --git a/Psychrometrics_Engine/Compute/FromHumidityRatio.cs b/Psychrometrics_Engine/Compute/FromHumidityRatio.cs index 01fcb06..6aa1bb7 100644 --- a/Psychrometrics_Engine/Compute/FromHumidityRatio.cs +++ b/Psychrometrics_Engine/Compute/FromHumidityRatio.cs @@ -29,6 +29,7 @@ using BH.oM.Base.Attributes; using BH.oM.Base; using BH.Engine.Base; +using BH.Engine.Units; namespace BH.Engine.Psychrometrics { @@ -55,6 +56,8 @@ public static Output FromHumidit double humidityRatio, double pressure = 101325) { + dryBulbTemperature = BH.Engine.Units.Convert.ToDegreeCelsius(dryBulbTemperature); + double Density = DensityHumidityRatio(dryBulbTemperature, humidityRatio, pressure); double Enthalpy = EnthalpyHumidityRatio(dryBulbTemperature, humidityRatio); double DewPoint = DewPointHumidityRatio(dryBulbTemperature, humidityRatio, pressure); @@ -62,6 +65,9 @@ public static Output FromHumidit double SpecificVolume = SpecificVolumeHumidityRatio(dryBulbTemperature, humidityRatio, pressure); double WetBulbTemperature = WetBulbHumidityRatio(dryBulbTemperature, humidityRatio, pressure); + DewPoint = BH.Engine.Units.Convert.FromDegreeCelsius(DewPoint); + WetBulbTemperature = BH.Engine.Units.Convert.FromDegreeCelsius(WetBulbTemperature); + return new Output { Item1 = Density, diff --git a/Psychrometrics_Engine/Compute/FromRelativeHumidity.cs b/Psychrometrics_Engine/Compute/FromRelativeHumidity.cs index ca752a9..9e58430 100644 --- a/Psychrometrics_Engine/Compute/FromRelativeHumidity.cs +++ b/Psychrometrics_Engine/Compute/FromRelativeHumidity.cs @@ -29,6 +29,7 @@ using BH.oM.Base.Attributes; using BH.oM.Base; using BH.Engine.Base; +using BH.Engine.Units; namespace BH.Engine.Psychrometrics { @@ -55,6 +56,8 @@ public static Output FromRelativ double relativeHumidity, double pressure = 101325) { + dryBulbTemperature = BH.Engine.Units.Convert.ToDegreeCelsius(dryBulbTemperature); + double Density = DensityRelativeHumidity(dryBulbTemperature, relativeHumidity, pressure); double Enthalpy = EnthalpyRelativeHumidity(dryBulbTemperature, relativeHumidity, pressure); double DewPoint = DewPointRelativeHumidity(dryBulbTemperature, relativeHumidity, pressure); @@ -62,6 +65,9 @@ public static Output FromRelativ double SpecificVolume = SpecificVolumeRelativeHumidity(dryBulbTemperature, relativeHumidity, pressure); double WetBulbTemperature = WetBulbTemperatureRelativeHumidity(dryBulbTemperature, relativeHumidity, pressure); + DewPoint = BH.Engine.Units.Convert.FromDegreeCelsius(DewPoint); + WetBulbTemperature = BH.Engine.Units.Convert.FromDegreeCelsius(WetBulbTemperature); + return new Output { Item1 = Density, diff --git a/Psychrometrics_Engine/Compute/FromWetBulbTemperature.cs b/Psychrometrics_Engine/Compute/FromWetBulbTemperature.cs index 1174cb7..63b069a 100644 --- a/Psychrometrics_Engine/Compute/FromWetBulbTemperature.cs +++ b/Psychrometrics_Engine/Compute/FromWetBulbTemperature.cs @@ -29,6 +29,7 @@ using BH.oM.Base.Attributes; using BH.oM.Base; using BH.Engine.Base; +using BH.Engine.Units; namespace BH.Engine.Psychrometrics { @@ -55,6 +56,9 @@ public static Output FromWetBulb double wetBulbTemperature, double pressure = 101325) { + dryBulbTemperature = BH.Engine.Units.Convert.ToDegreeCelsius(dryBulbTemperature); + wetBulbTemperature = BH.Engine.Units.Convert.ToDegreeCelsius(wetBulbTemperature); + double Density = DensityWetBulbTemperature(dryBulbTemperature, wetBulbTemperature, pressure); double Enthalpy = EnthalpyWetBulbTemperature(dryBulbTemperature, wetBulbTemperature, pressure); double DewPoint = DewPointWetBulbTemperature(dryBulbTemperature, wetBulbTemperature, pressure); @@ -62,6 +66,8 @@ public static Output FromWetBulb double RelativeHumidity = RelativeHumidityWetBulbTemperature(dryBulbTemperature, wetBulbTemperature, pressure); double SpecificVolume = SpecificVolumeWetBulbTemperature(dryBulbTemperature, wetBulbTemperature, pressure); + DewPoint = BH.Engine.Units.Convert.FromDegreeCelsius(DewPoint); + return new Output { Item1 = Density,