Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ccaradon/hprtu debug #245

Merged
merged 24 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
04bbe87
Patching Authorship for Documentation
rHorsey Apr 4, 2024
2106ba9
fixes to documentation
May 1, 2024
741e692
Merge remote-tracking branch 'origin/rhorsey/patch_release_2024_1_aut…
May 2, 2024
6f68102
Updating plotting scripts to sampling V2. AMI todo and EIA needs a qu…
rHorsey Sep 18, 2024
79d6ec1
Adding license to apportionment.
rHorsey Sep 18, 2024
d35ae57
Updating downloading of comstock data from s3.
rHorsey Sep 19, 2024
f7faead
Addressing Chriss comments - many thanks!
rHorsey Sep 19, 2024
2a6b506
Merge pull request #217 from NREL/rhorsey/sampling_v2_plotting_patch
rHorsey Sep 23, 2024
16f2bd1
Merge pull request #161 from NREL/documentation-fixes
rHorsey Oct 16, 2024
e39ad1b
incorporate roof insul measure; test methods for addressing min OA ai…
ChristopherCaradonna Oct 22, 2024
9ea4d95
update to address OpenStudio UnitarySystemPerformance:Multispeed FT e…
ChristopherCaradonna Oct 23, 2024
5866ea1
Merge branch 'main' into ccaradon/hprtu_debug
ChristopherCaradonna Oct 24, 2024
62640de
puts cleaning
JanghyunJK Oct 24, 2024
c40f038
rubocop autocorrection
JanghyunJK Oct 24, 2024
3a4f479
use snake_case for variable names
JanghyunJK Oct 24, 2024
2bb9c73
manual fixes from rubocop suggestion
JanghyunJK Oct 24, 2024
5094f6f
Update measure.xml
JanghyunJK Oct 24, 2024
44320ff
more format change
JanghyunJK Oct 24, 2024
f90c2ba
indent fix
JanghyunJK Oct 25, 2024
a370180
rubocop autocorrection on unit tests
JanghyunJK Oct 25, 2024
9cbf86f
more registerInfo cleanup
JanghyunJK Oct 25, 2024
355fdea
more formatting updates
JanghyunJK Oct 25, 2024
b5056b4
unit test update
JanghyunJK Oct 29, 2024
b525276
Update measure.xml
JanghyunJK Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion documentation/reference_doc/4_2_meta.tex
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,7 @@ \subsection{Space Type Ratios}
\subsection{Weather Data}
ComStock can be run with two different types of weather data: typical meteorological year (TMY3) and actual meteorological year (AMY). AMY data is the data measured during a specific year, taken from weather stations such as those at airports. Because these data are from a particular calendar year, weather patterns that span large areas, such as nationwide heat waves, are captured in the data across multiple locations. Therefore, these weather patterns are captured in the outputs of ComStock. This is important for use cases where coordinated weather patterns influence loads, such as peak load impacts for bulk power grid planning. TMY3 data, in contrast, take the ``most typical'' weather for each calendar month from a 30-year historical record and stitch these months together to form a complete year. The advantage of this method is that the weather data is less influenced by an extremely hot or cold year. However, this approach does not capture wide-area weather patterns, as the month of data used varies from location to location. For a more in-depth discussion of AMY and TMY3 weather data, see \cite{eulp_final_report}.

For geographic granularity, ComStock currently uses one weather file for each county in the United States. For counties with no weather data available (generally sparsely populated rural areas), data from the nearest weather station in the same climate zone are used. See \citep{eulp_final_report} for a more in-depth discussion of the weather data sources, cleaning process, and assignment assumptions.
For geographic granularity, ComStock currently uses one weather file for each county in the United States. For counties with no weather data available (generally sparsely populated rural areas), data from the nearest weather station in the same climate zone are used. See \citep{eulp_final_report} for a more in-depth discussion of the weather data sources, cleaning process, and assignment assumptions.

\subsection{Soil Properties}
Soil thermal conductivity and undisturbed ground temperature are location-dependent properties that are required in the ComStock model by several goethermal heat pump upgrade measures. Therefore, these properties are part of the ComStock sampling workflow and are stored as additionl properties in the building models, which can then be used by downstream measures. Soil thermal conductivity distributions by climate zone were dervied from a dataset produced by the Southern Methodist University Geothermal Lab, and are shown in Table \ref{fig:soil_conductivity} (\cite{smu_soil_conductivity}). The soil thermal conductivity values range from 0.5 to 2.6 W/m-K. Average undisturbed ground temperatures by climate zone were derived from a 2014 Oklahoma State University study and are shown in Table \ref{tab:undisturbed_ground_temp} (\cite{xing2014}).
2 changes: 1 addition & 1 deletion documentation/reference_doc/4_7_plug_and_process.tex
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ \subsection{Kitchen Equipment}

ComStock uses published data to create representative probability distributions of commercial cooking equipment counts, by building type, for both gas and electric appliances. Additionally, the equipment distributions are scaled by area to represent the non-linear scaling suggested in the literature. Although other building types likely include some degree of cooking equipment as well, such as larger offices (\cite{eia2012cbecs}), the current implementation of ComStock only includes cooking equipment in the previously-mentioned six building types plus quick service restaurants found in strip malls.

Commercial kitchens can contain electric or gas cooking equipment, or a mix of both. The prevalence of gas and electric fuel types for each equipment type and the rated powers used in ComStock are derived from a DOE study (\cite{goetzler_commercial_appliances}). These are shown in Table~\ref{tab:kitchen_prev_and_power}.
Commercial kitchens can contain electric or gas cooking equipment, or a mix of both. The prevalence of gas and electric fuel types for each equipment type used in ComStock are derived from a DOE study (\cite{goetzler_commercial_appliances}). ComStock requires rated input power values and fractions of radiant, latent, and lost heat for gas and electric kitchen equipment. These values are primarily derived from the ASHRAE Fundamentals Handbook (\cite{ashrae2017}) after comparisons with other kitchen equipment studies and commercially available products. More details about how these values were determined can be found in the End Use Savings Shapes documentation (\cite{nrel89130}).The assumptions used in ComStock for prevalence, rated input power, and fractions radiant, latent, and lost for gas and electric appliances are shown in Table~\ref{tab:kitchen_prev_and_power}.

\input{tables/kitchen_prev_and_power}

Expand Down
1 change: 1 addition & 0 deletions documentation/reference_doc/6_AppendixA.tex
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@

\input{tables/kitchen_cook_counts}

\input{tables/undisturbed_ground_temp}
10 changes: 9 additions & 1 deletion documentation/reference_doc/7_AppendixB.tex
Original file line number Diff line number Diff line change
Expand Up @@ -460,4 +460,12 @@
\centering \includegraphics[width=1.0\textwidth]{figures/refrigeration_LTnew.png}
\caption[Compressor performance for large, new, low temperature compressors]{Power and capacity values as a function of suction and discharge temperature for large, new, low-temperature compressors.}
\label{fig:refrig_lt_new}
\end{figure}
\end{figure}

\begin{figure} [ht!]
\includegraphics[width=0.8\textwidth]{figures/soil_conductivity.png}
\centering
\caption[Soil thermal conductivity distributions by climate zone]{Soil thermal conductivity distributions by climate zone.}
\label{fig:soil_conductivity}
\end{figure}

37 changes: 35 additions & 2 deletions documentation/reference_doc/bibliography.bib
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ @misc{trane_foundation
}

@misc{carrier_economiser,
title = {Carrier Economi$er},
title = {Carrier Economizer},
author = {{Carrier}},
year = 2023,
}
Expand Down Expand Up @@ -690,7 +690,7 @@ @misc{zip_to_util
}

@misc{tract_to_zip,
author = {{HUD PD&R}},
author = {{HUD PD\&R}},
institution = {U.S. Department of Housing and Urban Development Office of Policy Development and Research},
title = {HUD USPS ZIP CODE CROSSWALK FILES},
year = 2023,
Expand All @@ -714,4 +714,37 @@ @misc{atus2018
year = 2018,
howpublished = {https://www.bls.gov/tus/},
note = {Accessed: 2023-11-27}
}

@book{ashrae2017,
title = {ASHRAE Handbook - Fundamentals},
publisher = {American Society of Heating, Refrigerating, and Air-Conditioning Engineers, Inc.},
year = {2017},
address = {Atlanta}
}

@techreport{nrel89130,
author = {Marlena Praprost},
title = {End-Use Savings Shapes Measure Documentation: Electric Cooking Equipment},
institution = {National Renewable Energy Laboratory},
year = {2024},
type = {Technical Report},
number = {89130},
url = {https://www.nrel.gov/docs/fy24osti/89130.pdf}
}

@online{smu_soil_conductivity,
author = {{Dedman College of Humanities and Sciences; Roy M Huffington Department of Earth Sciences}},
title = {SMU Geothermal Lab | Data and Maps | Temperature Maps},
year = {2023},
url = {https://www.smu.edu/dedman/academics/departments/earth-sciences/research/geothermallab/datamaps/temperaturemaps},
note = {Accessed: 15 December 2023}
}

@phdthesis{xing2014,
author = {L. Xing},
title = {Estimations of Undisturbed Ground Temperatures Using Numerical and Analytical Modeling},
school = {Oklahoma State University},
address = {Stillwater, Oklahoma},
year = {2014}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions documentation/reference_doc/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
\usepackage[section]{placeins}
\usepackage{pdflscape}
\usepackage{soul}
\usepackage{biblatex}
\hypersetup{colorlinks=true}

% -----------------------------------
Expand All @@ -23,6 +24,8 @@
\author{Amy LeBar}
\author{Janghyun Kim}
\author{Lauren Klun}
\author{Eric Ringold}
\author{Wenyi Kuang}
\affil{National Renewable Energy Laboratory}

\fancypagestyle{plain}{}
Expand Down
111 changes: 95 additions & 16 deletions documentation/reference_doc/tables/kitchen_prev_and_power.tex
Original file line number Diff line number Diff line change
@@ -1,16 +1,95 @@
\begin{table}[h]
\small
\centering
\caption[Cooking Equipment Fuel Type Prevelance and Rater Power]{Cooking Equipment Fuel Type Prevelance and Rater Power}
\label{tab:kitchen_prev_and_power}
\begin{tabular}{|l|l|l|l|l|}
\hline
\textbf{Appliance} & \textbf{\% Gas} & \textbf{\% Electric} & \textbf{Rated Energy - Gas (BTU/hr)} & \textbf{Rated Energy - Electricity (kW)} \\ \hline
Broiler & 0.91 & 0.09 & 88000 & 11 \\ \hline
Fryers & 0.58 & 0.42 & 164000 & 22 \\ \hline
Griddles & 0.5 & 0.5 & 70000 & 12 \\ \hline
Ovens & 0.55 & 0.45 & 56000 & 15 \\ \hline
Ranges & 0.91 & 0.09 & 179000 & 12 \\ \hline
Steamers & 0.33 & 0.67 & 210000 & 24 \\ \hline
\end{tabular}
\end{table}
% Please add the following required packages to your document preamble:
% \usepackage{multirow}
% \usepackage{graphicx}
\begin{table}[]
\caption[Cooking Equipment Fuel Type Prevelance and Rater Power]{Cooking Equipment Fuel Type Prevelance and Rater Power}
\label{tab:kitchen_prev_and_power}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{|l|ll|ll|ll|ll|ll|}
\hline
\multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Appliance}}} &
\multicolumn{2}{c|}{\textbf{Fuel Prevalence Fraction}} &
\multicolumn{2}{c|}{\textbf{Rated Power}} &
\multicolumn{2}{c|}{\textbf{Fraction Radiant}} &
\multicolumn{2}{c|}{\textbf{Fraction Latent}} &
\multicolumn{2}{c|}{\textbf{Fraction Lost}} \\ \cline{2-11}
\multicolumn{1}{|c|}{} &
\multicolumn{1}{l|}{\textbf{Gas}} &
\textbf{Electric} &
\multicolumn{1}{l|}{\textbf{Gas (Btu/h)}} &
\textbf{Electric (kW)} &
\multicolumn{1}{l|}{\textbf{Gas}} &
\textbf{Electric} &
\multicolumn{1}{l|}{\textbf{Gas}} &
\textbf{Electric} &
\multicolumn{1}{l|}{\textbf{Gas}} &
\textbf{Electric} \\ \hline
Broiler &
\multicolumn{1}{l|}{0.91} &
0.09 &
\multicolumn{1}{l|}{96,000} &
10.8 &
\multicolumn{1}{l|}{0.12} &
0.35 &
\multicolumn{1}{l|}{0.1} &
0.1 &
\multicolumn{1}{l|}{0.68} &
0.45 \\ \hline
Griddle &
\multicolumn{1}{l|}{0.58} &
0.42 &
\multicolumn{1}{l|}{90,000} &
17.1 &
\multicolumn{1}{l|}{0.18} &
0.39 &
\multicolumn{1}{l|}{0.1} &
0.1 &
\multicolumn{1}{l|}{0.62} &
0.41 \\ \hline
Fryer &
\multicolumn{1}{l|}{0.5} &
0.5 &
\multicolumn{1}{l|}{80,000} &
14 &
\multicolumn{1}{l|}{0.23} &
0.36 &
\multicolumn{1}{l|}{0.1} &
0.1 &
\multicolumn{1}{l|}{0.57} &
0.44 \\ \hline
Oven &
\multicolumn{1}{l|}{0.55} &
0.45 &
\multicolumn{1}{l|}{44,000} &
12.1 &
\multicolumn{1}{l|}{0.08} &
0.22 &
\multicolumn{1}{l|}{0.1} &
0.1 &
\multicolumn{1}{l|}{0.72} &
0.58 \\ \hline
Range &
\multicolumn{1}{l|}{0.91} &
0.09 &
\multicolumn{1}{l|}{145,000} &
21 &
\multicolumn{1}{l|}{0.11} &
0.1 &
\multicolumn{1}{l|}{0.1} &
0.1 &
\multicolumn{1}{l|}{0.69} &
0.7 \\ \hline
Steamer &
\multicolumn{1}{l|}{0.33} &
0.67 &
\multicolumn{1}{l|}{200,000} &
27 &
\multicolumn{1}{l|}{0.1} &
0.1 &
\multicolumn{1}{l|}{0.1} &
0.1 &
\multicolumn{1}{l|}{0.7} &
0.7 \\ \hline
\end{tabular}%
}
\end{table}
28 changes: 28 additions & 0 deletions documentation/reference_doc/tables/undisturbed_ground_temp.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
% Please add the following required packages to your document preamble:
% \usepackage{graphicx}
\begin{table}[]
\centering
\caption[Average Undisturbed Ground Temperature by Climate Zone]{Average Undisturbed Ground Temperature by Climate Zone}
\label{tab:undisturbed_ground_temp}
\begin{tabular}{|l|l|}
\hline
2012 IECC Climate zone & Annual average undisturbed ground temperature (C) \\ \hline
1A & 25.9 \\ \hline
2A & 20.9 \\ \hline
2B & 25 \\ \hline
3A & 17.9 \\ \hline
3B & 19.7 \\ \hline
3C & 17 \\ \hline
4A & 14.7 \\ \hline
4B & 16.3 \\ \hline
4C & 13.3 \\ \hline
5A & 11.5 \\ \hline
5B & 12.9 \\ \hline
6A & 9 \\ \hline
6B & 9.3 \\ \hline
7A & 7 \\ \hline
7AK & 5.4 \\ \hline
7B & 6.5 \\ \hline
8AK & 2.3 \\ \hline
\end{tabular}%
\end{table}
23 changes: 12 additions & 11 deletions postprocessing/compare_comstock_to_cbecs.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ def main():
stock_estimation_version='2024R2', # Only updated when a new stock estimate is published
truth_data_version='v01' # Typically don't change this
)

# Scale ComStock run to CBECS 2018 AND remove non-ComStock buildings from CBECS
comstock.add_weights_aportioned_by_stock_estimate(apportionment=stock_estimate)
comstock.create_national_aggregation()
comstock.create_geospatially_resolved_aggregations(comstock.STATE_ID, pretty_geo_col_name='state_id')
comstock.create_geospatially_resolved_aggregations(comstock.COUNTY_ID, pretty_geo_col_name='county_id')

# CBECS
cbecs = cspp.CBECS(
Expand All @@ -46,19 +40,26 @@ def main():
color_hex='#009E73', # Color used to represent CBECS in plots
reload_from_csv=False # True if CSV already made and want faster reload times
)
# TODO Update past here including ensuring we can still apply CBECS weights on top of previous weights.


# Scale ComStock runs to the 'truth data' from StockE V3 estimates using bucket-based apportionment
comstock.add_weights_aportioned_by_stock_estimate(apportionment=stock_estimate)
# Scale ComStock run to CBECS 2018 AND remove non-ComStock buildings from CBECS
comstock.add_national_scaling_weights(cbecs, remove_non_comstock_bldg_types_from_cbecs=True)
comstock.calculate_weighted_columnal_values()
comstock.export_to_csv_wide()
# TODO This needs to be rewritten with safe column names, lazyframe usage, etc.
#comstock.calculate_weighted_columnal_values()

# Uncomment whichever to write results to disk:
comstock.create_national_aggregation()
# comstock.create_geospatially_resolved_aggregations(comstock.STATE_ID, pretty_geo_col_name='state_id')
# comstock.create_geospatially_resolved_aggregations(comstock.COUNTY_ID, pretty_geo_col_name='county_id')

# Make a comparison by passing in a list of CBECs and ComStock runs to compare
# upgrade_id can be 'All' or the upgrade number
comstock.create_plotting_lazyframe()
comp = cspp.ComStockToCBECSComparison(cbecs_list=[cbecs], comstock_list=[comstock], upgrade_id='All',make_comparison_plots=True)

comp.export_to_csv_wide()


# Code to execute the script
if __name__ == "__main__":
Expand Down
Loading