Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
216 changes: 216 additions & 0 deletions design/FY2021/NFP-HVACTemplateAndExpandObjectsWithEpJSON.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions doc/auxiliary-programs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@ set(INCLUDED_TEX
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/coeffconv-coeffcheck/coeffconv.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/coeffconv-coeffcheck/coeffcheck.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/coeffconv-coeffcheck/running-the-coeffconv-or-coeffcheck-programs.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/expandobjects.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/expandobjects/introduction-003.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/expandobjects/hvac-template-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/expandobjects/ground-heat-transfer-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/expandobjects/building-surface-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/introduction-003.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/hvac-template-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/ground-heat-transfer-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/building-surface-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/pyexpandobjects-hvac-template-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/pyexpandobjects-hvac-template-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/pyexpandobjects-ground-heat-transfer-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/hvactemplateexpansion/pyexpandobjects-building-surface-objects-processed.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/csvproc.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/convertesomtr.tex
${PROJECT_SOURCE_DIR}/auxiliary-programs/src/calcsoilsurftemp-program.tex
Expand Down
18 changes: 13 additions & 5 deletions doc/auxiliary-programs/auxiliary-programs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,23 @@

\input{src/coeffconv-coeffcheck/running-the-coeffconv-or-coeffcheck-programs}

\input{src/expandobjects}
\input{src/hvactemplateexpansion}

\input{src/expandobjects/introduction-003}
\input{src/hvactemplateexpansion/introduction-003}

\input{src/expandobjects/hvac-template-objects-processed}
\input{src/hvactemplateexpansion/hvac-template-objects-processed}

\input{src/expandobjects/ground-heat-transfer-objects-processed}
\input{src/hvactemplateexpansion/ground-heat-transfer-objects-processed}

\input{src/expandobjects/building-surface-objects-processed}
\input{src/hvactemplateexpansion/building-surface-objects-processed}

\input{src/hvactemplateexpansion/pyexpandobjects-introduction}

\input{src/hvactemplateexpansion/pyexpandobjects-hvac-template-objects-processed}

\input{src/hvactemplateexpansion/pyexpandobjects-ground-heat-transfer-objects-processed}

\input{src/hvactemplateexpansion/pyexpandobjects-building-surface-objects-processed}

\input{src/csvproc}

Expand Down
1 change: 0 additions & 1 deletion doc/auxiliary-programs/src/expandobjects.tex

This file was deleted.

1 change: 1 addition & 0 deletions doc/auxiliary-programs/src/hvactemplateexpansion.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\chapter{HVACTemplate Expansion}\label{hvactemplateexpansion}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\section{Building Surface Objects Processed}\label{building-surface-objects-processed}
\subsection{Building Surface Objects Processed}\label{building-surface-objects-processed}

The building surface objects that are currently modified by the ExpandObjects preprocessor are:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\section{Ground Heat Transfer Objects Processed}\label{ground-heat-transfer-objects-processed}
\subsection{Ground Heat Transfer Objects Processed}\label{ground-heat-transfer-objects-processed}

The GroundHeatTransfer objects that are currently read by the ExpandObjects preprocessor are:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\section{HVAC Template Objects Processed}\label{hvac-template-objects-processed}
\subsection{HVAC Template Objects Processed}\label{hvac-template-objects-processed}

The HVACTemplate objects that are currently read by the ExpandObjects preprocessor are:

Expand Down Expand Up @@ -31,6 +31,8 @@ \section{HVAC Template Objects Processed}\label{hvac-template-objects-processed}
HVACTemplate:System:PackagedVAV
\item
HVACTemplate:System:DedicatedOutdoorAir
\item
HVACTemplate:System:ConstantVolume
\item
HVACTemplate:Plant:ChilledWaterLoop
\item
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
\section{Introduction}\label{introduction-001}
\section{ExpandObjects}

\subsection{Introduction}\label{ExpandObjects}

The ExpandObjects program uses HVACTemplate objects in the IDF file to ``expand'' them into full fledged objects for EnergyPlus. Read more details of the systems and the individual fields in the HVACTemplate objects in the Input Output Reference document.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\subsection{Building Surface Objects Processed}\label{pyexpandobjects-building-surface-objects-processed}

No building surface objects are modified by the pyExpandObjects preprocessor.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\subsection{Ground Heat Transfer Objects Processed}\label{pyexpandobjects-ground-heat-transfer-objects-processed}

GroundHeatTransfer objects are not supported by the pyExpandObjects preprocessor.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\subsection{HVAC Template Objects Processed}\label{pyexpandobjects-hvac-template-objects-processed}

All HVACTemplate objects supported by the ExpandObjects program are supported in pyExpandObjects. Please refer to section~\ref{hvac-template-objects-processed} for further details.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
\section{pyExpandObjects}

\subsection{Introduction}\label{pyExpandObjects}

Much like the ExpandObjects program in Section~\ref{ExpandObjects}, the pyExpandObjects expands HVACTemplate objects from an input epJSON file into an expanded file that can be directly run in EnergyPlus. However, pyExpandObjects does not process GroundHeatTransfer objects or provide support for the Slab or Basement executables. Additionally, pyExpandObjects is a standalone application which means that it must be run manually to create an expanded file. Details on how to run the program can be found in the Input Output Reference Manual (Chapter 2 - HVACTemplate Objects).

The pyExpandObjects program works as a preprocessor that maps HVACTemplate objects to regular objects in EnergyPlus. This processor reads an epJSON file and generates and expanded epJSON file. No further pre-processing should be required after the conversion has been performed. Unlike ExpandObjects (Section~\ref{ExpandObjects}), a schema validation does occur when the file is read into the program, and error messages will be shown in the usual EnergyPlus error file. By default, an invalid epJSON file will stop the program, but this requirement can be removed via command line options. Documentation aimed at developers is also available at \url{https://epjson-expandobjects.readthedocs.io/} or see the '--help' command line option for further details. Additionally, the default settings produce two backup files ("<original-file-name>\_hvac\_templates.epJSON", "<original-file-name>\_base.epJSON") as well as an expanded file with an adjusted name ("<original-file-name>\_expanded.epJSON"). If the '--no-backup' option is used in the command line, then only the expanded file will be output.

The command line interface for this tool provides optional arguments to enable various features of the simulation package.

\begin{itemize}

\item
-f, --file FILE\_NAME : Specify file to expand

This argument may be omitted. A value passed to the program with no argument will be assumed to be a file name.

\item
-h, --help : Display help information

\item
-nb, --no\_backup : Do no create backup files

It is not possible to comment sections of code in JSON formatted files. Therefore, the output expanded files do not have the ability to retain the HVACTemplate objects used to create the current document. If the original file were to be overwritten, then all template data would be lost. In an attempt to provide and additional layer of backups, the -nb option is set to False by default which means two files will be created: one with HVACTemplate objects, and one with all other objects. With these files, the original input file can be created, or specific objects can be copied and pasted.

\item
-ns, --no\_schema : Skip schema validation checks for pyExpandObjects. Note, this does not skip other schema validation operations within EnergyPlus itself.

One benefit of the JSON file format is that files can be validated before simulation. This means that erroneous inputs can be found before simulation, which saves time debugging output files and reading through logs, unsure of the error source. This includes syntax errors, values that are out of range, and missing required inputs. However, situations may occur when the user wishes to skip schema validation, in which case this flag should be used. By default, schema validation is enabled.

\item
-o, --output\_directory : Specify output directory. If not provided, then input file directory is used.

\item
-l, --logger\_level LOGGER\_LEVEL: Set logging output level

Various levels of logging output are available for debugging, and other, purposes. A valid level, consistent with Python logging naming structure (i.e. DEBUG, INFO, WARNING, ERROR, CRITICAL), must be provided.

\item
-v, --version : Display version information

\item
-wl, --write-logs : Write logs to file

When this expansion tool is run from its source directory, the output can be written to a file, which is located in the logs directory (logs/base.log).
2 changes: 1 addition & 1 deletion doc/input-output-reference/src/hvac-template-objects.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\chapter{HVAC Template Objects}\label{hvac-template-objects}
\chapter{HVACTemplate Objects}\label{hvac-template-objects}

\input{src/hvac-template-objects/hvactemplate-processing}

Expand Down
Loading