diff --git a/design/FY2020/Alternative Models for Clear Sky Emissivity Calculation.md b/design/FY2020/Alternative Models for Clear Sky Emissivity Calculation.md
new file mode 100644
index 00000000000..79427b5da3d
--- /dev/null
+++ b/design/FY2020/Alternative Models for Clear Sky Emissivity Calculation.md
@@ -0,0 +1,153 @@
+Alternative Models for Clear Sky Emissivity Calculation
+================
+
+**Xuan Luo, Tianzhen Hong, Yukai Tomsovic**
+
+**Lawrence Berkeley National Laboratory**
+
+ - Original Date: October 15, 2019
+
+## Justification for New Feature ##
+
+Sky emissivity, which represents the complex combination of the spectrally-dependent emissivity of atmospheric constituents, is fundamental to the calculation of downwelling longwave atmospheric radiation [1]. In EnergyPlus, the clear sky emissivity is used to calculated the clear sky temperature. Over the last century, researchers have proposed empirical sky emissivity models as a function of meteorological variables, including ambient temperature, water vapor pressure, or dew point temperature. The differences in these models result in large differences in estimations of thermal energy exchange that can be amplified by climate or application, such as radiative cooling [2].
+
+There are two major algorithms adopted in BPS programs, one based on the work of Clark & Allen (1978) [3], the other Martin & Berdahl (1984) [4]. Currently, EnergyPlus uses the Clark-Allen model based on a logarithmic relationship to dew point temperature, which was formulated using measurements limited to data collected over one year in San Antonio, Texas. While the original authors reported a low root mean square error (RMSE) of 10 W/m2 while used to caculate long wave radiations, studies by the International Energy Agency and Dai and Fang demonstrated that, out of the empirical models examined, Clark-Allen had among the highest high errors when tested against MODTRAN predictions and observed data, respectively [5-6]. Further illustrating the limitations of Clark-Allen, a more recent assessment by Zhang et al shows that application of this model to calculate downwelling radiation in all-sky conditions tends to result in larger errors for low altitude and humid climates [6]. Literature indicates that this model is of insufficient accuracy. However, because the accuracy of emissivity models is limited by available measured data and strongly correlated to local conditions, it is difficult to establish a clear consensus among literature of the “best” model. For example, the most accurate model presented is often the model that was developed or fitted to the same region or climate as the dataset being studied. Despite this challenge, there is convincing evidence that more appropriate models than Clark-Allen for wide application to the contiguous United States exist.
+
+We propose to add the calibrated version [7] of the Berdahl and Martin [4], Brunt [8] and Idso [9] models, identified as three models with higher accuracy compared to Clark-Allen and other existing popular models. The three models are calibrated using the radiation and meteorological measurements from the SURFRAD (Surface Radiation Budget Network) and ASOS (Automated Surface Observing System) operated by NOAA (National Oceanic and Atmospheric Administration). Currently seven SURFRAD stations are operating
+in climatologically diverse regions over the contiguous United States including Bondville (in Illinois), Boulder (in Colorado), Desert Rock (in Nevada), Fort Peck (in Montana), Goodwin Creek (in Mississippi), Penn State University (in Pennsylvania) and Sioux Falls (in South Dakota) represent the climatological diversities.
+
+This feature update would allow users to select from these three models as alternatives to Clark-Allen to calculate the sky emissivity and temperature.
+
+## E-mail and Conference Call Conclusions ##
+
+N/A
+
+## Overview ##
+
+Berdahl and Martin (1984) proposed the following relationship between dew point temperature (Td, C) and clear sky emissivity:
+
+ε = 0.711 + 0.56・(Td/100) + 0.73・(Td/100)^2 Eq. (4) Eq. (1)
+
+Brunt (1932) proposed the following relationship between partial water vapor pressure (Pw, hPa) and clear sky emissivity:
+
+ε = 0.52 + 0.065・(Pw)1/2 Eq. (2)
+
+Idso (1981) uses both partial water vapor pressure (Pw, hPa) and ambient temperature (Ta, K) in this empirical model:
+
+ε = 0.70 + 5.95・10E-5・(Pw ∙ exp(1500/Ta)) Eq. (3)
+
+These three models are among the most widely accepted models, and all show improved performance over Clark-Allen in comparisons for locations across the United States [5-6]. When analyzed against observed longwave irradiance data, irradiation calculated with these models had relative RMSEs as low as 4% [10-11]. However, in order to address the challenge of location dependence, Li et al performed a grid-search recalibration using data from seven SURFRAD stations across the United States. Their study indicates that, after calibration, the models not only improved significantly in accuracy but also can be grouped into a few families yielding the same longwave irradiance values. This suggests that one of the most important factors in the accuracy of the proposed model is the fitting dataset, for local climate and geography cause large variations in emissivity. Original formulations of these models using small datasets in one location to fit the relationship between the desired meteorological variable and sky emissivity are likely to produce large errors when applied to data outside that region [12].
+
+Newly calibrated forms of the three models proposed by Li et al are chosen for implementation in EnergyPlus. Li et al’s extensive dataset of over 30,000 data points and subsequent analysis provides conclusive results that both of these models will accurately estimate sky emissivity. The calibrated forms of Martin & Berdahl, Brunt, and Idso from Li et alare listed:
+
+Martin & Berdahl Calibrated: ε = 0.758 + 0.521・(Td/100) + 0.625・(Td/100)^2 Eq. (4)
+
+Brunt Calibrated: ε = 0.618 + 0.056・(Pw)^1/2 Eq. (5)
+
+Idso Calibrated: ε = 0.685 + 3.2・10E-5・Pw・exp(1699/Ta) Eq. (6)
+
+Table 1 summarizes studies that examined the performance of the original and calibrated forms in calculating longwave radiation (LW, W/m2), which is a function of sky emissivity and ambient temperature:
+
+LW = ε ∙ 5.6697 ∙ 10E-8 ∙ Ta4 Eq (7)
+
+**Table 1. Summary of reported clear sky atmospheric longwave radiation errors compared to observed data**
+
+| Reference | Original model RMSE (W/m2) | Calibrated model RMSE (W/m2) |
+|----------------------------------|---------------------------------|---------------------------------|
+| Brunt(1931) | 32.24 | 13.24 |
+| Idso(1981) | 14.03 | 13.18 |
+| Berdahl & Martine (1984) | 22.42 | 13.24 |
+
+This improved sky emissivity feature would allow the user to select one of the three models, the calibrated Brunt (1932), the calibrated Idso (1981), and Clark-Allen (1978) using common meteorological inputs of ambient temperature (all), dewpoint temperature (Clark-Allen), and water vapor pressure (Idso and Brunt). The user can expect errors within 4-5% or around 14 W/m2 when using these models as reported by Li et al.
+
+## Approach ##
+
+We propose to add a new field to the existing `WeatherProperty:SkyTemperature` object to indicate the model to calculate the clear sky emissivity for calculating sky temperature.
+
+```
+WeatherProperty:SkyTemperature,
+ \memo This object is used to define alternative sky temperature calculation or schedule import methods.
+ A1, \field Name
+ \note blank in this field will apply to all run periods (that is, all objects=
+ \note SizingPeriod:WeatherFileDays, SizingPeriod:WeatherFileConditionType or RunPeriod
+ \note otherwise, this name must match one of the environment object names.
+ \type object-list
+ \object-list RunPeriodsAndDesignDays
+ A2, \field Calculation Type
+ \required-field
+ \note The field indicates that the sky temperature will be imported from external schedules or calculated by alternative methods other than default.
+ \type choice
+ \key ScheduleValue
+ \key DifferenceScheduleDryBulbValue
+ \key DifferenceScheduleDewPointValue
+ \key UseBruntModel
+ \key UseIdsoModel
+ \key UseBerdahlMartinModel
+ A3; \field Schedule Name
+ \note if name matches a SizingPeriod:DesignDay, put in a day schedule of this name
+ \note if name is for a SizingPeriod:WeatherFileDays, SizingPeriod:WeatherFileConditionType or
+ \note RunPeriod, put in a full year schedule that covers the appropriate days.
+ \note Required if Calculation Type is ScheduleValue, DifferenceScheduleDryBulbValue or DifferenceScheduleDewPointValue.
+ \type object-list
+ \object-list DayScheduleNames
+ \object-list ScheduleNames
+```
+
+## Testing/Validation/Data Source(s) ##
+
+With the example file - DOE reference small office model, we will compare the sky emissivity and temperature calculation results between models.
+
+## Input Output Reference Documentation ##
+
+To be developed.
+
+## Input Description ##
+
+The `Calculation Type` field under the _WeatherProperty:SkyTemperature_ object will be modified to take two new keys as the choice:
+
+- **UseBerdahlMartinModel**
+- **UseBruntModel**
+- **UseIdsoModel**
+
+## Outputs Description ##
+
+N/A
+
+## Engineering Reference ##
+
+To be developed.
+
+## Example Files and Transition Changes ##
+
+The existing DOE reference small office model will be modified to use alternative clear sky emissivity calculation methos.
+
+No transition change is required.
+
+## References ##
+
+[1] M. Cucumo, A. De Rosa, and V. Marinelli, “Experimental testing of correlations to calculate the atmospheric ‘transparency window’ emissivity coefficient,” Sol. Energy, vol. 80, no. 8, pp. 1031–1038, Aug. 2006.
+
+[2] L. Evangelisti, C. Guattari, and F. Asdrubali, “On the sky temperature models and their influence on buildings energy performance: A critical review,” Energy Build., vol. 183, pp. 607–625, 2019.
+
+[3] G. Clark, C. Allen, "The Estimation of Atmospheric Radiation for Clear and Cloudy Skies," In Proceedings of the 2nd National Passive Solar Conference, pp. 675–678, 1978.
+
+[4] P. Berdahl, M. Martin, "Emissivity of ClearSkies," Solar Energy, 32(5), pp.663–664, 1984.
+
+[5] Q. Dai and X. Fang, “A new model for atmospheric radiation under clear sky condition at various altitudes,” Adv. Sp. Res., vol. 54, no. 6, pp. 1044–1048, Sep. 2014.
+
+[6] K. Zhang, T. P. Mcdowell, and M. Kummert, “Sky Temperature Estimation and Measurement for Longwave Radiation Calculation,” no. 3, pp. 769–778, 2017.
+
+[7] M. Li, Y. Jiang, and C. F. M. Coimbra, “On the determination of atmospheric longwave irradiance under all-sky conditions,” Sol. Energy, vol. 144, pp. 40–48, 2017.
+
+[8] D. Brunt, “Notes on Radiation in the Atmosphere,” 1932.
+
+[9] S. B. Idso, “A set of equations for full spectrum and 8-14 um thermal radiation from cloudless skies,” Water Resour. Res., vol. 17, no. 2, pp. 295–304, 1981.
+
+[10] M. Choi, J. M. Jacobs, and W. P. Kustas, “Assessment of clear and cloudy sky parameterizations for daily downwelling longwave radiation over different land surfaces in Florida, USA,” Geophys. Res. Lett., vol. 35, no. 20, 2008.
+
+[11] F. Carmona, R. Rivas, and V. Caselles, “Estimation of daytime downward longwave radiation under clear and cloudy skies conditions over a sub-humid region,” Theor. Appl. Climatol., vol. 115, no. 1–2, pp. 281–295, 2014.
+
+[12] M. G. G. Iziomon, H. Mayer, and A. Matzarakis, “Downward atmospheric longwave irradiance under clear and cloudy skies: Measurement and parameterization,” J. Atmos. Solar-Terrestrial Phys., vol. 65, no. 10, pp. 1107–1116, Jul. 2003.
+
+
+
diff --git a/doc/engineering-reference/src/climate-sky-and-solar-shading-calculations/climate-calculations.tex b/doc/engineering-reference/src/climate-sky-and-solar-shading-calculations/climate-calculations.tex
index 4f6b8cb6e96..5ae4dc01be3 100644
--- a/doc/engineering-reference/src/climate-sky-and-solar-shading-calculations/climate-calculations.tex
+++ b/doc/engineering-reference/src/climate-sky-and-solar-shading-calculations/climate-calculations.tex
@@ -60,17 +60,44 @@ \subsection{Sky Radiation Modeling}\label{sky-radiation-modeling}
Temperature\(_{drybulb}\) = drybulb temperature \{K\}
-The sky emissivity is given by
+By default, the clear sky emissivity is calculated by the Clark \& Allen (1978) model as
\begin{equation}
-Sk{y_{emissivity}} = \left( {.787 + .764\cdot \ln \left( {\frac{{Temperatur{e_{dewpoint}}}}{{273.}}} \right)} \right)\cdot \left( {1. + .0224N - .0035{N^2} + .00028{N^3}} \right)
+Sky_{clear-sky-emissivity} = 0.787 + 0.764\cdot \ln \frac {T_{dewpoint}}{T_{Kelvin}}
\end{equation}
-where
+where, T\(_{dewpoint}\) = dewpoint temperature \{K\}.
+
+Alternatively, the clear sky emissivity can also be calculated using different models set by the user from options using the \textbf{WeatherProperty:SkyTemperature} object, including the calibrated version of the Berdahl and Martin, Brunt and Idso models (2017), listed as follows.
+
+Calibrated Berdahl and Martin model:
-Temperature\(_{dewpoint}\) = dewpoint temperature \{K\}
+\begin{equation}
+Sky_{clear-sky-emissivity} = 0.711 + 0.56\cdot(T_{dewpoint} / 100) + 0.73\cdot{T_{dewpoint} / 100}^2.
+\end{equation}
-N = opaque sky cover \{tenths\}
+Calibrated Brunt model:
+
+\begin{equation}
+Sky_{clear-sky-emissivity} = 0.52 + 0.065\cdot(P_{water-vapor})^{0.5},
+\end{equation}
+
+where, P\(_{water-vapor}\) = partial water vapor pressure \{hPa\}.
+
+Calibrated Idso model:
+
+\begin{equation}
+Sky_{clear-sky-emissivity} = 0.70 + 5.95\cdot10E-5\cdot(P_{water-vapor} \cdot exp(1500/T_{drybulb})).
+\end{equation}
+
+
+Then the sky emissivity is given by:
+
+\begin{equation}
+Sky_{emissivity} = Sky_{clear-sky-emissivity} \cdot \left( {1. + .0224N - .0035{N^2} + .00028{N^3}} \right)
+\end{equation}
+
+where, N = opaque sky cover \{tenths\}
Example: Clear sky (N = 0), Temperature\(_{drybulb}\) = 273+20 = 293 K, Temperature\(_{dewpoint}\) = 273+10 = 283 K:
@@ -78,7 +105,9 @@ \subsection{Sky Radiation Modeling}\label{sky-radiation-modeling}
Horizontal\_IR = 0.815*5.6697e-8*(293**4) = 340.6 W/m\(^{2}\)
-References for these calculations are contained in the references subsection at the end of this section and include Walton (1983) and Clark and Allen (1978).
+If specified in \textbf{WeatherProperty:SkyTemperature} object, Horizontal Infrared Radiation Intensity from the weather files can also be ignored and the values can be calculated directly from the specified sky emissivity model.
+
+References for these calculations are contained in the references subsection at the end of this section and include Walton (1983), Clark and Allen (1978), and Li et al (2017).
\subsection{EnergyPlus Sky Temperature Calculation}\label{energyplus-sky-temperature-calculation}
@@ -269,6 +298,8 @@ \subsection{References}\label{references-010}
Clark, G. and C. Allen, ``The Estimation of Atmospheric Radiation for Clear and Cloudy Skies,'' Proceedings 2nd National Passive Solar Conference (AS/ISES), 1978, pp.~675-678.
+Li, M., Jiang, Y. and Coimbra, C. F. M. 2017. On the determination of atmospheric longwave irradiance under all-sky conditions. Solar Energy 144, 40–48,
+
Watanabe, T., Urano, Y., and Hayashi, T. 1983. ``Procedures for Separating Direct and Diffuse Insolation on a Horizontal Surface and Prediction of Insolation on Tilted Surfaces'' (in Japanese), Transactions, No. 330, Architectural Institute of Japan, Tokyo, Japan.
Zhang, Q.Y. and Huang, Y.J. 2002. Development of typical year weather files for Chinese locations, LBNL-51436, ASHRAE Transactions, Vol. 108, Part 2.
diff --git a/doc/input-output-reference/src/overview/group-location-climate-weather-file-access.tex b/doc/input-output-reference/src/overview/group-location-climate-weather-file-access.tex
index 19cc97b8942..3c5d3a33f8e 100644
--- a/doc/input-output-reference/src/overview/group-location-climate-weather-file-access.tex
+++ b/doc/input-output-reference/src/overview/group-location-climate-weather-file-access.tex
@@ -839,7 +839,11 @@ \subsubsection{Inputs}\label{inputs-7-013}
\subsection{WeatherProperty:SkyTemperature}\label{weatherpropertyskytemperature}
-Sky Temperature, or radiative sky temperature, is internally calculated by EnergyPlus using an algorithm using horizontal infrared radiation from sky, cloudiness factors and current temperature. The algorithm is fully described in the Engineering Reference document. For flexibility, the following object can be entered to override the internal calculations. Much of the literature describes the sky temperature as relative to either drybulb or dewpoint temperature.
+Sky Temperature, or radiative sky temperature, is internally calculated by EnergyPlus with an empirical model using sky cloudiness factors and current clear sky emissivity. For flexibility, the following object can be entered to override the entire internal sky temperature calculation from schedule import.
+
+In particular, during Weather File Run Periods, the sky temperature is derived by the horizontal infrared radiation if presented in the weather file input by default. For flexibility, the field \textbf{Use Weather File Horizontal IR} can be set to "No" to ignore horizontal IR values from the weather file and always use the specified sky model for horizontal infrared radiation and sky temperature calculations.
+
+By default, EnergyPlus calculates clear sky emissivity using Clark-Allen model. The following object can also be entered to adopt alternative sky emissivity calculation methods. Alternative methods of sky emissivity calculation include the calibrated forms of Berdahl \& Martin, Brunt, and Idso model. Their algorithms are all described in the Engineering Reference document. Much of the literature describes the sky temperature as relative to water vapor pressure, drybulb or dewpoint temperature.
\subsubsection{Inputs}\label{inputs-8-011}
@@ -849,8 +853,17 @@ \subsubsection{Inputs}\label{inputs-8-011}
\paragraph{Field: Calculation Type}\label{field-calculation-type}
-Allowable entries here are: \textbf{ScheduleValue}, \textbf{DifferenceScheduleDryBulbValue}, or \textbf{DifferenceScheduleDewPointValue}.
-In each case the following field must specify a valid schedule name.
+Allowable entries here are: \textbf{ClarkAllen}, \textbf{Brunt}, \textbf{Idso}, \textbf{BerdahlMartin}, \textbf{ScheduleValue}, \textbf{DifferenceScheduleDryBulbValue}, or \textbf{DifferenceScheduleDewPointValue}.
+
+In the case of \textbf{ScheduleValue}, \textbf{DifferenceScheduleDryBulbValue} and \textbf{DifferenceScheduleDewPointValue} the following field must specify a valid schedule name.
+
+\textbf{ClarkAllen} -- the clear sky emissivity are calculated using Clark and Allen model. This is the default model to calculate clear sky emissivity.
+
+\textbf{Brunt} -- the clear sky emissivity are calculated using Brunt model.
+
+\textbf{Idso} -- the clear sky emissivity are calculated using Idso model.
+
+\textbf{BerdahlMartin} -- the clear sky emissivity are calculated using Berdahl & Martin model.
\textbf{ScheduleValue} -- the values in the schedule are used as the sky temperature.
@@ -862,6 +875,10 @@ \subsubsection{Inputs}\label{inputs-8-011}
This field specifies a schedule name to accomplish the sky temperature calculation from the previous field. A Schedule:Day:* (i.e., \hyperref[scheduledayhourly]{Schedule:Day:Hourly}, \hyperref[scheduledayinterval]{Schedule:Day:Interval}, \hyperref[scheduledaylist]{Schedule:Day:List}) should be specified if the name in the name field matches a \hyperref[sizingperioddesignday]{SizingPeriod:DesignDay} object. If the name is one of the weather file period specifications (i.e. matches a \hyperref[sizingperiodweatherfiledays]{SizingPeriod:WeatherFileDays}, \hyperref[sizingperiodweatherfileconditiontype]{SizingPeriod:WeatherFileConditionType} or \hyperref[runperiod]{RunPeriod}), then the schedule name must match a full year schedule (i.e. \hyperref[scheduleyear]{Schedule:Year}, \hyperref[schedulecompact]{Schedule:Compact}, \hyperref[schedulefile]{Schedule:File}, or \hyperref[scheduleconstant]{Schedule:Constant}).
+\paragraph{Field: Use Weather File Horizontal IR}\label{field-use-weather-file-hori-ir}
+
+This field specifies whether or not to use the horizontal infrared radiation values from weather files if presented. The field is default to be true. If yes or blank, and the values are presented in weather file, EnergyPlus uses the values from weather file for weather calculations, otherwise it uses the specified sky model to calculate the values. If no, it always uses the specified sky model and ignores the horizontal IR values from the weather file. For \textbf{Calculation Type} = \textbf{ScheduleValue}, \textbf{ScheduleValue} or \textbf{DifferenceScheduleDewPointValue,} this field is ignored and the scheduled values are used. If this field is set to \textbf{No} but no specific sky model is declared in the field \textbf{Calculation Type}, the default sky model \textbf{ClarkAllen} is used.
+
An example of IDF usage (with DesignDay):
\begin{lstlisting}
@@ -898,6 +915,17 @@ \subsubsection{Inputs}\label{inputs-8-011}
5; !- Value Until Time 1
\end{lstlisting}
+Another example of IDF usage:
+
+\begin{lstlisting}
+WeatherProperty:SkyTemperature,
+ ,
+ UseBerdahlMartinModel, !- Calculation Type
+ ,
+ No; !- Use Weather File Horizontal IR
+\end{lstlisting}
+
+
\subsection{Site:WeatherStation}\label{siteweatherstation}
The Site:WeatherStation object is used to specify the measurement conditions for the climatic data listed in the weather file. These conditions indicate the height above ground of the air temperature sensor, the height above ground of the wind speed sensor, as well as coefficients that describe the wind speed profile due to the terrain surrounding the weather station. There are necessary correlations between the entries for this object and some entries in the Building object, specifically the \textbf{Terrain} field.
diff --git a/idd/Energy+.idd.in b/idd/Energy+.idd.in
index 31a0cd7657a..2a63cc49b75 100644
--- a/idd/Energy+.idd.in
+++ b/idd/Energy+.idd.in
@@ -1457,18 +1457,32 @@ WeatherProperty:SkyTemperature,
\object-list RunPeriodsAndDesignDays
A2, \field Calculation Type
\required-field
+ \note The field indicates that the sky temperature will be imported from external schedules or calculated by alternative methods other than default.
\type choice
+ \key ClarkAllen
+ \key Brunt
+ \key Idso
+ \key BerdahlMartin
\key ScheduleValue
\key DifferenceScheduleDryBulbValue
\key DifferenceScheduleDewPointValue
- A3; \field Schedule Name
- \required-field
+ \default ClarkAllen
+ A3, \field Schedule Name
\note if name matches a SizingPeriod:DesignDay, put in a day schedule of this name
\note if name is for a SizingPeriod:WeatherFileDays, SizingPeriod:WeatherFileConditionType or
\note RunPeriod, put in a full year schedule that covers the appropriate days.
+ \note Required if Calculation Type is ScheduleValue, DifferenceScheduleDryBulbValue or DifferenceScheduleDewPointValue.
\type object-list
\object-list DayScheduleNames
\object-list ScheduleNames
+ A4; \field Use Weather File Horizontal IR
+ \note If yes or blank, use Horizontal IR values from weather file when present, otherwise use the specified sky model.
+ \note If no, always use the specified sky model and ignore the horizontal IR values from the weather file.
+ \note For Calculation Type = ScheduleValue, DifferenceScheduleDryBulbValue or DifferenceScheduleDewPointValue, this field is ignored and the scheduled values are used.
+ \type choice
+ \default Yes
+ \key Yes
+ \key No
Site:WeatherStation,
\unique-object
diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc
index 6e04a9eadb9..aed0a1dedfe 100644
--- a/src/EnergyPlus/WeatherManager.cc
+++ b/src/EnergyPlus/WeatherManager.cc
@@ -163,10 +163,14 @@ namespace WeatherManager {
int const DDDBRangeType_Difference(2); // Design Day DryBulb Range Type = Difference Schedule
int const DDDBRangeType_Profile(3); // Design Day DryBulb Range Type = Temperature Profile
+ int const WP_ClarkAllenModel(0); // Use Clark & Allen model for sky emissivity calculation
int const WP_ScheduleValue(1); // User entered Schedule value for Weather Property
int const WP_DryBulbDelta(2); // User entered DryBulb difference Schedule value for Weather Property
int const WP_DewPointDelta(3); // User entered Dewpoint difference Schedule value for Weather Property
- int const WP_SkyTAlgorithmA(4); // place holder
+ int const WP_BruntModel(4); // Use Brunt model for sky emissivity calculation
+ int const WP_IdsoModel(5); // Use Isdo model for sky emissivity calculation
+ int const WP_BerdahlMartinModel(6); // Use Martin & Berdahl model for sky emissivity calculation
+ int const WP_SkyTAlgorithmA(7); // place holder
int const GregorianToJulian(1); // JGDate argument for Gregorian to Julian Date conversion
int const JulianToGregorian(2); // JGDate argument for Julian to Gregorian Date conversion
@@ -809,10 +813,10 @@ namespace WeatherManager {
// SUBROUTINE PARAMETER DEFINITIONS:
static std::string const RoutineName("GetNextEnvironment: ");
- static constexpr auto EnvNameFormat("Environment,{},{},{},{},{},{},{},{},{},{},{},{}\n");
+ static constexpr auto EnvNameFormat("Environment,{},{},{},{},{},{},{},{},{},{},{},{},{}\n");
static constexpr auto EnvDSTNFormat("Environment:Daylight Saving,No,{}\n");
static constexpr auto EnvDSTYFormat("Environment:Daylight Saving,Yes,{},{},{}\n");
- static ObjexxFCL::gio::Fmt DateFormat("(I2.2,'/',I2.2)");
+ static ObjexxFCL::gio::Fmt DateFormat("(I2.2,'/',I2.2)");
static ObjexxFCL::gio::Fmt DateFormatwithYear("(I2.2,'/',I2.2,'/',I4.4)");
static Array1D_string const SpecialDayNames(5, {"Holiday", "SummerDesignDay", "WinterDesignDay", "CustomDay1", "CustomDay2"});
static Array1D_string const ValidDayNames(12,
@@ -828,7 +832,14 @@ namespace WeatherManager {
"WinterDesignDay",
"CustomDay1",
"CustomDay2"});
-
+ static Array1D_string const SkyTempModelNames(7,
+ {"Clark and Allen",
+ "Schedule Value",
+ "DryBulb Difference Schedule Value",
+ "Dewpoint Difference Schedule Value",
+ "Brunt",
+ "Idso",
+ "Berdahl and Martin"});
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
//////////// hoisted into namespace changed to GetBranchInputOneTimeFlag////////////
// static bool GetInputFlag( true ); // Set to true before execution starts changed to GetEnvironmentInputOneTimeFlag
@@ -840,6 +851,7 @@ namespace WeatherManager {
std::string EnDate;
std::string string;
std::string cTotalEnvDays;
+ std::string skyTempModel;
int DSTActStMon;
int DSTActStDay;
int DSTActEnMon;
@@ -1049,7 +1061,7 @@ namespace WeatherManager {
static constexpr auto EnvironFormat(
"! ,Environment Name,Environment Type, Start Date, End Date, Start DayOfWeek, Duration {#days}, "
"Source:Start DayOfWeek, Use Daylight Saving, Use Holidays, Apply Weekend Holiday Rule, Use Rain Values, Use Snow "
- "Values\n! , Special Day Name, Special Day Type, Source, Start Date, Duration {#days}\n! "
+ "Values, Sky Temperature Model\n! , Special Day Name, Special Day Type, Source, Start Date, Duration {#days}\n! "
", Daylight Saving Indicator, Source, Start Date, End Date\n! , "
"NumberofWarmupDays");
print(outputFiles.eio, "{}\n", EnvironFormat);
@@ -1216,6 +1228,7 @@ namespace WeatherManager {
AlpUseSnow = "No";
}
cTotalEnvDays = RoundSigDigits(Environment(Envrn).TotalDays);
+ skyTempModel = SkyTempModelNames(Environment(Envrn).SkyTempModel + 1);
print(outputFiles.eio,
EnvNameFormat,
@@ -1230,7 +1243,8 @@ namespace WeatherManager {
AlpUseSpec,
ApWkRule,
AlpUseRain,
- AlpUseSnow);
+ AlpUseSnow,
+ skyTempModel);
}
if (!DoingSizing && !KickOffSimulation) {
@@ -1370,6 +1384,7 @@ namespace WeatherManager {
<< DesDayInput(Environment(Envrn).DesignDayNum).Month << DesDayInput(Environment(Envrn).DesignDayNum).DayOfMonth;
EnDate = StDate;
if (DesDayInput(Environment(Envrn).DesignDayNum).DayType <= 7 && DoWeatherInitReporting) {
+
print(outputFiles.eio,
EnvNameFormat,
Environment(Envrn).Title,
@@ -1383,7 +1398,8 @@ namespace WeatherManager {
"N/A",
"N/A",
"N/A",
- "N/A");
+ "N/A",
+ SkyTempModelNames(Environment(Envrn).SkyTempModel + 1));
} else if (DoWeatherInitReporting) {
print(outputFiles.eio,
EnvNameFormat,
@@ -1398,7 +1414,8 @@ namespace WeatherManager {
"N/A",
"N/A",
"N/A",
- "N/A");
+ "N/A",
+ SkyTempModelNames(Environment(Envrn).SkyTempModel + 1));
}
if (DesDayInput(Environment(Envrn).DesignDayNum).DSTIndicator == 0 && DoWeatherInitReporting) {
print(outputFiles.eio, EnvDSTNFormat, "SizingPeriod:DesignDay");
@@ -2599,7 +2616,7 @@ namespace WeatherManager {
SPSiteBeamSolarScheduleValue(envrnDayNum) = DDBeamSolarValues(TimeStep, HourOfDay, envrnDayNum);
SPSiteDiffuseSolarScheduleValue(envrnDayNum) = DDDiffuseSolarValues(TimeStep, HourOfDay, envrnDayNum);
}
- if (Environment(Envrn).WP_Type1 != 0) {
+ if (Environment(Envrn).SkyTempModel <= 3 || Environment(Envrn).SkyTempModel >= 1) {
SPSiteSkyTemperatureScheduleValue(envrnDayNum) = DDSkyTempScheduleValues(TimeStep, HourOfDay, envrnDayNum);
}
} else if (TotDesDays > 0) {
@@ -2801,8 +2818,6 @@ namespace WeatherManager {
bool ErrorsFound;
static Real64 CurTime;
Real64 HourRep;
- int OSky;
- Real64 TDewK;
Real64 ESky;
bool ErrorFound;
std::string ErrOut;
@@ -3483,17 +3498,21 @@ namespace WeatherManager {
TomorrowWindSpeed(CurTimeStep, Hour) = WindSpeed;
TomorrowWindDir(CurTimeStep, Hour) = WindDir;
TomorrowLiquidPrecip(CurTimeStep, Hour) = LiquidPrecip;
- TomorrowHorizIRSky(CurTimeStep, Hour) = IRHoriz;
- if (Environment(Envrn).WP_Type1 == 0) {
+ ESky = CalcSkyEmissivity(Environment(Envrn).SkyTempModel, OpaqueSkyCover, DryBulb, DewPoint, RelHum);
+ if (!Environment(Envrn).UseWeatherFileHorizontalIR || IRHoriz >= 9999.0) {
+ TomorrowHorizIRSky(CurTimeStep, Hour) = ESky * Sigma * pow_4(DryBulb + TKelvin);
+ } else {
+ TomorrowHorizIRSky(CurTimeStep, Hour) = IRHoriz;
+ }
+
+ if (Environment(Envrn).SkyTempModel > 3 || Environment(Envrn).SkyTempModel == 0) {
// Calculate sky temperature, use IRHoriz if not missing
- if (IRHoriz >= 9999.0) {
- // Missing, use sky cover
- OSky = OpaqueSkyCover;
- TDewK = min(DryBulb, DewPoint) + TKelvin;
- ESky = (0.787 + 0.764 * std::log(TDewK / TKelvin)) * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky));
+ if (!Environment(Envrn).UseWeatherFileHorizontalIR || IRHoriz >= 9999.0) {
+ // Missing or user defined to not use IRHoriz from weather, using sky cover and clear sky emissivity
SkyTemp = (DryBulb + TKelvin) * root_4(ESky) - TKelvin;
- } else { // Valid IR from Sky
+ } else {
+ // Valid IR from weather files
SkyTemp = root_4(IRHoriz / Sigma) - TKelvin;
}
} else {
@@ -3646,7 +3665,7 @@ namespace WeatherManager {
TomorrowWindSpeed(TS, Hour) = LastHrWindSpeed * WtPrevHour + Wthr.WindSpeed(Hour) * WtNow;
TomorrowWindDir(TS, Hour) = interpolateWindDirection(LastHrWindDir, Wthr.WindDir(Hour), WtNow);
TomorrowHorizIRSky(TS, Hour) = LastHrHorizIRSky * WtPrevHour + Wthr.HorizIRSky(Hour) * WtNow;
- if (Environment(Environ).WP_Type1 == 0) {
+ if (Environment(Envrn).SkyTempModel > 3 || Environment(Envrn).SkyTempModel == 0) {
TomorrowSkyTemp(TS, Hour) = LastHrSkyTemp * WtPrevHour + Wthr.SkyTemp(Hour) * WtNow;
}
TomorrowDifSolarRad(TS, Hour) =
@@ -3731,6 +3750,34 @@ namespace WeatherManager {
return (fmod(interpAng, 360.)); // fmod is float modulus function
}
+ Real64 CalcSkyEmissivity(int ESkyCalcType, Real64 OSky, Real64 DryBulb, Real64 DewPoint, Real64 RelHum){
+ // Calculate Sky Emissivity
+ // References:
+ // M. Li, Y. Jiang and C. F. M. Coimbra,
+ // "On the determination of atmospheric longwave irradiance under all-sky conditions,"
+ // Solar Energy 144, 2017, pp. 40–48,
+ // G. Clark and C. Allen, "The Estimation of Atmospheric Radiation for Clear and
+ // Cloudy Skies," Proc. 2nd National Passive Solar Conference (AS/ISES), 1978, pp. 675-678.
+
+ Real64 ESky;
+
+ if (ESkyCalcType == WP_BruntModel) {
+ double const PartialPress = RelHum * PsyPsatFnTemp(DryBulb) * 0.01;
+ ESky = 0.618 + 0.056 * pow(PartialPress, 0.5);
+ } else if (ESkyCalcType == WP_IdsoModel) {
+ double const PartialPress = RelHum * PsyPsatFnTemp(DryBulb) * 0.01;
+ ESky = 0.685 + 0.000032 * PartialPress * exp(1699 / (DryBulb + TKelvin));
+ } else if (ESkyCalcType == WP_BerdahlMartinModel) {
+ double const TDewC = min(DryBulb, DewPoint);
+ ESky = 0.758 + 0.521 * (TDewC / 100) + 0.625 * pow_2(TDewC / 100);
+ } else {
+ ESky = 0.787 + 0.764 * std::log((min(DryBulb, DewPoint) + TKelvin) / TKelvin);
+ }
+ ESky = ESky * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky));
+ return ESky;
+ }
+
+
void SetDayOfWeekInitialValues(int const EnvironDayOfWeek, // Starting Day of Week for the (Weather) RunPeriod (User Input)
int &CurDayOfWeek, // Current Day of Week
bool &UseDayOfWeek // hmmm does not appear to be used anywhere.
@@ -4191,7 +4238,6 @@ namespace WeatherManager {
int CurrentYear;
int OSky; // Opaque Sky Cover (tenths)
Real64 HumidityRatio; // Humidity Ratio -- when constant for day
- Real64 TDewK; // Dewpoint in Kelvin
Real64 ESky; // Emissivitity of Sky
Real64 CosZenith; // Cosine of Zenith Angle of Sun
Real64 TotHoriz; // Total Radiation on Horizontal Surface
@@ -4505,6 +4551,8 @@ namespace WeatherManager {
} else {
HumidityRatio = PsyWFnTdbRhPb(
TomorrowOutDryBulbTemp(TS, Hour), DDHumIndModifier(TS, Hour, EnvrnNum) / 100.0, DesDayInput(EnvrnNum).PressBarom);
+ TomorrowOutRelHum(TS, Hour) =
+ PsyRhFnTdbWPb(TomorrowOutDryBulbTemp(TS, Hour), HumidityRatio, DesDayInput(EnvrnNum).PressBarom, WeatherManager) * 100.0;
// TomorrowOutRelHum values set earlier
TomorrowOutDewPointTemp(TS, Hour) = PsyTdpFnWPb(HumidityRatio, DesDayInput(EnvrnNum).PressBarom);
}
@@ -4533,17 +4581,15 @@ namespace WeatherManager {
// G. Clark and C. Allen, "The Estimation of Atmospheric Radiation for Clear and
// Cloudy Skies," Proc. 2nd National Passive Solar Conference (AS/ISES), 1978, pp. 675-678.
- if (Environment(EnvrnNum).WP_Type1 == 0) {
- TDewK = min(TomorrowOutDryBulbTemp(TS, Hour), TomorrowOutDewPointTemp(TS, Hour)) + TKelvin;
- ESky = (0.787 + 0.764 * std::log((TDewK) / TKelvin)) * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky));
- TomorrowHorizIRSky(TS, Hour) = ESky * Sigma * pow_4(TomorrowOutDryBulbTemp(TS, Hour) + TKelvin);
- TomorrowSkyTemp(TS, Hour) = (TomorrowOutDryBulbTemp(TS, Hour) + TKelvin) * root_4(ESky) - TKelvin;
- } else {
- TDewK = min(TomorrowOutDryBulbTemp(TS, Hour), TomorrowOutDewPointTemp(TS, Hour)) + TKelvin;
- ESky = (0.787 + 0.764 * std::log((TDewK) / TKelvin)) * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky));
- TomorrowHorizIRSky(TS, Hour) = ESky * Sigma * pow_4(TomorrowOutDryBulbTemp(TS, Hour) + TKelvin);
- }
+ double DryBulb = TomorrowOutDryBulbTemp(TS, Hour);
+ double RelHum = TomorrowOutRelHum(TS, Hour) * 0.01;
+ ESky = CalcSkyEmissivity(Environment(EnvrnNum).SkyTempModel, OSky, DryBulb, TomorrowOutDewPointTemp(TS, Hour), RelHum);
+ TomorrowHorizIRSky(TS, Hour) = ESky * Sigma * pow_4(DryBulb + TKelvin);
+ if (Environment(EnvrnNum).SkyTempModel > 3 || Environment(EnvrnNum).SkyTempModel == 0) {
+ // Design day not scheduled
+ TomorrowSkyTemp(TS, Hour) = (DryBulb + TKelvin) * root_4(ESky) - TKelvin;
+ }
// Generate solar values for timestep
// working results = BeamRad and DiffRad
// stored to program globals at end of loop
@@ -7931,6 +7977,18 @@ namespace WeatherManager {
WPSkyTemperature(Item).IsSchedule = true;
units = "[deltaC]";
unitType = OutputProcessor::Unit::deltaC;
+ } else if (UtilityRoutines::SameString(cAlphaArgs(2), "Brunt")) {
+ WPSkyTemperature(Item).CalculationType = WP_BruntModel;
+ WPSkyTemperature(Item).IsSchedule = false;
+ } else if (UtilityRoutines::SameString(cAlphaArgs(2), "Idso")) {
+ WPSkyTemperature(Item).CalculationType = WP_IdsoModel;
+ WPSkyTemperature(Item).IsSchedule = false;
+ } else if (UtilityRoutines::SameString(cAlphaArgs(2), "BerdahlMartin")) {
+ WPSkyTemperature(Item).CalculationType = WP_BerdahlMartinModel;
+ WPSkyTemperature(Item).IsSchedule = false;
+ } else if (UtilityRoutines::SameString(cAlphaArgs(2), "ClarkAllen")) {
+ WPSkyTemperature(Item).CalculationType = WP_ClarkAllenModel;
+ WPSkyTemperature(Item).IsSchedule = false;
} else {
ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid " + cAlphaFieldNames(2) + '.');
ShowContinueError("...entered value=\"" + cAlphaArgs(2) +
@@ -7938,58 +7996,78 @@ namespace WeatherManager {
ErrorsFound = true;
}
- WPSkyTemperature(Item).ScheduleName = cAlphaArgs(3);
- if (Environment(Found).KindOfEnvrn == ksRunPeriodWeather || Environment(Found).KindOfEnvrn == ksRunPeriodDesign) {
+ if (WPSkyTemperature(Item).IsSchedule) {
WPSkyTemperature(Item).ScheduleName = cAlphaArgs(3);
- // See if it's a schedule.
- Found = GetScheduleIndex(cAlphaArgs(3));
- if (Found == 0) {
- ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid " + cAlphaFieldNames(3) + '.');
- ShowContinueError("...Entered name=\"" + cAlphaArgs(3) + "\".");
- ShowContinueError("...Should be a full year schedule (\"Schedule:Year\", \"Schedule:Compact\", \"Schedule:File\", or "
- "\"Schedule:Constant\" objects.");
- ErrorsFound = true;
- } else {
- WPSkyTemperature(Item).IsSchedule = true;
- WPSkyTemperature(Item).SchedulePtr = Found;
- }
- } else { // See if it's a valid schedule.
- Found = GetDayScheduleIndex(cAlphaArgs(3));
- if (Found == 0) {
- ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid " + cAlphaFieldNames(3) + '.');
- ShowContinueError("...Entered name=\"" + cAlphaArgs(3) + "\".");
- ShowContinueError(
- "...Should be a single day schedule (\"Schedule:Day:Hourly\", \"Schedule:Day:Interval\", or \"Schedule:Day:List\" objects.");
- ErrorsFound = true;
- } else {
- if (envFound != 0) {
- schPtr = FindNumberInList(Found, SPSiteScheduleNamePtr, NumSPSiteScheduleNamePtrs);
- if (schPtr == 0) {
- ++NumSPSiteScheduleNamePtrs;
- SPSiteScheduleNamePtr(NumSPSiteScheduleNamePtrs) = Found;
- SPSiteScheduleUnits(NumSPSiteScheduleNamePtrs) = units;
- SetupOutputVariable("Sizing Period Site Sky Temperature Schedule Value",
- unitType,
- SPSiteSkyTemperatureScheduleValue(envFound),
- "Zone",
- "Average",
- cAlphaArgs(3));
- } else if (SPSiteScheduleUnits(schPtr) != units) {
- ++NumSPSiteScheduleNamePtrs;
- SPSiteScheduleNamePtr(NumSPSiteScheduleNamePtrs) = Found;
- SPSiteScheduleUnits(NumSPSiteScheduleNamePtrs) = units;
- SetupOutputVariable("Sizing Period Site Sky Temperature Schedule Value",
- unitType,
- SPSiteSkyTemperatureScheduleValue(envFound),
- "Zone",
- "Average",
- cAlphaArgs(3));
- }
+ if (Environment(Found).KindOfEnvrn == ksRunPeriodWeather ||
+ Environment(Found).KindOfEnvrn == ksRunPeriodDesign) {
+ WPSkyTemperature(Item).ScheduleName = cAlphaArgs(3);
+ // See if it's a schedule.
+ Found = GetScheduleIndex(cAlphaArgs(3));
+ if (Found == 0) {
+ ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid " +
+ cAlphaFieldNames(3) + '.');
+ ShowContinueError("...Entered name=\"" + cAlphaArgs(3) + "\".");
+ ShowContinueError(
+ "...Should be a full year schedule (\"Schedule:Year\", \"Schedule:Compact\", \"Schedule:File\", or "
+ "\"Schedule:Constant\" objects.");
+ ErrorsFound = true;
+ } else {
WPSkyTemperature(Item).IsSchedule = true;
WPSkyTemperature(Item).SchedulePtr = Found;
}
+ } else { // See if it's a valid schedule.
+ Found = GetDayScheduleIndex(cAlphaArgs(3));
+ if (Found == 0) {
+ ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid " +
+ cAlphaFieldNames(3) + '.');
+ ShowContinueError("...Entered name=\"" + cAlphaArgs(3) + "\".");
+ ShowContinueError(
+ "...Should be a single day schedule (\"Schedule:Day:Hourly\", \"Schedule:Day:Interval\", or \"Schedule:Day:List\" objects.");
+ ErrorsFound = true;
+ } else {
+ if (envFound != 0) {
+ schPtr = FindNumberInList(Found, SPSiteScheduleNamePtr, NumSPSiteScheduleNamePtrs);
+ if (schPtr == 0) {
+ ++NumSPSiteScheduleNamePtrs;
+ SPSiteScheduleNamePtr(NumSPSiteScheduleNamePtrs) = Found;
+ SPSiteScheduleUnits(NumSPSiteScheduleNamePtrs) = units;
+ SetupOutputVariable("Sizing Period Site Sky Temperature Schedule Value", unitType,
+ SPSiteSkyTemperatureScheduleValue(envFound), "Zone", "Average",
+ cAlphaArgs(3));
+ } else if (SPSiteScheduleUnits(schPtr) != units) {
+ ++NumSPSiteScheduleNamePtrs;
+ SPSiteScheduleNamePtr(NumSPSiteScheduleNamePtrs) = Found;
+ SPSiteScheduleUnits(NumSPSiteScheduleNamePtrs) = units;
+ SetupOutputVariable("Sizing Period Site Sky Temperature Schedule Value", unitType,
+ SPSiteSkyTemperatureScheduleValue(envFound), "Zone", "Average",
+ cAlphaArgs(3));
+ }
+ WPSkyTemperature(Item).IsSchedule = true;
+ WPSkyTemperature(Item).SchedulePtr = Found;
+ }
+ }
}
}
+
+ if (!WPSkyTemperature(Item).IsSchedule && !lAlphaFieldBlanks(4)) {
+ if (UtilityRoutines::SameString(cAlphaArgs(4), "Yes")) {
+ WPSkyTemperature(Item).UseWeatherFileHorizontalIR = true;
+ } else if (UtilityRoutines::SameString(cAlphaArgs(4), "No")) {
+ WPSkyTemperature(Item).UseWeatherFileHorizontalIR = false;
+ } else {
+ ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid " + cAlphaFieldNames(4) + '.');
+ ShowContinueError("...entered value=\"" + cAlphaArgs(4) + "\", should be Yes or No.");
+ ErrorsFound = true;
+ }
+ } else {
+ WPSkyTemperature(Item).UseWeatherFileHorizontalIR = true;
+ }
+ }
+ for (int envrn = 1; envrn <= NumOfEnvrn; ++envrn) {
+ if (Environment(envrn).WP_Type1 != 0 && NumWPSkyTemperatures >= Environment(envrn).WP_Type1){
+ Environment(envrn).SkyTempModel = WPSkyTemperature(Environment(envrn).WP_Type1).CalculationType;
+ Environment(envrn).UseWeatherFileHorizontalIR = WPSkyTemperature(Environment(envrn).WP_Type1).UseWeatherFileHorizontalIR;
+ }
}
}
diff --git a/src/EnergyPlus/WeatherManager.hh b/src/EnergyPlus/WeatherManager.hh
index 00121337c29..40733756649 100644
--- a/src/EnergyPlus/WeatherManager.hh
+++ b/src/EnergyPlus/WeatherManager.hh
@@ -104,9 +104,13 @@ namespace WeatherManager {
extern int const DDDBRangeType_Difference; // Design Day DryBulb Range Type = Difference Schedule
extern int const DDDBRangeType_Profile; // Design Day DryBulb Range Type = Temperature Profile
+ extern int const WP_ClarkAllenModel; // Use Clark and Allen model for sky emissivity calculation
extern int const WP_ScheduleValue; // User entered Schedule value for Weather Property
extern int const WP_DryBulbDelta; // User entered DryBulb difference Schedule value for Weather Property
extern int const WP_DewPointDelta; // User entered Dewpoint difference Schedule value for Weather Property
+ extern int const WP_BruntModel; // Use Brunt model for sky emissivity calculation
+ extern int const WP_IdsoModel; // Use Isdo model for sky emissivity calculation
+ extern int const WP_BerdahlMartinModel; // Use Berdahl & Martin model for sky emissivity calculation
extern int const WP_SkyTAlgorithmA; // place holder
extern int const GregorianToJulian; // JGDate argument for Gregorian to Julian Date conversion
@@ -313,6 +317,8 @@ namespace WeatherManager {
int NumSimYears; // Total Number of times this period to be performed
int CurrentCycle; // Current cycle through weather file in NumSimYears repeats
int WP_Type1; // WeatherProperties SkyTemperature Pointer
+ int SkyTempModel; // WeatherProperties SkyTemperature CalculationType
+ bool UseWeatherFileHorizontalIR; // If false, horizontal IR and sky temperature are calculated with WP models
int CurrentYear; // Current year
bool IsLeapYear; // True if current year is leap year.
bool RollDayTypeOnRepeat; // If repeating run period, increment day type on repeat.
@@ -326,8 +332,8 @@ namespace WeatherManager {
: KindOfEnvrn(0), DesignDayNum(0), RunPeriodDesignNum(0), SeedEnvrnNum(0), HVACSizingIterationNum(0), TotalDays(0), StartJDay(0),
StartMonth(0), StartDay(0), StartYear(0), StartDate(0), EndMonth(0), EndDay(0), EndJDay(0), EndYear(0), EndDate(0), DayOfWeek(0),
UseDST(false), UseHolidays(false), ApplyWeekendRule(false), UseRain(true), UseSnow(true), MonWeekDay(12, 0), SetWeekDays(false),
- NumSimYears(1), CurrentCycle(0), WP_Type1(0), CurrentYear(0), IsLeapYear(false), RollDayTypeOnRepeat(true),
- TreatYearsAsConsecutive(true), MatchYear(false), ActualWeather(false), RawSimDays(0)
+ NumSimYears(1), CurrentCycle(0), WP_Type1(0), SkyTempModel(0), UseWeatherFileHorizontalIR(true), CurrentYear(0), IsLeapYear(false),
+ RollDayTypeOnRepeat(true), TreatYearsAsConsecutive(true), MatchYear(false), ActualWeather(false), RawSimDays(0)
{
}
};
@@ -624,9 +630,10 @@ namespace WeatherManager {
int CalculationType;
int SchedulePtr; // pointer to schedule when used
bool UsedForEnvrn;
+ bool UseWeatherFileHorizontalIR; // If false, horizontal IR and sky temperature are calculated with WP models
// Default Constructor
- WeatherProperties() : IsSchedule(true), CalculationType(0), SchedulePtr(0), UsedForEnvrn(false)
+ WeatherProperties() : IsSchedule(true), CalculationType(0), SchedulePtr(0), UsedForEnvrn(false), UseWeatherFileHorizontalIR(true)
{
}
};
@@ -789,6 +796,8 @@ namespace WeatherManager {
//------------------------------------------------------------------------------
+ Real64 CalcSkyEmissivity(int Envrn, Real64 OSky, Real64 DryBulb, Real64 DewPoint, Real64 RelHum); // Calculate sky temperature from weather data
+
void ASHRAETauModel(int const TauModelType, // ASHRAETau solar model type ASHRAE_Tau or ASHRAE_Tau2017
Real64 const ETR, // extraterrestrial normal irradiance, W/m2
Real64 const CosZen, // COS( solar zenith angle), 0 - 1
diff --git a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md
index deb5b6057cf..590c43de219 100644
--- a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md
+++ b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md
@@ -177,6 +177,24 @@ Heat Pump Source Side Mass Flow Rate
See [7489](https://github.com/NREL/EnergyPlus/pull/7489/)
+### EIO output for Environment
+
+In the eio and table output related to `Environment`, the Sky Temperature Model are now correctly reported at the end. Example:
+
+*Before:*
+```
+! ,Environment Name,Environment Type, Start Date, End Date, Start DayOfWeek, Duration {#days}, Source:Start DayOfWeek, Use Daylight Saving, Use Holidays, Apply Weekend Holiday Rule, Use Rain Values, Use Snow Values
+Environment,DENVER CENTENNIAL GOLDEN ANN HTG 99% CONDNS DB DEFAULT,SizingPeriod:DesignDay,12/21,12/21,WinterDesignDay,1,N/A,N/A,N/A,N/A,N/A,N/A
+```
+
+*After:*
+```
+! ,Environment Name,Environment Type, Start Date, End Date, Start DayOfWeek, Duration {#days}, Source:Start DayOfWeek, Use Daylight Saving, Use Holidays, Apply Weekend Holiday Rule, Use Rain Values, Use Snow Values, Sky Temperature Model
+Environment,DENVER CENTENNIAL GOLDEN ANN HTG 99% CONDNS DB DEFAULT,SizingPeriod:DesignDay,12/21,12/21,WinterDesignDay,1,N/A,N/A,N/A,N/A,N/A,N/A,Clark and Allen
+```
+
+See [#PR7562](https://github.com/NREL/EnergyPlus/pull/7562)
+
### EIO output for PerformancePrecisionTradeoffs
In the eio and table output, new lines report the status of options for the PerformancePrecisionTradeoffs object.
diff --git a/tst/EnergyPlus/unit/WeatherManager.unit.cc b/tst/EnergyPlus/unit/WeatherManager.unit.cc
index 0988770b83d..51cf3f0e30c 100644
--- a/tst/EnergyPlus/unit/WeatherManager.unit.cc
+++ b/tst/EnergyPlus/unit/WeatherManager.unit.cc
@@ -151,6 +151,34 @@ TEST_F(EnergyPlusFixture, SkyTempTest)
EXPECT_NEAR(3.02, TomorrowSkyTemp(1, 1), .001);
}
+TEST_F(EnergyPlusFixture, SkyEmissivityTest)
+{
+ // setup environment state
+ Environment.allocate(4);
+ Environment(1).SkyTempModel = WP_ClarkAllenModel;
+ Environment(2).SkyTempModel = WP_BruntModel;
+ Environment(3).SkyTempModel = WP_IdsoModel;
+ Environment(4).SkyTempModel = WP_BerdahlMartinModel;
+
+ // init local variables
+ Real64 OpagueSkyCover(0.0);
+ Real64 DryBulb(25.0);
+ Real64 DewPoint(16.7);
+ Real64 RelHum(0.6);
+
+ EXPECT_NEAR(0.832, CalcSkyEmissivity(Environment(1).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+ EXPECT_NEAR(0.862, CalcSkyEmissivity(Environment(2).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+ EXPECT_NEAR(0.867, CalcSkyEmissivity(Environment(3).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+ EXPECT_NEAR(0.862, CalcSkyEmissivity(Environment(4).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+
+ DryBulb = 5.0;
+ DewPoint = -2.13;
+ EXPECT_NEAR(0.781, CalcSkyEmissivity(Environment(1).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+ EXPECT_NEAR(0.746, CalcSkyEmissivity(Environment(2).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+ EXPECT_NEAR(0.760, CalcSkyEmissivity(Environment(3).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+ EXPECT_NEAR(0.747, CalcSkyEmissivity(Environment(4).SkyTempModel, OpagueSkyCover, DryBulb, DewPoint, RelHum), 0.001);
+}
+
TEST_F(EnergyPlusFixture, WaterMainsCorrelationTest)
{
using DataEnvironment::DayOfYear;
@@ -743,6 +771,7 @@ TEST_F(SQLiteFixture, DesignDay_EnthalphyAtMaxDB)
DesignDay.allocate(DataEnvironment::TotDesDays);
Environment(1).DesignDayNum = 1;
+ Environment(1).WP_Type1 = 0;
DataGlobals::MinutesPerTimeStep = 60;
DataGlobals::NumOfTimeStepInHour = 1;
DataGlobals::BeginSimFlag = true;